mage-engine 3.23.25 → 3.23.26

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 +28 -15
  2. package/package.json +1 -1
package/dist/mage.js CHANGED
@@ -55803,19 +55803,21 @@ var isLevelName = function isLevelName(level) {
55803
55803
 
55804
55804
  var loader = _this.getLoaderByType(loaderType);
55805
55805
 
55806
- return new Promise(function (resolve, reject) {
55806
+ return new Promise(function (resolve) {
55807
55807
  try {
55808
55808
  loader.load(path, function (asset) {
55809
55809
  _this.add(id, asset);
55810
55810
 
55811
55811
  resolve(asset);
55812
- }, function () {}, function () {
55813
- console.log(ERROR_LOADING_TEXTURE, name, path);
55814
- resolve();
55812
+ }, function () {}, function (error) {
55813
+ // Log warning but resolve anyway to allow other assets to continue loading
55814
+ console.warn("[Mage] ".concat(ERROR_LOADING_TEXTURE), name, path, (error === null || error === void 0 ? void 0 : error.message) || "");
55815
+ resolve(null);
55815
55816
  });
55816
55817
  } catch (e) {
55817
- console.log(ERROR_LOADING_TEXTURE, name, path);
55818
- reject();
55818
+ // Log warning but resolve anyway to allow other assets to continue loading
55819
+ console.warn("[Mage] ".concat(ERROR_LOADING_TEXTURE), name, path, (e === null || e === void 0 ? void 0 : e.message) || "");
55820
+ resolve(null);
55819
55821
  }
55820
55822
  });
55821
55823
  });
@@ -58295,7 +58297,7 @@ function applyMiddleware() {
58295
58297
 
58296
58298
  var thunk = createThunkMiddleware();
58297
58299
  thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
58298
- var version$1 = "3.23.25";
58300
+ var version$1 = "3.23.26";
58299
58301
  var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
58300
58302
  var main = "dist/mage.js";
58301
58303
  var author$1 = {
@@ -70377,15 +70379,22 @@ var Audio = /*#__PURE__*/function () {
70377
70379
  request.responseType = "arraybuffer";
70378
70380
 
70379
70381
  request.onreadystatechange = function (e) {
70380
- if (request.readyState === 4 && request.status === 200) {
70381
- _this.context.decodeAudioData(request.response, function (buffer) {
70382
- _this.buffersMap[id] = buffer;
70383
- resolve();
70384
- }, function () {
70382
+ if (request.readyState === 4) {
70383
+ if (request.status === 200) {
70384
+ _this.context.decodeAudioData(request.response, function (buffer) {
70385
+ _this.buffersMap[id] = buffer;
70386
+ resolve();
70387
+ }, function () {
70388
+ _this.buffersMap[id] = null;
70389
+ console.error(ASSETS_AUDIO_FILE_LOAD_FAIL);
70390
+ resolve();
70391
+ });
70392
+ } else {
70393
+ // Handle HTTP errors (404, etc.) - log warning and continue
70394
+ console.warn("[Mage] Failed to load audio \"".concat(id, "\" from ").concat(resolvedPath, ": HTTP ").concat(request.status));
70385
70395
  _this.buffersMap[id] = null;
70386
- console.error(ASSETS_AUDIO_FILE_LOAD_FAIL);
70387
70396
  resolve();
70388
- });
70397
+ }
70389
70398
  }
70390
70399
  };
70391
70400
 
@@ -81128,7 +81137,11 @@ var Models = /*#__PURE__*/function (_EventDispatcher) {
81128
81137
  }
81129
81138
 
81130
81139
  resolve(parsedModel);
81131
- }, NOOP, NOOP);
81140
+ }, NOOP, function (error) {
81141
+ // Log error but resolve anyway to allow other assets to continue loading
81142
+ console.warn("[Mage] Failed to load model \"".concat(name, "\" from ").concat(resolvedPath, ":"), (error === null || error === void 0 ? void 0 : error.message) || error);
81143
+ resolve(null);
81144
+ });
81132
81145
  });
81133
81146
  });
81134
81147
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mage-engine",
3
- "version": "3.23.25",
3
+ "version": "3.23.26",
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": {