@galacean/effects-threejs 2.0.0-alpha.28 → 2.0.0-alpha.29
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 +596 -515
- 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 +596 -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.0.0-alpha.
|
|
6
|
+
* Version: v2.0.0-alpha.29
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -4600,9 +4600,6 @@ function getDirectStore(target) {
|
|
|
4600
4600
|
};
|
|
4601
4601
|
return EffectsObject;
|
|
4602
4602
|
}();
|
|
4603
|
-
__decorate([
|
|
4604
|
-
serialize()
|
|
4605
|
-
], EffectsObject.prototype, "guid", void 0);
|
|
4606
4603
|
|
|
4607
4604
|
/**
|
|
4608
4605
|
* @since 2.0.0
|
|
@@ -4880,8 +4877,8 @@ var CameraController = /*#__PURE__*/ function(ItemBehaviour) {
|
|
|
4880
4877
|
camera.far = this.options.far;
|
|
4881
4878
|
camera.fov = this.options.fov;
|
|
4882
4879
|
camera.clipMode = this.options.clipMode;
|
|
4883
|
-
camera.position = this.transform.
|
|
4884
|
-
camera.rotation = this.transform.
|
|
4880
|
+
camera.position = this.transform.getWorldPosition();
|
|
4881
|
+
camera.rotation = this.transform.getWorldRotation();
|
|
4885
4882
|
}
|
|
4886
4883
|
};
|
|
4887
4884
|
_proto.fromData = function fromData(data) {
|
|
@@ -7866,6 +7863,7 @@ var TextureSourceType;
|
|
|
7866
7863
|
return Downloader;
|
|
7867
7864
|
}();
|
|
7868
7865
|
var webPFailed = false;
|
|
7866
|
+
var avifFailed = false;
|
|
7869
7867
|
/**
|
|
7870
7868
|
* 异步加载一个 WebP 图片文件,如果不支持 WebP,则加载 PNG 图片文件
|
|
7871
7869
|
* @param png - PNG 图片文件的 URL
|
|
@@ -7941,6 +7939,81 @@ function _loadWebPOptional() {
|
|
|
7941
7939
|
});
|
|
7942
7940
|
return _loadWebPOptional.apply(this, arguments);
|
|
7943
7941
|
}
|
|
7942
|
+
/**
|
|
7943
|
+
* 异步加载一个 AVIF 图片文件,如果不支持 AVIF,则加载 PNG 图片文件
|
|
7944
|
+
* @param png - PNG 图片文件的 URL
|
|
7945
|
+
* @param avif - AVIF 图片文件的 URL
|
|
7946
|
+
*/ function loadAVIFOptional(png, avif) {
|
|
7947
|
+
return _loadAVIFOptional.apply(this, arguments);
|
|
7948
|
+
}
|
|
7949
|
+
function _loadAVIFOptional() {
|
|
7950
|
+
_loadAVIFOptional = _async_to_generator(function(png, avif) {
|
|
7951
|
+
var image, image1, image2;
|
|
7952
|
+
return __generator(this, function(_state) {
|
|
7953
|
+
switch(_state.label){
|
|
7954
|
+
case 0:
|
|
7955
|
+
if (!(avifFailed || !avif)) return [
|
|
7956
|
+
3,
|
|
7957
|
+
2
|
|
7958
|
+
];
|
|
7959
|
+
return [
|
|
7960
|
+
4,
|
|
7961
|
+
loadImage(png)
|
|
7962
|
+
];
|
|
7963
|
+
case 1:
|
|
7964
|
+
image = _state.sent();
|
|
7965
|
+
return [
|
|
7966
|
+
2,
|
|
7967
|
+
{
|
|
7968
|
+
image: image,
|
|
7969
|
+
url: png
|
|
7970
|
+
}
|
|
7971
|
+
];
|
|
7972
|
+
case 2:
|
|
7973
|
+
_state.trys.push([
|
|
7974
|
+
2,
|
|
7975
|
+
4,
|
|
7976
|
+
,
|
|
7977
|
+
6
|
|
7978
|
+
]);
|
|
7979
|
+
return [
|
|
7980
|
+
4,
|
|
7981
|
+
loadImage(avif)
|
|
7982
|
+
];
|
|
7983
|
+
case 3:
|
|
7984
|
+
image1 = _state.sent();
|
|
7985
|
+
return [
|
|
7986
|
+
2,
|
|
7987
|
+
{
|
|
7988
|
+
image: image1,
|
|
7989
|
+
url: avif
|
|
7990
|
+
}
|
|
7991
|
+
];
|
|
7992
|
+
case 4:
|
|
7993
|
+
_state.sent();
|
|
7994
|
+
avifFailed = true;
|
|
7995
|
+
return [
|
|
7996
|
+
4,
|
|
7997
|
+
loadImage(png)
|
|
7998
|
+
];
|
|
7999
|
+
case 5:
|
|
8000
|
+
image2 = _state.sent();
|
|
8001
|
+
return [
|
|
8002
|
+
2,
|
|
8003
|
+
{
|
|
8004
|
+
image: image2,
|
|
8005
|
+
url: png
|
|
8006
|
+
}
|
|
8007
|
+
];
|
|
8008
|
+
case 6:
|
|
8009
|
+
return [
|
|
8010
|
+
2
|
|
8011
|
+
];
|
|
8012
|
+
}
|
|
8013
|
+
});
|
|
8014
|
+
});
|
|
8015
|
+
return _loadAVIFOptional.apply(this, arguments);
|
|
8016
|
+
}
|
|
7944
8017
|
/**
|
|
7945
8018
|
* 异步加载一个图片文件
|
|
7946
8019
|
* @param source - 图片文件的 URL、Blob 或 HTMLImageElement 对象
|
|
@@ -11582,7 +11655,7 @@ var gaussianDownVFrag = "precision highp float;varying vec2 uv;uniform sampler2D
|
|
|
11582
11655
|
|
|
11583
11656
|
var gaussianUpFrag = "precision highp float;varying vec2 uv;uniform sampler2D _MainTex;uniform sampler2D _GaussianDownTex;uniform vec2 _GaussianDownTextureSize;float GaussWeight2D(float x,float y,float sigma){float PI=3.14159265358;float E=2.71828182846;float sigma_2=pow(sigma,2.0);float a=-(x*x+y*y)/(2.0*sigma_2);return pow(E,a)/(2.0*PI*sigma_2);}vec3 GaussNxN(sampler2D tex,vec2 uv,vec2 stride,float sigma){vec3 color=vec3(0.,0.,0.);const int r=1;float weight=0.0;for(int i=-r;i<=r;i++){for(int j=-r;j<=r;j++){float w=GaussWeight2D(float(i),float(j),sigma);vec2 coord=uv+vec2(i,j)*stride;color+=texture2D(tex,coord).rgb*w;weight+=w;}}color/=weight;return color;}void main(){vec3 lowResColor=GaussNxN(_MainTex,uv,0.5/_GaussianDownTextureSize,1.0);vec3 highResColor=GaussNxN(_GaussianDownTex,uv,1.0/_GaussianDownTextureSize,1.0);vec3 color=mix(highResColor,lowResColor,0.7);gl_FragColor=vec4(color,1.0);}";
|
|
11584
11657
|
|
|
11585
|
-
var thresholdFrag = "precision highp float;varying vec2 uv;uniform sampler2D _MainTex;uniform float _Threshold;void main(){vec4
|
|
11658
|
+
var thresholdFrag = "precision highp float;varying vec2 uv;uniform sampler2D _MainTex;uniform float _Threshold;void main(){vec4 mainTex=texture2D(_MainTex,uv);mainTex.rgb=pow(mainTex.rgb,vec3(2.2));float brightness=max(mainTex.r,max(mainTex.g,mainTex.b));float w=max(0.0,brightness-_Threshold)/max(brightness,0.00001);mainTex.rgb*=w;mainTex.rgb*=mainTex.a;gl_FragColor=vec4(mainTex.rgb,1.0);}";
|
|
11586
11659
|
|
|
11587
11660
|
// Bloom 阈值 Pass
|
|
11588
11661
|
var BloomThresholdPass = /*#__PURE__*/ function(RenderPass) {
|
|
@@ -11880,28 +11953,6 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
11880
11953
|
return ToneMappingPass;
|
|
11881
11954
|
}(RenderPass);
|
|
11882
11955
|
|
|
11883
|
-
/**
|
|
11884
|
-
* 后处理配置
|
|
11885
|
-
*/ var defaultGlobalVolume = {
|
|
11886
|
-
useHDR: false,
|
|
11887
|
-
/***** Material Uniform *****/ // Bloom
|
|
11888
|
-
useBloom: true,
|
|
11889
|
-
threshold: 1.0,
|
|
11890
|
-
bloomIntensity: 1.0,
|
|
11891
|
-
// ColorAdjustments
|
|
11892
|
-
brightness: 1.0,
|
|
11893
|
-
saturation: 1.0,
|
|
11894
|
-
contrast: 1.0,
|
|
11895
|
-
// Vignette
|
|
11896
|
-
// vignetteColor: new math.Color(0, 0, 0, 1),
|
|
11897
|
-
// vignetteCenter: new math.Vector2(0.5, 0.5),
|
|
11898
|
-
vignetteIntensity: 0.2,
|
|
11899
|
-
vignetteSmoothness: 0.4,
|
|
11900
|
-
vignetteRoundness: 1.0,
|
|
11901
|
-
// ToneMapping
|
|
11902
|
-
useToneMapping: true
|
|
11903
|
-
};
|
|
11904
|
-
|
|
11905
11956
|
var RENDER_PASS_NAME_PREFIX = "_effects_default_";
|
|
11906
11957
|
var seed$6 = 1;
|
|
11907
11958
|
/**
|
|
@@ -11925,7 +11976,7 @@ var seed$6 = 1;
|
|
|
11925
11976
|
} : _options_clearAction;
|
|
11926
11977
|
var engine = renderer.engine;
|
|
11927
11978
|
if (globalVolume) {
|
|
11928
|
-
this.globalVolume =
|
|
11979
|
+
this.globalVolume = globalVolume;
|
|
11929
11980
|
}
|
|
11930
11981
|
this.globalUniforms = new GlobalUniforms();
|
|
11931
11982
|
var attachments = []; //渲染场景物体Pass的RT
|
|
@@ -12962,6 +13013,28 @@ var Renderer = /*#__PURE__*/ function() {
|
|
|
12962
13013
|
return Renderer;
|
|
12963
13014
|
}();
|
|
12964
13015
|
|
|
13016
|
+
/**
|
|
13017
|
+
* 后处理配置
|
|
13018
|
+
*/ var defaultGlobalVolume = {
|
|
13019
|
+
useHDR: false,
|
|
13020
|
+
/***** Material Uniform *****/ // Bloom
|
|
13021
|
+
useBloom: true,
|
|
13022
|
+
threshold: 1.0,
|
|
13023
|
+
bloomIntensity: 1.0,
|
|
13024
|
+
// ColorAdjustments
|
|
13025
|
+
brightness: 1.0,
|
|
13026
|
+
saturation: 1.0,
|
|
13027
|
+
contrast: 1.0,
|
|
13028
|
+
// Vignette
|
|
13029
|
+
// vignetteColor: new math.Color(0, 0, 0, 1),
|
|
13030
|
+
// vignetteCenter: new math.Vector2(0.5, 0.5),
|
|
13031
|
+
vignetteIntensity: 0.2,
|
|
13032
|
+
vignetteSmoothness: 0.4,
|
|
13033
|
+
vignetteRoundness: 1.0,
|
|
13034
|
+
// ToneMapping
|
|
13035
|
+
useToneMapping: true
|
|
13036
|
+
};
|
|
13037
|
+
|
|
12965
13038
|
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#ifdef ENV_EDITOR\n uniform vec4 uEditorTransform;\n#endif\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 #ifdef ENV_EDITOR\n gl_Position = vec4(gl_Position.xy * uEditorTransform.xy + uEditorTransform.zw * gl_Position.w, gl_Position.zw);\n #endif\n}\n";
|
|
12966
13039
|
var fragment = "\nprecision highp float;\n\n#define fragColor gl_FragColor\n\nvarying vec4 vColor;\nvoid main() {\n gl_FragColor = vColor;\n}\n";
|
|
12967
13040
|
var seed$5 = 1;
|
|
@@ -13108,6 +13181,7 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13108
13181
|
}
|
|
13109
13182
|
var _proto = InteractComponent.prototype;
|
|
13110
13183
|
_proto.start = function start() {
|
|
13184
|
+
var _this = this;
|
|
13111
13185
|
var options = this.item.props.content.options;
|
|
13112
13186
|
var env = this.item.engine.renderer.env;
|
|
13113
13187
|
var composition = this.item.composition;
|
|
@@ -13129,6 +13203,16 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13129
13203
|
this.materials = this.previewContent.mesh.materials;
|
|
13130
13204
|
}
|
|
13131
13205
|
this.item.getHitTestParams = this.getHitTestParams;
|
|
13206
|
+
this.item.onEnd = function() {
|
|
13207
|
+
if (_this.item && _this.item.composition) {
|
|
13208
|
+
var _this_previewContent;
|
|
13209
|
+
_this.item.composition.removeInteractiveItem(_this.item, _this.item.props.content.options.type);
|
|
13210
|
+
_this.clickable = false;
|
|
13211
|
+
_this.hasBeenAddedToComposition = false;
|
|
13212
|
+
(_this_previewContent = _this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
|
|
13213
|
+
_this.endDragTarget();
|
|
13214
|
+
}
|
|
13215
|
+
};
|
|
13132
13216
|
};
|
|
13133
13217
|
_proto.update = function update(dt) {
|
|
13134
13218
|
var _this_previewContent;
|
|
@@ -13157,15 +13241,7 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13157
13241
|
this.previewContent.mesh.render(renderer);
|
|
13158
13242
|
}
|
|
13159
13243
|
};
|
|
13160
|
-
_proto.onDestroy = function onDestroy() {
|
|
13161
|
-
if (this.item && this.item.composition) {
|
|
13162
|
-
var _this_previewContent;
|
|
13163
|
-
this.item.composition.removeInteractiveItem(this.item, this.item.props.content.options.type);
|
|
13164
|
-
this.clickable = false;
|
|
13165
|
-
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
|
|
13166
|
-
this.endDragTarget();
|
|
13167
|
-
}
|
|
13168
|
-
};
|
|
13244
|
+
_proto.onDestroy = function onDestroy() {};
|
|
13169
13245
|
_proto.endDragTarget = function endDragTarget() {
|
|
13170
13246
|
// OVERRIDE
|
|
13171
13247
|
};
|
|
@@ -13748,6 +13824,10 @@ var SpriteColorPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
13748
13824
|
}
|
|
13749
13825
|
if (!this.spriteMaterial) {
|
|
13750
13826
|
this.spriteMaterial = boundObject.getComponent(SpriteComponent).material;
|
|
13827
|
+
var startColor = this.spriteMaterial.getVector4("_Color");
|
|
13828
|
+
if (startColor) {
|
|
13829
|
+
this.startColor = startColor.toArray();
|
|
13830
|
+
}
|
|
13751
13831
|
}
|
|
13752
13832
|
var colorInc = vecFill(tempColor, 1);
|
|
13753
13833
|
var colorChanged;
|
|
@@ -13777,12 +13857,6 @@ var SpriteColorPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
13777
13857
|
this.colorOverLifetime = colorStopsFromGradient(colorOverLifetime.color[1]);
|
|
13778
13858
|
}
|
|
13779
13859
|
}
|
|
13780
|
-
this.startColor = clipData.startColor || [
|
|
13781
|
-
1,
|
|
13782
|
-
1,
|
|
13783
|
-
1,
|
|
13784
|
-
1
|
|
13785
|
-
];
|
|
13786
13860
|
return this;
|
|
13787
13861
|
};
|
|
13788
13862
|
return SpriteColorPlayable;
|
|
@@ -14090,7 +14164,7 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14090
14164
|
var splits = item.splits, renderer = item.renderer, textureSheetAnimation = item.textureSheetAnimation;
|
|
14091
14165
|
var sx = 1, sy = 1;
|
|
14092
14166
|
if (renderer.shape) {
|
|
14093
|
-
var _renderer_shape = renderer.shape,
|
|
14167
|
+
var _renderer_shape = renderer.shape, _renderer_shape_index = _renderer_shape.index, index = _renderer_shape_index === void 0 ? [] : _renderer_shape_index, _renderer_shape_aPoint = _renderer_shape.aPoint, aPoint = _renderer_shape_aPoint === void 0 ? [] : _renderer_shape_aPoint;
|
|
14094
14168
|
var point = new Float32Array(aPoint);
|
|
14095
14169
|
var position = [];
|
|
14096
14170
|
var atlasOffset = [];
|
|
@@ -16960,6 +17034,12 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
16960
17034
|
area: area
|
|
16961
17035
|
};
|
|
16962
17036
|
};
|
|
17037
|
+
_proto.onAttached = function onAttached() {
|
|
17038
|
+
Component.prototype.onAttached.call(this);
|
|
17039
|
+
this.renderer.item = this.item;
|
|
17040
|
+
this.item.components.push(this.renderer);
|
|
17041
|
+
this.item.rendererComponents.push(this.renderer);
|
|
17042
|
+
};
|
|
16963
17043
|
_proto.fromData = function fromData(data) {
|
|
16964
17044
|
Component.prototype.fromData.call(this, data);
|
|
16965
17045
|
var props = data;
|
|
@@ -17241,9 +17321,6 @@ var ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
17241
17321
|
}
|
|
17242
17322
|
this.item.getHitTestParams = this.getHitTestParams;
|
|
17243
17323
|
this.item._content = this;
|
|
17244
|
-
this.renderer.item = this.item;
|
|
17245
|
-
this.item.components.push(this.renderer);
|
|
17246
|
-
this.item.rendererComponents.push(this.renderer);
|
|
17247
17324
|
};
|
|
17248
17325
|
_create_class(ParticleSystem, [
|
|
17249
17326
|
{
|
|
@@ -19273,7 +19350,7 @@ function compareTracks(a, b) {
|
|
|
19273
19350
|
_proto.hitTest = function hitTest(ray, x, y, regions, force, options) {
|
|
19274
19351
|
var _this, _loop = function(i) {
|
|
19275
19352
|
var item = _this.items[i];
|
|
19276
|
-
if (item.getVisible() && !item.ended && !VFXItem.isComposition(item) && !skip(item)) {
|
|
19353
|
+
if (item.getVisible() && item.transform.getValid() && !item.ended && !VFXItem.isComposition(item) && !skip(item)) {
|
|
19277
19354
|
var hitParams = item.getHitTestParams(force);
|
|
19278
19355
|
if (hitParams) {
|
|
19279
19356
|
var success = false;
|
|
@@ -19429,18 +19506,6 @@ var TextLayout = /*#__PURE__*/ function() {
|
|
|
19429
19506
|
var tempWidth = fontSize + letterSpace;
|
|
19430
19507
|
this.autoWidth = autoWidth;
|
|
19431
19508
|
this.maxTextWidth = text.length * tempWidth;
|
|
19432
|
-
// if (autoWidth) {
|
|
19433
|
-
// this.width = this.maxTextWidth + this.lineWidth;
|
|
19434
|
-
// this.height = fontSize + this.lineHeight;
|
|
19435
|
-
// } else {
|
|
19436
|
-
// if (textWidth) {
|
|
19437
|
-
// this.maxCharCount = Math.floor((textWidth - this.lineWidth) / (tempWidth));
|
|
19438
|
-
// this.width = textWidth;
|
|
19439
|
-
// } else {
|
|
19440
|
-
// this.width = basicScale[0] * 100;
|
|
19441
|
-
// }
|
|
19442
|
-
// this.height = basicScale[1] * 100;
|
|
19443
|
-
// }
|
|
19444
19509
|
this.width = textWidth;
|
|
19445
19510
|
this.height = textHeight;
|
|
19446
19511
|
this.letterSpace = letterSpace;
|
|
@@ -19877,6 +19942,17 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
19877
19942
|
this.isDirty = true;
|
|
19878
19943
|
};
|
|
19879
19944
|
/**
|
|
19945
|
+
* 设置自适应宽高开关
|
|
19946
|
+
* @param value - 是否自适应宽高开关
|
|
19947
|
+
* @returns
|
|
19948
|
+
*/ _proto.setAutoWidth = function setAutoWidth(value) {
|
|
19949
|
+
if (this.textLayout.autoWidth === value) {
|
|
19950
|
+
return;
|
|
19951
|
+
}
|
|
19952
|
+
this.textLayout.autoWidth = value;
|
|
19953
|
+
this.isDirty = true;
|
|
19954
|
+
};
|
|
19955
|
+
/**
|
|
19880
19956
|
* 更新文本
|
|
19881
19957
|
* @returns
|
|
19882
19958
|
*/ _proto.updateTexture = function updateTexture(flipY) {
|
|
@@ -19889,20 +19965,26 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
19889
19965
|
var layout = this.textLayout;
|
|
19890
19966
|
var fontScale = style.fontScale;
|
|
19891
19967
|
var width = (layout.width + style.fontOffset) * fontScale;
|
|
19892
|
-
var
|
|
19968
|
+
var finalHeight = layout.lineHeight * this.lineCount;
|
|
19893
19969
|
var fontSize = style.fontSize * fontScale;
|
|
19894
19970
|
var lineHeight = layout.lineHeight * fontScale;
|
|
19895
19971
|
this.char = (this.text || "").split("");
|
|
19896
19972
|
this.canvas.width = width;
|
|
19897
|
-
|
|
19898
|
-
|
|
19973
|
+
if (layout.autoWidth) {
|
|
19974
|
+
this.canvas.height = finalHeight * fontScale;
|
|
19975
|
+
this.item.transform.size.set(1, finalHeight / layout.height);
|
|
19976
|
+
} else {
|
|
19977
|
+
this.canvas.height = layout.height * fontScale;
|
|
19978
|
+
}
|
|
19979
|
+
var height = this.canvas.height;
|
|
19980
|
+
context.clearRect(0, 0, width, height);
|
|
19899
19981
|
// fix bug 1/255
|
|
19900
19982
|
context.fillStyle = "rgba(255, 255, 255, 0.0039)";
|
|
19901
19983
|
if (!flipY) {
|
|
19902
19984
|
context.translate(0, height);
|
|
19903
19985
|
context.scale(1, -1);
|
|
19904
19986
|
}
|
|
19905
|
-
context.fillRect(0, 0, width,
|
|
19987
|
+
context.fillRect(0, 0, width, height);
|
|
19906
19988
|
style.fontDesc = this.getFontDesc();
|
|
19907
19989
|
context.font = style.fontDesc;
|
|
19908
19990
|
if (style.hasShadow) {
|
|
@@ -20213,39 +20295,10 @@ var PostProcessVolume = /*#__PURE__*/ function(ItemBehaviour) {
|
|
|
20213
20295
|
_proto.start = function start() {
|
|
20214
20296
|
var composition = this.item.composition;
|
|
20215
20297
|
if (composition) {
|
|
20216
|
-
composition.globalVolume =
|
|
20217
|
-
useHDR: this.useHDR,
|
|
20218
|
-
useBloom: this.useBloom,
|
|
20219
|
-
threshold: this.threshold,
|
|
20220
|
-
bloomIntensity: this.bloomIntensity,
|
|
20221
|
-
brightness: this.brightness,
|
|
20222
|
-
saturation: this.saturation,
|
|
20223
|
-
contrast: this.contrast,
|
|
20224
|
-
vignetteIntensity: this.vignetteIntensity,
|
|
20225
|
-
vignetteSmoothness: this.vignetteSmoothness,
|
|
20226
|
-
vignetteRoundness: this.vignetteRoundness,
|
|
20227
|
-
useToneMapping: this.useToneMapping
|
|
20228
|
-
};
|
|
20298
|
+
composition.globalVolume = this;
|
|
20229
20299
|
composition.createRenderFrame();
|
|
20230
20300
|
}
|
|
20231
20301
|
};
|
|
20232
|
-
_proto.update = function update(dt) {
|
|
20233
|
-
var composition = this.item.composition;
|
|
20234
|
-
if (composition) {
|
|
20235
|
-
var globalVolume = composition.renderFrame.globalVolume;
|
|
20236
|
-
globalVolume.useHDR = this.useHDR;
|
|
20237
|
-
globalVolume.useBloom = this.useBloom;
|
|
20238
|
-
globalVolume.threshold = this.threshold;
|
|
20239
|
-
globalVolume.bloomIntensity = this.bloomIntensity;
|
|
20240
|
-
globalVolume.brightness = this.brightness;
|
|
20241
|
-
globalVolume.saturation = this.saturation;
|
|
20242
|
-
globalVolume.contrast = this.contrast;
|
|
20243
|
-
globalVolume.vignetteIntensity = this.vignetteIntensity;
|
|
20244
|
-
globalVolume.vignetteSmoothness = this.vignetteSmoothness;
|
|
20245
|
-
globalVolume.vignetteRoundness = this.vignetteRoundness;
|
|
20246
|
-
globalVolume.useToneMapping = this.useToneMapping;
|
|
20247
|
-
}
|
|
20248
|
-
};
|
|
20249
20302
|
return PostProcessVolume;
|
|
20250
20303
|
}(ItemBehaviour);
|
|
20251
20304
|
__decorate([
|
|
@@ -21245,27 +21298,46 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
21245
21298
|
res1
|
|
21246
21299
|
];
|
|
21247
21300
|
case 7:
|
|
21248
|
-
if (isObject(property) && property.constructor === Object)
|
|
21249
|
-
|
|
21250
|
-
|
|
21251
|
-
|
|
21252
|
-
|
|
21253
|
-
|
|
21254
|
-
for(_iterator1 = _create_for_of_iterator_helper_loose(Object.keys(property)); !(_step1 = _iterator1()).done;){
|
|
21255
|
-
key = _step1.value;
|
|
21256
|
-
res2[key] = SerializationHelper.deserializeProperty(property[key], engine, level + 1);
|
|
21257
|
-
}
|
|
21258
|
-
return [
|
|
21259
|
-
2,
|
|
21260
|
-
res2
|
|
21261
|
-
];
|
|
21301
|
+
if (!(isObject(property) && property.constructor === Object)) return [
|
|
21302
|
+
3,
|
|
21303
|
+
12
|
|
21304
|
+
];
|
|
21305
|
+
if (type) {
|
|
21306
|
+
res2 = new type();
|
|
21262
21307
|
} else {
|
|
21263
|
-
|
|
21264
|
-
2,
|
|
21265
|
-
property
|
|
21266
|
-
];
|
|
21308
|
+
res2 = {};
|
|
21267
21309
|
}
|
|
21310
|
+
_iterator1 = _create_for_of_iterator_helper_loose(Object.keys(property));
|
|
21311
|
+
_state.label = 8;
|
|
21268
21312
|
case 8:
|
|
21313
|
+
if (!!(_step1 = _iterator1()).done) return [
|
|
21314
|
+
3,
|
|
21315
|
+
11
|
|
21316
|
+
];
|
|
21317
|
+
key = _step1.value;
|
|
21318
|
+
return [
|
|
21319
|
+
4,
|
|
21320
|
+
SerializationHelper.deserializePropertyAsync(property[key], engine, level + 1)
|
|
21321
|
+
];
|
|
21322
|
+
case 9:
|
|
21323
|
+
res2[key] = _state.sent();
|
|
21324
|
+
_state.label = 10;
|
|
21325
|
+
case 10:
|
|
21326
|
+
return [
|
|
21327
|
+
3,
|
|
21328
|
+
8
|
|
21329
|
+
];
|
|
21330
|
+
case 11:
|
|
21331
|
+
return [
|
|
21332
|
+
2,
|
|
21333
|
+
res2
|
|
21334
|
+
];
|
|
21335
|
+
case 12:
|
|
21336
|
+
return [
|
|
21337
|
+
2,
|
|
21338
|
+
property
|
|
21339
|
+
];
|
|
21340
|
+
case 13:
|
|
21269
21341
|
return [
|
|
21270
21342
|
2
|
|
21271
21343
|
];
|
|
@@ -21924,277 +21996,39 @@ function getBezierCurveFromHermiteInGE(geHermiteCurves) {
|
|
|
21924
21996
|
});
|
|
21925
21997
|
}
|
|
21926
21998
|
|
|
21927
|
-
function
|
|
21928
|
-
var
|
|
21929
|
-
var
|
|
21930
|
-
var shape = {
|
|
21931
|
-
type: ShapeType.NONE
|
|
21932
|
-
};
|
|
21933
|
-
if (particle.shape) {
|
|
21934
|
-
var _particle_shape_shape;
|
|
21935
|
-
var shapeType = (_particle_shape_shape = particle.shape.shape) == null ? void 0 : _particle_shape_shape.replace(/([A-Z])/g, "_$1").toUpperCase().replace(/^_/, "");
|
|
21936
|
-
shape = _extends({}, particle.shape, {
|
|
21937
|
-
type: ShapeType[shapeType]
|
|
21938
|
-
});
|
|
21939
|
-
if (particle.shape.upDirection) {
|
|
21940
|
-
var _particle_shape_upDirection = particle.shape.upDirection, x = _particle_shape_upDirection[0], y = _particle_shape_upDirection[1], z = _particle_shape_upDirection[2];
|
|
21941
|
-
if (x === 0 && y === 0 && z === 0) {
|
|
21942
|
-
delete shape.upDirection;
|
|
21943
|
-
}
|
|
21944
|
-
}
|
|
21945
|
-
}
|
|
21946
|
-
if (options.startTurbulence) {
|
|
21947
|
-
shape.turbulenceX = ensureNumberExpression(options.turbulenceX);
|
|
21948
|
-
shape.turbulenceY = ensureNumberExpression(options.turbulenceY);
|
|
21949
|
-
shape.turbulenceZ = ensureNumberExpression(options.turbulenceZ);
|
|
21950
|
-
}
|
|
21951
|
-
var emission = particle.emission;
|
|
21952
|
-
if (emission.bursts && emission.bursts.length > 0) {
|
|
21953
|
-
emission.bursts = emission.bursts.map(function(b) {
|
|
21954
|
-
return objectValueToNumber(b);
|
|
21955
|
-
});
|
|
21956
|
-
}
|
|
21957
|
-
if (emission.burstOffsets && emission.burstOffsets.length > 0) {
|
|
21958
|
-
emission.burstOffsets = emission.burstOffsets.map(function(b) {
|
|
21959
|
-
return objectValueToNumber(b);
|
|
21960
|
-
});
|
|
21961
|
-
}
|
|
21962
|
-
if (emission.rateOverTime) {
|
|
21963
|
-
emission.rateOverTime = ensureNumberExpression(emission.rateOverTime);
|
|
21964
|
-
}
|
|
21999
|
+
function getStandardCameraContent(model) {
|
|
22000
|
+
var _model_transform;
|
|
22001
|
+
var opt = model.options;
|
|
21965
22002
|
var ret = {
|
|
21966
|
-
renderer: particle.renderer,
|
|
21967
|
-
shape: shape,
|
|
21968
|
-
splits: particle.splits,
|
|
21969
|
-
emission: emission,
|
|
21970
22003
|
options: {
|
|
21971
|
-
|
|
21972
|
-
|
|
21973
|
-
|
|
21974
|
-
|
|
21975
|
-
startSizeY: ensureNumberExpression(options.startSizeY),
|
|
21976
|
-
sizeAspect: ensureNumberExpression(options.sizeAspect),
|
|
21977
|
-
maxCount: options.maxCount,
|
|
21978
|
-
startDelay: ensureNumberExpression(options.startDelay),
|
|
21979
|
-
startColor: ensureColorExpression(options.startColor, true),
|
|
21980
|
-
startRotationZ: ensureNumberExpression(options.startRotation || options.startRotationZ),
|
|
21981
|
-
particleFollowParent: options.particleFollowParent
|
|
22004
|
+
fov: opt.fov,
|
|
22005
|
+
far: opt.far,
|
|
22006
|
+
near: opt.near,
|
|
22007
|
+
clipMode: opt.clipMode
|
|
21982
22008
|
}
|
|
21983
22009
|
};
|
|
21984
|
-
|
|
21985
|
-
|
|
21986
|
-
|
|
21987
|
-
|
|
21988
|
-
|
|
21989
|
-
|
|
21990
|
-
|
|
21991
|
-
|
|
21992
|
-
}
|
|
21993
|
-
var sizeOverLifetime = particle.sizeOverLifetime;
|
|
21994
|
-
if (sizeOverLifetime) {
|
|
21995
|
-
if (sizeOverLifetime.separateAxes) {
|
|
21996
|
-
ret.sizeOverLifetime = {
|
|
21997
|
-
separateAxes: true,
|
|
21998
|
-
x: ensureNumberExpression(sizeOverLifetime.x),
|
|
21999
|
-
y: ensureNumberExpression(sizeOverLifetime.y)
|
|
22000
|
-
};
|
|
22001
|
-
} else {
|
|
22002
|
-
ret.sizeOverLifetime = {
|
|
22003
|
-
size: ensureNumberExpression(sizeOverLifetime.size)
|
|
22004
|
-
};
|
|
22005
|
-
}
|
|
22006
|
-
}
|
|
22007
|
-
var velocityOverLifetime = particle.velocityOverLifetime || {};
|
|
22008
|
-
var sol = velocityOverLifetime.speedOverLifetime;
|
|
22009
|
-
if (sol) {
|
|
22010
|
-
sol = ensureFixedNumber(sol);
|
|
22011
|
-
} else {
|
|
22012
|
-
sol = undefined;
|
|
22013
|
-
}
|
|
22014
|
-
ret.positionOverLifetime = {
|
|
22015
|
-
gravity: options.gravity,
|
|
22016
|
-
gravityOverLifetime: ensureFixedNumber(options.gravityModifier),
|
|
22017
|
-
startSpeed: ensureNumberExpression(options.startSpeed),
|
|
22018
|
-
speedOverLifetime: sol,
|
|
22019
|
-
asMovement: velocityOverLifetime.asMovement,
|
|
22020
|
-
linearX: ensureNumberExpression(velocityOverLifetime.linearX),
|
|
22021
|
-
linearY: ensureNumberExpression(velocityOverLifetime.linearY),
|
|
22022
|
-
linearZ: ensureNumberExpression(velocityOverLifetime.linearZ),
|
|
22023
|
-
asRotation: velocityOverLifetime.asRotation,
|
|
22024
|
-
orbCenter: velocityOverLifetime.orbCenter,
|
|
22025
|
-
orbitalX: ensureNumberExpression(velocityOverLifetime.orbitalX),
|
|
22026
|
-
orbitalY: ensureNumberExpression(velocityOverLifetime.orbitalY),
|
|
22027
|
-
orbitalZ: ensureNumberExpression(velocityOverLifetime.orbitalZ),
|
|
22028
|
-
forceTarget: velocityOverLifetime.forceTarget,
|
|
22029
|
-
target: velocityOverLifetime.target,
|
|
22030
|
-
forceCurve: ensureFixedNumber(velocityOverLifetime.forceCurve)
|
|
22031
|
-
};
|
|
22032
|
-
deleteEmptyValue(ret.positionOverLifetime);
|
|
22033
|
-
var rotationOverLifetime = particle.rotationOverLifetime;
|
|
22034
|
-
if (rotationOverLifetime) {
|
|
22035
|
-
ret.rotationOverLifetime = {
|
|
22036
|
-
separateAxes: rotationOverLifetime.separateAxes,
|
|
22037
|
-
asRotation: rotationOverLifetime.asRotation,
|
|
22038
|
-
z: ensureNumberExpression(rotationOverLifetime.separateAxes ? rotationOverLifetime.z : rotationOverLifetime.angularVelocity)
|
|
22039
|
-
};
|
|
22040
|
-
if (rotationOverLifetime.separateAxes) {
|
|
22041
|
-
ret.rotationOverLifetime.y = ensureFixedNumber(rotationOverLifetime.y);
|
|
22042
|
-
ret.rotationOverLifetime.x = ensureFixedNumber(rotationOverLifetime.x);
|
|
22043
|
-
}
|
|
22044
|
-
}
|
|
22045
|
-
var colorOverLifetime = particle.colorOverLifetime;
|
|
22046
|
-
if (colorOverLifetime) {
|
|
22047
|
-
var col = ret.colorOverLifetime = {
|
|
22048
|
-
opacity: ensureFixedNumber(colorOverLifetime.opacity)
|
|
22049
|
-
};
|
|
22050
|
-
if (colorOverLifetime.color) {
|
|
22051
|
-
col.color = getGradientColor(colorOverLifetime.color);
|
|
22052
|
-
}
|
|
22053
|
-
}
|
|
22054
|
-
var textureSheetAnimation = particle.textureSheetAnimation;
|
|
22055
|
-
if (textureSheetAnimation) {
|
|
22056
|
-
ret.textureSheetAnimation = {
|
|
22057
|
-
row: textureSheetAnimation.row,
|
|
22058
|
-
col: textureSheetAnimation.col,
|
|
22059
|
-
total: textureSheetAnimation.total,
|
|
22060
|
-
animate: textureSheetAnimation.animate,
|
|
22061
|
-
cycles: ensureFixedNumber(textureSheetAnimation.cycles),
|
|
22062
|
-
animationDelay: ensureFixedNumberWithRandom(textureSheetAnimation.animationDelay, 0),
|
|
22063
|
-
animationDuration: ensureFixedNumberWithRandom(textureSheetAnimation.animationDuration, 0)
|
|
22064
|
-
};
|
|
22065
|
-
}
|
|
22066
|
-
var trials = particle.trails;
|
|
22067
|
-
if (trials) {
|
|
22068
|
-
ret.trails = {
|
|
22069
|
-
lifetime: ensureNumberExpression(trials.lifetime),
|
|
22070
|
-
dieWithParticles: trials.dieWithParticles,
|
|
22071
|
-
maxPointPerTrail: trials.maxPointPerTrail,
|
|
22072
|
-
minimumVertexDistance: trials.minimumVertexDistance,
|
|
22073
|
-
widthOverTrail: ensureFixedNumber(trials.widthOverTrail),
|
|
22074
|
-
colorOverTrail: trials.colorOverTrail && getGradientColor(trials.colorOverTrail, false),
|
|
22075
|
-
blending: trials.blending,
|
|
22076
|
-
colorOverLifetime: trials.colorOverLifetime && getGradientColor(trials.colorOverLifetime, false),
|
|
22077
|
-
inheritParticleColor: trials.inheritParticleColor,
|
|
22078
|
-
occlusion: trials.occlusion,
|
|
22079
|
-
transparentOcclusion: trials.transparentOcclusion,
|
|
22080
|
-
orderOffset: trials.orderOffset,
|
|
22081
|
-
sizeAffectsLifetime: trials.sizeAffectsLifetime,
|
|
22082
|
-
sizeAffectsWidth: trials.sizeAffectsWidth,
|
|
22083
|
-
texture: trials.texture,
|
|
22084
|
-
parentAffectsPosition: trials.parentAffectsPosition,
|
|
22085
|
-
opacityOverLifetime: ensureNumberExpression(trials.opacityOverLifetime)
|
|
22086
|
-
};
|
|
22087
|
-
}
|
|
22088
|
-
ret.trails && deleteEmptyValue(ret.trails);
|
|
22089
|
-
var interaction = particle.interaction;
|
|
22090
|
-
if (interaction) {
|
|
22091
|
-
ret.interaction = {
|
|
22092
|
-
behavior: interaction.behavior,
|
|
22093
|
-
radius: interaction.radius,
|
|
22094
|
-
multiple: interaction.multiple
|
|
22095
|
-
};
|
|
22096
|
-
}
|
|
22097
|
-
return ret;
|
|
22098
|
-
}
|
|
22099
|
-
|
|
22100
|
-
function getStandardNullContent(sprite, transform) {
|
|
22101
|
-
var _sprite_transform;
|
|
22102
|
-
var opt = sprite.options;
|
|
22103
|
-
var velocityOverLifetime = sprite.velocityOverLifetime || {};
|
|
22104
|
-
var positionOverLifetime = {
|
|
22105
|
-
path: ensureFixedVec3((_sprite_transform = sprite.transform) == null ? void 0 : _sprite_transform.path),
|
|
22106
|
-
gravity: opt.gravity,
|
|
22107
|
-
gravityOverLifetime: ensureFixedNumber(opt.gravityModifier),
|
|
22108
|
-
direction: opt.direction,
|
|
22109
|
-
startSpeed: opt.startSpeed,
|
|
22110
|
-
asMovement: velocityOverLifetime.asMovement,
|
|
22111
|
-
linearX: ensureFixedNumber(velocityOverLifetime.linearX),
|
|
22112
|
-
linearY: ensureFixedNumber(velocityOverLifetime.linearY),
|
|
22113
|
-
linearZ: ensureFixedNumber(velocityOverLifetime.linearZ),
|
|
22114
|
-
asRotation: velocityOverLifetime.asRotation,
|
|
22115
|
-
orbCenter: velocityOverLifetime.orbCenter,
|
|
22116
|
-
orbitalX: ensureFixedNumber(velocityOverLifetime.orbitalX),
|
|
22117
|
-
orbitalY: ensureFixedNumber(velocityOverLifetime.orbitalY),
|
|
22118
|
-
orbitalZ: ensureFixedNumber(velocityOverLifetime.orbitalZ),
|
|
22119
|
-
speedOverLifetime: ensureFixedNumber(velocityOverLifetime.speedOverLifetime)
|
|
22120
|
-
};
|
|
22121
|
-
deleteEmptyValue(positionOverLifetime);
|
|
22122
|
-
var ret = {
|
|
22123
|
-
options: {
|
|
22124
|
-
startColor: ensureRGBAValue(opt.startColor)
|
|
22125
|
-
},
|
|
22126
|
-
positionOverLifetime: positionOverLifetime
|
|
22127
|
-
};
|
|
22128
|
-
if (opt.startSize) {
|
|
22129
|
-
transform.scale = [
|
|
22130
|
-
opt.startSize,
|
|
22131
|
-
opt.startSize / (opt.sizeAspect || 1),
|
|
22132
|
-
1
|
|
22133
|
-
];
|
|
22134
|
-
}
|
|
22135
|
-
if (opt.startRotation) {
|
|
22136
|
-
if (!transform.rotation) {
|
|
22137
|
-
transform.rotation = [
|
|
22138
|
-
0,
|
|
22139
|
-
0,
|
|
22140
|
-
opt.startRotation
|
|
22141
|
-
];
|
|
22142
|
-
} else {
|
|
22143
|
-
transform.rotation[2] += opt.startRotation;
|
|
22144
|
-
}
|
|
22145
|
-
}
|
|
22146
|
-
var rotationOverLifetime = sprite.rotationOverLifetime;
|
|
22147
|
-
if (rotationOverLifetime) {
|
|
22148
|
-
var rot = ret.rotationOverLifetime = {
|
|
22149
|
-
separateAxes: rotationOverLifetime.separateAxes,
|
|
22150
|
-
asRotation: rotationOverLifetime.asRotation
|
|
22151
|
-
};
|
|
22152
|
-
if (rot.separateAxes) {
|
|
22153
|
-
rot.x = ensureFixedNumber(rotationOverLifetime.x);
|
|
22154
|
-
rot.y = ensureFixedNumber(rotationOverLifetime.y);
|
|
22155
|
-
rot.z = ensureFixedNumber(rotationOverLifetime.z);
|
|
22156
|
-
} else {
|
|
22157
|
-
rot.z = ensureFixedNumber(rotationOverLifetime.angularVelocity);
|
|
22158
|
-
}
|
|
22159
|
-
}
|
|
22160
|
-
var colorOverLifetime = sprite.colorOverLifetime;
|
|
22161
|
-
if (colorOverLifetime) {
|
|
22162
|
-
var col = ret.colorOverLifetime = {
|
|
22163
|
-
opacity: ensureFixedNumber(colorOverLifetime.opacity)
|
|
22164
|
-
};
|
|
22165
|
-
if (colorOverLifetime.color) {
|
|
22166
|
-
col.color = getGradientColor(colorOverLifetime.color);
|
|
22167
|
-
}
|
|
22168
|
-
}
|
|
22169
|
-
var sizeOverLifetime = sprite.sizeOverLifetime;
|
|
22170
|
-
if (sizeOverLifetime) {
|
|
22171
|
-
ret.sizeOverLifetime = {
|
|
22172
|
-
separateAxes: sizeOverLifetime.separateAxes,
|
|
22173
|
-
size: ensureFixedNumber(sizeOverLifetime.size),
|
|
22174
|
-
x: ensureFixedNumber(sizeOverLifetime.x),
|
|
22175
|
-
y: ensureFixedNumber(sizeOverLifetime.y),
|
|
22176
|
-
z: ensureFixedNumber(sizeOverLifetime.z)
|
|
22010
|
+
var velocityOverLifetime = model.velocityOverLifetime;
|
|
22011
|
+
if (velocityOverLifetime || ((_model_transform = model.transform) == null ? void 0 : _model_transform.path)) {
|
|
22012
|
+
var _model_transform1;
|
|
22013
|
+
var positionOverLifetime = {
|
|
22014
|
+
path: ensureFixedVec3((_model_transform1 = model.transform) == null ? void 0 : _model_transform1.path),
|
|
22015
|
+
linearX: ensureFixedNumber(velocityOverLifetime == null ? void 0 : velocityOverLifetime.translateX),
|
|
22016
|
+
linearY: ensureFixedNumber(velocityOverLifetime == null ? void 0 : velocityOverLifetime.translateY),
|
|
22017
|
+
linearZ: ensureFixedNumber(velocityOverLifetime == null ? void 0 : velocityOverLifetime.translateZ)
|
|
22177
22018
|
};
|
|
22019
|
+
deleteEmptyValue(positionOverLifetime);
|
|
22020
|
+
ret.positionOverLifetime = positionOverLifetime;
|
|
22178
22021
|
}
|
|
22179
|
-
|
|
22180
|
-
|
|
22181
|
-
|
|
22182
|
-
|
|
22183
|
-
|
|
22184
|
-
|
|
22185
|
-
|
|
22186
|
-
row: texAni.row,
|
|
22187
|
-
col: texAni.col,
|
|
22188
|
-
total: texAni.total || undefined,
|
|
22189
|
-
animate: texAni.animate
|
|
22022
|
+
var rol = model.rotationOverLifetime;
|
|
22023
|
+
if (rol) {
|
|
22024
|
+
var rotationOverLifetime = {
|
|
22025
|
+
separateAxes: rol.separateAxes,
|
|
22026
|
+
x: ensureFixedNumber(rol == null ? void 0 : rol.rotateX),
|
|
22027
|
+
y: ensureFixedNumber(rol == null ? void 0 : rol.rotateY),
|
|
22028
|
+
z: rol.separateAxes ? ensureFixedNumber(rol == null ? void 0 : rol.rotateZ) : ensureFixedNumber(rol.rotation)
|
|
22190
22029
|
};
|
|
22191
|
-
|
|
22192
|
-
|
|
22193
|
-
if (sprite.splits) {
|
|
22194
|
-
ret.splits = sprite.splits;
|
|
22195
|
-
}
|
|
22196
|
-
if (sprite.interaction) {
|
|
22197
|
-
ret.interaction = sprite.interaction;
|
|
22030
|
+
deleteEmptyValue(rotationOverLifetime);
|
|
22031
|
+
ret.rotationOverLifetime = rotationOverLifetime;
|
|
22198
22032
|
}
|
|
22199
22033
|
return ret;
|
|
22200
22034
|
}
|
|
@@ -22239,43 +22073,6 @@ function getStandardInteractContent(ui) {
|
|
|
22239
22073
|
return ret;
|
|
22240
22074
|
}
|
|
22241
22075
|
|
|
22242
|
-
function getStandardCameraContent(model) {
|
|
22243
|
-
var _model_transform;
|
|
22244
|
-
var opt = model.options;
|
|
22245
|
-
var ret = {
|
|
22246
|
-
options: {
|
|
22247
|
-
fov: opt.fov,
|
|
22248
|
-
far: opt.far,
|
|
22249
|
-
near: opt.near,
|
|
22250
|
-
clipMode: opt.clipMode
|
|
22251
|
-
}
|
|
22252
|
-
};
|
|
22253
|
-
var velocityOverLifetime = model.velocityOverLifetime;
|
|
22254
|
-
if (velocityOverLifetime || ((_model_transform = model.transform) == null ? void 0 : _model_transform.path)) {
|
|
22255
|
-
var _model_transform1;
|
|
22256
|
-
var positionOverLifetime = {
|
|
22257
|
-
path: ensureFixedVec3((_model_transform1 = model.transform) == null ? void 0 : _model_transform1.path),
|
|
22258
|
-
linearX: ensureFixedNumber(velocityOverLifetime == null ? void 0 : velocityOverLifetime.translateX),
|
|
22259
|
-
linearY: ensureFixedNumber(velocityOverLifetime == null ? void 0 : velocityOverLifetime.translateY),
|
|
22260
|
-
linearZ: ensureFixedNumber(velocityOverLifetime == null ? void 0 : velocityOverLifetime.translateZ)
|
|
22261
|
-
};
|
|
22262
|
-
deleteEmptyValue(positionOverLifetime);
|
|
22263
|
-
ret.positionOverLifetime = positionOverLifetime;
|
|
22264
|
-
}
|
|
22265
|
-
var rol = model.rotationOverLifetime;
|
|
22266
|
-
if (rol) {
|
|
22267
|
-
var rotationOverLifetime = {
|
|
22268
|
-
separateAxes: rol.separateAxes,
|
|
22269
|
-
x: ensureFixedNumber(rol == null ? void 0 : rol.rotateX),
|
|
22270
|
-
y: ensureFixedNumber(rol == null ? void 0 : rol.rotateY),
|
|
22271
|
-
z: rol.separateAxes ? ensureFixedNumber(rol == null ? void 0 : rol.rotateZ) : ensureFixedNumber(rol.rotation)
|
|
22272
|
-
};
|
|
22273
|
-
deleteEmptyValue(rotationOverLifetime);
|
|
22274
|
-
ret.rotationOverLifetime = rotationOverLifetime;
|
|
22275
|
-
}
|
|
22276
|
-
return ret;
|
|
22277
|
-
}
|
|
22278
|
-
|
|
22279
22076
|
/**
|
|
22280
22077
|
* 2.1 以下版本数据适配(mars-player@2.4.0 及以上版本支持 2.1 以下数据的适配)
|
|
22281
22078
|
*/ function version21Migration(json) {
|
|
@@ -22392,11 +22189,12 @@ function getStandardCameraContent(model) {
|
|
|
22392
22189
|
var _textures;
|
|
22393
22190
|
(_textures = (_result = result).textures) != null ? _textures : _result.textures = [];
|
|
22394
22191
|
result.textures.forEach(function(textureOptions) {
|
|
22192
|
+
var _result_images_textureOptions_source;
|
|
22395
22193
|
textureOptions.id = generateGUID();
|
|
22396
22194
|
textureOptions.dataType = DataType.Texture;
|
|
22397
22195
|
// @ts-expect-error
|
|
22398
22196
|
textureOptions.source = {
|
|
22399
|
-
id: result.images[textureOptions.source].id
|
|
22197
|
+
id: (_result_images_textureOptions_source = result.images[textureOptions.source]) == null ? void 0 : _result_images_textureOptions_source.id
|
|
22400
22198
|
};
|
|
22401
22199
|
});
|
|
22402
22200
|
if (result.textures.length < result.images.length) {
|
|
@@ -22750,8 +22548,7 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
|
|
|
22750
22548
|
var newSpriteColorPlayableAssetData = {
|
|
22751
22549
|
id: generateGUID(),
|
|
22752
22550
|
dataType: "SpriteColorPlayableAsset",
|
|
22753
|
-
colorOverLifetime: item.content.colorOverLifetime
|
|
22754
|
-
startColor: item.content.options.startColor
|
|
22551
|
+
colorOverLifetime: item.content.colorOverLifetime
|
|
22755
22552
|
};
|
|
22756
22553
|
playableAssetDatas.push(newSpriteColorPlayableAssetData);
|
|
22757
22554
|
var newTrackData1 = {
|
|
@@ -22806,77 +22603,352 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
|
|
|
22806
22603
|
children: subTrackDatas,
|
|
22807
22604
|
clips: []
|
|
22808
22605
|
};
|
|
22809
|
-
trackDatas.push(bindingTrackData);
|
|
22810
|
-
timelineAssetData.tracks.push({
|
|
22811
|
-
id: bindingTrackData.id
|
|
22812
|
-
});
|
|
22813
|
-
sceneBindings.push({
|
|
22814
|
-
key: {
|
|
22815
|
-
id: bindingTrackData.id
|
|
22816
|
-
},
|
|
22817
|
-
value: {
|
|
22818
|
-
id: item.id
|
|
22819
|
-
}
|
|
22820
|
-
});
|
|
22606
|
+
trackDatas.push(bindingTrackData);
|
|
22607
|
+
timelineAssetData.tracks.push({
|
|
22608
|
+
id: bindingTrackData.id
|
|
22609
|
+
});
|
|
22610
|
+
sceneBindings.push({
|
|
22611
|
+
key: {
|
|
22612
|
+
id: bindingTrackData.id
|
|
22613
|
+
},
|
|
22614
|
+
value: {
|
|
22615
|
+
id: item.id
|
|
22616
|
+
}
|
|
22617
|
+
});
|
|
22618
|
+
}
|
|
22619
|
+
var trackIds = [];
|
|
22620
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(trackDatas), _step1; !(_step1 = _iterator1()).done;){
|
|
22621
|
+
var trackData = _step1.value;
|
|
22622
|
+
trackIds.push({
|
|
22623
|
+
id: trackData.id
|
|
22624
|
+
});
|
|
22625
|
+
}
|
|
22626
|
+
composition.timelineAsset = {
|
|
22627
|
+
id: timelineAssetData.id
|
|
22628
|
+
};
|
|
22629
|
+
composition.sceneBindings = sceneBindings;
|
|
22630
|
+
jsonScene.miscs.push(timelineAssetData);
|
|
22631
|
+
for(var _iterator2 = _create_for_of_iterator_helper_loose(trackDatas), _step2; !(_step2 = _iterator2()).done;){
|
|
22632
|
+
var trackData1 = _step2.value;
|
|
22633
|
+
//@ts-expect-error
|
|
22634
|
+
jsonScene.miscs.push(trackData1);
|
|
22635
|
+
}
|
|
22636
|
+
for(var _iterator3 = _create_for_of_iterator_helper_loose(playableAssetDatas), _step3; !(_step3 = _iterator3()).done;){
|
|
22637
|
+
var playableAsset = _step3.value;
|
|
22638
|
+
//@ts-expect-error
|
|
22639
|
+
jsonScene.miscs.push(playableAsset);
|
|
22640
|
+
}
|
|
22641
|
+
}
|
|
22642
|
+
function convertBinaryAsset(bins, jsonScene) {
|
|
22643
|
+
//@ts-expect-error
|
|
22644
|
+
jsonScene.bins = bins.map(function(bin) {
|
|
22645
|
+
return {
|
|
22646
|
+
url: bin.url,
|
|
22647
|
+
"dataType": "BinaryAsset",
|
|
22648
|
+
id: generateGUID()
|
|
22649
|
+
};
|
|
22650
|
+
});
|
|
22651
|
+
}
|
|
22652
|
+
function convertSpineData(resource, content, jsonScene) {
|
|
22653
|
+
//@ts-expect-error
|
|
22654
|
+
content.resource = {
|
|
22655
|
+
"atlas": {
|
|
22656
|
+
"bins": {
|
|
22657
|
+
//@ts-expect-error
|
|
22658
|
+
"id": jsonScene.bins[resource.atlas[1][0]].id
|
|
22659
|
+
},
|
|
22660
|
+
"source": resource.atlas[1].slice(1)
|
|
22661
|
+
},
|
|
22662
|
+
"skeleton": {
|
|
22663
|
+
"bins": {
|
|
22664
|
+
//@ts-expect-error
|
|
22665
|
+
"id": jsonScene.bins[resource.skeleton[1][0]].id
|
|
22666
|
+
},
|
|
22667
|
+
"source": resource.skeleton[1].slice(1)
|
|
22668
|
+
},
|
|
22669
|
+
"skeletonType": resource.skeletonType,
|
|
22670
|
+
"images": resource.images.map(function(i) {
|
|
22671
|
+
return {
|
|
22672
|
+
//@ts-expect-error
|
|
22673
|
+
id: jsonScene.textures[i].id
|
|
22674
|
+
};
|
|
22675
|
+
})
|
|
22676
|
+
};
|
|
22677
|
+
}
|
|
22678
|
+
|
|
22679
|
+
function getStandardParticleContent(particle) {
|
|
22680
|
+
var options = particle.options;
|
|
22681
|
+
var transform = particle.transform;
|
|
22682
|
+
var shape = {
|
|
22683
|
+
type: ShapeType.NONE
|
|
22684
|
+
};
|
|
22685
|
+
if (particle.shape) {
|
|
22686
|
+
var _particle_shape_shape;
|
|
22687
|
+
var shapeType = (_particle_shape_shape = particle.shape.shape) == null ? void 0 : _particle_shape_shape.replace(/([A-Z])/g, "_$1").toUpperCase().replace(/^_/, "");
|
|
22688
|
+
shape = _extends({}, particle.shape, {
|
|
22689
|
+
type: ShapeType[shapeType]
|
|
22690
|
+
});
|
|
22691
|
+
if (particle.shape.upDirection) {
|
|
22692
|
+
var _particle_shape_upDirection = particle.shape.upDirection, x = _particle_shape_upDirection[0], y = _particle_shape_upDirection[1], z = _particle_shape_upDirection[2];
|
|
22693
|
+
if (x === 0 && y === 0 && z === 0) {
|
|
22694
|
+
delete shape.upDirection;
|
|
22695
|
+
}
|
|
22696
|
+
}
|
|
22697
|
+
}
|
|
22698
|
+
if (options.startTurbulence) {
|
|
22699
|
+
shape.turbulenceX = ensureNumberExpression(options.turbulenceX);
|
|
22700
|
+
shape.turbulenceY = ensureNumberExpression(options.turbulenceY);
|
|
22701
|
+
shape.turbulenceZ = ensureNumberExpression(options.turbulenceZ);
|
|
22702
|
+
}
|
|
22703
|
+
var emission = particle.emission;
|
|
22704
|
+
if (emission.bursts && emission.bursts.length > 0) {
|
|
22705
|
+
emission.bursts = emission.bursts.map(function(b) {
|
|
22706
|
+
return objectValueToNumber(b);
|
|
22707
|
+
});
|
|
22708
|
+
}
|
|
22709
|
+
if (emission.burstOffsets && emission.burstOffsets.length > 0) {
|
|
22710
|
+
emission.burstOffsets = emission.burstOffsets.map(function(b) {
|
|
22711
|
+
return objectValueToNumber(b);
|
|
22712
|
+
});
|
|
22713
|
+
}
|
|
22714
|
+
if (emission.rateOverTime) {
|
|
22715
|
+
emission.rateOverTime = ensureNumberExpression(emission.rateOverTime);
|
|
22716
|
+
}
|
|
22717
|
+
var ret = {
|
|
22718
|
+
renderer: particle.renderer,
|
|
22719
|
+
shape: shape,
|
|
22720
|
+
splits: particle.splits,
|
|
22721
|
+
emission: emission,
|
|
22722
|
+
options: {
|
|
22723
|
+
startLifetime: ensureNumberExpression(options.startLifetime),
|
|
22724
|
+
start3DSize: !!options.start3DSize,
|
|
22725
|
+
startSize: ensureNumberExpression(options.startSize),
|
|
22726
|
+
startSizeX: ensureNumberExpression(options.startSizeX),
|
|
22727
|
+
startSizeY: ensureNumberExpression(options.startSizeY),
|
|
22728
|
+
sizeAspect: ensureNumberExpression(options.sizeAspect),
|
|
22729
|
+
maxCount: options.maxCount,
|
|
22730
|
+
startDelay: ensureNumberExpression(options.startDelay),
|
|
22731
|
+
startColor: ensureColorExpression(options.startColor, true),
|
|
22732
|
+
startRotationZ: ensureNumberExpression(options.startRotation || options.startRotationZ),
|
|
22733
|
+
particleFollowParent: options.particleFollowParent
|
|
22734
|
+
}
|
|
22735
|
+
};
|
|
22736
|
+
if (options.start3DRotation) {
|
|
22737
|
+
ret.options.startRotationX = ensureNumberExpression(options.startRotationX);
|
|
22738
|
+
ret.options.startRotationY = ensureNumberExpression(options.startRotationY);
|
|
22739
|
+
}
|
|
22740
|
+
if (transform && transform.path) {
|
|
22741
|
+
ret.emitterTransform = {
|
|
22742
|
+
path: ensureFixedVec3(transform.path)
|
|
22743
|
+
};
|
|
22744
|
+
}
|
|
22745
|
+
var sizeOverLifetime = particle.sizeOverLifetime;
|
|
22746
|
+
if (sizeOverLifetime) {
|
|
22747
|
+
if (sizeOverLifetime.separateAxes) {
|
|
22748
|
+
ret.sizeOverLifetime = {
|
|
22749
|
+
separateAxes: true,
|
|
22750
|
+
x: ensureNumberExpression(sizeOverLifetime.x),
|
|
22751
|
+
y: ensureNumberExpression(sizeOverLifetime.y)
|
|
22752
|
+
};
|
|
22753
|
+
} else {
|
|
22754
|
+
ret.sizeOverLifetime = {
|
|
22755
|
+
size: ensureNumberExpression(sizeOverLifetime.size)
|
|
22756
|
+
};
|
|
22757
|
+
}
|
|
22758
|
+
}
|
|
22759
|
+
var velocityOverLifetime = particle.velocityOverLifetime || {};
|
|
22760
|
+
var sol = velocityOverLifetime.speedOverLifetime;
|
|
22761
|
+
if (sol) {
|
|
22762
|
+
sol = ensureFixedNumber(sol);
|
|
22763
|
+
} else {
|
|
22764
|
+
sol = undefined;
|
|
22765
|
+
}
|
|
22766
|
+
ret.positionOverLifetime = {
|
|
22767
|
+
gravity: options.gravity,
|
|
22768
|
+
gravityOverLifetime: ensureFixedNumber(options.gravityModifier),
|
|
22769
|
+
startSpeed: ensureNumberExpression(options.startSpeed),
|
|
22770
|
+
speedOverLifetime: sol,
|
|
22771
|
+
asMovement: velocityOverLifetime.asMovement,
|
|
22772
|
+
linearX: ensureNumberExpression(velocityOverLifetime.linearX),
|
|
22773
|
+
linearY: ensureNumberExpression(velocityOverLifetime.linearY),
|
|
22774
|
+
linearZ: ensureNumberExpression(velocityOverLifetime.linearZ),
|
|
22775
|
+
asRotation: velocityOverLifetime.asRotation,
|
|
22776
|
+
orbCenter: velocityOverLifetime.orbCenter,
|
|
22777
|
+
orbitalX: ensureNumberExpression(velocityOverLifetime.orbitalX),
|
|
22778
|
+
orbitalY: ensureNumberExpression(velocityOverLifetime.orbitalY),
|
|
22779
|
+
orbitalZ: ensureNumberExpression(velocityOverLifetime.orbitalZ),
|
|
22780
|
+
forceTarget: velocityOverLifetime.forceTarget,
|
|
22781
|
+
target: velocityOverLifetime.target,
|
|
22782
|
+
forceCurve: ensureFixedNumber(velocityOverLifetime.forceCurve)
|
|
22783
|
+
};
|
|
22784
|
+
deleteEmptyValue(ret.positionOverLifetime);
|
|
22785
|
+
var rotationOverLifetime = particle.rotationOverLifetime;
|
|
22786
|
+
if (rotationOverLifetime) {
|
|
22787
|
+
ret.rotationOverLifetime = {
|
|
22788
|
+
separateAxes: rotationOverLifetime.separateAxes,
|
|
22789
|
+
asRotation: rotationOverLifetime.asRotation,
|
|
22790
|
+
z: ensureNumberExpression(rotationOverLifetime.separateAxes ? rotationOverLifetime.z : rotationOverLifetime.angularVelocity)
|
|
22791
|
+
};
|
|
22792
|
+
if (rotationOverLifetime.separateAxes) {
|
|
22793
|
+
ret.rotationOverLifetime.y = ensureFixedNumber(rotationOverLifetime.y);
|
|
22794
|
+
ret.rotationOverLifetime.x = ensureFixedNumber(rotationOverLifetime.x);
|
|
22795
|
+
}
|
|
22821
22796
|
}
|
|
22822
|
-
var
|
|
22823
|
-
|
|
22824
|
-
var
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22797
|
+
var colorOverLifetime = particle.colorOverLifetime;
|
|
22798
|
+
if (colorOverLifetime) {
|
|
22799
|
+
var col = ret.colorOverLifetime = {
|
|
22800
|
+
opacity: ensureFixedNumber(colorOverLifetime.opacity)
|
|
22801
|
+
};
|
|
22802
|
+
if (colorOverLifetime.color) {
|
|
22803
|
+
col.color = getGradientColor(colorOverLifetime.color);
|
|
22804
|
+
}
|
|
22828
22805
|
}
|
|
22829
|
-
|
|
22830
|
-
|
|
22831
|
-
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
|
|
22837
|
-
|
|
22806
|
+
var textureSheetAnimation = particle.textureSheetAnimation;
|
|
22807
|
+
if (textureSheetAnimation) {
|
|
22808
|
+
ret.textureSheetAnimation = {
|
|
22809
|
+
row: textureSheetAnimation.row,
|
|
22810
|
+
col: textureSheetAnimation.col,
|
|
22811
|
+
total: textureSheetAnimation.total,
|
|
22812
|
+
animate: textureSheetAnimation.animate,
|
|
22813
|
+
cycles: ensureFixedNumber(textureSheetAnimation.cycles),
|
|
22814
|
+
animationDelay: ensureFixedNumberWithRandom(textureSheetAnimation.animationDelay, 0),
|
|
22815
|
+
animationDuration: ensureFixedNumberWithRandom(textureSheetAnimation.animationDuration, 0)
|
|
22816
|
+
};
|
|
22838
22817
|
}
|
|
22839
|
-
|
|
22840
|
-
|
|
22841
|
-
|
|
22842
|
-
|
|
22818
|
+
var trials = particle.trails;
|
|
22819
|
+
if (trials) {
|
|
22820
|
+
ret.trails = {
|
|
22821
|
+
lifetime: ensureNumberExpression(trials.lifetime),
|
|
22822
|
+
dieWithParticles: trials.dieWithParticles,
|
|
22823
|
+
maxPointPerTrail: trials.maxPointPerTrail,
|
|
22824
|
+
minimumVertexDistance: trials.minimumVertexDistance,
|
|
22825
|
+
widthOverTrail: ensureFixedNumber(trials.widthOverTrail),
|
|
22826
|
+
colorOverTrail: trials.colorOverTrail && getGradientColor(trials.colorOverTrail, false),
|
|
22827
|
+
blending: trials.blending,
|
|
22828
|
+
colorOverLifetime: trials.colorOverLifetime && getGradientColor(trials.colorOverLifetime, false),
|
|
22829
|
+
inheritParticleColor: trials.inheritParticleColor,
|
|
22830
|
+
occlusion: trials.occlusion,
|
|
22831
|
+
transparentOcclusion: trials.transparentOcclusion,
|
|
22832
|
+
orderOffset: trials.orderOffset,
|
|
22833
|
+
sizeAffectsLifetime: trials.sizeAffectsLifetime,
|
|
22834
|
+
sizeAffectsWidth: trials.sizeAffectsWidth,
|
|
22835
|
+
texture: trials.texture,
|
|
22836
|
+
parentAffectsPosition: trials.parentAffectsPosition,
|
|
22837
|
+
opacityOverLifetime: ensureNumberExpression(trials.opacityOverLifetime)
|
|
22838
|
+
};
|
|
22843
22839
|
}
|
|
22844
|
-
|
|
22845
|
-
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
id: generateGUID()
|
|
22840
|
+
ret.trails && deleteEmptyValue(ret.trails);
|
|
22841
|
+
var interaction = particle.interaction;
|
|
22842
|
+
if (interaction) {
|
|
22843
|
+
ret.interaction = {
|
|
22844
|
+
behavior: interaction.behavior,
|
|
22845
|
+
radius: interaction.radius,
|
|
22846
|
+
multiple: interaction.multiple
|
|
22852
22847
|
};
|
|
22853
|
-
}
|
|
22848
|
+
}
|
|
22849
|
+
return ret;
|
|
22854
22850
|
}
|
|
22855
|
-
|
|
22856
|
-
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22851
|
+
|
|
22852
|
+
function getStandardNullContent(sprite, transform) {
|
|
22853
|
+
var _sprite_transform;
|
|
22854
|
+
var opt = sprite.options;
|
|
22855
|
+
var velocityOverLifetime = sprite.velocityOverLifetime || {};
|
|
22856
|
+
var positionOverLifetime = {
|
|
22857
|
+
path: ensureFixedVec3((_sprite_transform = sprite.transform) == null ? void 0 : _sprite_transform.path),
|
|
22858
|
+
gravity: opt.gravity,
|
|
22859
|
+
gravityOverLifetime: ensureFixedNumber(opt.gravityModifier),
|
|
22860
|
+
direction: opt.direction,
|
|
22861
|
+
startSpeed: opt.startSpeed,
|
|
22862
|
+
asMovement: velocityOverLifetime.asMovement,
|
|
22863
|
+
linearX: ensureFixedNumber(velocityOverLifetime.linearX),
|
|
22864
|
+
linearY: ensureFixedNumber(velocityOverLifetime.linearY),
|
|
22865
|
+
linearZ: ensureFixedNumber(velocityOverLifetime.linearZ),
|
|
22866
|
+
asRotation: velocityOverLifetime.asRotation,
|
|
22867
|
+
orbCenter: velocityOverLifetime.orbCenter,
|
|
22868
|
+
orbitalX: ensureFixedNumber(velocityOverLifetime.orbitalX),
|
|
22869
|
+
orbitalY: ensureFixedNumber(velocityOverLifetime.orbitalY),
|
|
22870
|
+
orbitalZ: ensureFixedNumber(velocityOverLifetime.orbitalZ),
|
|
22871
|
+
speedOverLifetime: ensureFixedNumber(velocityOverLifetime.speedOverLifetime)
|
|
22872
|
+
};
|
|
22873
|
+
deleteEmptyValue(positionOverLifetime);
|
|
22874
|
+
var ret = {
|
|
22875
|
+
options: {
|
|
22876
|
+
startColor: ensureRGBAValue(opt.startColor)
|
|
22871
22877
|
},
|
|
22872
|
-
|
|
22873
|
-
"images": resource.images.map(function(i) {
|
|
22874
|
-
return {
|
|
22875
|
-
//@ts-expect-error
|
|
22876
|
-
id: jsonScene.textures[i].id
|
|
22877
|
-
};
|
|
22878
|
-
})
|
|
22878
|
+
positionOverLifetime: positionOverLifetime
|
|
22879
22879
|
};
|
|
22880
|
+
if (opt.startSize) {
|
|
22881
|
+
transform.scale = [
|
|
22882
|
+
opt.startSize,
|
|
22883
|
+
opt.startSize / (opt.sizeAspect || 1),
|
|
22884
|
+
1
|
|
22885
|
+
];
|
|
22886
|
+
}
|
|
22887
|
+
if (opt.startRotation) {
|
|
22888
|
+
if (!transform.rotation) {
|
|
22889
|
+
transform.rotation = [
|
|
22890
|
+
0,
|
|
22891
|
+
0,
|
|
22892
|
+
opt.startRotation
|
|
22893
|
+
];
|
|
22894
|
+
} else {
|
|
22895
|
+
transform.rotation[2] += opt.startRotation;
|
|
22896
|
+
}
|
|
22897
|
+
}
|
|
22898
|
+
var rotationOverLifetime = sprite.rotationOverLifetime;
|
|
22899
|
+
if (rotationOverLifetime) {
|
|
22900
|
+
var rot = ret.rotationOverLifetime = {
|
|
22901
|
+
separateAxes: rotationOverLifetime.separateAxes,
|
|
22902
|
+
asRotation: rotationOverLifetime.asRotation
|
|
22903
|
+
};
|
|
22904
|
+
if (rot.separateAxes) {
|
|
22905
|
+
rot.x = ensureFixedNumber(rotationOverLifetime.x);
|
|
22906
|
+
rot.y = ensureFixedNumber(rotationOverLifetime.y);
|
|
22907
|
+
rot.z = ensureFixedNumber(rotationOverLifetime.z);
|
|
22908
|
+
} else {
|
|
22909
|
+
rot.z = ensureFixedNumber(rotationOverLifetime.angularVelocity);
|
|
22910
|
+
}
|
|
22911
|
+
}
|
|
22912
|
+
var colorOverLifetime = sprite.colorOverLifetime;
|
|
22913
|
+
if (colorOverLifetime) {
|
|
22914
|
+
var col = ret.colorOverLifetime = {
|
|
22915
|
+
opacity: ensureFixedNumber(colorOverLifetime.opacity)
|
|
22916
|
+
};
|
|
22917
|
+
if (colorOverLifetime.color) {
|
|
22918
|
+
col.color = getGradientColor(colorOverLifetime.color);
|
|
22919
|
+
}
|
|
22920
|
+
}
|
|
22921
|
+
var sizeOverLifetime = sprite.sizeOverLifetime;
|
|
22922
|
+
if (sizeOverLifetime) {
|
|
22923
|
+
ret.sizeOverLifetime = {
|
|
22924
|
+
separateAxes: sizeOverLifetime.separateAxes,
|
|
22925
|
+
size: ensureFixedNumber(sizeOverLifetime.size),
|
|
22926
|
+
x: ensureFixedNumber(sizeOverLifetime.x),
|
|
22927
|
+
y: ensureFixedNumber(sizeOverLifetime.y),
|
|
22928
|
+
z: ensureFixedNumber(sizeOverLifetime.z)
|
|
22929
|
+
};
|
|
22930
|
+
}
|
|
22931
|
+
return ret;
|
|
22932
|
+
}
|
|
22933
|
+
function getStandardSpriteContent(sprite, transform) {
|
|
22934
|
+
var ret = getStandardNullContent(sprite, transform);
|
|
22935
|
+
var texAni = sprite.textureSheetAnimation;
|
|
22936
|
+
if (texAni) {
|
|
22937
|
+
ret.textureSheetAnimation = {
|
|
22938
|
+
row: texAni.row,
|
|
22939
|
+
col: texAni.col,
|
|
22940
|
+
total: texAni.total || undefined,
|
|
22941
|
+
animate: texAni.animate
|
|
22942
|
+
};
|
|
22943
|
+
}
|
|
22944
|
+
ret.renderer = sprite.renderer;
|
|
22945
|
+
if (sprite.splits) {
|
|
22946
|
+
ret.splits = sprite.splits;
|
|
22947
|
+
}
|
|
22948
|
+
if (sprite.interaction) {
|
|
22949
|
+
ret.interaction = sprite.interaction;
|
|
22950
|
+
}
|
|
22951
|
+
return ret;
|
|
22880
22952
|
}
|
|
22881
22953
|
|
|
22882
22954
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
@@ -23258,7 +23330,7 @@ function getBackgroundImage(template, variables) {
|
|
|
23258
23330
|
}
|
|
23259
23331
|
function _combineImageTemplate() {
|
|
23260
23332
|
_combineImageTemplate = _async_to_generator(function(url, template, variables) {
|
|
23261
|
-
var image,
|
|
23333
|
+
var image, templateBackground;
|
|
23262
23334
|
return __generator(this, function(_state) {
|
|
23263
23335
|
switch(_state.label){
|
|
23264
23336
|
case 0:
|
|
@@ -23289,37 +23361,25 @@ function _combineImageTemplate() {
|
|
|
23289
23361
|
image
|
|
23290
23362
|
];
|
|
23291
23363
|
}
|
|
23292
|
-
drawImage = image;
|
|
23293
23364
|
// 获取动态换图的图片对象或 url 地址
|
|
23294
23365
|
templateBackground = getBackgroundImage(template, variables);
|
|
23295
|
-
if (
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
|
|
23302
|
-
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
return [
|
|
23310
|
-
3,
|
|
23311
|
-
6
|
|
23312
|
-
];
|
|
23313
|
-
case 5:
|
|
23314
|
-
_tmp = templateBackground;
|
|
23315
|
-
_state.label = 6;
|
|
23316
|
-
case 6:
|
|
23317
|
-
drawImage = _tmp;
|
|
23318
|
-
_state.label = 7;
|
|
23319
|
-
case 7:
|
|
23366
|
+
if (templateBackground) {
|
|
23367
|
+
if (isString(templateBackground) && templateBackground !== image.src) {
|
|
23368
|
+
return [
|
|
23369
|
+
2,
|
|
23370
|
+
loadImage(templateBackground)
|
|
23371
|
+
];
|
|
23372
|
+
}
|
|
23373
|
+
if (_instanceof1(templateBackground, HTMLImageElement)) {
|
|
23374
|
+
return [
|
|
23375
|
+
2,
|
|
23376
|
+
templateBackground
|
|
23377
|
+
];
|
|
23378
|
+
}
|
|
23379
|
+
}
|
|
23320
23380
|
return [
|
|
23321
23381
|
2,
|
|
23322
|
-
|
|
23382
|
+
image
|
|
23323
23383
|
];
|
|
23324
23384
|
}
|
|
23325
23385
|
});
|
|
@@ -23783,15 +23843,17 @@ var seed$1 = 1;
|
|
|
23783
23843
|
_this_options = _this.options, useCompressedTexture = _this_options.useCompressedTexture, variables = _this_options.variables;
|
|
23784
23844
|
baseUrl = _this.baseUrl;
|
|
23785
23845
|
jobs = images.map(/*#__PURE__*/ _async_to_generator(function(img, idx) {
|
|
23786
|
-
var png, webp, imageURL, webpURL, template, background, url, isVideo, loadFn, resultImage, e, compressed, src, bufferURL, _ref, url1, image;
|
|
23846
|
+
var png, webp, avif, imageURL, webpURL, avifURL, template, background, url, isVideo, loadFn, resultImage, e, compressed, src, bufferURL, _ref, url1, image, _tmp;
|
|
23787
23847
|
return __generator(this, function(_state) {
|
|
23788
23848
|
switch(_state.label){
|
|
23789
23849
|
case 0:
|
|
23790
|
-
png = img.url, webp = img.webp;
|
|
23850
|
+
png = img.url, webp = img.webp, avif = img.avif;
|
|
23791
23851
|
// eslint-disable-next-line compat/compat
|
|
23792
23852
|
imageURL = new URL(png, baseUrl).href;
|
|
23793
23853
|
// eslint-disable-next-line compat/compat
|
|
23794
23854
|
webpURL = webp && new URL(webp, baseUrl).href;
|
|
23855
|
+
// eslint-disable-next-line compat/compat
|
|
23856
|
+
avifURL = avif && new URL(avif, baseUrl).href;
|
|
23795
23857
|
if (!("template" in img)) return [
|
|
23796
23858
|
3,
|
|
23797
23859
|
8
|
|
@@ -23891,12 +23953,30 @@ var seed$1 = 1;
|
|
|
23891
23953
|
}
|
|
23892
23954
|
_state.label = 9;
|
|
23893
23955
|
case 9:
|
|
23956
|
+
if (!avifURL) return [
|
|
23957
|
+
3,
|
|
23958
|
+
11
|
|
23959
|
+
];
|
|
23894
23960
|
return [
|
|
23895
23961
|
4,
|
|
23896
|
-
|
|
23962
|
+
loadAVIFOptional(imageURL, avifURL)
|
|
23897
23963
|
];
|
|
23898
23964
|
case 10:
|
|
23899
|
-
|
|
23965
|
+
_tmp = _state.sent();
|
|
23966
|
+
return [
|
|
23967
|
+
3,
|
|
23968
|
+
13
|
|
23969
|
+
];
|
|
23970
|
+
case 11:
|
|
23971
|
+
return [
|
|
23972
|
+
4,
|
|
23973
|
+
loadWebPOptional(imageURL, webpURL)
|
|
23974
|
+
];
|
|
23975
|
+
case 12:
|
|
23976
|
+
_tmp = _state.sent();
|
|
23977
|
+
_state.label = 13;
|
|
23978
|
+
case 13:
|
|
23979
|
+
_ref = _tmp, url1 = _ref.url, image = _ref.image;
|
|
23900
23980
|
_this.assets[idx] = {
|
|
23901
23981
|
url: url1,
|
|
23902
23982
|
type: TextureSourceType.image
|
|
@@ -27366,7 +27446,7 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
|
|
|
27366
27446
|
registerPlugin("particle", ParticleLoader, VFXItem, true);
|
|
27367
27447
|
registerPlugin("cal", CalculateLoader, VFXItem, true);
|
|
27368
27448
|
registerPlugin("interact", InteractLoader, VFXItem, true);
|
|
27369
|
-
var version$1 = "2.0.0-alpha.
|
|
27449
|
+
var version$1 = "2.0.0-alpha.29";
|
|
27370
27450
|
logger.info("Core version: " + version$1 + ".");
|
|
27371
27451
|
|
|
27372
27452
|
var _obj;
|
|
@@ -28999,8 +29079,8 @@ setMaxSpriteMeshItemCount(8);
|
|
|
28999
29079
|
*/ Mesh.create = function(engine, props) {
|
|
29000
29080
|
return new ThreeMesh(engine, props);
|
|
29001
29081
|
};
|
|
29002
|
-
var version = "2.0.0-alpha.
|
|
29082
|
+
var version = "2.0.0-alpha.29";
|
|
29003
29083
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
29004
29084
|
|
|
29005
|
-
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, 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, Component, Composition, CompositionComponent, CompositionSourceManager, DEFAULT_FONTS, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Engine, EventSystem, FilterMode, Float16ArrayWrapper, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, ItemBehaviour, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, PostProcessVolume, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, 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, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderType, ShaderVariant, SpriteColorPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMacros, createShape, createValueGetter, decimalEqual, defaultGlobalVolume, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTemplateCanvasPool, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrameFrag, itemVert, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, pointOnLine, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
|
|
29085
|
+
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, 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, Component, Composition, CompositionComponent, CompositionSourceManager, DEFAULT_FONTS, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Engine, EventSystem, FilterMode, Float16ArrayWrapper, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, ItemBehaviour, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, PostProcessVolume, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, 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, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderType, ShaderVariant, SpriteColorPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMacros, createShape, createValueGetter, decimalEqual, defaultGlobalVolume, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTemplateCanvasPool, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrameFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, pointOnLine, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
|
|
29006
29086
|
//# sourceMappingURL=index.mjs.map
|