mage-engine 3.23.11 → 3.23.12

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 +8 -2
  2. package/package.json +1 -1
package/dist/mage.js CHANGED
@@ -55039,6 +55039,7 @@ var Config$1 = new Config();var Universe = /*#__PURE__*/function () {
55039
55039
  }, {
55040
55040
  key: "find",
55041
55041
  value: function find(element) {
55042
+ if (!element) return;
55042
55043
  var found;
55043
55044
  this.forEach(function (el) {
55044
55045
  if (el.has(element) && !found) {
@@ -57798,7 +57799,7 @@ function applyMiddleware() {
57798
57799
 
57799
57800
  var thunk = createThunkMiddleware();
57800
57801
  thunk.withExtraArgument = createThunkMiddleware;var name$1 = "mage-engine";
57801
- var version$1 = "3.23.11";
57802
+ var version$1 = "3.23.12";
57802
57803
  var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
57803
57804
  var main = "dist/mage.js";
57804
57805
  var author$1 = {
@@ -60267,7 +60268,8 @@ var tweenTo = function tweenTo(origin, target) {
60267
60268
  this.isMage = true;
60268
60269
  this.parent = false;
60269
60270
  this.tags = [DEFAULT_TAG];
60270
- }
60271
+ } // TODO: this is ridiculous, it's introducing a 200ms delay for no reason if delay is missing.
60272
+
60271
60273
  }, {
60272
60274
  key: "waitForBody",
60273
60275
  value: function waitForBody() {
@@ -60366,6 +60368,8 @@ var tweenTo = function tweenTo(origin, target) {
60366
60368
  }, {
60367
60369
  key: "isParentOf",
60368
60370
  value: function isParentOf(child) {
60371
+ if (!child) return false;
60372
+
60369
60373
  var comparator = function comparator(child) {
60370
60374
  return !!child.getBody().getObjectById(child.id);
60371
60375
  };
@@ -60381,6 +60385,8 @@ var tweenTo = function tweenTo(origin, target) {
60381
60385
  }, {
60382
60386
  key: "has",
60383
60387
  value: function has(child) {
60388
+ if (!child) return false;
60389
+
60384
60390
  if (child.isMage) {
60385
60391
  return this.equals(child) || this.isParentOf(child);
60386
60392
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mage-engine",
3
- "version": "3.23.11",
3
+ "version": "3.23.12",
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": {