@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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. 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
- for (const shapeDef of shapes) {
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/renderer",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"