@galacean/effects-threejs 2.8.0-alpha.3 → 2.8.0-alpha.5
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 +697 -516
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +695 -516
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
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: v2.8.0-alpha.
|
|
6
|
+
* Version: v2.8.0-alpha.5
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -2666,355 +2666,6 @@ function asserts(condition, msg) {
|
|
|
2666
2666
|
return /^[^\d.][\w-]*$/.test(fontFamily);
|
|
2667
2667
|
}
|
|
2668
2668
|
|
|
2669
|
-
/**
|
|
2670
|
-
* Simple implementation of the deferred pattern.
|
|
2671
|
-
* An object that exposes a promise and functions to resolve and reject it.
|
|
2672
|
-
*/ var Deferred = function Deferred() {
|
|
2673
|
-
var _this = this;
|
|
2674
|
-
this.promise = new Promise(function(resolve, reject) {
|
|
2675
|
-
_this.resolve = resolve;
|
|
2676
|
-
_this.reject = reject;
|
|
2677
|
-
});
|
|
2678
|
-
};
|
|
2679
|
-
|
|
2680
|
-
var prefix = "[Galacean Effects]";
|
|
2681
|
-
var localLogger;
|
|
2682
|
-
function format(message) {
|
|
2683
|
-
return [
|
|
2684
|
-
"%c" + prefix,
|
|
2685
|
-
"color: #AA0100",
|
|
2686
|
-
"" + message
|
|
2687
|
-
];
|
|
2688
|
-
}
|
|
2689
|
-
function error(message) {
|
|
2690
|
-
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
2691
|
-
args[_key - 1] = arguments[_key];
|
|
2692
|
-
}
|
|
2693
|
-
var _console;
|
|
2694
|
-
(_console = console).error.apply(_console, [].concat(format(message), [
|
|
2695
|
-
args
|
|
2696
|
-
]));
|
|
2697
|
-
localLogger == null ? void 0 : localLogger("error", message, args);
|
|
2698
|
-
}
|
|
2699
|
-
/**
|
|
2700
|
-
* info 会转换成浏览器的 console.debug
|
|
2701
|
-
* @param message
|
|
2702
|
-
* @param args
|
|
2703
|
-
*/ function info(message) {
|
|
2704
|
-
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
2705
|
-
args[_key - 1] = arguments[_key];
|
|
2706
|
-
}
|
|
2707
|
-
var _console;
|
|
2708
|
-
(_console = console).debug.apply(_console, [].concat(format(message)));
|
|
2709
|
-
localLogger == null ? void 0 : localLogger("info", message, args);
|
|
2710
|
-
}
|
|
2711
|
-
function warn(message) {
|
|
2712
|
-
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
2713
|
-
args[_key - 1] = arguments[_key];
|
|
2714
|
-
}
|
|
2715
|
-
var _console;
|
|
2716
|
-
(_console = console).warn.apply(_console, [].concat(format(message)));
|
|
2717
|
-
localLogger == null ? void 0 : localLogger("warn", message, args);
|
|
2718
|
-
}
|
|
2719
|
-
/**
|
|
2720
|
-
* 注册自定义埋点函数
|
|
2721
|
-
*
|
|
2722
|
-
* @param fn
|
|
2723
|
-
*/ function register(fn) {
|
|
2724
|
-
if (fn && isFunction(fn)) {
|
|
2725
|
-
localLogger = fn;
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
var logger = {
|
|
2729
|
-
error: error,
|
|
2730
|
-
info: info,
|
|
2731
|
-
warn: warn,
|
|
2732
|
-
register: register
|
|
2733
|
-
};
|
|
2734
|
-
|
|
2735
|
-
var DestroyOptions;
|
|
2736
|
-
(function(DestroyOptions) {
|
|
2737
|
-
DestroyOptions[DestroyOptions["destroy"] = 0] = "destroy";
|
|
2738
|
-
DestroyOptions[DestroyOptions["keep"] = 1] = "keep";
|
|
2739
|
-
DestroyOptions[DestroyOptions["force"] = 0] = "force";
|
|
2740
|
-
})(DestroyOptions || (DestroyOptions = {}));
|
|
2741
|
-
function noop() {}
|
|
2742
|
-
/**
|
|
2743
|
-
* 判断对象是否是`String`类型
|
|
2744
|
-
*
|
|
2745
|
-
* @static
|
|
2746
|
-
* @function isString
|
|
2747
|
-
* @param obj - 要判断的对象
|
|
2748
|
-
* @return
|
|
2749
|
-
*/ function isString(obj) {
|
|
2750
|
-
return typeof obj === "string";
|
|
2751
|
-
}
|
|
2752
|
-
/**
|
|
2753
|
-
* 判断对象是否是`Array`类型
|
|
2754
|
-
*
|
|
2755
|
-
* @static
|
|
2756
|
-
* @function isArray
|
|
2757
|
-
* @param obj - 要判断的对象
|
|
2758
|
-
* @return
|
|
2759
|
-
*/ var isArray = Array.isArray || function(obj) {
|
|
2760
|
-
return Object.prototype.toString.call(obj) === "[object Array]";
|
|
2761
|
-
};
|
|
2762
|
-
/**
|
|
2763
|
-
* 判断对象是否是函数类型
|
|
2764
|
-
*
|
|
2765
|
-
* @static
|
|
2766
|
-
* @function isFunction
|
|
2767
|
-
* @param obj - 要判断的对象
|
|
2768
|
-
* @return
|
|
2769
|
-
*/ function isFunction(obj) {
|
|
2770
|
-
return Object.prototype.toString.call(obj) === "[object Function]";
|
|
2771
|
-
}
|
|
2772
|
-
/**
|
|
2773
|
-
* 判断对象是否是`Object`类型
|
|
2774
|
-
*
|
|
2775
|
-
* @static
|
|
2776
|
-
* @function isObject
|
|
2777
|
-
* @param obj - 要判断的对象
|
|
2778
|
-
* @return
|
|
2779
|
-
*/ function isObject(obj) {
|
|
2780
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
2781
|
-
}
|
|
2782
|
-
/**
|
|
2783
|
-
* 判断对象是否是`Plain Object`类型
|
|
2784
|
-
*
|
|
2785
|
-
* @param obj - 要判断的对象
|
|
2786
|
-
* @returns
|
|
2787
|
-
*/ function isPlainObject(obj) {
|
|
2788
|
-
if (obj === null || typeof obj !== "object") {
|
|
2789
|
-
return false;
|
|
2790
|
-
}
|
|
2791
|
-
// 先排除 Array/Date/Map/Set/RegExp 等
|
|
2792
|
-
if (Object.prototype.toString.call(obj) !== "[object Object]") {
|
|
2793
|
-
return false;
|
|
2794
|
-
}
|
|
2795
|
-
var proto = Object.getPrototypeOf(obj);
|
|
2796
|
-
if (proto === null) {
|
|
2797
|
-
return true;
|
|
2798
|
-
} // Object.create(null)
|
|
2799
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
2800
|
-
var Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
|
|
2801
|
-
// 构造器需要是 Object(跨 realm 用函数源码比对)
|
|
2802
|
-
return typeof Ctor === "function" && Function.prototype.toString.call(Ctor) === Function.prototype.toString.call(Object);
|
|
2803
|
-
}
|
|
2804
|
-
function isCanvas(canvas) {
|
|
2805
|
-
var _canvas_tagName;
|
|
2806
|
-
// 小程序 Canvas 无法使用 instanceof HTMLCanvasElement 判断
|
|
2807
|
-
return typeof canvas === "object" && canvas !== null && ((_canvas_tagName = canvas.tagName) == null ? void 0 : _canvas_tagName.toUpperCase()) === "CANVAS";
|
|
2808
|
-
}
|
|
2809
|
-
function isPowerOfTwo(value) {
|
|
2810
|
-
return (value & value - 1) === 0 && value !== 0;
|
|
2811
|
-
}
|
|
2812
|
-
/**
|
|
2813
|
-
* 生成一个位于 min 和 max 之间的随机数
|
|
2814
|
-
* @param min
|
|
2815
|
-
* @param max
|
|
2816
|
-
* @returns
|
|
2817
|
-
*/ function randomInRange(min, max) {
|
|
2818
|
-
return min + Math.random() * (max - min);
|
|
2819
|
-
}
|
|
2820
|
-
function throwDestroyedError() {
|
|
2821
|
-
throw new Error("Destroyed item cannot be used again.");
|
|
2822
|
-
}
|
|
2823
|
-
function generateGUID() {
|
|
2824
|
-
return v4().replace(/-/g, "");
|
|
2825
|
-
}
|
|
2826
|
-
function base64ToFile(base64, filename, contentType) {
|
|
2827
|
-
if (filename === void 0) filename = "base64File";
|
|
2828
|
-
if (contentType === void 0) contentType = "";
|
|
2829
|
-
// 去掉 Base64 字符串的 Data URL 部分(如果存在)
|
|
2830
|
-
var base64WithoutPrefix = base64.split(",")[1] || base64;
|
|
2831
|
-
// 将 base64 编码的字符串转换为二进制字符串
|
|
2832
|
-
var byteCharacters = atob(base64WithoutPrefix);
|
|
2833
|
-
// 创建一个 8 位无符号整数值的数组,即“字节数组”
|
|
2834
|
-
var byteArrays = [];
|
|
2835
|
-
// 切割二进制字符串为多个片段,并将每个片段转换成一个字节数组
|
|
2836
|
-
for(var offset = 0; offset < byteCharacters.length; offset += 512){
|
|
2837
|
-
var slice = byteCharacters.slice(offset, offset + 512);
|
|
2838
|
-
var byteNumbers = new Array(slice.length);
|
|
2839
|
-
for(var i = 0; i < slice.length; i++){
|
|
2840
|
-
byteNumbers[i] = slice.charCodeAt(i);
|
|
2841
|
-
}
|
|
2842
|
-
var byteArray = new Uint8Array(byteNumbers);
|
|
2843
|
-
byteArrays.push(byteArray);
|
|
2844
|
-
}
|
|
2845
|
-
// 使用字节数组创建 Blob 对象
|
|
2846
|
-
var blob = new Blob(byteArrays, {
|
|
2847
|
-
type: contentType
|
|
2848
|
-
});
|
|
2849
|
-
// 创建 File 对象
|
|
2850
|
-
var file = new File([
|
|
2851
|
-
blob
|
|
2852
|
-
], filename, {
|
|
2853
|
-
type: contentType
|
|
2854
|
-
});
|
|
2855
|
-
return file;
|
|
2856
|
-
}
|
|
2857
|
-
function applyMixins(derivedCtrl, baseCtrls) {
|
|
2858
|
-
baseCtrls.forEach(function(baseCtrl) {
|
|
2859
|
-
Object.getOwnPropertyNames(baseCtrl.prototype).forEach(function(name) {
|
|
2860
|
-
var propertyDescriptor = Object.getOwnPropertyDescriptor(baseCtrl.prototype, name);
|
|
2861
|
-
if (!propertyDescriptor) {
|
|
2862
|
-
throw new Error("Cannot find property descriptor of class " + baseCtrl);
|
|
2863
|
-
}
|
|
2864
|
-
Object.defineProperty(derivedCtrl.prototype, name, propertyDescriptor);
|
|
2865
|
-
});
|
|
2866
|
-
});
|
|
2867
|
-
}
|
|
2868
|
-
|
|
2869
|
-
var pluginLoaderMap = {};
|
|
2870
|
-
var plugins = [];
|
|
2871
|
-
/**
|
|
2872
|
-
* 注册 plugin
|
|
2873
|
-
* @param name
|
|
2874
|
-
* @param pluginClass class of plugin
|
|
2875
|
-
* @param itemClass class of item
|
|
2876
|
-
* @param isDefault load
|
|
2877
|
-
*/ function registerPlugin(name, pluginClass) {
|
|
2878
|
-
if (pluginLoaderMap[name]) {
|
|
2879
|
-
logger.error("Duplicate registration for plugin " + name + ".");
|
|
2880
|
-
}
|
|
2881
|
-
pluginLoaderMap[name] = pluginClass;
|
|
2882
|
-
var pluginInstance = new pluginClass();
|
|
2883
|
-
pluginInstance.name = name;
|
|
2884
|
-
pluginInstance.initialize();
|
|
2885
|
-
plugins.push(pluginInstance);
|
|
2886
|
-
plugins.sort(function(a, b) {
|
|
2887
|
-
return a.order - b.order;
|
|
2888
|
-
});
|
|
2889
|
-
}
|
|
2890
|
-
/**
|
|
2891
|
-
* 注销 plugin
|
|
2892
|
-
*/ function unregisterPlugin(name) {
|
|
2893
|
-
delete pluginLoaderMap[name];
|
|
2894
|
-
var pluginIndex = plugins.findIndex(function(plugin) {
|
|
2895
|
-
return plugin.name === name;
|
|
2896
|
-
});
|
|
2897
|
-
if (pluginIndex !== -1) {
|
|
2898
|
-
plugins.splice(pluginIndex, 1);
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
var PluginSystem = /*#__PURE__*/ function() {
|
|
2902
|
-
function PluginSystem() {}
|
|
2903
|
-
PluginSystem.getPlugins = function getPlugins() {
|
|
2904
|
-
return plugins;
|
|
2905
|
-
};
|
|
2906
|
-
PluginSystem.initializeComposition = function initializeComposition(composition, scene) {
|
|
2907
|
-
plugins.forEach(function(loader) {
|
|
2908
|
-
return loader.onCompositionConstructed(composition, scene);
|
|
2909
|
-
});
|
|
2910
|
-
};
|
|
2911
|
-
PluginSystem.destroyComposition = function destroyComposition(comp) {
|
|
2912
|
-
plugins.forEach(function(loader) {
|
|
2913
|
-
return loader.onCompositionDestroyed(comp);
|
|
2914
|
-
});
|
|
2915
|
-
};
|
|
2916
|
-
PluginSystem.processAssets = function processAssets(scene, options) {
|
|
2917
|
-
return _async_to_generator(function() {
|
|
2918
|
-
return __generator(this, function(_state) {
|
|
2919
|
-
return [
|
|
2920
|
-
2,
|
|
2921
|
-
Promise.all(plugins.map(function(plugin) {
|
|
2922
|
-
return plugin.processAssets(scene, options);
|
|
2923
|
-
}))
|
|
2924
|
-
];
|
|
2925
|
-
});
|
|
2926
|
-
})();
|
|
2927
|
-
};
|
|
2928
|
-
PluginSystem.loadResources = function loadResources(scene, options, engine) {
|
|
2929
|
-
plugins.forEach(function(loader) {
|
|
2930
|
-
return loader.prepareResource(scene, options, engine);
|
|
2931
|
-
});
|
|
2932
|
-
};
|
|
2933
|
-
return PluginSystem;
|
|
2934
|
-
}();
|
|
2935
|
-
var pluginInfoMap = {
|
|
2936
|
-
"alipay-downgrade": "@galacean/effects-plugin-alipay-downgrade",
|
|
2937
|
-
"downgrade": "@galacean/effects-plugin-downgrade",
|
|
2938
|
-
"editor-gizmo": "@galacean/effects-plugin-editor-gizmo",
|
|
2939
|
-
"ffd": "@galacean/effects-plugin-ffd",
|
|
2940
|
-
"ktx2": "@galacean/effects-plugin-ktx2",
|
|
2941
|
-
"model": "@galacean/effects-plugin-model",
|
|
2942
|
-
"video": "@galacean/effects-plugin-multimedia",
|
|
2943
|
-
"audio": "@galacean/effects-plugin-multimedia",
|
|
2944
|
-
"orientation-transformer": "@galacean/effects-plugin-orientation-transformer",
|
|
2945
|
-
"rich-text": "@galacean/effects-plugin-rich-text",
|
|
2946
|
-
"spine": "@galacean/effects-plugin-spine"
|
|
2947
|
-
};
|
|
2948
|
-
function getPluginUsageInfo(name) {
|
|
2949
|
-
var info = pluginInfoMap[name];
|
|
2950
|
-
if (info) {
|
|
2951
|
-
return "\n请按如下命令进行操作(Please follow the commands below to proceed):\n1、使用 npm 安装插件(Install Plugin):npm i " + info + "@latest --save\n2、导入插件(Import Plugin):import '" + info + "'";
|
|
2952
|
-
} else {
|
|
2953
|
-
return "";
|
|
2954
|
-
}
|
|
2955
|
-
}
|
|
2956
|
-
|
|
2957
|
-
/**
|
|
2958
|
-
* 抽象插件类
|
|
2959
|
-
* 注册合成不同生命周期的回调函数
|
|
2960
|
-
*/ var AbstractPlugin = /*#__PURE__*/ function() {
|
|
2961
|
-
function AbstractPlugin() {
|
|
2962
|
-
this.order = 100;
|
|
2963
|
-
this.name = "";
|
|
2964
|
-
}
|
|
2965
|
-
var _proto = AbstractPlugin.prototype;
|
|
2966
|
-
_proto.initialize = function initialize() {};
|
|
2967
|
-
/**
|
|
2968
|
-
* loadScene 函数调用的时候会触发此函数,
|
|
2969
|
-
* 此阶段可以加载插件所需类型资源,并返回原始资源和加载后的资源。
|
|
2970
|
-
* @param scene
|
|
2971
|
-
* @param options
|
|
2972
|
-
* @returns
|
|
2973
|
-
*/ _proto.processAssets = function processAssets(scene, options) {
|
|
2974
|
-
return _async_to_generator(function() {
|
|
2975
|
-
return __generator(this, function(_state) {
|
|
2976
|
-
return [
|
|
2977
|
-
2
|
|
2978
|
-
];
|
|
2979
|
-
});
|
|
2980
|
-
})();
|
|
2981
|
-
};
|
|
2982
|
-
/**
|
|
2983
|
-
* loadScene 函数调用的时候会触发此函数,
|
|
2984
|
-
* 此阶段时,json 中的图片和二进制已经被加载完成,可以对加载好的资源做进一步处理,
|
|
2985
|
-
* 如果 promise 被 reject, loadScene 函数同样会被 reject,表示场景加载失败。
|
|
2986
|
-
* 请记住,整个 load 阶段都不要创建 GL 相关的对象,只创建 JS 对象
|
|
2987
|
-
* 此阶段晚于 processAssets
|
|
2988
|
-
* @param {Scene} scene
|
|
2989
|
-
* @param {SceneLoadOptions} options
|
|
2990
|
-
*/ _proto.prepareResource = function prepareResource(scene, options, engine) {};
|
|
2991
|
-
_proto.onCompositionConstructed = function onCompositionConstructed(composition, scene) {};
|
|
2992
|
-
_proto.onCompositionDestroyed = function onCompositionDestroyed(composition) {};
|
|
2993
|
-
return AbstractPlugin;
|
|
2994
|
-
}();
|
|
2995
|
-
|
|
2996
|
-
function _set_prototype_of(o, p) {
|
|
2997
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
2998
|
-
o.__proto__ = p;
|
|
2999
|
-
return o;
|
|
3000
|
-
};
|
|
3001
|
-
return _set_prototype_of(o, p);
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
|
-
function _inherits(subClass, superClass) {
|
|
3005
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
3006
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
3007
|
-
}
|
|
3008
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
3009
|
-
constructor: {
|
|
3010
|
-
value: subClass,
|
|
3011
|
-
writable: true,
|
|
3012
|
-
configurable: true
|
|
3013
|
-
}
|
|
3014
|
-
});
|
|
3015
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
2669
|
/**
|
|
3019
2670
|
* JSON 版本
|
|
3020
2671
|
*/ var JSONSceneVersion;
|
|
@@ -3762,6 +3413,17 @@ var NodeDataType;
|
|
|
3762
3413
|
MultimediaType["video"] = "video";
|
|
3763
3414
|
MultimediaType["audio"] = "audio";
|
|
3764
3415
|
})(MultimediaType || (MultimediaType = {}));
|
|
3416
|
+
var HevcVideoCodec;
|
|
3417
|
+
(function(HevcVideoCodec) {
|
|
3418
|
+
HevcVideoCodec["L30"] = "hev1.1.0.L30.B0";
|
|
3419
|
+
HevcVideoCodec["L60"] = "hev1.1.0.L60.B0";
|
|
3420
|
+
HevcVideoCodec["L63"] = "hev1.1.0.L63.B0";
|
|
3421
|
+
HevcVideoCodec["L90"] = "hev1.1.0.L90.B0";
|
|
3422
|
+
HevcVideoCodec["L93"] = "hev1.1.0.L93.B0";
|
|
3423
|
+
HevcVideoCodec["L120"] = "hev1.1.0.L120.B0";
|
|
3424
|
+
HevcVideoCodec["L150"] = "hev1.1.0.L150.B0";
|
|
3425
|
+
HevcVideoCodec["L180"] = "hev1.1.0.L180.B0";
|
|
3426
|
+
})(HevcVideoCodec || (HevcVideoCodec = {}));
|
|
3765
3427
|
|
|
3766
3428
|
var DataType;
|
|
3767
3429
|
(function(DataType) {
|
|
@@ -3967,6 +3629,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
3967
3629
|
get NodeDataType () { return NodeDataType; },
|
|
3968
3630
|
get BackgroundType () { return BackgroundType; },
|
|
3969
3631
|
get MultimediaType () { return MultimediaType; },
|
|
3632
|
+
get HevcVideoCodec () { return HevcVideoCodec; },
|
|
3970
3633
|
get DataType () { return DataType; },
|
|
3971
3634
|
get GeometryType () { return GeometryType; },
|
|
3972
3635
|
get VertexFormatType () { return VertexFormatType; },
|
|
@@ -3974,6 +3637,391 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
3974
3637
|
get VertexBufferSemantic () { return VertexBufferSemantic; }
|
|
3975
3638
|
});
|
|
3976
3639
|
|
|
3640
|
+
/**
|
|
3641
|
+
* Check if the browser can play the given HEVC codec.
|
|
3642
|
+
* @param codec - The HEVC codec to check.
|
|
3643
|
+
* @returns True if the browser can probably or maybe play the codec, false otherwise.
|
|
3644
|
+
*/ function canPlayHevcCodec(codec) {
|
|
3645
|
+
var video = document.createElement("video");
|
|
3646
|
+
var contentType = 'video/mp4; codecs="' + codec + '"';
|
|
3647
|
+
var result = video.canPlayType(contentType);
|
|
3648
|
+
return result === "probably" || result === "maybe";
|
|
3649
|
+
}
|
|
3650
|
+
/**
|
|
3651
|
+
* Parse the given codec string into a HEVC video codec enum value.
|
|
3652
|
+
* @param codec - The codec string to parse.
|
|
3653
|
+
* @returns The corresponding HEVC video codec enum value, or undefined if the codec is invalid.
|
|
3654
|
+
*/ function parseCodec(codec) {
|
|
3655
|
+
// 传入的是完整的枚举值
|
|
3656
|
+
if (isCodecValue(codec)) {
|
|
3657
|
+
return codec;
|
|
3658
|
+
}
|
|
3659
|
+
// 传入的是枚举名称
|
|
3660
|
+
if (isCodecKey(codec)) {
|
|
3661
|
+
return HevcVideoCodec[codec];
|
|
3662
|
+
}
|
|
3663
|
+
return undefined;
|
|
3664
|
+
}
|
|
3665
|
+
function isCodecValue(codec) {
|
|
3666
|
+
return Object.keys(HevcVideoCodec).some(function(key) {
|
|
3667
|
+
return HevcVideoCodec[key] === codec;
|
|
3668
|
+
});
|
|
3669
|
+
}
|
|
3670
|
+
function isCodecKey(codec) {
|
|
3671
|
+
return codec in HevcVideoCodec;
|
|
3672
|
+
}
|
|
3673
|
+
|
|
3674
|
+
/**
|
|
3675
|
+
* Simple implementation of the deferred pattern.
|
|
3676
|
+
* An object that exposes a promise and functions to resolve and reject it.
|
|
3677
|
+
*/ var Deferred = function Deferred() {
|
|
3678
|
+
var _this = this;
|
|
3679
|
+
this.promise = new Promise(function(resolve, reject) {
|
|
3680
|
+
_this.resolve = resolve;
|
|
3681
|
+
_this.reject = reject;
|
|
3682
|
+
});
|
|
3683
|
+
};
|
|
3684
|
+
|
|
3685
|
+
var prefix = "[Galacean Effects]";
|
|
3686
|
+
var localLogger;
|
|
3687
|
+
function format(message) {
|
|
3688
|
+
return [
|
|
3689
|
+
"%c" + prefix,
|
|
3690
|
+
"color: #AA0100",
|
|
3691
|
+
"" + message
|
|
3692
|
+
];
|
|
3693
|
+
}
|
|
3694
|
+
function error(message) {
|
|
3695
|
+
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
3696
|
+
args[_key - 1] = arguments[_key];
|
|
3697
|
+
}
|
|
3698
|
+
var _console;
|
|
3699
|
+
(_console = console).error.apply(_console, [].concat(format(message), [
|
|
3700
|
+
args
|
|
3701
|
+
]));
|
|
3702
|
+
localLogger == null ? void 0 : localLogger("error", message, args);
|
|
3703
|
+
}
|
|
3704
|
+
/**
|
|
3705
|
+
* info 会转换成浏览器的 console.debug
|
|
3706
|
+
* @param message
|
|
3707
|
+
* @param args
|
|
3708
|
+
*/ function info(message) {
|
|
3709
|
+
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
3710
|
+
args[_key - 1] = arguments[_key];
|
|
3711
|
+
}
|
|
3712
|
+
var _console;
|
|
3713
|
+
(_console = console).debug.apply(_console, [].concat(format(message)));
|
|
3714
|
+
localLogger == null ? void 0 : localLogger("info", message, args);
|
|
3715
|
+
}
|
|
3716
|
+
function warn(message) {
|
|
3717
|
+
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
3718
|
+
args[_key - 1] = arguments[_key];
|
|
3719
|
+
}
|
|
3720
|
+
var _console;
|
|
3721
|
+
(_console = console).warn.apply(_console, [].concat(format(message)));
|
|
3722
|
+
localLogger == null ? void 0 : localLogger("warn", message, args);
|
|
3723
|
+
}
|
|
3724
|
+
/**
|
|
3725
|
+
* 注册自定义埋点函数
|
|
3726
|
+
*
|
|
3727
|
+
* @param fn
|
|
3728
|
+
*/ function register(fn) {
|
|
3729
|
+
if (fn && isFunction(fn)) {
|
|
3730
|
+
localLogger = fn;
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
var logger = {
|
|
3734
|
+
error: error,
|
|
3735
|
+
info: info,
|
|
3736
|
+
warn: warn,
|
|
3737
|
+
register: register
|
|
3738
|
+
};
|
|
3739
|
+
|
|
3740
|
+
var DestroyOptions;
|
|
3741
|
+
(function(DestroyOptions) {
|
|
3742
|
+
DestroyOptions[DestroyOptions["destroy"] = 0] = "destroy";
|
|
3743
|
+
DestroyOptions[DestroyOptions["keep"] = 1] = "keep";
|
|
3744
|
+
DestroyOptions[DestroyOptions["force"] = 0] = "force";
|
|
3745
|
+
})(DestroyOptions || (DestroyOptions = {}));
|
|
3746
|
+
function noop() {}
|
|
3747
|
+
/**
|
|
3748
|
+
* 判断对象是否是`String`类型
|
|
3749
|
+
*
|
|
3750
|
+
* @static
|
|
3751
|
+
* @function isString
|
|
3752
|
+
* @param obj - 要判断的对象
|
|
3753
|
+
* @return
|
|
3754
|
+
*/ function isString(obj) {
|
|
3755
|
+
return typeof obj === "string";
|
|
3756
|
+
}
|
|
3757
|
+
/**
|
|
3758
|
+
* 判断对象是否是`Array`类型
|
|
3759
|
+
*
|
|
3760
|
+
* @static
|
|
3761
|
+
* @function isArray
|
|
3762
|
+
* @param obj - 要判断的对象
|
|
3763
|
+
* @return
|
|
3764
|
+
*/ var isArray = Array.isArray || function(obj) {
|
|
3765
|
+
return Object.prototype.toString.call(obj) === "[object Array]";
|
|
3766
|
+
};
|
|
3767
|
+
/**
|
|
3768
|
+
* 判断对象是否是函数类型
|
|
3769
|
+
*
|
|
3770
|
+
* @static
|
|
3771
|
+
* @function isFunction
|
|
3772
|
+
* @param obj - 要判断的对象
|
|
3773
|
+
* @return
|
|
3774
|
+
*/ function isFunction(obj) {
|
|
3775
|
+
return Object.prototype.toString.call(obj) === "[object Function]";
|
|
3776
|
+
}
|
|
3777
|
+
/**
|
|
3778
|
+
* 判断对象是否是`Object`类型
|
|
3779
|
+
*
|
|
3780
|
+
* @static
|
|
3781
|
+
* @function isObject
|
|
3782
|
+
* @param obj - 要判断的对象
|
|
3783
|
+
* @return
|
|
3784
|
+
*/ function isObject(obj) {
|
|
3785
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
3786
|
+
}
|
|
3787
|
+
/**
|
|
3788
|
+
* 判断对象是否是`Plain Object`类型
|
|
3789
|
+
*
|
|
3790
|
+
* @param obj - 要判断的对象
|
|
3791
|
+
* @returns
|
|
3792
|
+
*/ function isPlainObject(obj) {
|
|
3793
|
+
if (obj === null || typeof obj !== "object") {
|
|
3794
|
+
return false;
|
|
3795
|
+
}
|
|
3796
|
+
// 先排除 Array/Date/Map/Set/RegExp 等
|
|
3797
|
+
if (Object.prototype.toString.call(obj) !== "[object Object]") {
|
|
3798
|
+
return false;
|
|
3799
|
+
}
|
|
3800
|
+
var proto = Object.getPrototypeOf(obj);
|
|
3801
|
+
if (proto === null) {
|
|
3802
|
+
return true;
|
|
3803
|
+
} // Object.create(null)
|
|
3804
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
3805
|
+
var Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
|
|
3806
|
+
// 构造器需要是 Object(跨 realm 用函数源码比对)
|
|
3807
|
+
return typeof Ctor === "function" && Function.prototype.toString.call(Ctor) === Function.prototype.toString.call(Object);
|
|
3808
|
+
}
|
|
3809
|
+
function isCanvas(canvas) {
|
|
3810
|
+
var _canvas_tagName;
|
|
3811
|
+
// 小程序 Canvas 无法使用 instanceof HTMLCanvasElement 判断
|
|
3812
|
+
return typeof canvas === "object" && canvas !== null && ((_canvas_tagName = canvas.tagName) == null ? void 0 : _canvas_tagName.toUpperCase()) === "CANVAS";
|
|
3813
|
+
}
|
|
3814
|
+
function isPowerOfTwo(value) {
|
|
3815
|
+
return (value & value - 1) === 0 && value !== 0;
|
|
3816
|
+
}
|
|
3817
|
+
/**
|
|
3818
|
+
* 生成一个位于 min 和 max 之间的随机数
|
|
3819
|
+
* @param min
|
|
3820
|
+
* @param max
|
|
3821
|
+
* @returns
|
|
3822
|
+
*/ function randomInRange(min, max) {
|
|
3823
|
+
return min + Math.random() * (max - min);
|
|
3824
|
+
}
|
|
3825
|
+
function throwDestroyedError() {
|
|
3826
|
+
throw new Error("Destroyed item cannot be used again.");
|
|
3827
|
+
}
|
|
3828
|
+
function generateGUID() {
|
|
3829
|
+
return v4().replace(/-/g, "");
|
|
3830
|
+
}
|
|
3831
|
+
function base64ToFile(base64, filename, contentType) {
|
|
3832
|
+
if (filename === void 0) filename = "base64File";
|
|
3833
|
+
if (contentType === void 0) contentType = "";
|
|
3834
|
+
// 去掉 Base64 字符串的 Data URL 部分(如果存在)
|
|
3835
|
+
var base64WithoutPrefix = base64.split(",")[1] || base64;
|
|
3836
|
+
// 将 base64 编码的字符串转换为二进制字符串
|
|
3837
|
+
var byteCharacters = atob(base64WithoutPrefix);
|
|
3838
|
+
// 创建一个 8 位无符号整数值的数组,即“字节数组”
|
|
3839
|
+
var byteArrays = [];
|
|
3840
|
+
// 切割二进制字符串为多个片段,并将每个片段转换成一个字节数组
|
|
3841
|
+
for(var offset = 0; offset < byteCharacters.length; offset += 512){
|
|
3842
|
+
var slice = byteCharacters.slice(offset, offset + 512);
|
|
3843
|
+
var byteNumbers = new Array(slice.length);
|
|
3844
|
+
for(var i = 0; i < slice.length; i++){
|
|
3845
|
+
byteNumbers[i] = slice.charCodeAt(i);
|
|
3846
|
+
}
|
|
3847
|
+
var byteArray = new Uint8Array(byteNumbers);
|
|
3848
|
+
byteArrays.push(byteArray);
|
|
3849
|
+
}
|
|
3850
|
+
// 使用字节数组创建 Blob 对象
|
|
3851
|
+
var blob = new Blob(byteArrays, {
|
|
3852
|
+
type: contentType
|
|
3853
|
+
});
|
|
3854
|
+
// 创建 File 对象
|
|
3855
|
+
var file = new File([
|
|
3856
|
+
blob
|
|
3857
|
+
], filename, {
|
|
3858
|
+
type: contentType
|
|
3859
|
+
});
|
|
3860
|
+
return file;
|
|
3861
|
+
}
|
|
3862
|
+
function applyMixins(derivedCtrl, baseCtrls) {
|
|
3863
|
+
baseCtrls.forEach(function(baseCtrl) {
|
|
3864
|
+
Object.getOwnPropertyNames(baseCtrl.prototype).forEach(function(name) {
|
|
3865
|
+
var propertyDescriptor = Object.getOwnPropertyDescriptor(baseCtrl.prototype, name);
|
|
3866
|
+
if (!propertyDescriptor) {
|
|
3867
|
+
throw new Error("Cannot find property descriptor of class " + baseCtrl);
|
|
3868
|
+
}
|
|
3869
|
+
Object.defineProperty(derivedCtrl.prototype, name, propertyDescriptor);
|
|
3870
|
+
});
|
|
3871
|
+
});
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3874
|
+
var pluginLoaderMap = {};
|
|
3875
|
+
var plugins = [];
|
|
3876
|
+
/**
|
|
3877
|
+
* 注册 plugin
|
|
3878
|
+
* @param name
|
|
3879
|
+
* @param pluginClass class of plugin
|
|
3880
|
+
* @param itemClass class of item
|
|
3881
|
+
* @param isDefault load
|
|
3882
|
+
*/ function registerPlugin(name, pluginClass) {
|
|
3883
|
+
if (pluginLoaderMap[name]) {
|
|
3884
|
+
logger.error("Duplicate registration for plugin " + name + ".");
|
|
3885
|
+
}
|
|
3886
|
+
pluginLoaderMap[name] = pluginClass;
|
|
3887
|
+
var pluginInstance = new pluginClass();
|
|
3888
|
+
pluginInstance.name = name;
|
|
3889
|
+
plugins.push(pluginInstance);
|
|
3890
|
+
plugins.sort(function(a, b) {
|
|
3891
|
+
return a.order - b.order;
|
|
3892
|
+
});
|
|
3893
|
+
}
|
|
3894
|
+
/**
|
|
3895
|
+
* 注销 plugin
|
|
3896
|
+
*/ function unregisterPlugin(name) {
|
|
3897
|
+
delete pluginLoaderMap[name];
|
|
3898
|
+
var pluginIndex = plugins.findIndex(function(plugin) {
|
|
3899
|
+
return plugin.name === name;
|
|
3900
|
+
});
|
|
3901
|
+
if (pluginIndex !== -1) {
|
|
3902
|
+
plugins.splice(pluginIndex, 1);
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
var PluginSystem = /*#__PURE__*/ function() {
|
|
3906
|
+
function PluginSystem() {}
|
|
3907
|
+
PluginSystem.getPlugins = function getPlugins() {
|
|
3908
|
+
return plugins;
|
|
3909
|
+
};
|
|
3910
|
+
PluginSystem.initializeComposition = function initializeComposition(composition, scene) {
|
|
3911
|
+
plugins.forEach(function(loader) {
|
|
3912
|
+
return loader.onCompositionCreated(composition, scene);
|
|
3913
|
+
});
|
|
3914
|
+
};
|
|
3915
|
+
PluginSystem.destroyComposition = function destroyComposition(comp) {
|
|
3916
|
+
plugins.forEach(function(loader) {
|
|
3917
|
+
return loader.onCompositionDestroy(comp);
|
|
3918
|
+
});
|
|
3919
|
+
};
|
|
3920
|
+
PluginSystem.onAssetsLoadStart = function onAssetsLoadStart(scene, options) {
|
|
3921
|
+
return _async_to_generator(function() {
|
|
3922
|
+
return __generator(this, function(_state) {
|
|
3923
|
+
return [
|
|
3924
|
+
2,
|
|
3925
|
+
Promise.all(plugins.map(function(plugin) {
|
|
3926
|
+
return plugin.onAssetsLoadStart(scene, options);
|
|
3927
|
+
}))
|
|
3928
|
+
];
|
|
3929
|
+
});
|
|
3930
|
+
})();
|
|
3931
|
+
};
|
|
3932
|
+
PluginSystem.onAssetsLoadFinish = function onAssetsLoadFinish(scene, options, engine) {
|
|
3933
|
+
plugins.forEach(function(loader) {
|
|
3934
|
+
return loader.onAssetsLoadFinish(scene, options, engine);
|
|
3935
|
+
});
|
|
3936
|
+
};
|
|
3937
|
+
return PluginSystem;
|
|
3938
|
+
}();
|
|
3939
|
+
var pluginInfoMap = {
|
|
3940
|
+
"alipay-downgrade": "@galacean/effects-plugin-alipay-downgrade",
|
|
3941
|
+
"downgrade": "@galacean/effects-plugin-downgrade",
|
|
3942
|
+
"editor-gizmo": "@galacean/effects-plugin-editor-gizmo",
|
|
3943
|
+
"ffd": "@galacean/effects-plugin-ffd",
|
|
3944
|
+
"ktx2": "@galacean/effects-plugin-ktx2",
|
|
3945
|
+
"model": "@galacean/effects-plugin-model",
|
|
3946
|
+
"video": "@galacean/effects-plugin-multimedia",
|
|
3947
|
+
"audio": "@galacean/effects-plugin-multimedia",
|
|
3948
|
+
"orientation-transformer": "@galacean/effects-plugin-orientation-transformer",
|
|
3949
|
+
"rich-text": "@galacean/effects-plugin-rich-text",
|
|
3950
|
+
"spine": "@galacean/effects-plugin-spine"
|
|
3951
|
+
};
|
|
3952
|
+
function getPluginUsageInfo(name) {
|
|
3953
|
+
var info = pluginInfoMap[name];
|
|
3954
|
+
if (info) {
|
|
3955
|
+
return "\n请按如下命令进行操作(Please follow the commands below to proceed):\n1、使用 npm 安装插件(Install Plugin):npm i " + info + "@latest --save\n2、导入插件(Import Plugin):import '" + info + "'";
|
|
3956
|
+
} else {
|
|
3957
|
+
return "";
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
/**
|
|
3962
|
+
* 抽象插件类
|
|
3963
|
+
* 注册合成不同生命周期的回调函数
|
|
3964
|
+
*/ var Plugin = /*#__PURE__*/ function() {
|
|
3965
|
+
function Plugin() {
|
|
3966
|
+
this.order = 100;
|
|
3967
|
+
this.name = "Plugin";
|
|
3968
|
+
}
|
|
3969
|
+
var _proto = Plugin.prototype;
|
|
3970
|
+
/**
|
|
3971
|
+
* 场景加载时触发,用于加载插件所需的自定义资源。
|
|
3972
|
+
* 此阶段适合发起异步资源请求。
|
|
3973
|
+
* @param scene - 场景对象
|
|
3974
|
+
* @param options - 场景加载选项
|
|
3975
|
+
*/ _proto.onAssetsLoadStart = function onAssetsLoadStart(scene, options) {
|
|
3976
|
+
return _async_to_generator(function() {
|
|
3977
|
+
return __generator(this, function(_state) {
|
|
3978
|
+
return [
|
|
3979
|
+
2
|
|
3980
|
+
];
|
|
3981
|
+
});
|
|
3982
|
+
})();
|
|
3983
|
+
};
|
|
3984
|
+
/**
|
|
3985
|
+
* 场景资源加载完成后触发。
|
|
3986
|
+
* 此时 JSON 中的图片和二进制已加载完成,可对资源做进一步处理。
|
|
3987
|
+
* @param scene - 场景对象
|
|
3988
|
+
* @param options - 场景加载选项
|
|
3989
|
+
* @param engine - 引擎实例
|
|
3990
|
+
*/ _proto.onAssetsLoadFinish = function onAssetsLoadFinish(scene, options, engine) {};
|
|
3991
|
+
/**
|
|
3992
|
+
* 合成创建完成后触发。
|
|
3993
|
+
* @param composition - 合成对象
|
|
3994
|
+
* @param scene - 场景对象
|
|
3995
|
+
*/ _proto.onCompositionCreated = function onCompositionCreated(composition, scene) {};
|
|
3996
|
+
/**
|
|
3997
|
+
* 合成销毁时触发。
|
|
3998
|
+
* @param composition - 合成对象
|
|
3999
|
+
*/ _proto.onCompositionDestroy = function onCompositionDestroy(composition) {};
|
|
4000
|
+
return Plugin;
|
|
4001
|
+
}();
|
|
4002
|
+
|
|
4003
|
+
function _set_prototype_of(o, p) {
|
|
4004
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
4005
|
+
o.__proto__ = p;
|
|
4006
|
+
return o;
|
|
4007
|
+
};
|
|
4008
|
+
return _set_prototype_of(o, p);
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
function _inherits(subClass, superClass) {
|
|
4012
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
4013
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
4014
|
+
}
|
|
4015
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
4016
|
+
constructor: {
|
|
4017
|
+
value: subClass,
|
|
4018
|
+
writable: true,
|
|
4019
|
+
configurable: true
|
|
4020
|
+
}
|
|
4021
|
+
});
|
|
4022
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
4023
|
+
}
|
|
4024
|
+
|
|
3977
4025
|
function _array_like_to_array(arr, len) {
|
|
3978
4026
|
if (len == null || len > arr.length) len = arr.length;
|
|
3979
4027
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -10650,6 +10698,9 @@ var DrawObjectPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10650
10698
|
stencilAction: TextureLoadAction.clear
|
|
10651
10699
|
});
|
|
10652
10700
|
}
|
|
10701
|
+
this.meshes.sort(function(a, b) {
|
|
10702
|
+
return a.priority - b.priority;
|
|
10703
|
+
});
|
|
10653
10704
|
renderer.renderMeshes(this.meshes);
|
|
10654
10705
|
};
|
|
10655
10706
|
_proto.onCameraCleanup = function onCameraCleanup(renderer) {
|
|
@@ -16587,13 +16638,49 @@ CameraController = __decorate([
|
|
|
16587
16638
|
effectsClass(DataType.CameraController)
|
|
16588
16639
|
], CameraController);
|
|
16589
16640
|
|
|
16590
|
-
|
|
16591
|
-
|
|
16641
|
+
function _get_prototype_of(o) {
|
|
16642
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
16643
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
16644
|
+
};
|
|
16645
|
+
return _get_prototype_of(o);
|
|
16646
|
+
}
|
|
16647
|
+
|
|
16648
|
+
function _is_native_function(fn) {
|
|
16649
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
16650
|
+
}
|
|
16651
|
+
|
|
16652
|
+
function _wrap_native_super(Class) {
|
|
16653
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
16654
|
+
_wrap_native_super = function _wrap_native_super(Class) {
|
|
16655
|
+
if (Class === null || !_is_native_function(Class)) return Class;
|
|
16656
|
+
if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
|
|
16657
|
+
if (typeof _cache !== "undefined") {
|
|
16658
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
16659
|
+
_cache.set(Class, Wrapper);
|
|
16660
|
+
}
|
|
16661
|
+
function Wrapper() {
|
|
16662
|
+
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
16663
|
+
}
|
|
16664
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
16665
|
+
constructor: {
|
|
16666
|
+
value: Wrapper,
|
|
16667
|
+
enumerable: false,
|
|
16668
|
+
writable: true,
|
|
16669
|
+
configurable: true
|
|
16670
|
+
}
|
|
16671
|
+
});
|
|
16672
|
+
return _set_prototype_of(Wrapper, Class);
|
|
16673
|
+
};
|
|
16674
|
+
return _wrap_native_super(Class);
|
|
16675
|
+
}
|
|
16676
|
+
|
|
16677
|
+
var CameraVFXItemLoader = /*#__PURE__*/ function(Plugin) {
|
|
16678
|
+
_inherits(CameraVFXItemLoader, Plugin);
|
|
16592
16679
|
function CameraVFXItemLoader() {
|
|
16593
|
-
return
|
|
16680
|
+
return Plugin.apply(this, arguments);
|
|
16594
16681
|
}
|
|
16595
16682
|
return CameraVFXItemLoader;
|
|
16596
|
-
}(
|
|
16683
|
+
}(_wrap_native_super(Plugin));
|
|
16597
16684
|
|
|
16598
16685
|
var HitTestType;
|
|
16599
16686
|
(function(HitTestType) {
|
|
@@ -16877,13 +16964,13 @@ function getCoord(event) {
|
|
|
16877
16964
|
};
|
|
16878
16965
|
}
|
|
16879
16966
|
|
|
16880
|
-
var InteractLoader = /*#__PURE__*/ function(
|
|
16881
|
-
_inherits(InteractLoader,
|
|
16967
|
+
var InteractLoader = /*#__PURE__*/ function(Plugin) {
|
|
16968
|
+
_inherits(InteractLoader, Plugin);
|
|
16882
16969
|
function InteractLoader() {
|
|
16883
|
-
return
|
|
16970
|
+
return Plugin.apply(this, arguments);
|
|
16884
16971
|
}
|
|
16885
16972
|
return InteractLoader;
|
|
16886
|
-
}(
|
|
16973
|
+
}(_wrap_native_super(Plugin));
|
|
16887
16974
|
|
|
16888
16975
|
var vertex = "\nprecision highp float;\n\nattribute vec2 aPoint;\nuniform vec4 uPos;\nuniform vec2 uSize;\nuniform vec4 uQuat;\nuniform vec4 uColor;\nuniform mat4 effects_ObjectToWorld;\nuniform mat4 effects_MatrixInvV;\nuniform mat4 effects_MatrixVP;\nvarying vec4 vColor;\n\nvec3 rotateByQuat(vec3 a, vec4 quat){\n vec3 qvec = quat.xyz;\n vec3 uv = cross(qvec, a);\n vec3 uuv = cross(qvec, uv) * 2.;\n return a +(uv * 2. * quat.w + uuv);\n}\n\nvoid main() {\n vec4 _pos = uPos;\n vec3 point = rotateByQuat(vec3(aPoint.xy * uSize, 0.),uQuat);\n vec4 pos = vec4(_pos.xyz, 1.0);\n pos = effects_ObjectToWorld * pos;\n pos.xyz += effects_MatrixInvV[0].xyz * point.x+ effects_MatrixInvV[1].xyz * point.y;\n gl_Position = effects_MatrixVP * pos;\n vColor = uColor;\n}\n";
|
|
16889
16976
|
var fragment = "\nprecision highp float;\n\n#define fragColor gl_FragColor\n\nvarying vec4 vColor;\nvoid main() {\n gl_FragColor = vColor*vColor.a;\n}\n";
|
|
@@ -17482,16 +17569,16 @@ function shouldIgnoreBouncing(arg, mul) {
|
|
|
17482
17569
|
return MeshCollider;
|
|
17483
17570
|
}();
|
|
17484
17571
|
|
|
17485
|
-
var SpriteLoader = /*#__PURE__*/ function(
|
|
17486
|
-
_inherits(SpriteLoader,
|
|
17572
|
+
var SpriteLoader = /*#__PURE__*/ function(Plugin) {
|
|
17573
|
+
_inherits(SpriteLoader, Plugin);
|
|
17487
17574
|
function SpriteLoader() {
|
|
17488
17575
|
var _this;
|
|
17489
|
-
_this =
|
|
17576
|
+
_this = Plugin.apply(this, arguments) || this;
|
|
17490
17577
|
_this.name = "sprite";
|
|
17491
17578
|
return _this;
|
|
17492
17579
|
}
|
|
17493
17580
|
return SpriteLoader;
|
|
17494
|
-
}(
|
|
17581
|
+
}(_wrap_native_super(Plugin));
|
|
17495
17582
|
|
|
17496
17583
|
/**
|
|
17497
17584
|
* 动画图可播放节点对象
|
|
@@ -19982,7 +20069,7 @@ function calculateDirection(prePoint, point, nextPoint) {
|
|
|
19982
20069
|
if (this.time >= 0 && this.time < particleSystem.item.duration && particleSystem.isEnded()) {
|
|
19983
20070
|
particleSystem.reset();
|
|
19984
20071
|
}
|
|
19985
|
-
particleSystem.
|
|
20072
|
+
particleSystem.simulate(this.time - particleSystem.time);
|
|
19986
20073
|
}
|
|
19987
20074
|
this.lastTime = this.time;
|
|
19988
20075
|
};
|
|
@@ -21433,126 +21520,133 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
21433
21520
|
this.initEmitterTransform();
|
|
21434
21521
|
};
|
|
21435
21522
|
_proto.onUpdate = function onUpdate(dt) {
|
|
21436
|
-
this.
|
|
21523
|
+
if (!this.frozen) {
|
|
21524
|
+
this.update(dt);
|
|
21525
|
+
}
|
|
21526
|
+
};
|
|
21527
|
+
_proto.simulate = function simulate(time) {
|
|
21528
|
+
this.update(time * 1000);
|
|
21529
|
+
this.frozen = true;
|
|
21437
21530
|
};
|
|
21438
21531
|
_proto.update = function update(delta) {
|
|
21439
21532
|
var _this = this;
|
|
21440
|
-
if (this.started
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21448
|
-
|
|
21449
|
-
|
|
21450
|
-
|
|
21451
|
-
|
|
21452
|
-
|
|
21453
|
-
|
|
21454
|
-
|
|
21455
|
-
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
|
|
21460
|
-
|
|
21461
|
-
|
|
21462
|
-
|
|
21533
|
+
if (!this.started) {
|
|
21534
|
+
return;
|
|
21535
|
+
}
|
|
21536
|
+
var now = this.time + delta / 1000;
|
|
21537
|
+
var options = this.options;
|
|
21538
|
+
var loopStartTime = this.loopStartTime;
|
|
21539
|
+
var emission = this.emission;
|
|
21540
|
+
this.time = now;
|
|
21541
|
+
this.upDirectionWorld = null;
|
|
21542
|
+
this.renderer.updateTime(now, delta);
|
|
21543
|
+
var link = this.particleLink;
|
|
21544
|
+
var emitterLifetime = (now - loopStartTime) / this.item.duration;
|
|
21545
|
+
var timePassed = this.timePassed;
|
|
21546
|
+
var trailUpdated = false;
|
|
21547
|
+
var updateTrail = function() {
|
|
21548
|
+
if (_this.trails && !trailUpdated) {
|
|
21549
|
+
trailUpdated = true;
|
|
21550
|
+
link.forEach(function(param) {
|
|
21551
|
+
var time = param[0], pointIndex = param[1], delay = param[2], point = param[3];
|
|
21552
|
+
if (time < timePassed) {
|
|
21553
|
+
_this.clearPointTrail(pointIndex);
|
|
21554
|
+
} else if (timePassed > delay) {
|
|
21555
|
+
_this.updatePointTrail(pointIndex, emitterLifetime, point, delay);
|
|
21556
|
+
}
|
|
21557
|
+
});
|
|
21558
|
+
}
|
|
21559
|
+
};
|
|
21560
|
+
if (!this.ended) {
|
|
21561
|
+
var duration = this.item.duration;
|
|
21562
|
+
var lifetime = this.lifetime;
|
|
21563
|
+
if (timePassed < duration) {
|
|
21564
|
+
var interval = 1 / emission.rateOverTime.getValue(lifetime);
|
|
21565
|
+
var pointCount = Math.floor((timePassed - this.lastEmitTime) / interval);
|
|
21566
|
+
var maxEmissionCount = pointCount;
|
|
21567
|
+
var timeDelta = interval / pointCount;
|
|
21568
|
+
var meshTime = now;
|
|
21569
|
+
var maxCount = options.maxCount;
|
|
21570
|
+
this.updateEmitterTransform(timePassed);
|
|
21571
|
+
var shouldSkipGenerate = function() {
|
|
21572
|
+
var first = link.first;
|
|
21573
|
+
return _this.emissionStopped || link.length === maxCount && first && first.content[0] - loopStartTime > timePassed;
|
|
21574
|
+
};
|
|
21575
|
+
for(var i = 0; i < maxEmissionCount && i < maxCount; i++){
|
|
21576
|
+
if (shouldSkipGenerate()) {
|
|
21577
|
+
break;
|
|
21578
|
+
}
|
|
21579
|
+
var p = this.createPoint(lifetime);
|
|
21580
|
+
p.delay += meshTime + i * timeDelta;
|
|
21581
|
+
this.addParticle(p, maxCount);
|
|
21582
|
+
this.lastEmitTime = timePassed;
|
|
21463
21583
|
}
|
|
21464
|
-
|
|
21465
|
-
|
|
21466
|
-
|
|
21467
|
-
|
|
21468
|
-
if (timePassed < duration) {
|
|
21469
|
-
var interval = 1 / emission.rateOverTime.getValue(lifetime);
|
|
21470
|
-
var pointCount = Math.floor((timePassed - this.lastEmitTime) / interval);
|
|
21471
|
-
var maxEmissionCount = pointCount;
|
|
21472
|
-
var timeDelta = interval / pointCount;
|
|
21473
|
-
var meshTime = now;
|
|
21474
|
-
var maxCount = options.maxCount;
|
|
21475
|
-
this.updateEmitterTransform(timePassed);
|
|
21476
|
-
var shouldSkipGenerate = function() {
|
|
21477
|
-
var first = link.first;
|
|
21478
|
-
return _this.emissionStopped || link.length === maxCount && first && first.content[0] - loopStartTime > timePassed;
|
|
21479
|
-
};
|
|
21480
|
-
for(var i = 0; i < maxEmissionCount && i < maxCount; i++){
|
|
21481
|
-
if (shouldSkipGenerate()) {
|
|
21482
|
-
break;
|
|
21483
|
-
}
|
|
21484
|
-
var p = this.createPoint(lifetime);
|
|
21485
|
-
p.delay += meshTime + i * timeDelta;
|
|
21486
|
-
this.addParticle(p, maxCount);
|
|
21487
|
-
this.lastEmitTime = timePassed;
|
|
21584
|
+
var bursts = emission.bursts;
|
|
21585
|
+
for(var j = (bursts == null ? void 0 : bursts.length) - 1, cursor = 0; j >= 0 && cursor < maxCount; j--){
|
|
21586
|
+
if (shouldSkipGenerate()) {
|
|
21587
|
+
break;
|
|
21488
21588
|
}
|
|
21489
|
-
var
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
|
|
21589
|
+
var burst = bursts[j];
|
|
21590
|
+
var opts = !burst.disabled && burst.getGeneratorOptions(timePassed, lifetime);
|
|
21591
|
+
if (opts) {
|
|
21592
|
+
var originVec = [
|
|
21593
|
+
0,
|
|
21594
|
+
0,
|
|
21595
|
+
0
|
|
21596
|
+
];
|
|
21597
|
+
var offsets = emission.burstOffsets[j];
|
|
21598
|
+
var burstOffset = offsets && offsets[opts.cycleIndex] || originVec;
|
|
21599
|
+
if (burst.once) {
|
|
21600
|
+
this.removeBurst(j);
|
|
21493
21601
|
}
|
|
21494
|
-
var
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
0,
|
|
21499
|
-
0,
|
|
21500
|
-
0
|
|
21501
|
-
];
|
|
21502
|
-
var offsets = emission.burstOffsets[j];
|
|
21503
|
-
var burstOffset = offsets && offsets[opts.cycleIndex] || originVec;
|
|
21504
|
-
if (burst.once) {
|
|
21505
|
-
this.removeBurst(j);
|
|
21506
|
-
}
|
|
21507
|
-
for(var i1 = 0; i1 < opts.count && cursor < maxCount; i1++){
|
|
21508
|
-
var _p_transform;
|
|
21509
|
-
if (shouldSkipGenerate()) {
|
|
21510
|
-
break;
|
|
21511
|
-
}
|
|
21512
|
-
var p1 = this.initPoint(this.shape.generate({
|
|
21513
|
-
total: opts.total,
|
|
21514
|
-
index: opts.index,
|
|
21515
|
-
burstIndex: i1,
|
|
21516
|
-
burstCount: opts.count
|
|
21517
|
-
}));
|
|
21518
|
-
p1.delay += meshTime;
|
|
21519
|
-
cursor++;
|
|
21520
|
-
(_p_transform = p1.transform).translate.apply(_p_transform, [].concat(burstOffset));
|
|
21521
|
-
this.addParticle(p1, maxCount);
|
|
21602
|
+
for(var i1 = 0; i1 < opts.count && cursor < maxCount; i1++){
|
|
21603
|
+
var _p_transform;
|
|
21604
|
+
if (shouldSkipGenerate()) {
|
|
21605
|
+
break;
|
|
21522
21606
|
}
|
|
21607
|
+
var p1 = this.initPoint(this.shape.generate({
|
|
21608
|
+
total: opts.total,
|
|
21609
|
+
index: opts.index,
|
|
21610
|
+
burstIndex: i1,
|
|
21611
|
+
burstCount: opts.count
|
|
21612
|
+
}));
|
|
21613
|
+
p1.delay += meshTime;
|
|
21614
|
+
cursor++;
|
|
21615
|
+
(_p_transform = p1.transform).translate.apply(_p_transform, [].concat(burstOffset));
|
|
21616
|
+
this.addParticle(p1, maxCount);
|
|
21523
21617
|
}
|
|
21524
21618
|
}
|
|
21525
|
-
} else if (this.item.endBehavior === EndBehavior.restart) {
|
|
21526
|
-
updateTrail();
|
|
21527
|
-
this.loopStartTime = now - duration;
|
|
21528
|
-
this.lastEmitTime -= duration;
|
|
21529
|
-
this.time -= duration;
|
|
21530
|
-
emission.bursts.forEach(function(b) {
|
|
21531
|
-
return b.reset();
|
|
21532
|
-
});
|
|
21533
|
-
this.particleLink.forEach(function(content) {
|
|
21534
|
-
content[0] -= duration;
|
|
21535
|
-
content[2] -= duration;
|
|
21536
|
-
content[3].delay -= duration;
|
|
21537
|
-
});
|
|
21538
|
-
this.renderer.minusTimeForLoop(duration);
|
|
21539
|
-
} else {
|
|
21540
|
-
this.ended = true;
|
|
21541
|
-
var endBehavior = this.item.endBehavior;
|
|
21542
|
-
if (endBehavior === EndBehavior.freeze) {
|
|
21543
|
-
this.frozen = true;
|
|
21544
|
-
}
|
|
21545
21619
|
}
|
|
21546
|
-
} else if (this.item.endBehavior
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
|
|
21550
|
-
|
|
21551
|
-
|
|
21620
|
+
} else if (this.item.endBehavior === EndBehavior.restart) {
|
|
21621
|
+
updateTrail();
|
|
21622
|
+
this.loopStartTime = now - duration;
|
|
21623
|
+
this.lastEmitTime -= duration;
|
|
21624
|
+
this.time -= duration;
|
|
21625
|
+
emission.bursts.forEach(function(b) {
|
|
21626
|
+
return b.reset();
|
|
21627
|
+
});
|
|
21628
|
+
this.particleLink.forEach(function(content) {
|
|
21629
|
+
content[0] -= duration;
|
|
21630
|
+
content[2] -= duration;
|
|
21631
|
+
content[3].delay -= duration;
|
|
21632
|
+
});
|
|
21633
|
+
this.renderer.minusTimeForLoop(duration);
|
|
21634
|
+
} else {
|
|
21635
|
+
this.ended = true;
|
|
21636
|
+
var endBehavior = this.item.endBehavior;
|
|
21637
|
+
if (endBehavior === EndBehavior.freeze) {
|
|
21638
|
+
this.frozen = true;
|
|
21639
|
+
}
|
|
21640
|
+
}
|
|
21641
|
+
} else if (this.item.endBehavior !== EndBehavior.restart) {
|
|
21642
|
+
if (EndBehavior.destroy === this.item.endBehavior) {
|
|
21643
|
+
var node = link.last;
|
|
21644
|
+
if (node && node.content[0] < this.time) {
|
|
21645
|
+
this.destroyed = true;
|
|
21552
21646
|
}
|
|
21553
21647
|
}
|
|
21554
|
-
updateTrail();
|
|
21555
21648
|
}
|
|
21649
|
+
updateTrail();
|
|
21556
21650
|
};
|
|
21557
21651
|
_proto.drawStencilMask = function drawStencilMask(renderer) {
|
|
21558
21652
|
if (!this.isActiveAndEnabled) {
|
|
@@ -25592,7 +25686,6 @@ var SpriteComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
25592
25686
|
_this = MaskableGraphic.call(this, engine) || this;
|
|
25593
25687
|
_this.time = 0;
|
|
25594
25688
|
_this.duration = 1;
|
|
25595
|
-
_this.loop = true;
|
|
25596
25689
|
/**
|
|
25597
25690
|
* @internal
|
|
25598
25691
|
*/ _this.splits = singleSplits;
|
|
@@ -25607,11 +25700,13 @@ var SpriteComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
25607
25700
|
var _this = this;
|
|
25608
25701
|
var time = this.time;
|
|
25609
25702
|
var duration = this.duration;
|
|
25610
|
-
|
|
25703
|
+
var textureAnimation = this.textureSheetAnimation;
|
|
25704
|
+
var _textureAnimation_loop;
|
|
25705
|
+
var loop = (_textureAnimation_loop = textureAnimation == null ? void 0 : textureAnimation.loop) != null ? _textureAnimation_loop : true;
|
|
25706
|
+
if (time > duration && loop) {
|
|
25611
25707
|
time = time % duration;
|
|
25612
25708
|
}
|
|
25613
25709
|
var life = Math.min(Math.max(time / duration, 0.0), 1.0);
|
|
25614
|
-
var ta = this.textureSheetAnimation;
|
|
25615
25710
|
var video = this.renderer.texture.source.video;
|
|
25616
25711
|
if (video) {
|
|
25617
25712
|
if (time === 0) {
|
|
@@ -25623,9 +25718,9 @@ var SpriteComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
25623
25718
|
}
|
|
25624
25719
|
this.renderer.texture.uploadCurrentVideoFrame();
|
|
25625
25720
|
}
|
|
25626
|
-
if (
|
|
25721
|
+
if (textureAnimation) {
|
|
25627
25722
|
var _this_material_getVector4;
|
|
25628
|
-
var total =
|
|
25723
|
+
var total = textureAnimation.total || textureAnimation.row * textureAnimation.col;
|
|
25629
25724
|
var texRectX = 0;
|
|
25630
25725
|
var texRectY = 0;
|
|
25631
25726
|
var texRectW = 1;
|
|
@@ -25646,20 +25741,20 @@ var SpriteComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
25646
25741
|
}
|
|
25647
25742
|
var dx, dy;
|
|
25648
25743
|
if (flip) {
|
|
25649
|
-
dx = 1 /
|
|
25650
|
-
dy = 1 /
|
|
25744
|
+
dx = 1 / textureAnimation.row * texRectW;
|
|
25745
|
+
dy = 1 / textureAnimation.col * texRectH;
|
|
25651
25746
|
} else {
|
|
25652
|
-
dx = 1 /
|
|
25653
|
-
dy = 1 /
|
|
25747
|
+
dx = 1 / textureAnimation.col * texRectW;
|
|
25748
|
+
dy = 1 / textureAnimation.row * texRectH;
|
|
25654
25749
|
}
|
|
25655
25750
|
var texOffset;
|
|
25656
|
-
if (
|
|
25751
|
+
if (textureAnimation.animate) {
|
|
25657
25752
|
var frameIndex = Math.round(life * (total - 1));
|
|
25658
|
-
var yIndex = Math.floor(frameIndex /
|
|
25659
|
-
var xIndex = frameIndex - yIndex *
|
|
25753
|
+
var yIndex = Math.floor(frameIndex / textureAnimation.col);
|
|
25754
|
+
var xIndex = frameIndex - yIndex * textureAnimation.col;
|
|
25660
25755
|
texOffset = flip ? [
|
|
25661
25756
|
dx * yIndex,
|
|
25662
|
-
dy * (
|
|
25757
|
+
dy * (textureAnimation.col - xIndex)
|
|
25663
25758
|
] : [
|
|
25664
25759
|
dx * xIndex,
|
|
25665
25760
|
dy * (1 + yIndex)
|
|
@@ -25847,8 +25942,6 @@ var SpriteComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
25847
25942
|
var _data_duration;
|
|
25848
25943
|
//@ts-expect-error
|
|
25849
25944
|
this.duration = (_data_duration = data.duration) != null ? _data_duration : this.item.duration;
|
|
25850
|
-
var _data_loop;
|
|
25851
|
-
this.loop = (_data_loop = data.loop) != null ? _data_loop : true;
|
|
25852
25945
|
};
|
|
25853
25946
|
return SpriteComponent;
|
|
25854
25947
|
}(MaskableGraphic);
|
|
@@ -25856,21 +25949,21 @@ SpriteComponent = __decorate([
|
|
|
25856
25949
|
effectsClass(DataType.SpriteComponent)
|
|
25857
25950
|
], SpriteComponent);
|
|
25858
25951
|
|
|
25859
|
-
var ParticleLoader = /*#__PURE__*/ function(
|
|
25860
|
-
_inherits(ParticleLoader,
|
|
25952
|
+
var ParticleLoader = /*#__PURE__*/ function(Plugin) {
|
|
25953
|
+
_inherits(ParticleLoader, Plugin);
|
|
25861
25954
|
function ParticleLoader() {
|
|
25862
|
-
return
|
|
25955
|
+
return Plugin.apply(this, arguments);
|
|
25863
25956
|
}
|
|
25864
25957
|
return ParticleLoader;
|
|
25865
|
-
}(
|
|
25958
|
+
}(_wrap_native_super(Plugin));
|
|
25866
25959
|
|
|
25867
|
-
var CalculateLoader = /*#__PURE__*/ function(
|
|
25868
|
-
_inherits(CalculateLoader,
|
|
25960
|
+
var CalculateLoader = /*#__PURE__*/ function(Plugin) {
|
|
25961
|
+
_inherits(CalculateLoader, Plugin);
|
|
25869
25962
|
function CalculateLoader() {
|
|
25870
|
-
return
|
|
25963
|
+
return Plugin.apply(this, arguments);
|
|
25871
25964
|
}
|
|
25872
25965
|
return CalculateLoader;
|
|
25873
|
-
}(
|
|
25966
|
+
}(_wrap_native_super(Plugin));
|
|
25874
25967
|
|
|
25875
25968
|
// Based on:
|
|
25876
25969
|
/**
|
|
@@ -28972,6 +29065,12 @@ var TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
28972
29065
|
/**
|
|
28973
29066
|
* 每一行文本的最大宽度
|
|
28974
29067
|
*/ _this.maxLineWidth = 0;
|
|
29068
|
+
/**
|
|
29069
|
+
* 初始文本宽度,用于计算缩放比例
|
|
29070
|
+
*/ _this.baseTextWidth = 0;
|
|
29071
|
+
/**
|
|
29072
|
+
* 初始 `transform.size.x`,用于按比例更新显示宽度
|
|
29073
|
+
*/ _this.baseScaleX = 1;
|
|
28975
29074
|
_this.name = "MText" + seed$2++;
|
|
28976
29075
|
// 初始化canvas资源
|
|
28977
29076
|
_this.canvas = canvasPool.getCanvas();
|
|
@@ -28997,10 +29096,11 @@ var TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
28997
29096
|
text: "默认文本",
|
|
28998
29097
|
fontFamily: "AlibabaSans-BoldItalic",
|
|
28999
29098
|
fontSize: 40,
|
|
29099
|
+
// 统一使用 0-1 颜色值
|
|
29000
29100
|
textColor: [
|
|
29001
|
-
|
|
29002
|
-
|
|
29003
|
-
|
|
29101
|
+
1,
|
|
29102
|
+
1,
|
|
29103
|
+
1,
|
|
29004
29104
|
1
|
|
29005
29105
|
],
|
|
29006
29106
|
fontWeight: TextWeight.normal,
|
|
@@ -29037,6 +29137,10 @@ var TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29037
29137
|
// TextComponentBase
|
|
29038
29138
|
this.updateWithOptions(options);
|
|
29039
29139
|
this.renderText(options);
|
|
29140
|
+
// 记录初始的 textWidth 和 x 缩放,用于后续按比例更新显示宽度
|
|
29141
|
+
// 添加兜底值 1 防止除 0
|
|
29142
|
+
this.baseTextWidth = options.textWidth || this.textLayout.width || 1;
|
|
29143
|
+
this.baseScaleX = this.item.transform.size.x;
|
|
29040
29144
|
// 恢复默认颜色
|
|
29041
29145
|
this.material.setColor("_Color", new Color(1, 1, 1, 1));
|
|
29042
29146
|
};
|
|
@@ -29235,9 +29339,9 @@ var TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29235
29339
|
if (style.isOutlined) {
|
|
29236
29340
|
_this.setupOutline();
|
|
29237
29341
|
}
|
|
29238
|
-
//
|
|
29342
|
+
// textColor 统一是 0-1,写入 canvas 时乘 255
|
|
29239
29343
|
var _style_textColor = style.textColor, r = _style_textColor[0], g = _style_textColor[1], b = _style_textColor[2], a = _style_textColor[3];
|
|
29240
|
-
context.fillStyle = "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
|
|
29344
|
+
context.fillStyle = "rgba(" + r * 255 + ", " + g * 255 + ", " + b * 255 + ", " + a + ")";
|
|
29241
29345
|
var charsInfo = [];
|
|
29242
29346
|
var x = 0;
|
|
29243
29347
|
var y = layout.getOffsetY(style, _this.lineCount, lineHeight, fontSize);
|
|
@@ -29299,6 +29403,31 @@ var TextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
29299
29403
|
layout.autoWidth = normalizedValue;
|
|
29300
29404
|
this.isDirty = true;
|
|
29301
29405
|
};
|
|
29406
|
+
/**
|
|
29407
|
+
* 设置文本框宽度
|
|
29408
|
+
* 手动设置宽度时会自动关闭 `autoWidth`
|
|
29409
|
+
* 同时会按比例更新 `transform.size.x`,让 UI 框宽度也跟着变化
|
|
29410
|
+
* @param value - 文本框宽度
|
|
29411
|
+
*/ _proto.setTextWidth = function setTextWidth(value) {
|
|
29412
|
+
var width = Math.max(0, Number(value) || 0);
|
|
29413
|
+
var layout = this.textLayout;
|
|
29414
|
+
// 宽度没变且已是非 autoWidth 模式,直接返回
|
|
29415
|
+
if (layout.width === width && layout.autoWidth === false) {
|
|
29416
|
+
return;
|
|
29417
|
+
}
|
|
29418
|
+
// 手动设置宽度时关闭 autoWidth
|
|
29419
|
+
layout.autoWidth = false;
|
|
29420
|
+
layout.width = width;
|
|
29421
|
+
// 按当前 overflow 模式重新计算行数和 maxLineWidth
|
|
29422
|
+
this.lineCount = this.getLineCount(this.text || "");
|
|
29423
|
+
this.isDirty = true;
|
|
29424
|
+
// 同步更新外层显示宽度(按比例缩放 transform)
|
|
29425
|
+
// 这样 UI 框的视觉宽度也会跟着文本宽度变化
|
|
29426
|
+
if (this.baseTextWidth > 0) {
|
|
29427
|
+
var scale = width / this.baseTextWidth;
|
|
29428
|
+
this.item.transform.size.x = this.baseScaleX * scale;
|
|
29429
|
+
}
|
|
29430
|
+
};
|
|
29302
29431
|
_proto.setFontSize = function setFontSize(value) {
|
|
29303
29432
|
if (this.textStyle.fontSize === value) {
|
|
29304
29433
|
return;
|
|
@@ -29366,13 +29495,13 @@ applyMixins(TextComponent, [
|
|
|
29366
29495
|
]);
|
|
29367
29496
|
|
|
29368
29497
|
// TODO: 注册必须用
|
|
29369
|
-
var TextLoader = /*#__PURE__*/ function(
|
|
29370
|
-
_inherits(TextLoader,
|
|
29498
|
+
var TextLoader = /*#__PURE__*/ function(Plugin) {
|
|
29499
|
+
_inherits(TextLoader, Plugin);
|
|
29371
29500
|
function TextLoader() {
|
|
29372
|
-
return
|
|
29501
|
+
return Plugin.apply(this, arguments);
|
|
29373
29502
|
}
|
|
29374
29503
|
return TextLoader;
|
|
29375
|
-
}(
|
|
29504
|
+
}(_wrap_native_super(Plugin));
|
|
29376
29505
|
|
|
29377
29506
|
var Asset = /*#__PURE__*/ function(EffectsObject) {
|
|
29378
29507
|
_inherits(Asset, EffectsObject);
|
|
@@ -30429,6 +30558,10 @@ function version35Migration(json) {
|
|
|
30429
30558
|
if (component.dataType === DataType.TextComponent || component.dataType === DataType.RichTextComponent && component.options) {
|
|
30430
30559
|
ensureTextVerticalAlign(component.options);
|
|
30431
30560
|
}
|
|
30561
|
+
// 处理文本颜色从 0-255 到 0-1 的转换
|
|
30562
|
+
if (component.dataType === DataType.TextComponent) {
|
|
30563
|
+
convertTextColorTo01(component.options);
|
|
30564
|
+
}
|
|
30432
30565
|
}
|
|
30433
30566
|
}
|
|
30434
30567
|
//@ts-expect-error
|
|
@@ -30448,6 +30581,22 @@ function version35Migration(json) {
|
|
|
30448
30581
|
options.TextVerticalAlign = options.textBaseline;
|
|
30449
30582
|
}
|
|
30450
30583
|
}
|
|
30584
|
+
/**
|
|
30585
|
+
* 将文本颜色从 0-255 转换到 0-1
|
|
30586
|
+
*/ function convertTextColorTo01(options) {
|
|
30587
|
+
if (!options || !options.textColor) {
|
|
30588
|
+
return;
|
|
30589
|
+
}
|
|
30590
|
+
var textColor = options.textColor;
|
|
30591
|
+
var _textColor_;
|
|
30592
|
+
// 将 RGB 从 0-255 转换到 0-1(alpha 通道已经是 0-1,不需要转换)
|
|
30593
|
+
options.textColor = [
|
|
30594
|
+
textColor[0] / 255.0,
|
|
30595
|
+
textColor[1] / 255.0,
|
|
30596
|
+
textColor[2] / 255.0,
|
|
30597
|
+
(_textColor_ = textColor[3]) != null ? _textColor_ : 1
|
|
30598
|
+
];
|
|
30599
|
+
}
|
|
30451
30600
|
/**
|
|
30452
30601
|
* 根据形状获取形状几何体数据
|
|
30453
30602
|
* @param shape - 形状
|
|
@@ -31224,6 +31373,7 @@ function getStandardParticleContent(particle) {
|
|
|
31224
31373
|
}
|
|
31225
31374
|
var textureSheetAnimation = particle.textureSheetAnimation;
|
|
31226
31375
|
if (textureSheetAnimation) {
|
|
31376
|
+
// @ts-expect-error
|
|
31227
31377
|
ret.textureSheetAnimation = {
|
|
31228
31378
|
row: textureSheetAnimation.row,
|
|
31229
31379
|
col: textureSheetAnimation.col,
|
|
@@ -31353,6 +31503,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31353
31503
|
var ret = getStandardNullContent(sprite, transform);
|
|
31354
31504
|
var texAni = sprite.textureSheetAnimation;
|
|
31355
31505
|
if (texAni) {
|
|
31506
|
+
// @ts-expect-error
|
|
31356
31507
|
ret.textureSheetAnimation = {
|
|
31357
31508
|
row: texAni.row,
|
|
31358
31509
|
col: texAni.col,
|
|
@@ -31370,7 +31521,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31370
31521
|
return ret;
|
|
31371
31522
|
}
|
|
31372
31523
|
|
|
31373
|
-
var version$2 = "2.8.0-alpha.
|
|
31524
|
+
var version$2 = "2.8.0-alpha.5";
|
|
31374
31525
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
31375
31526
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
31376
31527
|
var reverseParticle = false;
|
|
@@ -32010,8 +32161,8 @@ var seed$1 = 1;
|
|
|
32010
32161
|
};
|
|
32011
32162
|
return [
|
|
32012
32163
|
4,
|
|
32013
|
-
hookTimeInfo("plugin:
|
|
32014
|
-
return _this.
|
|
32164
|
+
hookTimeInfo("plugin:onAssetsLoadStart", function() {
|
|
32165
|
+
return _this.onPluginSceneLoadStart(scene);
|
|
32015
32166
|
})
|
|
32016
32167
|
];
|
|
32017
32168
|
case 6:
|
|
@@ -32019,7 +32170,7 @@ var seed$1 = 1;
|
|
|
32019
32170
|
_jsonScene_bins = jsonScene.bins, bins = _jsonScene_bins === void 0 ? [] : _jsonScene_bins, images = jsonScene.images, fonts = jsonScene.fonts;
|
|
32020
32171
|
return [
|
|
32021
32172
|
4,
|
|
32022
|
-
Promise.all([
|
|
32173
|
+
Promise.all([].concat([
|
|
32023
32174
|
hookTimeInfo("processBins", function() {
|
|
32024
32175
|
return _this.processBins(bins);
|
|
32025
32176
|
}),
|
|
@@ -32029,7 +32180,11 @@ var seed$1 = 1;
|
|
|
32029
32180
|
hookTimeInfo("processFontURL", function() {
|
|
32030
32181
|
return _this.processFontURL(fonts);
|
|
32031
32182
|
})
|
|
32032
|
-
]
|
|
32183
|
+
], _this.options.useHevcVideo ? [
|
|
32184
|
+
hookTimeInfo("processVideoURL", function() {
|
|
32185
|
+
return _this.processVideoURL(jsonScene);
|
|
32186
|
+
})
|
|
32187
|
+
] : []))
|
|
32033
32188
|
];
|
|
32034
32189
|
case 7:
|
|
32035
32190
|
_ref = _state.sent(), loadedBins = _ref[0], loadedImages = _ref[1];
|
|
@@ -32299,7 +32454,7 @@ var seed$1 = 1;
|
|
|
32299
32454
|
});
|
|
32300
32455
|
})();
|
|
32301
32456
|
};
|
|
32302
|
-
_proto.
|
|
32457
|
+
_proto.onPluginSceneLoadStart = function onPluginSceneLoadStart(scene) {
|
|
32303
32458
|
var _this = this;
|
|
32304
32459
|
return _async_to_generator(function() {
|
|
32305
32460
|
return __generator(this, function(_state) {
|
|
@@ -32307,7 +32462,7 @@ var seed$1 = 1;
|
|
|
32307
32462
|
case 0:
|
|
32308
32463
|
return [
|
|
32309
32464
|
4,
|
|
32310
|
-
PluginSystem.
|
|
32465
|
+
PluginSystem.onAssetsLoadStart(scene, _this.options)
|
|
32311
32466
|
];
|
|
32312
32467
|
case 1:
|
|
32313
32468
|
_state.sent();
|
|
@@ -32415,6 +32570,30 @@ var seed$1 = 1;
|
|
|
32415
32570
|
});
|
|
32416
32571
|
})();
|
|
32417
32572
|
};
|
|
32573
|
+
_proto.processVideoURL = function processVideoURL(jsonScene) {
|
|
32574
|
+
return _async_to_generator(function() {
|
|
32575
|
+
return __generator(this, function(_state) {
|
|
32576
|
+
if (!(jsonScene == null ? void 0 : jsonScene.videos) || !Array.isArray(jsonScene.videos)) {
|
|
32577
|
+
return [
|
|
32578
|
+
2
|
|
32579
|
+
];
|
|
32580
|
+
}
|
|
32581
|
+
jsonScene.videos.forEach(function(video) {
|
|
32582
|
+
var hevc = video.hevc;
|
|
32583
|
+
if (!(hevc == null ? void 0 : hevc.url) || !(hevc == null ? void 0 : hevc.codec)) {
|
|
32584
|
+
return;
|
|
32585
|
+
}
|
|
32586
|
+
var codec = parseCodec(hevc.codec);
|
|
32587
|
+
if (codec && canPlayHevcCodec(codec)) {
|
|
32588
|
+
video.url = hevc.url;
|
|
32589
|
+
}
|
|
32590
|
+
});
|
|
32591
|
+
return [
|
|
32592
|
+
2
|
|
32593
|
+
];
|
|
32594
|
+
});
|
|
32595
|
+
})();
|
|
32596
|
+
};
|
|
32418
32597
|
_proto.loadJSON = function loadJSON(url) {
|
|
32419
32598
|
var _this = this;
|
|
32420
32599
|
return _async_to_generator(function() {
|
|
@@ -35008,8 +35187,8 @@ var SceneLoader = /*#__PURE__*/ function() {
|
|
|
35008
35187
|
case 1:
|
|
35009
35188
|
loadedScene = _state.sent();
|
|
35010
35189
|
engine.clearResources();
|
|
35011
|
-
// 触发插件系统 pluginSystem 的回调
|
|
35012
|
-
PluginSystem.
|
|
35190
|
+
// 触发插件系统 pluginSystem 的回调 onAssetsLoadFinish
|
|
35191
|
+
PluginSystem.onAssetsLoadFinish(loadedScene, assetManager.options, engine);
|
|
35013
35192
|
engine.assetService.prepareAssets(loadedScene, loadedScene.assets);
|
|
35014
35193
|
engine.assetService.updateTextVariables(loadedScene, options.variables);
|
|
35015
35194
|
engine.assetService.initializeTexture(loadedScene);
|
|
@@ -35071,7 +35250,7 @@ registerPlugin("sprite", SpriteLoader);
|
|
|
35071
35250
|
registerPlugin("particle", ParticleLoader);
|
|
35072
35251
|
registerPlugin("cal", CalculateLoader);
|
|
35073
35252
|
registerPlugin("interact", InteractLoader);
|
|
35074
|
-
var version$1 = "2.8.0-alpha.
|
|
35253
|
+
var version$1 = "2.8.0-alpha.5";
|
|
35075
35254
|
logger.info("Core version: " + version$1 + ".");
|
|
35076
35255
|
|
|
35077
35256
|
var _obj;
|
|
@@ -36365,8 +36544,8 @@ var ThreeRenderer = /*#__PURE__*/ function(Renderer) {
|
|
|
36365
36544
|
_$scene = _state.sent();
|
|
36366
36545
|
engine = _this.engine;
|
|
36367
36546
|
engine.clearResources();
|
|
36368
|
-
// 触发插件系统 pluginSystem 的回调
|
|
36369
|
-
PluginSystem.
|
|
36547
|
+
// 触发插件系统 pluginSystem 的回调 onAssetsLoadFinish
|
|
36548
|
+
PluginSystem.onAssetsLoadFinish(_$scene, assetManager.options, engine);
|
|
36370
36549
|
_this.assetService.prepareAssets(_$scene, assetManager.getAssets());
|
|
36371
36550
|
_this.assetService.updateTextVariables(_$scene, assetManager.options.variables);
|
|
36372
36551
|
_this.assetService.initializeTexture(_$scene);
|
|
@@ -36661,8 +36840,8 @@ applyMixins(ThreeTextComponent, [
|
|
|
36661
36840
|
*/ Mesh.create = function(engine, props) {
|
|
36662
36841
|
return new ThreeMesh(engine, props);
|
|
36663
36842
|
};
|
|
36664
|
-
var version = "2.8.0-alpha.
|
|
36843
|
+
var version = "2.8.0-alpha.5";
|
|
36665
36844
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
36666
36845
|
|
|
36667
|
-
export {
|
|
36846
|
+
export { ActivationMixerPlayable, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AndNode, AndNodeData, Animatable, AnimationClip, AnimationClipNode, AnimationClipNodeData, AnimationGraphAsset, Animator, ApplyAdditiveNode, ApplyAdditiveNodeData, Asset, AssetLoader, AssetManager, AssetService, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, BlendNode, BlendNodeData, BoolValueNode, CONSTANT_MAP_BLEND, CONSTANT_MAP_DEPTH, CONSTANT_MAP_STENCIL_FUNC, CONSTANT_MAP_STENCIL_OP, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, ColorCurve, ColorPlayable, ColorPropertyMixerPlayable, ColorPropertyPlayableAsset, ColorPropertyTrack, Component, ComponentTimePlayable, ComponentTimePlayableAsset, ComponentTimeTrack, Composition, CompositionComponent, CompressTextureCapabilityType, ConstBoolNode, ConstBoolNodeData, ConstFloatNode, ConstFloatNodeData, ConstraintTarget, ControlParameterBoolNode, ControlParameterBoolNodeData, ControlParameterFloatNode, ControlParameterFloatNodeData, ControlParameterTriggerNode, ControlParameterTriggerNodeData, DEFAULT_FONTS, DEFAULT_FPS, Database, Deferred, DestroyOptions, Downloader, DrawObjectPass, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectComponentTimeTrack, EffectsObject, EffectsPackage, Ellipse, Engine, EqualNodeData, EventEmitter, EventSystem, Fake3DAnimationMode, Fake3DComponent, FilterMode, Float16ArrayWrapper, FloatComparisonNode, FloatComparisonNodeData, FloatPropertyMixerPlayable, FloatPropertyPlayableAsset, FloatPropertyTrack, FloatValueNode, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, GraphInstance, GraphNode, GraphNodeData, GraphicsPath, GreaterNodeData, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, InvalidIndex, Item, LayerBlendNode, LayerBlendNodeData, LessNodeData, LineSegments, LinearValue, MaskMode, MaskProcessor, MaskableGraphic, Material, MaterialDataBlock, MaterialRenderType, MaterialTrack, Mesh, MeshCollider, NodeTransform, NotNode, NotNodeData, ObjectBindingTrack, OrNode, OrNodeData, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleMixerPlayable, ParticleSystem, ParticleSystemRenderer, ParticleTrack, PassTextureCache, PathSegments, PlayState, Playable, PlayableAsset, PlayableOutput, Plugin, PluginSystem, PointerEventData, PointerEventType, PolyStar, Polygon, Pose, PoseNode, PositionConstraint, PostProcessVolume, PropertyClipPlayable, PropertyTrack, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RaycastResult, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTargetPool, RenderTextureFormat, Renderbuffer, Renderer, RendererComponent, RuntimeClip, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0, SEMANTIC_PRE_COLOR_ATTACHMENT_0, SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0, SPRITE_VERTEX_STRIDE, Scene, SceneLoader, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderFactory, ShaderType, ShaderVariant, ShapeComponent, ShapePath, SourceType, SpriteColorMixerPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteComponentTimeTrack, SpriteLoader, StarType, StateMachineNode, StateMachineNodeData, StateNode, StateNodeData, StaticValue, SubCompositionClipPlayable, SubCompositionMixerPlayable, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TangentMode, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TexturePaintScaleMode, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelineInstance, TrackAsset, TrackMixerPlayable, TrackType, Transform, TransformMixerPlayable, TransformPlayable, TransformPlayableAsset, TransformTrack, TransitionNode, TransitionNodeData, TransitionState, VFXItem, ValueGetter, ValueNode, Vector2Curve, Vector2PropertyMixerPlayable, Vector2PropertyPlayableAsset, Vector2PropertyTrack, Vector3Curve, Vector3PropertyMixerPlayable, Vector3PropertyTrack, Vector3ropertyPlayableAsset, Vector4Curve, Vector4PropertyMixerPlayable, Vector4PropertyPlayableAsset, Vector4PropertyTrack, WeightedMode, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, buildLine, calculateTranslation, canPlayHevcCodec, canUseBOM, canvasPool, closePointEps, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createGLContext, createKeyFrameMeta, createShape, createValueGetter, curveEps, decimalEqual, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getClass, getColorFromGradientStops, getConfig, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getKeyFrameMetaByRawValue, getMergedStore, getNodeDataClass, getParticleMeshShader, getPixelRatio, getPluginUsageInfo, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isOpenHarmony, isPlainObject, isPowerOfTwo, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, modifyMaxKeyframeShader, nearestPowerOfTwo, nodeDataClass, noop, normalizeColor, numberToFix, oldBezierKeyFramesToNew, parseCodec, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, passRenderLevel, pluginLoaderMap, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setRayFromCamera, setSideMode, setUniformValue, sortByOrder, index$1 as spec, textureLoaderRegistry, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecFill, vecMulCombine, version, vertexFormatType2GLType };
|
|
36668
36847
|
//# sourceMappingURL=index.mjs.map
|