@galacean/effects 1.0.0 → 1.0.1

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/weapp.mjs CHANGED
@@ -9447,6 +9447,7 @@ var Transform = /** @class */ (function () {
9447
9447
  */
9448
9448
  Transform.prototype.rotateByQuat = function (quat) {
9449
9449
  quatMultiply(this.quat, this.quat, quat);
9450
+ rotationFromMat3(this.rotation, mat3FromQuat(tempMat3$3, quat));
9450
9451
  this.dirtyFlags.localData = true;
9451
9452
  this.dispatchValueChange();
9452
9453
  };
@@ -10273,7 +10274,7 @@ var PluginSystem = /** @class */ (function () {
10273
10274
  .map(function (name) {
10274
10275
  var CTRL = pluginLoaderMap[name];
10275
10276
  if (!CTRL) {
10276
- throw new Error("plugin '".concat(name, "' not found"));
10277
+ throw new Error("plugin '".concat(name, "' not found.") + getPluginUsageInfo(name));
10277
10278
  }
10278
10279
  var loader = new CTRL();
10279
10280
  loader.name = name;
@@ -10345,6 +10346,23 @@ var PluginSystem = /** @class */ (function () {
10345
10346
  };
10346
10347
  return PluginSystem;
10347
10348
  }());
10349
+ var pluginInfoMap = {
10350
+ 'alipay-downgrade': '@galacean/effects-plugin-alipay-downgrade',
10351
+ 'editor-gizmo': '@galacean/effects-plugin-editor-gizmo',
10352
+ 'tree': '@galacean/effects-plugin-model',
10353
+ 'model': '@galacean/effects-plugin-model',
10354
+ 'orientation-transformer': '@galacean/effects-plugin-orientation-transformer',
10355
+ 'spine': '@galacean/effects-plugin-spine',
10356
+ };
10357
+ function getPluginUsageInfo(name) {
10358
+ var info = pluginInfoMap[name];
10359
+ if (info) {
10360
+ return "\nInstall Plugin: npm i ".concat(info, "@latest --save\nImport Plugin: import '").concat(info, "'");
10361
+ }
10362
+ else {
10363
+ return '';
10364
+ }
10365
+ }
10348
10366
 
10349
10367
  /**
10350
10368
  * 抽象插件类
@@ -30935,11 +30953,15 @@ var Player = /** @class */ (function () {
30935
30953
  }
30936
30954
  this.canvas.remove();
30937
30955
  }
30938
- this.tick = throwDestroyedError;
30939
- this.resize = throwDestroyedError;
30940
- this.loadScene = throwDestroyedErrorPromise;
30941
- this.play = throwDestroyedErrorPromise;
30942
- this.resume = throwDestroyedErrorPromise;
30956
+ // 在报错函数中传入 player.name
30957
+ var errorMsg = getDestroyedErrorMessage(this.name);
30958
+ var throwErrorFunc = function () { return throwDestroyedError(errorMsg); };
30959
+ var throwErrorPromiseFunc = function () { return throwDestroyedErrorPromise(errorMsg); };
30960
+ this.tick = throwErrorFunc;
30961
+ this.resize = throwErrorFunc;
30962
+ this.loadScene = throwErrorPromiseFunc;
30963
+ this.play = throwErrorPromiseFunc;
30964
+ this.resume = throwErrorPromiseFunc;
30943
30965
  this.disposed = true;
30944
30966
  };
30945
30967
  Player.prototype.offloadTexture = function () {
@@ -31064,11 +31086,13 @@ function assertContainer(container) {
31064
31086
  throw new Error("Container is not an HTMLElement, see ".concat(HELP_LINK['Container is not an HTMLElement']));
31065
31087
  }
31066
31088
  }
31067
- var destroyedErrorMessage = "Never use destroyed player again, see ".concat(HELP_LINK['Never use destroyed player again']);
31068
- function throwDestroyedError() {
31089
+ function getDestroyedErrorMessage(name) {
31090
+ return "Never use destroyed player: ".concat(name, " again, see ").concat(HELP_LINK['Never use destroyed player again']);
31091
+ }
31092
+ function throwDestroyedError(destroyedErrorMessage) {
31069
31093
  throw new Error(destroyedErrorMessage);
31070
31094
  }
31071
- function throwDestroyedErrorPromise() {
31095
+ function throwDestroyedErrorPromise(destroyedErrorMessage) {
31072
31096
  return Promise.reject(destroyedErrorMessage);
31073
31097
  }
31074
31098
 
@@ -31114,9 +31138,9 @@ Renderer.create = function (canvas, framework, renderOptions) {
31114
31138
  Engine.create = function (gl) {
31115
31139
  return new GLEngine(gl);
31116
31140
  };
31117
- var version = "1.0.0";
31141
+ var version = "1.0.1";
31118
31142
  console.info({
31119
- content: '[Galacean Effects Player] version: ' + "1.0.0",
31143
+ content: '[Galacean Effects Player] version: ' + "1.0.1",
31120
31144
  type: LOG_TYPE,
31121
31145
  });
31122
31146