@combeenation/3d-viewer 12.1.1 → 12.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib-cjs/api/classes/element.js +2 -1
- package/dist/lib-cjs/api/classes/element.js.map +1 -1
- package/dist/lib-cjs/api/util/babylonHelper.js +1 -1
- package/dist/lib-cjs/api/util/babylonHelper.js.map +1 -1
- package/dist/lib-cjs/buildinfo.json +1 -1
- package/dist/lib-cjs/commonjs.tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/api/classes/element.ts +2 -1
- package/src/api/util/babylonHelper.ts +1 -1
package/package.json
CHANGED
|
@@ -34,6 +34,7 @@ import { PBRMaterial } from '@babylonjs/core/Materials/PBR/pbrMaterial';
|
|
|
34
34
|
import { Material } from '@babylonjs/core/Materials/material';
|
|
35
35
|
import { Color3 } from '@babylonjs/core/Maths/math.color';
|
|
36
36
|
import { AbstractMesh } from '@babylonjs/core/Meshes/abstractMesh';
|
|
37
|
+
import { InstancedMesh } from '@babylonjs/core/Meshes/instancedMesh';
|
|
37
38
|
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
38
39
|
import { TransformNode } from '@babylonjs/core/Meshes/transformNode';
|
|
39
40
|
import { Tags } from '@babylonjs/core/Misc/tags';
|
|
@@ -78,7 +79,7 @@ export class Element extends VariantParameterizable {
|
|
|
78
79
|
// this can only be done after the cloning process of the whole tree is finished, as we can't be sure if all
|
|
79
80
|
// instanced meshes or all sources meshes are cloning prior
|
|
80
81
|
const reassignSourceMesh = (node: TransformNode) => {
|
|
81
|
-
if (node
|
|
82
|
+
if (node instanceof InstancedMesh) {
|
|
82
83
|
// find the cloned instance and source mesh
|
|
83
84
|
const clonedInstance = node as InstancedMesh;
|
|
84
85
|
const originalInstance = clonedInstance.metadata.cloneSource as InstancedMesh;
|
|
@@ -114,7 +114,7 @@ const cloneTransformNode = function (
|
|
|
114
114
|
// if the cloned node is of type InstancedMesh, due to a bug(?),
|
|
115
115
|
// the InstancedMesh.isEnabled state may have changed after cloning.
|
|
116
116
|
// in that case, set the clone's enabled state to the original's state
|
|
117
|
-
if (node
|
|
117
|
+
if (node instanceof InstancedMesh) {
|
|
118
118
|
clone.setEnabled(node.isEnabled(false));
|
|
119
119
|
|
|
120
120
|
// tags are not cloned for instanced meshes by default
|