@galacean/effects-core 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 core 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';
@@ -509,6 +509,10 @@ function isAndroid() {
509
509
  function isSimulatorCellPhone() {
510
510
  return isAndroid() || /\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent);
511
511
  }
512
+ function isAlipayMiniApp() {
513
+ //@ts-expect-error
514
+ return typeof my !== 'undefined' && (my === null || my === void 0 ? void 0 : my.renderTarget) === 'web';
515
+ }
512
516
 
513
517
  function imageDataFromColor(value) {
514
518
  if (isString(value)) {
@@ -698,7 +702,7 @@ function isValidFontFamily(fontFamily) {
698
702
  * Name: @galacean/effects-specification
699
703
  * Description: Galacean Effects JSON Specification
700
704
  * Author: Ant Group CO., Ltd.
701
- * Version: v1.2.0
705
+ * Version: v1.3.0-alpha.0
702
706
  */
703
707
 
704
708
  /*********************************************/
@@ -21879,7 +21883,7 @@ var filters = {
21879
21883
  * Name: @galacean/effects-specification
21880
21884
  * Description: Galacean Effects JSON Specification
21881
21885
  * Author: Ant Group CO., Ltd.
21882
- * Version: v1.2.0
21886
+ * Version: v1.3.0-alpha.0
21883
21887
  */
21884
21888
 
21885
21889
  /*********************************************/
@@ -24255,7 +24259,7 @@ var AssetManager = /** @class */ (function () {
24255
24259
  _a = this.options, useCompressedTexture = _a.useCompressedTexture, variables = _a.variables;
24256
24260
  baseUrl = this.baseUrl;
24257
24261
  jobs = images.map(function (img, idx) { return __awaiter(_this, void 0, void 0, function () {
24258
- var png, webp, imageURL, webpURL, template, isTemplateV2, background, url_1, isVideo, loadFn, resultImage, resultImage, compressed, src, bufferURL, _a, url, image;
24262
+ var png, webp, imageURL, webpURL, template, isTemplateV2, background, url_1, isVideo, loadFn, resultImage, e_3, resultImage, compressed, src, bufferURL, _a, url, image;
24259
24263
  return __generator(this, function (_b) {
24260
24264
  switch (_b.label) {
24261
24265
  case 0:
@@ -24290,8 +24294,8 @@ var AssetManager = /** @class */ (function () {
24290
24294
  case 4: return [2 /*return*/, _b.sent()];
24291
24295
  case 5: return [3 /*break*/, 7];
24292
24296
  case 6:
24293
- _b.sent();
24294
- throw new Error("Failed to load. Check the template or if the URL is ".concat(isVideo ? 'video' : 'image', " type, URL: ").concat(url_1, "."));
24297
+ e_3 = _b.sent();
24298
+ 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));
24295
24299
  case 7: return [3 /*break*/, 12];
24296
24300
  case 8:
24297
24301
  _b.trys.push([8, 11, , 12]);
@@ -26070,6 +26074,7 @@ exports.initErrors = initErrors;
26070
26074
  exports.initGLContext = initGLContext;
26071
26075
  exports.integrate = integrate;
26072
26076
  exports.interpolateColor = interpolateColor;
26077
+ exports.isAlipayMiniApp = isAlipayMiniApp;
26073
26078
  exports.isAndroid = isAndroid;
26074
26079
  exports.isArray = isArray;
26075
26080
  exports.isFunction = isFunction;