@expofp/renderer 2.1.0 → 2.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.
Files changed (2) hide show
  1. package/dist/index.js +14 -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);
@@ -4783,6 +4785,7 @@ class CameraController extends CameraControls {
4783
4785
  */
4784
4786
  constructor(camera) {
4785
4787
  super(camera);
4788
+ __publicField(this, "touchCancelListener");
4786
4789
  this.dollyToCursor = true;
4787
4790
  this.draggingSmoothTime = 0;
4788
4791
  void this.rotatePolarTo(0, false);
@@ -4797,6 +4800,7 @@ class CameraController extends CameraControls {
4797
4800
  two: CameraController.ACTION.NONE,
4798
4801
  three: CameraController.ACTION.NONE
4799
4802
  };
4803
+ this.touchCancelListener = () => this.cancel();
4800
4804
  }
4801
4805
  update(delta) {
4802
4806
  const needsUpdate = super.update(delta);
@@ -4809,6 +4813,15 @@ class CameraController extends CameraControls {
4809
4813
  }
4810
4814
  return needsUpdate;
4811
4815
  }
4816
+ connect(domElement) {
4817
+ super.connect(domElement);
4818
+ domElement.addEventListener("touchcancel", this.touchCancelListener);
4819
+ }
4820
+ disconnect() {
4821
+ var _a2;
4822
+ (_a2 = this._domElement) == null ? void 0 : _a2.removeEventListener("touchcancel", this.touchCancelListener);
4823
+ super.disconnect();
4824
+ }
4812
4825
  }
4813
4826
  class CameraSystem {
4814
4827
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/renderer",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"