mage-engine 3.25.3 → 3.25.4

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/mage.js +11 -5
  2. package/package.json +1 -1
package/dist/mage.js CHANGED
@@ -59857,11 +59857,17 @@ let Controls = /*#__PURE__*/function (_EventDispatcher) {
59857
59857
  await Physics$1.init();
59858
59858
 
59859
59859
  // Entities loaded before physics was enabled had their
59860
- // enablePhysics() calls silently skipped. Now that the
59861
- // worker is ready, add every entity that has pending
59862
- // physics options to the world.
59860
+ // enablePhysics() calls silently skipped (or the worker
59861
+ // message was dropped because the worker wasn't ready yet).
59862
+ // Now that the worker is ready, re-add every entity that
59863
+ // has pending physics options. Clear stale entries first
59864
+ // so the hasElement check doesn't incorrectly skip
59865
+ // elements whose worker message was silently dropped.
59863
59866
  Universe$1.forEach(element => {
59864
- if (element._physicsEnabled && !Physics$1.hasElement(element)) {
59867
+ if (element._physicsEnabled) {
59868
+ if (Physics$1.hasElement(element)) {
59869
+ Physics$1.removeElement(element);
59870
+ }
59865
59871
  Physics$1.add(element, element.getPhysicsOptions());
59866
59872
  }
59867
59873
  });
@@ -61295,7 +61301,7 @@ function applyMiddleware() {
61295
61301
 
61296
61302
  var thunk = createThunkMiddleware();
61297
61303
  thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
61298
- var version$1 = "3.25.3";
61304
+ var version$1 = "3.25.4";
61299
61305
  var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
61300
61306
  var main = "dist/mage.js";
61301
61307
  var author$1 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mage-engine",
3
- "version": "3.25.3",
3
+ "version": "3.25.4",
4
4
  "description": "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.",
5
5
  "main": "dist/mage.js",
6
6
  "author": {