Skip to content

Commit

Permalink
fix: add guard check for clipping planes object materials
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Jul 4, 2024
1 parent 30e8ef0 commit 8edc0cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thatopen/components",
"description": "Collection of core functionalities to author BIM apps.",
"version": "2.0.21",
"version": "2.0.22",
"author": "That Open Company",
"contributors": [
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/core/Clipper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ export class Clipper
world.renderer.updateClippingPlanes();
const { clippingPlanes } = world.renderer;
for (const model of world.meshes) {
if (!model.material) {
continue;
}
if (Array.isArray(model.material)) {
for (const mat of model.material) {
mat.clippingPlanes = clippingPlanes;
Expand Down

0 comments on commit 8edc0cc

Please sign in to comment.