@galacean/effects-threejs 1.5.0-alpha.0 → 1.5.0-alpha.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/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime threejs plugin for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v1.5.0-alpha.0
6
+ * Version: v1.5.0-alpha.1
7
7
  */
8
8
 
9
9
  'use strict';
@@ -531,6 +531,10 @@ function isAndroid() {
531
531
  function isSimulatorCellPhone() {
532
532
  return isAndroid() || /\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent);
533
533
  }
534
+ function isAlipayMiniApp() {
535
+ //@ts-expect-error
536
+ return typeof my !== 'undefined' && (my === null || my === void 0 ? void 0 : my.renderTarget) === 'web';
537
+ }
534
538
 
535
539
  function imageDataFromColor(value) {
536
540
  if (isString(value)) {
@@ -24277,7 +24281,7 @@ var AssetManager = /** @class */ (function () {
24277
24281
  _a = this.options, useCompressedTexture = _a.useCompressedTexture, variables = _a.variables;
24278
24282
  baseUrl = this.baseUrl;
24279
24283
  jobs = images.map(function (img, idx) { return __awaiter(_this, void 0, void 0, function () {
24280
- var png, webp, imageURL, webpURL, template, isTemplateV2, background, url_1, isVideo, loadFn, resultImage, resultImage, compressed, src, bufferURL, _a, url, image;
24284
+ var png, webp, imageURL, webpURL, template, isTemplateV2, background, url_1, isVideo, loadFn, resultImage, e_3, resultImage, compressed, src, bufferURL, _a, url, image;
24281
24285
  return __generator(this, function (_b) {
24282
24286
  switch (_b.label) {
24283
24287
  case 0:
@@ -24312,8 +24316,8 @@ var AssetManager = /** @class */ (function () {
24312
24316
  case 4: return [2 /*return*/, _b.sent()];
24313
24317
  case 5: return [3 /*break*/, 7];
24314
24318
  case 6:
24315
- _b.sent();
24316
- throw new Error("Failed to load. Check the template or if the URL is ".concat(isVideo ? 'video' : 'image', " type, URL: ").concat(url_1, "."));
24319
+ e_3 = _b.sent();
24320
+ throw new Error("Failed to load. Check the template or if the URL is ".concat(isVideo ? 'video' : 'image', " type, URL: ").concat(url_1, ", Error: ").concat(e_3.message));
24317
24321
  case 7: return [3 /*break*/, 12];
24318
24322
  case 8:
24319
24323
  _b.trys.push([8, 11, , 12]);
@@ -25665,7 +25669,7 @@ var Composition = /** @class */ (function () {
25665
25669
  }());
25666
25670
 
25667
25671
  /**
25668
- * Engine 基类,负责维护所有 GPU 资源的销毁
25672
+ * Engine 基类,负责维护所有 GPU 资源的管理及销毁
25669
25673
  */
25670
25674
  var Engine = /** @class */ (function () {
25671
25675
  function Engine() {
@@ -25675,6 +25679,10 @@ var Engine = /** @class */ (function () {
25675
25679
  this.geometries = [];
25676
25680
  this.meshes = [];
25677
25681
  this.renderPasses = [];
25682
+ /**
25683
+ * 渲染过程中错误队列
25684
+ */
25685
+ this.renderErrors = new Set();
25678
25686
  }
25679
25687
  Engine.prototype.addTexture = function (tex) {
25680
25688
  if (this.destroyed) {
@@ -27418,7 +27426,7 @@ Geometry.create = function (engine, options) {
27418
27426
  Mesh.create = function (engine, props) {
27419
27427
  return new ThreeMesh(engine, props);
27420
27428
  };
27421
- var version = "1.5.0-alpha.0";
27429
+ var version = "1.5.0-alpha.1";
27422
27430
  logger.info('THREEJS plugin version: ' + version);
27423
27431
 
27424
27432
  exports.AbstractPlugin = AbstractPlugin;
@@ -27606,6 +27614,7 @@ exports.initErrors = initErrors;
27606
27614
  exports.initGLContext = initGLContext;
27607
27615
  exports.integrate = integrate;
27608
27616
  exports.interpolateColor = interpolateColor;
27617
+ exports.isAlipayMiniApp = isAlipayMiniApp;
27609
27618
  exports.isAndroid = isAndroid;
27610
27619
  exports.isArray = isArray;
27611
27620
  exports.isFunction = isFunction;