mage-engine 3.23.41 → 3.23.42

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 +14 -2
  2. package/package.json +1 -1
package/dist/mage.js CHANGED
@@ -58204,7 +58204,7 @@ function applyMiddleware() {
58204
58204
 
58205
58205
  var thunk = createThunkMiddleware();
58206
58206
  thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
58207
- var version$1 = "3.23.41";
58207
+ var version$1 = "3.23.42";
58208
58208
  var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
58209
58209
  var main = "dist/mage.js";
58210
58210
  var author$1 = {
@@ -60856,7 +60856,19 @@ const tweenTo = function (origin, target) {
60856
60856
 
60857
60857
  _defineProperty$1(_assertThisInitialized(_this), "setUuid", uuid => {
60858
60858
  if (uuid) {
60859
- _this.body.uuid = uuid;
60859
+ const oldUuid = _this.body.uuid;
60860
+ _this.body.uuid = uuid; // Re-register in Universe under the new UUID so that
60861
+ // Universe.getByUUID(newUuid) works after the Importer
60862
+ // restores an entity's persisted UUID.
60863
+
60864
+ if (oldUuid !== uuid) {
60865
+ const registered = Universe$1.getByUUID(oldUuid);
60866
+
60867
+ if (registered) {
60868
+ Universe$1.remove(oldUuid);
60869
+ Universe$1.set(uuid, registered);
60870
+ }
60871
+ }
60860
60872
  }
60861
60873
  });
60862
60874
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mage-engine",
3
- "version": "3.23.41",
3
+ "version": "3.23.42",
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": {