three-zoo 0.11.6 → 0.11.7
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/index.js
CHANGED
|
@@ -362,17 +362,15 @@ class InstancedMeshPool {
|
|
|
362
362
|
instance.index = -1;
|
|
363
363
|
this["notifyUpdate"](entry);
|
|
364
364
|
}
|
|
365
|
-
sortMeshes(compare) {
|
|
365
|
+
sortMeshes(baseRenderOrder, compare) {
|
|
366
366
|
const meshes = [];
|
|
367
367
|
for (const entry of this._private_meshes.values()) {
|
|
368
368
|
meshes.push(entry.mesh);
|
|
369
369
|
}
|
|
370
370
|
meshes.sort(compare);
|
|
371
|
+
let currentRenderOrder = baseRenderOrder;
|
|
371
372
|
for (const mesh of meshes) {
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
for (const mesh of meshes) {
|
|
375
|
-
this._private_scene.add(mesh);
|
|
373
|
+
mesh.renderOrder = currentRenderOrder++;
|
|
376
374
|
}
|
|
377
375
|
}
|
|
378
376
|
_private_getOrCreateEntry(geometry, material) {
|