@mml-io/3d-web-client-core 0.0.0-experimental-4ec4338-20250205 → 0.0.0-experimental-a28e2f4-20250207
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/build/index.js +29 -11
- package/build/index.js.map +2 -2
- package/package.json +3 -3
package/build/index.js
CHANGED
@@ -5985,23 +5985,41 @@ var CollisionsManager = class {
|
|
5985
5985
|
group.traverse((child) => {
|
5986
5986
|
const asMesh = child;
|
5987
5987
|
if (asMesh.isMesh) {
|
5988
|
-
const
|
5989
|
-
if (
|
5988
|
+
const asInstancedMesh = asMesh;
|
5989
|
+
if (asInstancedMesh.isInstancedMesh) {
|
5990
|
+
for (let i = 0; i < asInstancedMesh.count; i++) {
|
5991
|
+
const clonedGeometry = asInstancedMesh.geometry.clone();
|
5992
|
+
for (const key in clonedGeometry.attributes) {
|
5993
|
+
if (key !== "position") {
|
5994
|
+
clonedGeometry.deleteAttribute(key);
|
5995
|
+
}
|
5996
|
+
}
|
5997
|
+
clonedGeometry.applyMatrix4(
|
5998
|
+
this.tempMatrix2.fromArray(asInstancedMesh.instanceMatrix.array, i * 16)
|
5999
|
+
);
|
6000
|
+
if (clonedGeometry.index) {
|
6001
|
+
geometries.push(clonedGeometry.toNonIndexed());
|
6002
|
+
} else {
|
6003
|
+
geometries.push(clonedGeometry);
|
6004
|
+
}
|
6005
|
+
}
|
6006
|
+
} else {
|
6007
|
+
const clonedGeometry = asMesh.geometry.clone();
|
5990
6008
|
asMesh.updateWorldMatrix(true, false);
|
6009
|
+
for (const key in clonedGeometry.attributes) {
|
6010
|
+
if (key !== "position") {
|
6011
|
+
clonedGeometry.deleteAttribute(key);
|
6012
|
+
}
|
6013
|
+
}
|
5991
6014
|
clonedGeometry.applyMatrix4(
|
5992
6015
|
this.tempMatrix2.multiplyMatrices(invertedRootMatrix, asMesh.matrixWorld)
|
5993
6016
|
);
|
5994
|
-
|
5995
|
-
|
5996
|
-
|
5997
|
-
|
6017
|
+
if (clonedGeometry.index) {
|
6018
|
+
geometries.push(clonedGeometry.toNonIndexed());
|
6019
|
+
} else {
|
6020
|
+
geometries.push(clonedGeometry);
|
5998
6021
|
}
|
5999
6022
|
}
|
6000
|
-
if (clonedGeometry.index) {
|
6001
|
-
geometries.push(clonedGeometry.toNonIndexed());
|
6002
|
-
} else {
|
6003
|
-
geometries.push(clonedGeometry);
|
6004
|
-
}
|
6005
6023
|
}
|
6006
6024
|
});
|
6007
6025
|
const newBufferGeometry = BufferGeometryUtils.mergeGeometries(geometries, false);
|