@galacean/effects-threejs 1.4.5 → 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.4.5
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)) {
@@ -720,7 +724,7 @@ function isValidFontFamily(fontFamily) {
720
724
  * Name: @galacean/effects-specification
721
725
  * Description: Galacean Effects JSON Specification
722
726
  * Author: Ant Group CO., Ltd.
723
- * Version: v1.2.0
727
+ * Version: v1.3.0-alpha.0
724
728
  */
725
729
 
726
730
  /*********************************************/
@@ -21901,7 +21905,7 @@ var filters = {
21901
21905
  * Name: @galacean/effects-specification
21902
21906
  * Description: Galacean Effects JSON Specification
21903
21907
  * Author: Ant Group CO., Ltd.
21904
- * Version: v1.2.0
21908
+ * Version: v1.3.0-alpha.0
21905
21909
  */
21906
21910
 
21907
21911
  /*********************************************/
@@ -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]);
@@ -27422,7 +27426,7 @@ Geometry.create = function (engine, options) {
27422
27426
  Mesh.create = function (engine, props) {
27423
27427
  return new ThreeMesh(engine, props);
27424
27428
  };
27425
- var version = "1.4.5";
27429
+ var version = "1.5.0-alpha.1";
27426
27430
  logger.info('THREEJS plugin version: ' + version);
27427
27431
 
27428
27432
  exports.AbstractPlugin = AbstractPlugin;
@@ -27610,6 +27614,7 @@ exports.initErrors = initErrors;
27610
27614
  exports.initGLContext = initGLContext;
27611
27615
  exports.integrate = integrate;
27612
27616
  exports.interpolateColor = interpolateColor;
27617
+ exports.isAlipayMiniApp = isAlipayMiniApp;
27613
27618
  exports.isAndroid = isAndroid;
27614
27619
  exports.isArray = isArray;
27615
27620
  exports.isFunction = isFunction;