@galacean/effects-core 2.0.0-alpha.27 → 2.0.0-alpha.28

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.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v2.0.0-alpha.27
6
+ * Version: v2.0.0-alpha.28
7
7
  */
8
8
 
9
9
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -440,16 +440,27 @@ function isIOS() {
440
440
  // real ios device not in simulator
441
441
  return !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
442
442
  }
443
+ function isIOSByUA() {
444
+ var str = navigator.userAgent.toLowerCase();
445
+ var ver = str.match(/cpu (iphone )?os (.*?) like mac os/);
446
+ return ver ? parseInt(ver[2], 10) : 0;
447
+ }
443
448
  function isAndroid() {
444
449
  return /\b[Aa]ndroid\b/.test(navigator.userAgent);
445
450
  }
446
451
  function isSimulatorCellPhone() {
447
452
  return isAndroid() || /\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent);
448
453
  }
454
+ function isMiniProgram() {
455
+ return isAlipayMiniApp() || isWechatMiniApp();
456
+ }
449
457
  function isAlipayMiniApp() {
450
458
  var _my;
451
459
  return typeof my !== "undefined" && ((_my = my) == null ? void 0 : _my.renderTarget) === "web";
452
460
  }
461
+ function isWechatMiniApp() {
462
+ return window.__wxjs_environment === "miniprogram";
463
+ }
453
464
 
454
465
  function imageDataFromColor(value) {
455
466
  if (isString(value)) {
@@ -8129,31 +8140,35 @@ function deserializeMipmapTexture(textureOptions, bins, engine) {
8129
8140
  }
8130
8141
  function _deserializeMipmapTexture() {
8131
8142
  _deserializeMipmapTexture = _async_to_generator(function(textureOptions, bins, engine, files) {
8132
- var mipmaps, target, loadedMipmaps, _iterator, _step, level, newLevel, _iterator1, _step1, face, loadedImageAsset, mipmaps1, target1, jobs, loadedMipmaps1, bin;
8143
+ var mipmaps, target, jobs, loadedMipmaps, mipmaps1, target1, jobs1, loadedMipmaps1, bin;
8133
8144
  return __generator(this, function(_state) {
8134
8145
  switch(_state.label){
8135
8146
  case 0:
8136
8147
  if (files === void 0) files = [];
8137
8148
  if (!(textureOptions.target === 34067)) return [
8138
8149
  3,
8139
- 1
8150
+ 2
8140
8151
  ];
8141
8152
  mipmaps = textureOptions.mipmaps, target = textureOptions.target;
8142
- // const jobs = mipmaps.map(mipmap => Promise.all(mipmap.map(pointer => loadMipmapImage(pointer, bins))));
8143
- loadedMipmaps = [];
8144
- for(_iterator = _create_for_of_iterator_helper_loose(mipmaps); !(_step = _iterator()).done;){
8145
- level = _step.value;
8146
- newLevel = [];
8147
- for(_iterator1 = _create_for_of_iterator_helper_loose(level); !(_step1 = _iterator1()).done;){
8148
- face = _step1.value;
8149
- // @ts-expect-error
8150
- loadedImageAsset = engine.assetLoader.loadGUID(face.id);
8153
+ jobs = mipmaps.map(function(mipmap) {
8154
+ return Promise.all(mipmap.map(function(pointer) {
8151
8155
  // @ts-expect-error
8152
- newLevel.push(loadedImageAsset.data);
8153
- }
8154
- loadedMipmaps.push(newLevel);
8155
- }
8156
- // const bin = files[mipmaps[0][0][1][0]].url;
8156
+ if (pointer.id) {
8157
+ // @ts-expect-error
8158
+ var loadedImageAsset = engine.assetLoader.loadGUID(pointer.id);
8159
+ // @ts-expect-error
8160
+ return loadedImageAsset.data;
8161
+ } else {
8162
+ return loadMipmapImage(pointer, bins);
8163
+ }
8164
+ }));
8165
+ });
8166
+ return [
8167
+ 4,
8168
+ Promise.all(jobs)
8169
+ ];
8170
+ case 1:
8171
+ loadedMipmaps = _state.sent();
8157
8172
  return [
8158
8173
  2,
8159
8174
  _extends({
@@ -8167,17 +8182,17 @@ function _deserializeMipmapTexture() {
8167
8182
  }
8168
8183
  })
8169
8184
  ];
8170
- case 1:
8185
+ case 2:
8171
8186
  // TODO: 补充测试用例
8172
8187
  mipmaps1 = textureOptions.mipmaps, target1 = textureOptions.target;
8173
- jobs = mipmaps1.map(function(pointer) {
8188
+ jobs1 = mipmaps1.map(function(pointer) {
8174
8189
  return loadMipmapImage(pointer, bins);
8175
8190
  });
8176
8191
  return [
8177
8192
  4,
8178
- Promise.all(jobs)
8193
+ Promise.all(jobs1)
8179
8194
  ];
8180
- case 2:
8195
+ case 3:
8181
8196
  loadedMipmaps1 = _state.sent();
8182
8197
  bin = files[mipmaps1[0][1][0]].url;
8183
8198
  return [
@@ -8200,7 +8215,7 @@ function _deserializeMipmapTexture() {
8200
8215
  }
8201
8216
  })
8202
8217
  ];
8203
- case 3:
8218
+ case 4:
8204
8219
  return [
8205
8220
  2
8206
8221
  ];
@@ -11555,7 +11570,7 @@ var valueDefine = "#ifdef SHADER_VERTEX\n#define CURVE_VALUE_TEXTURE uVCurveValu
11555
11570
 
11556
11571
  var screenMeshVert = "precision highp float;attribute vec2 aPos;varying vec2 uv;void main(){gl_Position=vec4(aPos,0.,1.0);uv=(aPos+vec2(1.0))/2.;}";
11557
11572
 
11558
- var colorGradingFrag = "precision highp float;\n#define HALF_MAX 60000.0\n#define ACEScc_MIDGRAY 0.4135884\nvarying vec2 uv;uniform sampler2D _GaussianTex;uniform sampler2D _SceneTex;uniform float _BloomIntensity;uniform float _Brightness;uniform float _Saturation;uniform float _Contrast;uniform bool _UseBloom;uniform bool _UseToneMapping;uniform vec3 _VignetteColor;uniform vec2 _VignetteCenter;uniform float _VignetteIntensity;uniform float _VignetteSmoothness;uniform float _VignetteRoundness;mat3 LinearToACES=mat3(0.59719,0.07600,0.02840,0.35458,0.90834,0.13383,0.04823,0.01566,0.83777);mat3 ACESToLinear=mat3(1.60475,-0.10208,-0.00327,-0.53108,1.10813,-0.07276,-0.07367,-0.00605,1.07602);float log10(float x){return log(x)/log(10.0);}vec3 log10(vec3 v){return vec3(log10(v.x),log10(v.y),log10(v.z));}vec3 LinearToLogC(vec3 x){return 0.244161*log10(5.555556*x+0.047996)+0.386036;}vec3 LogCToLinear(vec3 x){return(pow(vec3(10.0),(x-0.386036)/0.244161)-0.047996)/5.555556;}vec3 rrt_and_odt_fit(vec3 col){vec3 a=col*(col+0.0245786)-0.000090537;vec3 b=col*(0.983729*col+0.4329510)+0.238081;return a/b;}vec3 ACESToneMapping(vec3 col){vec3 aces=LinearToACES*col;aces=rrt_and_odt_fit(aces);col=ACESToLinear*aces;return col;}vec3 LinearToSrgb(vec3 c){return mix(1.055*pow(c,vec3(1./2.4))-0.055,12.92*c,step(c,vec3(0.0031308)));}vec3 GammaCorrection(vec3 c){return pow(c,vec3(1.0/2.2));}vec3 ApplyVignette(vec3 inputColor,vec2 uv,vec2 center,float intensity,float roundness,float smoothness,vec3 color){vec2 dist=abs(uv-center)*intensity;dist.x*=roundness;float vfactor=pow(clamp((1.0-dot(dist,dist)),0.0,1.0),smoothness);return inputColor*mix(color,vec3(1.0),vfactor);}void main(){vec4 hdrColor=texture2D(_SceneTex,uv);hdrColor.rgb=pow(hdrColor.rgb,vec3(2.2));vec3 finalColor=hdrColor.rgb;if(_UseBloom){vec4 bloomColor=texture2D(_GaussianTex,uv);bloomColor.rgb*=_BloomIntensity;finalColor+=bloomColor.rgb;}if(_VignetteIntensity>0.0){finalColor=ApplyVignette(finalColor,uv,_VignetteCenter,_VignetteIntensity,_VignetteRoundness,_VignetteSmoothness,_VignetteColor);}finalColor=finalColor*_Brightness;vec3 colorLog=LinearToLogC(finalColor);colorLog=(colorLog-ACEScc_MIDGRAY)*_Contrast+ACEScc_MIDGRAY;finalColor=LogCToLinear(colorLog);finalColor=max(finalColor,0.0);float luminance=0.2125*finalColor.r+0.7154*finalColor.g+0.0721*finalColor.b;vec3 luminanceColor=vec3(luminance,luminance,luminance);finalColor=(finalColor-luminanceColor)*_Saturation+luminanceColor;finalColor=max(finalColor,0.0);if(_UseToneMapping){finalColor=max(vec3(0.0),ACESToneMapping(finalColor));}gl_FragColor=vec4(clamp(GammaCorrection(finalColor),0.0,1.0),1.0);}";
11573
+ var colorGradingFrag = "precision highp float;\n#define HALF_MAX 60000.0\n#define ACEScc_MIDGRAY 0.4135884\nvarying vec2 uv;uniform sampler2D _GaussianTex;uniform sampler2D _SceneTex;uniform float _BloomIntensity;uniform float _Brightness;uniform float _Saturation;uniform float _Contrast;uniform bool _UseBloom;uniform bool _UseToneMapping;uniform vec3 _VignetteColor;uniform vec2 _VignetteCenter;uniform float _VignetteIntensity;uniform float _VignetteSmoothness;uniform float _VignetteRoundness;mat3 LinearToACES=mat3(0.59719,0.07600,0.02840,0.35458,0.90834,0.13383,0.04823,0.01566,0.83777);mat3 ACESToLinear=mat3(1.60475,-0.10208,-0.00327,-0.53108,1.10813,-0.07276,-0.07367,-0.00605,1.07602);float log10(float x){return log(x)/log(10.0);}vec3 log10(vec3 v){return vec3(log10(v.x),log10(v.y),log10(v.z));}vec3 LinearToLogC(vec3 x){return 0.244161*log10(5.555556*x+0.047996)+0.386036;}vec3 LogCToLinear(vec3 x){return(pow(vec3(10.0),(x-0.386036)/0.244161)-0.047996)/5.555556;}vec3 rrt_and_odt_fit(vec3 col){vec3 a=col*(col+0.0245786)-0.000090537;vec3 b=col*(0.983729*col+0.4329510)+0.238081;return a/b;}vec3 ACESToneMapping(vec3 col){vec3 aces=LinearToACES*col;aces=rrt_and_odt_fit(aces);col=ACESToLinear*aces;return col;}vec3 LinearToSrgb(vec3 c){return mix(1.055*pow(c,vec3(1./2.4))-0.055,12.92*c,step(c,vec3(0.0031308)));}vec3 GammaCorrection(vec3 c){return pow(c,vec3(1.0/2.2));}vec3 ApplyVignette(vec3 inputColor,vec2 uv,vec2 center,float intensity,float roundness,float smoothness,vec3 color){vec2 dist=abs(uv-center)*intensity;dist.x*=roundness;float vfactor=pow(clamp((1.0-dot(dist,dist)),0.0,1.0),smoothness);return inputColor*mix(color,vec3(1.0),vfactor);}void main(){vec4 hdrColor=texture2D(_SceneTex,uv);hdrColor*=hdrColor.a;hdrColor.rgb=pow(hdrColor.rgb,vec3(2.2));vec3 finalColor=hdrColor.rgb;if(_UseBloom){vec4 bloomColor=texture2D(_GaussianTex,uv);bloomColor.rgb*=_BloomIntensity;finalColor+=bloomColor.rgb;}if(_VignetteIntensity>0.0){finalColor=ApplyVignette(finalColor,uv,_VignetteCenter,_VignetteIntensity,_VignetteRoundness,_VignetteSmoothness,_VignetteColor);}finalColor=finalColor*_Brightness;vec3 colorLog=LinearToLogC(finalColor);colorLog=(colorLog-ACEScc_MIDGRAY)*_Contrast+ACEScc_MIDGRAY;finalColor=LogCToLinear(colorLog);finalColor=max(finalColor,0.0);float luminance=0.2125*finalColor.r+0.7154*finalColor.g+0.0721*finalColor.b;vec3 luminanceColor=vec3(luminance,luminance,luminance);finalColor=(finalColor-luminanceColor)*_Saturation+luminanceColor;finalColor=max(finalColor,0.0);if(_UseToneMapping){finalColor=max(vec3(0.0),ACESToneMapping(finalColor));}gl_FragColor=vec4(clamp(GammaCorrection(finalColor),0.0,1.0),1.0);}";
11559
11574
 
11560
11575
  var gaussianDown_frag = "precision highp float;varying vec2 uv;uniform sampler2D _MainTex;uniform vec2 _TextureSize;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=5/2;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(){vec4 mainColor=texture2D(_MainTex,uv);vec3 color=mainColor.rgb;color=GaussNxN(_MainTex,uv,1.0/_TextureSize,1.0);gl_FragColor=vec4(color,1.0);}";
11561
11576
 
@@ -11843,7 +11858,7 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
11843
11858
  this.screenMesh.material.setFloat("_Brightness", brightness);
11844
11859
  this.screenMesh.material.setFloat("_Saturation", saturation);
11845
11860
  this.screenMesh.material.setFloat("_Contrast", contrast);
11846
- this.screenMesh.material.setInt("_UseBloom", useBloom);
11861
+ this.screenMesh.material.setInt("_UseBloom", Number(useBloom));
11847
11862
  if (useBloom) {
11848
11863
  this.screenMesh.material.setTexture("_GaussianTex", this.mainTexture);
11849
11864
  this.screenMesh.material.setFloat("_BloomIntensity", bloomIntensity);
@@ -11855,7 +11870,7 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
11855
11870
  this.screenMesh.material.setVector2("_VignetteCenter", new Vector2(0.5, 0.5));
11856
11871
  this.screenMesh.material.setVector3("_VignetteColor", new Vector3(0.0, 0.0, 0.0));
11857
11872
  }
11858
- this.screenMesh.material.setInt("_UseToneMapping", useToneMapping);
11873
+ this.screenMesh.material.setInt("_UseToneMapping", Number(useToneMapping));
11859
11874
  renderer.renderMeshes([
11860
11875
  this.screenMesh
11861
11876
  ]);
@@ -11867,9 +11882,8 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
11867
11882
  * 后处理配置
11868
11883
  */ var defaultGlobalVolume = {
11869
11884
  useHDR: false,
11870
- usePostProcessing: false,
11871
11885
  /***** Material Uniform *****/ // Bloom
11872
- useBloom: 1.0,
11886
+ useBloom: true,
11873
11887
  threshold: 1.0,
11874
11888
  bloomIntensity: 1.0,
11875
11889
  // ColorAdjustments
@@ -11883,7 +11897,7 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
11883
11897
  vignetteSmoothness: 0.4,
11884
11898
  vignetteRoundness: 1.0,
11885
11899
  // ToneMapping
11886
- useToneMapping: 1
11900
+ useToneMapping: true
11887
11901
  };
11888
11902
 
11889
11903
  var RENDER_PASS_NAME_PREFIX = "_effects_default_";
@@ -11952,20 +11966,36 @@ var seed$5 = 1;
11952
11966
  ];
11953
11967
  this.setRenderPasses(renderPasses);
11954
11968
  if (this.globalVolume) {
11955
- var useBloom = this.globalVolume.useBloom;
11956
11969
  var sceneTextureHandle = new RenderTargetHandle(engine); //保存后处理前的屏幕图像
11957
- if (useBloom) {
11958
- var gaussianStep = 7; // 高斯模糊的迭代次数,次数越高模糊范围越大
11959
- var viewport = [
11960
- 0,
11961
- 0,
11962
- this.renderer.getWidth() / 2,
11963
- this.renderer.getHeight() / 2
11964
- ];
11965
- var gaussianDownResults = new Array(gaussianStep); //存放多个高斯Pass的模糊结果,用于Bloom
11966
- var textureType1 = this.globalVolume.useHDR ? glContext.HALF_FLOAT : glContext.UNSIGNED_BYTE;
11967
- var bloomThresholdPass = new BloomThresholdPass(renderer, {
11968
- name: "BloomThresholdPass",
11970
+ var gaussianStep = 7; // 高斯模糊的迭代次数,次数越高模糊范围越大
11971
+ var viewport = [
11972
+ 0,
11973
+ 0,
11974
+ this.renderer.getWidth() / 2,
11975
+ this.renderer.getHeight() / 2
11976
+ ];
11977
+ var gaussianDownResults = new Array(gaussianStep); //存放多个高斯Pass的模糊结果,用于Bloom
11978
+ var textureType1 = this.globalVolume.useHDR ? glContext.HALF_FLOAT : glContext.UNSIGNED_BYTE;
11979
+ var bloomThresholdPass = new BloomThresholdPass(renderer, {
11980
+ name: "BloomThresholdPass",
11981
+ attachments: [
11982
+ {
11983
+ texture: {
11984
+ format: glContext.RGBA,
11985
+ type: textureType1,
11986
+ minFilter: glContext.LINEAR,
11987
+ magFilter: glContext.LINEAR
11988
+ }
11989
+ }
11990
+ ]
11991
+ });
11992
+ bloomThresholdPass.sceneTextureHandle = sceneTextureHandle;
11993
+ this.addRenderPass(bloomThresholdPass);
11994
+ for(var i = 0; i < gaussianStep; i++){
11995
+ gaussianDownResults[i] = new RenderTargetHandle(engine);
11996
+ var gaussianDownHPass = new HQGaussianDownSamplePass(renderer, "H", {
11997
+ name: "GaussianDownPassH" + i,
11998
+ viewport: viewport,
11969
11999
  attachments: [
11970
12000
  {
11971
12001
  texture: {
@@ -11977,74 +12007,50 @@ var seed$5 = 1;
11977
12007
  }
11978
12008
  ]
11979
12009
  });
11980
- bloomThresholdPass.sceneTextureHandle = sceneTextureHandle;
11981
- this.addRenderPass(bloomThresholdPass);
11982
- for(var i = 0; i < gaussianStep; i++){
11983
- gaussianDownResults[i] = new RenderTargetHandle(engine);
11984
- var gaussianDownHPass = new HQGaussianDownSamplePass(renderer, "H", {
11985
- name: "GaussianDownPassH" + i,
11986
- viewport: viewport,
11987
- attachments: [
11988
- {
11989
- texture: {
11990
- format: glContext.RGBA,
11991
- type: textureType1,
11992
- minFilter: glContext.LINEAR,
11993
- magFilter: glContext.LINEAR
11994
- }
11995
- }
11996
- ]
11997
- });
11998
- var gaussianDownVPass = new HQGaussianDownSamplePass(renderer, "V", {
11999
- name: "GaussianDownPassV" + i,
12000
- viewport: viewport,
12001
- attachments: [
12002
- {
12003
- texture: {
12004
- format: glContext.RGBA,
12005
- type: textureType1,
12006
- minFilter: glContext.LINEAR,
12007
- magFilter: glContext.LINEAR
12008
- }
12010
+ var gaussianDownVPass = new HQGaussianDownSamplePass(renderer, "V", {
12011
+ name: "GaussianDownPassV" + i,
12012
+ viewport: viewport,
12013
+ attachments: [
12014
+ {
12015
+ texture: {
12016
+ format: glContext.RGBA,
12017
+ type: textureType1,
12018
+ minFilter: glContext.LINEAR,
12019
+ magFilter: glContext.LINEAR
12009
12020
  }
12010
- ]
12011
- });
12012
- gaussianDownVPass.gaussianResult = gaussianDownResults[i];
12013
- this.addRenderPass(gaussianDownHPass);
12014
- this.addRenderPass(gaussianDownVPass);
12015
- viewport[2] /= 2;
12016
- viewport[3] /= 2;
12017
- // TODO 限制最大迭代
12018
- }
12019
- viewport[2] *= 4;
12020
- viewport[3] *= 4;
12021
- for(var i1 = 0; i1 < gaussianStep - 1; i1++){
12022
- var gaussianUpPass = new HQGaussianUpSamplePass(renderer, {
12023
- name: "GaussianUpPass" + i1,
12024
- viewport: viewport,
12025
- attachments: [
12026
- {
12027
- texture: {
12028
- format: glContext.RGBA,
12029
- type: textureType1,
12030
- minFilter: glContext.LINEAR,
12031
- magFilter: glContext.LINEAR
12032
- }
12021
+ }
12022
+ ]
12023
+ });
12024
+ gaussianDownVPass.gaussianResult = gaussianDownResults[i];
12025
+ this.addRenderPass(gaussianDownHPass);
12026
+ this.addRenderPass(gaussianDownVPass);
12027
+ viewport[2] /= 2;
12028
+ viewport[3] /= 2;
12029
+ // TODO 限制最大迭代
12030
+ }
12031
+ viewport[2] *= 4;
12032
+ viewport[3] *= 4;
12033
+ for(var i1 = 0; i1 < gaussianStep - 1; i1++){
12034
+ var gaussianUpPass = new HQGaussianUpSamplePass(renderer, {
12035
+ name: "GaussianUpPass" + i1,
12036
+ viewport: viewport,
12037
+ attachments: [
12038
+ {
12039
+ texture: {
12040
+ format: glContext.RGBA,
12041
+ type: textureType1,
12042
+ minFilter: glContext.LINEAR,
12043
+ magFilter: glContext.LINEAR
12033
12044
  }
12034
- ]
12035
- });
12036
- gaussianUpPass.gaussianDownSampleResult = gaussianDownResults[gaussianStep - 2 - i1];
12037
- this.addRenderPass(gaussianUpPass);
12038
- viewport[2] *= 2;
12039
- viewport[3] *= 2;
12040
- }
12041
- }
12042
- var postProcessPass;
12043
- if (useBloom) {
12044
- postProcessPass = new ToneMappingPass(renderer, sceneTextureHandle);
12045
- } else {
12046
- postProcessPass = new ToneMappingPass(renderer);
12045
+ }
12046
+ ]
12047
+ });
12048
+ gaussianUpPass.gaussianDownSampleResult = gaussianDownResults[gaussianStep - 2 - i1];
12049
+ this.addRenderPass(gaussianUpPass);
12050
+ viewport[2] *= 2;
12051
+ viewport[3] *= 2;
12047
12052
  }
12053
+ var postProcessPass = new ToneMappingPass(renderer, sceneTextureHandle);
12048
12054
  this.addRenderPass(postProcessPass);
12049
12055
  }
12050
12056
  this.semantics = new SemanticMap(options.semantics);
@@ -13081,6 +13087,7 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
13081
13087
  1
13082
13088
  ];
13083
13089
  /** 是否响应点击和拖拽交互事件 */ _this._interactive = true;
13090
+ _this.hasBeenAddedToComposition = false;
13084
13091
  _this.getHitTestParams = function(force) {
13085
13092
  if (!_this.clickable) {
13086
13093
  return;
@@ -13099,7 +13106,6 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
13099
13106
  }
13100
13107
  var _proto = InteractComponent.prototype;
13101
13108
  _proto.start = function start() {
13102
- var _this = this;
13103
13109
  var options = this.item.props.content.options;
13104
13110
  var env = this.item.engine.renderer.env;
13105
13111
  var composition = this.item.composition;
@@ -13111,10 +13117,6 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
13111
13117
  this.previewContent = new InteractMesh(this.item.props.content, rendererOptions, this.transform, this.engine);
13112
13118
  }
13113
13119
  }
13114
- composition.addInteractiveItem(this.item, options.type);
13115
- this.item.onEnd = function() {
13116
- return composition.removeInteractiveItem(_this.item, options.type);
13117
- };
13118
13120
  if (options.type === InteractType.DRAG) {
13119
13121
  if (env !== PLAYER_OPTIONS_ENV_EDITOR || options.enableInEditor) {
13120
13122
  composition.event && this.beginDragTarget(options, composition.event);
@@ -13129,6 +13131,11 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
13129
13131
  _proto.update = function update(dt) {
13130
13132
  var _this_previewContent;
13131
13133
  (_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
13134
+ if (!this.hasBeenAddedToComposition && this.item.composition) {
13135
+ var options = this.item.props.content.options;
13136
+ this.item.composition.addInteractiveItem(this.item, options.type);
13137
+ this.hasBeenAddedToComposition = true;
13138
+ }
13132
13139
  if (!this.dragEvent || !this.bouncingArg) {
13133
13140
  return;
13134
13141
  }
@@ -14852,8 +14859,7 @@ var RectangleEdge = /*#__PURE__*/ function() {
14852
14859
  }();
14853
14860
  var Edge = /*#__PURE__*/ function() {
14854
14861
  function Edge(args) {
14855
- // TODO: 为通过帧对比暂时使用老计算,修复粒子发射器直线宽度问题下面一行改为: this._d = args.width || 1 ;
14856
- this._d = (args.width || 1) / 2;
14862
+ this._d = args.width || 1;
14857
14863
  this.arcMode = args.arcMode;
14858
14864
  }
14859
14865
  var _proto = Edge.prototype;
@@ -20178,6 +20184,105 @@ function geometryToTriangles(geometry) {
20178
20184
  return res;
20179
20185
  }
20180
20186
 
20187
+ var PostProcessVolume = /*#__PURE__*/ function(ItemBehaviour) {
20188
+ _inherits(PostProcessVolume, ItemBehaviour);
20189
+ function PostProcessVolume() {
20190
+ var _this;
20191
+ _this = ItemBehaviour.apply(this, arguments) || this;
20192
+ _this.useHDR = true;
20193
+ // Bloom
20194
+ _this.useBloom = true;
20195
+ _this.threshold = 1.0;
20196
+ _this.bloomIntensity = 1.0;
20197
+ // ColorAdjustments
20198
+ _this.brightness = 1.0;
20199
+ _this.saturation = 1.0;
20200
+ _this.contrast = 1.0;
20201
+ // Vignette
20202
+ _this.vignetteIntensity = 0.2;
20203
+ _this.vignetteSmoothness = 0.4;
20204
+ _this.vignetteRoundness = 1.0;
20205
+ // ToneMapping
20206
+ _this.useToneMapping = true // 1: true, 0: false
20207
+ ;
20208
+ return _this;
20209
+ }
20210
+ var _proto = PostProcessVolume.prototype;
20211
+ _proto.start = function start() {
20212
+ var composition = this.item.composition;
20213
+ if (composition) {
20214
+ composition.globalVolume = {
20215
+ useHDR: this.useHDR,
20216
+ useBloom: this.useBloom,
20217
+ threshold: this.threshold,
20218
+ bloomIntensity: this.bloomIntensity,
20219
+ brightness: this.brightness,
20220
+ saturation: this.saturation,
20221
+ contrast: this.contrast,
20222
+ vignetteIntensity: this.vignetteIntensity,
20223
+ vignetteSmoothness: this.vignetteSmoothness,
20224
+ vignetteRoundness: this.vignetteRoundness,
20225
+ useToneMapping: this.useToneMapping
20226
+ };
20227
+ composition.createRenderFrame();
20228
+ }
20229
+ };
20230
+ _proto.update = function update(dt) {
20231
+ var composition = this.item.composition;
20232
+ if (composition) {
20233
+ var globalVolume = composition.renderFrame.globalVolume;
20234
+ globalVolume.useHDR = this.useHDR;
20235
+ globalVolume.useBloom = this.useBloom;
20236
+ globalVolume.threshold = this.threshold;
20237
+ globalVolume.bloomIntensity = this.bloomIntensity;
20238
+ globalVolume.brightness = this.brightness;
20239
+ globalVolume.saturation = this.saturation;
20240
+ globalVolume.contrast = this.contrast;
20241
+ globalVolume.vignetteIntensity = this.vignetteIntensity;
20242
+ globalVolume.vignetteSmoothness = this.vignetteSmoothness;
20243
+ globalVolume.vignetteRoundness = this.vignetteRoundness;
20244
+ globalVolume.useToneMapping = this.useToneMapping;
20245
+ }
20246
+ };
20247
+ return PostProcessVolume;
20248
+ }(ItemBehaviour);
20249
+ __decorate([
20250
+ serialize()
20251
+ ], PostProcessVolume.prototype, "useHDR", void 0);
20252
+ __decorate([
20253
+ serialize()
20254
+ ], PostProcessVolume.prototype, "useBloom", void 0);
20255
+ __decorate([
20256
+ serialize()
20257
+ ], PostProcessVolume.prototype, "threshold", void 0);
20258
+ __decorate([
20259
+ serialize()
20260
+ ], PostProcessVolume.prototype, "bloomIntensity", void 0);
20261
+ __decorate([
20262
+ serialize()
20263
+ ], PostProcessVolume.prototype, "brightness", void 0);
20264
+ __decorate([
20265
+ serialize()
20266
+ ], PostProcessVolume.prototype, "saturation", void 0);
20267
+ __decorate([
20268
+ serialize()
20269
+ ], PostProcessVolume.prototype, "contrast", void 0);
20270
+ __decorate([
20271
+ serialize()
20272
+ ], PostProcessVolume.prototype, "vignetteIntensity", void 0);
20273
+ __decorate([
20274
+ serialize()
20275
+ ], PostProcessVolume.prototype, "vignetteSmoothness", void 0);
20276
+ __decorate([
20277
+ serialize()
20278
+ ], PostProcessVolume.prototype, "vignetteRoundness", void 0);
20279
+ __decorate([
20280
+ serialize()
20281
+ ], PostProcessVolume.prototype, "useToneMapping", void 0);
20282
+ PostProcessVolume = __decorate([
20283
+ effectsClass("PostProcessVolume")
20284
+ ], PostProcessVolume);
20285
+
20181
20286
  var VFXItem = /*#__PURE__*/ function(EffectsObject) {
20182
20287
  _inherits(VFXItem, EffectsObject);
20183
20288
  function VFXItem(engine, props) {
@@ -20401,7 +20506,7 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
20401
20506
  /**
20402
20507
  * 获取元素用于计算光线投射的面片类型和参数
20403
20508
  * @override
20404
- * @param force 元素没有开启交互也返回参数
20509
+ * @param force - 元素没有开启交互也返回参数
20405
20510
  */ _proto.getHitTestParams = function getHitTestParams(force) {
20406
20511
  // OVERRIDE
20407
20512
  };
@@ -20651,42 +20756,6 @@ var Item;
20651
20756
  }
20652
20757
  Item.isNull = isNull;
20653
20758
  })(Item || (Item = {}));
20654
- /**
20655
- * (待废弃) 根据元素的类型创建对应的 `VFXItem` 实例
20656
- * @param props
20657
- * @param composition
20658
- */ function createVFXItem(props, composition) {
20659
- var type = props.type;
20660
- var pluginName = props.pluginName;
20661
- if (!pluginName) {
20662
- switch(type){
20663
- case ItemType.null:
20664
- pluginName = "cal";
20665
- break;
20666
- case ItemType.sprite:
20667
- pluginName = "sprite";
20668
- break;
20669
- case ItemType.particle:
20670
- pluginName = "particle";
20671
- break;
20672
- case ItemType.interact:
20673
- pluginName = "interact";
20674
- break;
20675
- case ItemType.camera:
20676
- pluginName = "camera";
20677
- break;
20678
- case ItemType.text:
20679
- pluginName = "text";
20680
- break;
20681
- case ItemType.tree:
20682
- pluginName = "tree";
20683
- break;
20684
- default:
20685
- throw new Error("Invalid vfx item type.");
20686
- }
20687
- }
20688
- return composition.pluginSystem.createPluginItem(pluginName, props, composition);
20689
- }
20690
20759
 
20691
20760
  var pluginLoaderMap = {};
20692
20761
  var defaultPlugins = [];
@@ -20699,6 +20768,9 @@ var pluginCtrlMap = {};
20699
20768
  * @param isDefault load
20700
20769
  */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
20701
20770
  function registerPlugin(name, pluginClass, itemClass, isDefault) {
20771
+ if (pluginCtrlMap[name]) {
20772
+ logger.error("Duplicate registration for plugin " + name + ".");
20773
+ }
20702
20774
  pluginCtrlMap[name] = itemClass;
20703
20775
  pluginLoaderMap[name] = pluginClass;
20704
20776
  if (isDefault) {
@@ -21277,8 +21349,8 @@ var SerializationHelper = /*#__PURE__*/ function() {
21277
21349
  if (this.engine.objectInstance[guid]) {
21278
21350
  return this.engine.objectInstance[guid];
21279
21351
  }
21280
- var effectsObject;
21281
21352
  var effectsObjectData = this.findData(guid);
21353
+ var effectsObject;
21282
21354
  if (!effectsObjectData) {
21283
21355
  console.error("Object data with uuid: " + guid + " not found.");
21284
21356
  return undefined;
@@ -21314,7 +21386,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
21314
21386
  _proto.loadGUIDAsync = function loadGUIDAsync(guid) {
21315
21387
  var _this = this;
21316
21388
  return _async_to_generator(function() {
21317
- var effectsObject, effectsObjectData, classConstructor;
21389
+ var effectsObjectData, effectsObject, classConstructor;
21318
21390
  return __generator(this, function(_state) {
21319
21391
  switch(_state.label){
21320
21392
  case 0:
@@ -23579,14 +23651,6 @@ var seed = 1;
23579
23651
  case 0:
23580
23652
  // TODO: 后面切换到新的数据版本,就不用掉用 getStandardJSON 做转换了
23581
23653
  jsonScene = getStandardJSON(json);
23582
- // FIXME: hack globalVolume,specification 更新后需移除
23583
- // @ts-expect-error
23584
- json.compositions.forEach(function(composition, i) {
23585
- if (composition.globalVolume) {
23586
- // @ts-expect-error
23587
- jsonScene.compositions[i].globalVolume = composition.globalVolume;
23588
- }
23589
- });
23590
23654
  _jsonScene_plugins = jsonScene.plugins, plugins = _jsonScene_plugins === void 0 ? [] : _jsonScene_plugins, sceneCompositions = jsonScene.compositions, imgUsage = jsonScene.imgUsage, images = jsonScene.images;
23591
23655
  pluginSystem = new PluginSystem(plugins);
23592
23656
  return [
@@ -24374,9 +24438,7 @@ var listOrder = 0;
24374
24438
  }
24375
24439
  var _proto = CompositionSourceManager.prototype;
24376
24440
  _proto.getContent = function getContent(composition) {
24377
- // TODO: specification 中补充 globalVolume 类型
24378
- // @ts-expect-error
24379
- var id = composition.id, duration = composition.duration, name = composition.name, endBehavior = composition.endBehavior, camera = composition.camera, globalVolume = composition.globalVolume, _composition_startTime = composition.startTime, startTime = _composition_startTime === void 0 ? 0 : _composition_startTime;
24441
+ var id = composition.id, duration = composition.duration, name = composition.name, endBehavior = composition.endBehavior, camera = composition.camera, _composition_startTime = composition.startTime, startTime = _composition_startTime === void 0 ? 0 : _composition_startTime;
24380
24442
  var items = this.assembleItems(composition);
24381
24443
  return _extends({}, composition, {
24382
24444
  id: id,
@@ -24386,8 +24448,7 @@ var listOrder = 0;
24386
24448
  // looping,
24387
24449
  items: items,
24388
24450
  camera: camera,
24389
- startTime: startTime,
24390
- globalVolume: globalVolume
24451
+ startTime: startTime
24391
24452
  });
24392
24453
  };
24393
24454
  _proto.assembleItems = function assembleItems(composition) {
@@ -24549,7 +24610,6 @@ var listOrder = 0;
24549
24610
  this.rootComposition = this.rootItem.addComponent(CompositionComponent);
24550
24611
  this.rootComposition.data = sourceContent;
24551
24612
  var imageUsage = !reusable && imgUsage;
24552
- this.globalVolume = sourceContent.globalVolume;
24553
24613
  this.width = width;
24554
24614
  this.height = height;
24555
24615
  this.renderOrder = baseRenderOrder;
@@ -26754,7 +26814,10 @@ var FBGeometryDataT = /*#__PURE__*/ function() {
26754
26814
  return FBGeometryDataT;
26755
26815
  }();
26756
26816
 
26757
- var EffectsPackage = /*#__PURE__*/ function() {
26817
+ /**
26818
+ * @since 2.0.0
26819
+ * @internal
26820
+ */ var EffectsPackage = /*#__PURE__*/ function() {
26758
26821
  function EffectsPackage() {
26759
26822
  this.exportObjectDatas = [];
26760
26823
  }
@@ -26779,8 +26842,7 @@ var EffectsPackage = /*#__PURE__*/ function() {
26779
26842
  }
26780
26843
  effectsPackage.exportObjects = exportObjects;
26781
26844
  FBEffectsPackageData.finishFBEffectsPackageDataBuffer(fbb, effectsPackage.pack(fbb));
26782
- var buffer = fbb.asUint8Array(); // Of type `Uint8Array`.
26783
- return buffer;
26845
+ return fbb.asUint8Array(); // Of type `Uint8Array`.
26784
26846
  };
26785
26847
  _proto.deserializeFromBinary = function deserializeFromBinary(buffer) {
26786
26848
  var buf = new ByteBuffer(buffer);
@@ -26808,37 +26870,35 @@ var EffectsPackage = /*#__PURE__*/ function() {
26808
26870
  _proto.geometryDataToBinary = function geometryDataToBinary(geometryData) {
26809
26871
  var fbb = new Builder(1);
26810
26872
  var fbGeometryData = new FBGeometryDataT();
26811
- fbGeometryData.indexFormat = geometryData.indexFormat;
26812
- fbGeometryData.indexOffset = geometryData.indexOffset;
26813
- fbGeometryData.mode = geometryData.mode;
26814
- fbGeometryData.id = geometryData.id;
26815
- var _geometryData_boneNames;
26816
- fbGeometryData.boneNames = (_geometryData_boneNames = geometryData.boneNames) != null ? _geometryData_boneNames : [];
26817
- var _geometryData_rootBoneName;
26818
- fbGeometryData.rootBoneName = (_geometryData_rootBoneName = geometryData.rootBoneName) != null ? _geometryData_rootBoneName : "";
26819
- var _geometryData_inverseBindMatrices;
26820
- fbGeometryData.inverseBindMatrices = (_geometryData_inverseBindMatrices = geometryData.inverseBindMatrices) != null ? _geometryData_inverseBindMatrices : [];
26821
- var _geometryData_binaryData;
26822
- fbGeometryData.binaryData = (_geometryData_binaryData = geometryData.binaryData) != null ? _geometryData_binaryData : [];
26873
+ var indexFormat = geometryData.indexFormat, indexOffset = geometryData.indexOffset, mode = geometryData.mode, id = geometryData.id, vertexData = geometryData.vertexData, _geometryData_boneNames = geometryData.boneNames, boneNames = _geometryData_boneNames === void 0 ? [] : _geometryData_boneNames, _geometryData_rootBoneName = geometryData.rootBoneName, rootBoneName = _geometryData_rootBoneName === void 0 ? "" : _geometryData_rootBoneName, _geometryData_inverseBindMatrices = geometryData.inverseBindMatrices, inverseBindMatrices = _geometryData_inverseBindMatrices === void 0 ? [] : _geometryData_inverseBindMatrices, _geometryData_binaryData = geometryData.binaryData, binaryData = _geometryData_binaryData === void 0 ? [] : _geometryData_binaryData;
26874
+ fbGeometryData.indexFormat = indexFormat;
26875
+ fbGeometryData.indexOffset = indexOffset;
26876
+ fbGeometryData.mode = mode;
26877
+ fbGeometryData.id = id;
26878
+ fbGeometryData.boneNames = boneNames;
26879
+ fbGeometryData.rootBoneName = rootBoneName;
26880
+ fbGeometryData.inverseBindMatrices = inverseBindMatrices;
26881
+ fbGeometryData.binaryData = binaryData;
26823
26882
  var fbVertexdata = new FBVertexDataT();
26824
- fbVertexdata.vertexCount = geometryData.vertexData.vertexCount;
26883
+ fbVertexdata.vertexCount = vertexData.vertexCount;
26825
26884
  fbVertexdata.channels = [];
26826
- for(var _iterator = _create_for_of_iterator_helper_loose(geometryData.vertexData.channels), _step; !(_step = _iterator()).done;){
26885
+ for(var _iterator = _create_for_of_iterator_helper_loose(vertexData.channels), _step; !(_step = _iterator()).done;){
26827
26886
  var channel = _step.value;
26828
- var fbChannel = new FBVertexChannelT(channel.semantic, channel.offset, channel.format, channel.dimension, channel.normalize);
26887
+ var semantic = channel.semantic, offset = channel.offset, format = channel.format, dimension = channel.dimension, normalize = channel.normalize;
26888
+ var fbChannel = new FBVertexChannelT(semantic, offset, format, dimension, normalize);
26829
26889
  fbVertexdata.channels.push(fbChannel);
26830
26890
  }
26831
26891
  fbGeometryData.vertexData = fbVertexdata;
26832
26892
  var fbSubMeshes = [];
26833
26893
  for(var _iterator1 = _create_for_of_iterator_helper_loose(geometryData.subMeshes), _step1; !(_step1 = _iterator1()).done;){
26834
26894
  var subMesh = _step1.value;
26835
- var fbSubMesh = new FBSubMeshT(subMesh.offset, subMesh.indexCount, subMesh.vertexCount);
26895
+ var offset1 = subMesh.offset, indexCount = subMesh.indexCount, vertexCount = subMesh.vertexCount;
26896
+ var fbSubMesh = new FBSubMeshT(offset1, indexCount, vertexCount);
26836
26897
  fbSubMeshes.push(fbSubMesh);
26837
26898
  }
26838
26899
  fbGeometryData.subMeshes = fbSubMeshes;
26839
26900
  FBEffectsPackageData.finishFBEffectsPackageDataBuffer(fbb, fbGeometryData.pack(fbb));
26840
- var buffer = fbb.asUint8Array(); // Of type `Uint8Array`.
26841
- return buffer;
26901
+ return fbb.asUint8Array(); // Of type `Uint8Array`.
26842
26902
  };
26843
26903
  _proto.binaryToGeometryData = function binaryToGeometryData(buffer) {
26844
26904
  var buf = new ByteBuffer(buffer);
@@ -26860,7 +26920,8 @@ var EffectsPackage = /*#__PURE__*/ function() {
26860
26920
  semantic: (_channel_semantic = channel.semantic()) != null ? _channel_semantic : "",
26861
26921
  offset: channel.offset(),
26862
26922
  format: channel.format(),
26863
- dimension: channel.dimension()
26923
+ dimension: channel.dimension(),
26924
+ normalize: channel.normalize()
26864
26925
  };
26865
26926
  vertexData.channels.push(vertexChannel);
26866
26927
  }
@@ -26873,7 +26934,8 @@ var EffectsPackage = /*#__PURE__*/ function() {
26873
26934
  }
26874
26935
  var subMesh = {
26875
26936
  offset: fbSubMesh.offset(),
26876
- vertexCount: fbSubMesh.vertexCount()
26937
+ vertexCount: fbSubMesh.vertexCount(),
26938
+ indexCount: fbSubMesh.indexCount()
26877
26939
  };
26878
26940
  subMeshes.push(subMesh);
26879
26941
  }
@@ -27302,8 +27364,8 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
27302
27364
  registerPlugin("particle", ParticleLoader, VFXItem, true);
27303
27365
  registerPlugin("cal", CalculateLoader, VFXItem, true);
27304
27366
  registerPlugin("interact", InteractLoader, VFXItem, true);
27305
- var version = "2.0.0-alpha.27";
27367
+ var version = "2.0.0-alpha.28";
27306
27368
  logger.info("Core version: " + version + ".");
27307
27369
 
27308
- export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, 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, 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, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, 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, createVFXItem, 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, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, 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, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
27370
+ export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, 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, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, 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, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
27309
27371
  //# sourceMappingURL=index.mjs.map