Fixed an issue where filtered objects were incorrectly ignored by the section planes
This commit is contained in:
@@ -210,10 +210,16 @@ export default class SpeckleRenderer {
|
||||
|
||||
public updateClippingPlanes(planes: Plane[]) {
|
||||
if (!this.allObjects) return
|
||||
/** This will be done via the batches in the near future */
|
||||
this.allObjects.traverse((object) => {
|
||||
const material = (object as unknown as { material }).material
|
||||
if (material) {
|
||||
if (!material) return
|
||||
if (!Array.isArray(material)) {
|
||||
material.clippingPlanes = planes
|
||||
} else {
|
||||
for (let k = 0; k < material.length; k++) {
|
||||
material[k].clippingPlanes = planes
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user