mage-engine 3.23.17 → 3.23.20
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.
- package/dist/mage.js +18 -4
- package/package.json +1 -1
package/dist/mage.js
CHANGED
|
@@ -56835,6 +56835,7 @@ var Physics$1 = new Physics();var Scene = /*#__PURE__*/function () {
|
|
|
56835
56835
|
var fog = Config$1.fog();
|
|
56836
56836
|
this.scene = new Scene$2();
|
|
56837
56837
|
this.scene.name = name;
|
|
56838
|
+
this.elements = [];
|
|
56838
56839
|
|
|
56839
56840
|
if (fog.enabled) {
|
|
56840
56841
|
this.fog(fog.color, fog.density);
|
|
@@ -56968,7 +56969,9 @@ var Physics$1 = new Physics();var Scene = /*#__PURE__*/function () {
|
|
|
56968
56969
|
// destroy renderer
|
|
56969
56970
|
this.renderer.dispose(); // remove listener to resize
|
|
56970
56971
|
|
|
56971
|
-
this.detachListeners();
|
|
56972
|
+
this.detachListeners(); // clear elements array
|
|
56973
|
+
|
|
56974
|
+
this.elements = [];
|
|
56972
56975
|
}
|
|
56973
56976
|
}, {
|
|
56974
56977
|
key: "createCamera",
|
|
@@ -58254,7 +58257,7 @@ function applyMiddleware() {
|
|
|
58254
58257
|
|
|
58255
58258
|
var thunk = createThunkMiddleware();
|
|
58256
58259
|
thunk.withExtraArgument = createThunkMiddleware;var name$1 = "mage-engine";
|
|
58257
|
-
var version$1 = "3.23.
|
|
58260
|
+
var version$1 = "3.23.20";
|
|
58258
58261
|
var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
|
|
58259
58262
|
var main = "dist/mage.js";
|
|
58260
58263
|
var author$1 = {
|
|
@@ -90990,6 +90993,9 @@ var Level = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
90990
90993
|
}, {
|
|
90991
90994
|
key: "onCreate",
|
|
90992
90995
|
value: function onCreate() {}
|
|
90996
|
+
}, {
|
|
90997
|
+
key: "onStart",
|
|
90998
|
+
value: function onStart() {}
|
|
90993
90999
|
}, {
|
|
90994
91000
|
key: "onUpdate",
|
|
90995
91001
|
value: function onUpdate() {}
|
|
@@ -93307,7 +93313,11 @@ var Importer = /*#__PURE__*/function () {
|
|
|
93307
93313
|
_this.getCurrentLevel().init();
|
|
93308
93314
|
|
|
93309
93315
|
storage.load().then(Importer.parseLevelData).then(function () {
|
|
93310
|
-
|
|
93316
|
+
if (_this.getCurrentLevel().onStart instanceof Function) {
|
|
93317
|
+
_this.getCurrentLevel().onStart();
|
|
93318
|
+
}
|
|
93319
|
+
|
|
93320
|
+
resolve(_this.getCurrentLevel());
|
|
93311
93321
|
});
|
|
93312
93322
|
} else {
|
|
93313
93323
|
Physics$1.waitForState(PHYSICS_STATES.READY).then(function () {
|
|
@@ -93317,7 +93327,11 @@ var Importer = /*#__PURE__*/function () {
|
|
|
93317
93327
|
|
|
93318
93328
|
var levelData = Config$1.getLevelData(_this.getCurrentLevel().getPath()) || {};
|
|
93319
93329
|
Importer.importLevelSnapshot(levelData).then(function () {
|
|
93320
|
-
|
|
93330
|
+
if (_this.getCurrentLevel().onStart instanceof Function) {
|
|
93331
|
+
_this.getCurrentLevel().onStart();
|
|
93332
|
+
}
|
|
93333
|
+
|
|
93334
|
+
resolve(_this.getCurrentLevel());
|
|
93321
93335
|
}).catch(reject);
|
|
93322
93336
|
});
|
|
93323
93337
|
}
|