@expofp/renderer 2.1.0 → 2.1.1
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 +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1806,7 +1806,9 @@ class MeshSystem extends RenderableSystem {
|
|
|
1806
1806
|
const rotation = new Quaternion();
|
|
1807
1807
|
const scale = new Vector3();
|
|
1808
1808
|
const matrix = new Matrix4();
|
|
1809
|
-
|
|
1809
|
+
const [rects, polygons] = partition(shapes, (shapeDef) => shapeDef.shape instanceof Rect);
|
|
1810
|
+
const sortedShapes = [...rects, ...polygons];
|
|
1811
|
+
for (const shapeDef of sortedShapes) {
|
|
1810
1812
|
let instanceId = void 0;
|
|
1811
1813
|
if (shapeDef.shape instanceof Rect && rectGeometryId !== void 0) {
|
|
1812
1814
|
instanceId = batchedMesh.addInstance(rectGeometryId);
|