reverted to section planes in material rather than renderer

This commit is contained in:
NGimbal
2021-02-10 21:52:37 -05:00
parent bf64f7f003
commit 166af0956e
4 changed files with 43 additions and 43 deletions
@@ -78,8 +78,7 @@ export default class SceneObjectManager {
// Is it a transparent material?
if ( renderMat.opacity !== 1 ) {
let material = this.transparentMaterial.clone()
// material.clippingPlanes = this.viewer.sectionPlaneHelper.planes
// material.clippingPlanes = this.viewer.sectionBox.planes.map(p => p.plane)
material.clippingPlanes = this.viewer.sectionBox.planes.map(p => p.plane)
material.color = color
material.opacity = renderMat.opacity !== 0 ? renderMat.opacity : 0.2
@@ -88,8 +87,7 @@ export default class SceneObjectManager {
// It's not a transparent material!
} else {
let material = this.solidMaterial.clone()
// material.clippingPlanes = this.viewer.sectionPlaneHelper.planes
// material.clippingPlanes = this.viewer.sectionBox.planes.map(p => p.plane)
material.clippingPlanes = this.viewer.sectionBox.planes.map(p => p.plane)
material.color = color
material.metalness = renderMat.metalness
@@ -100,8 +98,7 @@ export default class SceneObjectManager {
} else {
// If we don't have defined material, just use the default
let material = this.solidMaterial.clone()
// material.clippingPlanes = this.viewer.sectionPlaneHelper.planes
// material.clippingPlanes = this.viewer.sectionBox.planes.map(p => p.plane)
material.clippingPlanes = this.viewer.sectionBox.planes.map(p => p.plane)
this.addSolid( wrapper, material )
}