@galacean/effects-core 2.4.8 → 2.5.0-alpha.0

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.4.8
6
+ * Version: v2.5.0-alpha.0
7
7
  */
8
8
 
9
9
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -341,11 +341,6 @@ function colorToArr$1(hex, normalized) {
341
341
  parseInt(m[2], 16),
342
342
  parseInt(m[3], 16),
343
343
  255
344
- ] || [
345
- 0,
346
- 0,
347
- 0,
348
- 255
349
344
  ];
350
345
  }
351
346
  } else if (_instanceof1(hex, Array)) {
@@ -10208,7 +10203,7 @@ var itemFrame_frag = "#version 100\nprecision highp float;vec4 blendColor(vec4 c
10208
10203
 
10209
10204
  var integrate = "float calculateMovement(float t,vec2 p1,vec2 p2,vec2 p3,vec2 p4){float movement=0.0;float h=(t-p1.x)*0.05;for(int i=0;i<=20;i++){float t=float(i)*h;float nt=binarySearchT(t,p1.x,p2.x,p3.x,p4.x);float y=cubicBezier(nt,p1.y,p2.y,p3.y,p4.y);float weight=(i==0||i==20)? 1.0 :(mod(float(i),2.)!=0.)? 4.0 : 2.0;movement+=weight*y;}movement*=h/3.;return movement;}float integrateFromBezierCurveFrames(float time,float frameStart,float frameCount){int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i+=2){vec4 k0=lookup_curve(i+start);vec4 k1=lookup_curve(i+1+start);if(i==0&&time<k0.x){return ret;}vec2 p1=vec2(k0.x,k0.y);vec2 p2=vec2(k0.z,k0.w);vec2 p3=vec2(k1.z,k1.w);vec2 p4=vec2(k1.x,k1.y);if(time>=k1.x){ret+=calculateMovement(k1.x,p1,p2,p3,p4);}if(time>=k0.x&&time<k1.x){return ret+calculateMovement(time,p1,p2,p3,p4);}}return ret;}float integrateByTimeLineSeg(float t,vec2 p0,vec2 p1){float t0=p0.x;float t1=p1.x;float y0=p0.y;float y1=p1.y;vec4 tSqr=vec4(t,t,t0,t0);tSqr=tSqr*tSqr;vec4 a=vec4(2.*t,3.,-t0,3.)*tSqr;float t1y0=t1*y0;vec4 b=vec4(y0-y1,t0*y1-t1y0,2.*y0+y1,t1y0);float r=dot(a,b);return r/(t0-t1)*0.16666667;}float integrateLineSeg(float time,vec2 p0,vec2 p1){float h=time-p0.x;float y0=p0.y;return(y0+y0+(p1.y-y0)*h/(p1.x-p0.x))*h/2.;}float integrateFromLineSeg(float time,float frameStart,float frameCount){if(time==0.){return 0.;}int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i++){if(i>count){return ret;}vec4 ks=lookup_curve(i+start);vec2 k0=ks.xy;vec2 k1=ks.zw;if(time>k0.x&&time<=k1.x){return ret+integrateLineSeg(time,k0,k1);}ret+=integrateLineSeg(k1.x,k0,k1);vec2 k2=lookup_curve(i+start+1).xy;if(time>k1.x&&time<=k2.x){return ret+integrateLineSeg(time,k1,k2);}ret+=integrateLineSeg(k2.x,k1,k2);}return ret;}float integrateByTimeFromLineSeg(float time,float frameStart,float frameCount){if(time==0.){return 0.;}int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i++){if(i>count){return ret;}vec4 ks=lookup_curve(i+start);vec2 k0=ks.xy;vec2 k1=ks.zw;if(time>k0.x&&time<=k1.x){return ret+integrateByTimeLineSeg(time,k0,k1);}ret+=integrateByTimeLineSeg(k1.x,k0,k1);vec2 k2=lookup_curve(i+start+1).xy;if(time>k1.x&&time<=k2.x){return ret+integrateByTimeLineSeg(time,k1,k2);}ret+=integrateByTimeLineSeg(k2.x,k1,k2);}return ret;}float getIntegrateFromTime0(float t1,vec4 value){float type=value.x;if(type==0.){return value.y*t1;}if(type==1.){vec2 p0=vec2(0.,value.y);vec2 p1=vec2(value.w,value.z);return integrateLineSeg(t1,p0,p1);}if(type==3.){return integrateFromLineSeg(t1,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed)*t1;}if(type==5.){return integrateFromBezierCurveFrames(t1,value.z,value.w);}return 0.;}float getIntegrateByTimeFromTime(float t0,float t1,vec4 value){float type=value.x;if(type==0.){return value.y*(t1*t1-t0*t0)/2.;}else if(type==1.){vec2 p0=vec2(0.,value.y);vec2 p1=vec2(value.w,value.z);return integrateByTimeLineSeg(t1,p0,p1)-integrateByTimeLineSeg(t0,p0,p1);}if(type==3.){return integrateByTimeFromLineSeg(t1,value.y,value.z)-integrateByTimeFromLineSeg(t0,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed)*(t1*t1-t0*t0)/2.;}if(type==5.){return integrateFromBezierCurveFrames(t1,value.z,value.w)-integrateFromBezierCurveFrames(t0,value.z,value.w);}return 0.;}";
10210
10205
 
10211
- var itemVert = "precision highp float;attribute vec2 atlasOffset;attribute vec3 aPos;varying vec2 vTexCoord;varying vec3 vParams;varying vec4 vColor;uniform vec2 _Size;uniform vec3 _Scale;uniform vec4 _Color;uniform vec4 _TexParams;uniform vec4 _TexOffset;uniform mat4 effects_MatrixVP;uniform mat4 effects_ObjectToWorld;uniform mat4 effects_MatrixV;\n#ifdef ENV_EDITOR\nuniform vec4 uEditorTransform;\n#endif\nvoid main(){vec4 texParams=_TexParams;vTexCoord=vec2(atlasOffset.xy*_TexOffset.zw+_TexOffset.xy);vColor=_Color;vParams=vec3(texParams.w,texParams.y,texParams.x);if(texParams.z==1.0){vec4 pos=vec4(aPos.xy*_Size,aPos.z,1.0);gl_Position=effects_MatrixVP*effects_ObjectToWorld*pos;}else{mat4 view=effects_MatrixV;vec3 camRight=vec3(view[0][0],view[1][0],view[2][0]);vec3 camUp=vec3(view[0][1],view[1][1],view[2][1]);vec3 worldPosition=vec3(effects_ObjectToWorld*vec4(0.0,0.0,0.0,1.0));vec3 vertexPosition=worldPosition+camRight*aPos.x*_Size.x*_Scale.x+camUp*aPos.y*_Size.y*_Scale.y;gl_Position=effects_MatrixVP*vec4(vertexPosition,1.0);}\n#ifdef ENV_EDITOR\ngl_Position=vec4(gl_Position.xy*uEditorTransform.xy+uEditorTransform.zw*gl_Position.w,gl_Position.zw);\n#endif\n}";
10206
+ var itemVert = "precision highp float;attribute vec2 aUV;attribute vec3 aPos;varying vec2 vTexCoord;varying vec3 vParams;varying vec4 vColor;uniform vec2 _Size;uniform vec3 _Scale;uniform vec4 _Color;uniform vec4 _TexParams;uniform vec4 _TexOffset;uniform mat4 effects_MatrixVP;uniform mat4 effects_ObjectToWorld;uniform mat4 effects_MatrixV;\n#ifdef ENV_EDITOR\nuniform vec4 uEditorTransform;\n#endif\nvoid main(){vec4 texParams=_TexParams;vTexCoord=vec2(aUV.xy*_TexOffset.zw+_TexOffset.xy);vColor=_Color;vParams=vec3(texParams.w,texParams.y,texParams.x);if(texParams.z==1.0){vec4 pos=vec4(aPos.xy*_Size,aPos.z,1.0);gl_Position=effects_MatrixVP*effects_ObjectToWorld*pos;}else{mat4 view=effects_MatrixV;vec3 camRight=vec3(view[0][0],view[1][0],view[2][0]);vec3 camUp=vec3(view[0][1],view[1][1],view[2][1]);vec3 worldPosition=vec3(effects_ObjectToWorld*vec4(0.0,0.0,0.0,1.0));vec3 vertexPosition=worldPosition+camRight*aPos.x*_Size.x*_Scale.x+camUp*aPos.y*_Size.y*_Scale.y;gl_Position=effects_MatrixVP*vec4(vertexPosition,1.0);}\n#ifdef ENV_EDITOR\ngl_Position=vec4(gl_Position.xy*uEditorTransform.xy+uEditorTransform.zw*gl_Position.w,gl_Position.zw);\n#endif\n}";
10212
10207
 
10213
10208
  var itemFrag = "precision highp float;varying vec4 vColor;varying vec2 vTexCoord;varying vec3 vParams;uniform sampler2D _MainTex;vec4 blendColor(vec4 color,vec4 vc,float mode){vec4 ret=color*vc;float alpha=ret.a;if(mode==1.){ret.rgb*=alpha;}else if(mode==2.){ret.rgb*=alpha;ret.a=dot(ret.rgb,vec3(0.33333333));}else if(mode==3.){alpha=color.r*alpha;ret=vec4(vc.rgb*alpha,alpha);}return ret;}void main(){vec4 color=vec4(0.);\n#ifdef TRANSPARENT_VIDEO\nfloat halfX=vTexCoord.x*0.5;vec2 uv_rgb=vec2(halfX,vTexCoord.y);vec2 uv_alpha=vec2(halfX+0.5,vTexCoord.y);vec3 rgb=texture2D(_MainTex,uv_rgb).rgb;float alpha=max(texture2D(_MainTex,uv_alpha).r,1e-5);vec4 texColor=vec4(rgb/alpha,alpha);\n#else\nvec4 texColor=texture2D(_MainTex,vTexCoord.xy);\n#endif\ncolor=blendColor(texColor,vColor,floor(0.5+vParams.y));\n#ifdef ALPHA_CLIP\nif(color.a<0.04){discard;}\n#endif\ncolor.a=clamp(color.a,0.0,1.0);gl_FragColor=color;}";
10214
10209
 
@@ -12444,6 +12439,15 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12444
12439
  return out;
12445
12440
  }
12446
12441
 
12442
+ var singleSplits = [
12443
+ [
12444
+ 0,
12445
+ 0,
12446
+ 1,
12447
+ 1,
12448
+ undefined
12449
+ ]
12450
+ ];
12447
12451
  /**
12448
12452
  * @since 2.1.0
12449
12453
  */ var BaseRenderComponent = /*#__PURE__*/ function(RendererComponent) {
@@ -12451,11 +12455,12 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12451
12455
  function BaseRenderComponent(engine) {
12452
12456
  var _this;
12453
12457
  _this = RendererComponent.call(this, engine) || this;
12454
- _this.color = new Color(1, 1, 1, 1);
12455
12458
  _this.visible = true;
12459
+ _this.splits = singleSplits;
12456
12460
  /**
12457
12461
  * 用于点击测试的碰撞器
12458
12462
  */ _this.meshCollider = new MeshCollider();
12463
+ _this._color = new Color(1, 1, 1, 1);
12459
12464
  // TODO 点击测试后续抽象一个 Collider 组件
12460
12465
  _this.getHitTestParams = function(force) {
12461
12466
  var sizeMatrix = Matrix4.fromScale(_this.transform.size.x, _this.transform.size.y, 1);
@@ -12486,6 +12491,58 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12486
12491
  mask: 0,
12487
12492
  alphaMask: false
12488
12493
  };
12494
+ _this.defaultGeometry = Geometry.create(_this.engine, {
12495
+ attributes: {
12496
+ aPos: {
12497
+ type: glContext.FLOAT,
12498
+ size: 3,
12499
+ data: new Float32Array([
12500
+ -0.5,
12501
+ 0.5,
12502
+ 0,
12503
+ -0.5,
12504
+ -0.5,
12505
+ 0,
12506
+ 0.5,
12507
+ 0.5,
12508
+ 0,
12509
+ 0.5,
12510
+ -0.5,
12511
+ 0
12512
+ ])
12513
+ },
12514
+ aUV: {
12515
+ size: 2,
12516
+ offset: 0,
12517
+ releasable: true,
12518
+ type: glContext.FLOAT,
12519
+ data: new Float32Array([
12520
+ 0,
12521
+ 1,
12522
+ 0,
12523
+ 0,
12524
+ 1,
12525
+ 1,
12526
+ 1,
12527
+ 0
12528
+ ])
12529
+ }
12530
+ },
12531
+ indices: {
12532
+ data: new Uint16Array([
12533
+ 0,
12534
+ 1,
12535
+ 2,
12536
+ 2,
12537
+ 1,
12538
+ 3
12539
+ ]),
12540
+ releasable: true
12541
+ },
12542
+ mode: glContext.TRIANGLES,
12543
+ drawCount: 6
12544
+ });
12545
+ _this.geometry = _this.defaultGeometry;
12489
12546
  var material = Material.create(_this.engine, {
12490
12547
  shader: {
12491
12548
  fragment: itemFrag,
@@ -12494,12 +12551,7 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12494
12551
  }
12495
12552
  });
12496
12553
  _this.material = material;
12497
- _this.material.setColor("_Color", new Color().setFromArray([
12498
- 1,
12499
- 1,
12500
- 1,
12501
- 1
12502
- ]));
12554
+ _this.material.setColor("_Color", new Color(1, 1, 1, 1));
12503
12555
  _this.maskManager = new MaskProcessor(engine);
12504
12556
  return _this;
12505
12557
  }
@@ -12519,11 +12571,11 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12519
12571
  };
12520
12572
  _proto.setColor = function setColor(color) {
12521
12573
  if (_instanceof1(color, Color)) {
12522
- this.color.copyFrom(color);
12574
+ this._color.copyFrom(color);
12523
12575
  } else {
12524
- this.color.setFromArray(color);
12576
+ this._color.setFromArray(color);
12525
12577
  }
12526
- this.material.setColor("_Color", this.color);
12578
+ this.material.setColor("_Color", this._color);
12527
12579
  };
12528
12580
  _proto.setTexture = function setTexture(input) {
12529
12581
  var _this = this;
@@ -12586,98 +12638,143 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12586
12638
  var boundingBox = this.meshCollider.getBoundingBox();
12587
12639
  return boundingBox;
12588
12640
  };
12589
- _proto.getItemGeometryData = function getItemGeometryData(geometry) {
12590
- var renderer = this.renderer;
12641
+ _proto.getItemGeometryData = function getItemGeometryData(renderer) {
12642
+ var _this = this, splits = _this.splits, textureSheetAnimation = _this.textureSheetAnimation;
12643
+ var sx = 1, sy = 1;
12644
+ var geometry = this.defaultGeometry;
12591
12645
  if (renderer.shape) {
12592
12646
  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;
12593
12647
  var point = new Float32Array(aPoint);
12594
12648
  var position = [];
12595
- var atlasOffset = [];
12649
+ var aUV = [];
12596
12650
  for(var i = 0; i < point.length; i += 6){
12597
- atlasOffset.push(aPoint[i + 2], aPoint[i + 3]);
12651
+ point[i] *= sx;
12652
+ point[i + 1] *= sy;
12653
+ aUV.push(aPoint[i + 2], aPoint[i + 3]);
12598
12654
  position.push(point[i], point[i + 1], 0.0);
12599
12655
  }
12600
12656
  geometry.setAttributeData("aPos", new Float32Array(position));
12601
12657
  return {
12602
12658
  index: index,
12603
- atlasOffset: atlasOffset
12659
+ aUV: aUV
12604
12660
  };
12605
- } else {
12606
- geometry.setAttributeData("aPos", new Float32Array([
12607
- -0.5,
12608
- 0.5,
12661
+ }
12662
+ var originData = [
12663
+ -.5,
12664
+ .5,
12665
+ -.5,
12666
+ -.5,
12667
+ .5,
12668
+ .5,
12669
+ .5,
12670
+ -.5
12671
+ ];
12672
+ var aUV1 = [];
12673
+ var index1 = [];
12674
+ var position1 = [];
12675
+ if (splits.length === 1) {
12676
+ var split = textureSheetAnimation ? [
12609
12677
  0,
12610
- -0.5,
12611
- -0.5,
12612
12678
  0,
12613
- 0.5,
12614
- 0.5,
12679
+ 1,
12680
+ 1,
12681
+ splits[0][4]
12682
+ ] : splits[0];
12683
+ var texOffset = split[4] ? [
12615
12684
  0,
12616
- 0.5,
12617
- -0.5,
12685
+ 0,
12686
+ 1,
12687
+ 0,
12688
+ 0,
12689
+ 1,
12690
+ 1,
12691
+ 1
12692
+ ] : [
12693
+ 0,
12694
+ 1,
12695
+ 0,
12696
+ 0,
12697
+ 1,
12698
+ 1,
12699
+ 1,
12618
12700
  0
12619
- ]));
12620
- return {
12621
- index: [
12622
- 0,
12623
- 1,
12624
- 2,
12625
- 2,
12626
- 1,
12627
- 3
12628
- ],
12629
- atlasOffset: [
12630
- 0,
12631
- 1,
12632
- 0,
12633
- 0,
12634
- 1,
12635
- 1,
12636
- 1,
12637
- 0
12638
- ]
12639
- };
12640
- }
12641
- };
12642
- _proto.createGeometry = function createGeometry() {
12643
- var geometry = Geometry.create(this.engine, {
12644
- attributes: {
12645
- aPos: {
12646
- type: glContext.FLOAT,
12647
- size: 3,
12648
- data: new Float32Array([
12649
- -0.5,
12650
- 0.5,
12701
+ ];
12702
+ var tox = split[0];
12703
+ var toy = split[1];
12704
+ var tsx = split[4] ? split[3] : split[2];
12705
+ var tsy = split[4] ? split[2] : split[3];
12706
+ aUV1.push(texOffset[0] * tsx + tox, texOffset[1] * tsy + toy, texOffset[2] * tsx + tox, texOffset[3] * tsy + toy, texOffset[4] * tsx + tox, texOffset[5] * tsy + toy, texOffset[6] * tsx + tox, texOffset[7] * tsy + toy);
12707
+ position1.push(originData[0], originData[1], 0.0, originData[2], originData[3], 0.0, originData[4], originData[5], 0.0, originData[6], originData[7], 0.0);
12708
+ index1.push(0, 1, 2, 2, 1, 3);
12709
+ } else {
12710
+ // TODO: 原有打包纹理拆分逻辑,待移除
12711
+ //-------------------------------------------------------------------------
12712
+ var col = 2;
12713
+ var row = 2;
12714
+ for(var x = 0; x < col; x++){
12715
+ for(var y = 0; y < row; y++){
12716
+ var base = (y * 2 + x) * 4;
12717
+ // @ts-expect-error
12718
+ var split1 = textureSheetAnimation ? [
12651
12719
  0,
12652
- -0.5,
12653
- -0.5,
12654
12720
  0,
12655
- 0.5,
12656
- 0.5,
12721
+ 1,
12722
+ 1,
12723
+ splits[0][4]
12724
+ ] : splits[y * 2 + x];
12725
+ var texOffset1 = split1[4] ? [
12657
12726
  0,
12658
- 0.5,
12659
- -0.5,
12727
+ 0,
12728
+ 1,
12729
+ 0,
12730
+ 0,
12731
+ 1,
12732
+ 1,
12733
+ 1
12734
+ ] : [
12735
+ 0,
12736
+ 1,
12737
+ 0,
12738
+ 0,
12739
+ 1,
12740
+ 1,
12741
+ 1,
12660
12742
  0
12661
- ])
12662
- },
12663
- atlasOffset: {
12664
- size: 2,
12665
- offset: 0,
12666
- releasable: true,
12667
- type: glContext.FLOAT,
12668
- data: new Float32Array(0)
12743
+ ];
12744
+ var dw = ((x + x + 1) / col - 1) / 2;
12745
+ var dh = ((y + y + 1) / row - 1) / 2;
12746
+ var tox1 = split1[0];
12747
+ var toy1 = split1[1];
12748
+ var tsx1 = split1[4] ? split1[3] : split1[2];
12749
+ var tsy1 = split1[4] ? split1[2] : split1[3];
12750
+ var origin = [
12751
+ originData[0] / col + dw,
12752
+ originData[1] / row + dh,
12753
+ originData[2] / col + dw,
12754
+ originData[3] / row + dh,
12755
+ originData[4] / col + dw,
12756
+ originData[5] / row + dh,
12757
+ originData[6] / col + dw,
12758
+ originData[7] / row + dh
12759
+ ];
12760
+ aUV1.push(texOffset1[0] * tsx1 + tox1, texOffset1[1] * tsy1 + toy1, texOffset1[2] * tsx1 + tox1, texOffset1[3] * tsy1 + toy1, texOffset1[4] * tsx1 + tox1, texOffset1[5] * tsy1 + toy1, texOffset1[6] * tsx1 + tox1, texOffset1[7] * tsy1 + toy1);
12761
+ position1.push(origin[0] * sx, origin[1] * sy, 0.0, origin[2] * sx, origin[3] * sy, 0.0, origin[4] * sx, origin[5] * sy, 0.0, origin[6] * sx, origin[7] * sy, 0.0);
12762
+ index1.push(base, 1 + base, 2 + base, 2 + base, 1 + base, 3 + base);
12669
12763
  }
12670
- },
12671
- indices: {
12672
- data: new Uint16Array(0),
12673
- releasable: true
12674
- },
12675
- mode: glContext.TRIANGLES
12676
- });
12677
- var geoData = this.getItemGeometryData(geometry);
12678
- var index = geoData.index, atlasOffset = geoData.atlasOffset;
12764
+ }
12765
+ }
12766
+ geometry.setAttributeData("aPos", new Float32Array(position1));
12767
+ return {
12768
+ index: index1,
12769
+ aUV: aUV1
12770
+ };
12771
+ };
12772
+ _proto.configureDefaultGeometry = function configureDefaultGeometry(renderer) {
12773
+ var geoData = this.getItemGeometryData(renderer);
12774
+ var index = geoData.index, aUV = geoData.aUV;
12775
+ var geometry = this.defaultGeometry;
12679
12776
  geometry.setIndexData(new Uint16Array(index));
12680
- geometry.setAttributeData("atlasOffset", new Float32Array(atlasOffset));
12777
+ geometry.setAttributeData("aUV", new Float32Array(aUV));
12681
12778
  geometry.setDrawCount(index.length);
12682
12779
  return geometry;
12683
12780
  };
@@ -12696,13 +12793,12 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12696
12793
  setMaskMode(material, maskMode);
12697
12794
  setSideMode(material, side);
12698
12795
  material.shader.shaderData.properties = '_MainTex("_MainTex",2D) = "white" {}';
12699
- material.setColor("_Color", new Color(0, 0, 0, 1));
12700
12796
  material.setVector4("_TexOffset", new Vector4(0, 0, 1, 1));
12701
12797
  material.setTexture("_MainTex", texture);
12702
- this.preMultiAlpha = getPreMultiAlpha(blendMode);
12798
+ var preMultiAlpha = getPreMultiAlpha(blendMode);
12703
12799
  var texParams = new Vector4();
12704
12800
  texParams.x = renderer.occlusion ? +renderer.transparentOcclusion : 1;
12705
- texParams.y = +this.preMultiAlpha;
12801
+ texParams.y = preMultiAlpha;
12706
12802
  texParams.z = renderer.renderMode;
12707
12803
  texParams.w = renderer.maskMode;
12708
12804
  material.setVector4("_TexParams", texParams);
@@ -12728,8 +12824,11 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12728
12824
  };
12729
12825
  _proto.fromData = function fromData(data) {
12730
12826
  RendererComponent.prototype.fromData.call(this, data);
12731
- var _data_renderer;
12732
- var renderer = (_data_renderer = data.renderer) != null ? _data_renderer : {};
12827
+ var baseRenderComponentData = data;
12828
+ var _baseRenderComponentData_renderer;
12829
+ var renderer = (_baseRenderComponentData_renderer = baseRenderComponentData.renderer) != null ? _baseRenderComponentData_renderer : {};
12830
+ var splits = baseRenderComponentData.splits;
12831
+ var textureSheetAnimation = baseRenderComponentData.textureSheetAnimation;
12733
12832
  var maskProps = data.mask;
12734
12833
  if (maskProps && maskProps.ref) {
12735
12834
  maskProps.ref = this.engine.findObject(maskProps.ref);
@@ -12738,14 +12837,15 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12738
12837
  // TODO 新蒙板上线后移除
12739
12838
  //-------------------------------------------------------------------------
12740
12839
  var shapeData = renderer.shape;
12741
- //@ts-expect-error
12742
- var split = data.splits && !data.textureSheetAnimation ? data.splits[0] : undefined;
12840
+ var split = splits && !textureSheetAnimation ? splits[0] : undefined;
12743
12841
  var shapeGeometry = undefined;
12744
12842
  if (shapeData !== undefined && shapeData !== null && !("aPoint" in shapeData && "index" in shapeData)) {
12745
12843
  shapeGeometry = getGeometryByShape(shapeData, split);
12746
12844
  }
12747
- var _renderer_renderMode, _renderer_blending, _renderer_side, _renderer_alphaMask;
12748
12845
  //-------------------------------------------------------------------------
12846
+ this.splits = splits || singleSplits;
12847
+ this.textureSheetAnimation = textureSheetAnimation;
12848
+ var _renderer_renderMode, _renderer_blending, _renderer_side, _renderer_alphaMask;
12749
12849
  this.renderer = {
12750
12850
  renderMode: (_renderer_renderMode = renderer.renderMode) != null ? _renderer_renderMode : RenderMode.MESH,
12751
12851
  blending: (_renderer_blending = renderer.blending) != null ? _renderer_blending : BlendingMode.ALPHA,
@@ -12760,7 +12860,31 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
12760
12860
  alphaMask: (_renderer_alphaMask = renderer.alphaMask) != null ? _renderer_alphaMask : false
12761
12861
  };
12762
12862
  this.configureMaterial(this.renderer);
12863
+ if (baseRenderComponentData.geometry) {
12864
+ this.geometry = this.engine.findObject(baseRenderComponentData.geometry);
12865
+ } else {
12866
+ this.geometry = this.defaultGeometry;
12867
+ this.configureDefaultGeometry(this.renderer);
12868
+ }
12763
12869
  };
12870
+ _create_class(BaseRenderComponent, [
12871
+ {
12872
+ key: "color",
12873
+ get: /**
12874
+ * 获取当前图层的颜色
12875
+ * @since 2.5.0
12876
+ */ function get() {
12877
+ return this._color;
12878
+ },
12879
+ set: /**
12880
+ * 设置当前图层的颜色
12881
+ * @since 2.5.0
12882
+ */ function set(value) {
12883
+ this._color = value;
12884
+ this.material.setColor("_Color", this._color);
12885
+ }
12886
+ }
12887
+ ]);
12764
12888
  return BaseRenderComponent;
12765
12889
  }(RendererComponent);
12766
12890
 
@@ -12775,37 +12899,8 @@ var ShapeComponent = /*#__PURE__*/ function(BaseRenderComponent) {
12775
12899
  _this.graphicsPath = new GraphicsPath();
12776
12900
  _this.vert = "\nprecision highp float;\n\nattribute vec3 aPos;//x y\n\nuniform mat4 effects_MatrixVP;\nuniform mat4 effects_MatrixInvV;\nuniform mat4 effects_ObjectToWorld;\n\nvoid main() {\n vec4 pos = vec4(aPos.xyz, 1.0);\n gl_Position = effects_MatrixVP * effects_ObjectToWorld * pos;\n}\n";
12777
12901
  _this.frag = "\nprecision highp float;\n\nuniform vec4 _Color;\n\nvoid main() {\n vec4 color = _Color;\n color.rgb *= color.a;\n gl_FragColor = color;\n}\n";
12778
- // Create Geometry
12902
+ // Add Geometry SubMesh
12779
12903
  //-------------------------------------------------------------------------
12780
- _this.geometry = Geometry.create(engine, {
12781
- attributes: {
12782
- aPos: {
12783
- type: glContext.FLOAT,
12784
- size: 3,
12785
- data: new Float32Array([
12786
- -0.5,
12787
- 0.5,
12788
- 0,
12789
- -0.5,
12790
- -0.5,
12791
- 0,
12792
- 0.5,
12793
- 0.5,
12794
- 0,
12795
- 0.5,
12796
- -0.5,
12797
- 0
12798
- ])
12799
- },
12800
- aUV: {
12801
- type: glContext.FLOAT,
12802
- size: 2,
12803
- data: new Float32Array()
12804
- }
12805
- },
12806
- mode: glContext.TRIANGLES,
12807
- drawCount: 4
12808
- });
12809
12904
  _this.geometry.subMeshes.push({
12810
12905
  offset: 0,
12811
12906
  indexCount: 0,
@@ -20135,7 +20230,7 @@ var RuntimeClip = /*#__PURE__*/ function() {
20135
20230
  this.playable.play();
20136
20231
  }
20137
20232
  this.parentMixer.setClipWeight(this.playable, weight);
20138
- var clipTime = clip.toLocalTime(localTime);
20233
+ var clipTime = parseFloat(clip.toLocalTime(localTime).toFixed(3));
20139
20234
  this.playable.setTime(clipTime);
20140
20235
  // 判断动画是否结束
20141
20236
  if (ended) {
@@ -21324,12 +21419,11 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
21324
21419
  * 前进合成到指定时间
21325
21420
  * @param time - 相对0时刻的时间
21326
21421
  */ _proto.forwardTime = function forwardTime(time) {
21327
- var deltaTime = time * 1000 - this.time * 1000;
21422
+ var deltaTime = time * 1000 - this.rootComposition.time * 1000;
21328
21423
  var reverse = deltaTime < 0;
21329
21424
  var step = 15;
21330
21425
  var t = Math.abs(deltaTime);
21331
21426
  var ss = reverse ? -step : step;
21332
- // FIXME Update 中可能会修改合成时间,这边需要优化更新逻辑
21333
21427
  for(t; t > step; t -= step){
21334
21428
  this.update(ss);
21335
21429
  }
@@ -21369,14 +21463,13 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
21369
21463
  this.callAwake(this.rootItem);
21370
21464
  this.rootItem.beginPlay();
21371
21465
  }
21372
- var previousCompositionTime = this.time;
21373
- this.updateCompositionTime(deltaTime * this.speed / 1000);
21374
- var deltaTimeInMs = (this.time - previousCompositionTime) * 1000;
21466
+ var dt = parseFloat(this.getUpdateTime(deltaTime * this.speed).toFixed(0));
21467
+ this.updateRootComposition(dt / 1000);
21375
21468
  this.updateVideo();
21376
21469
  // 更新 model-tree-plugin
21377
- this.updatePluginLoaders(deltaTimeInMs);
21378
- this.sceneTicking.update.tick(deltaTimeInMs);
21379
- this.sceneTicking.lateUpdate.tick(deltaTimeInMs);
21470
+ this.updatePluginLoaders(deltaTime);
21471
+ this.sceneTicking.update.tick(dt);
21472
+ this.sceneTicking.lateUpdate.tick(dt);
21380
21473
  this.updateCamera();
21381
21474
  this.prepareRender();
21382
21475
  if (this.isEnded && !this.isEndCalled) {
@@ -21392,6 +21485,14 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
21392
21485
  _proto.shouldDispose = function shouldDispose() {
21393
21486
  return this.isEnded && this.rootItem.endBehavior === EndBehavior.destroy && !this.reusable;
21394
21487
  };
21488
+ _proto.getUpdateTime = function getUpdateTime(t) {
21489
+ var startTimeInMs = this.startTime * 1000;
21490
+ var now = this.rootComposition.time * 1000;
21491
+ if (t < 0 && now + t < startTimeInMs) {
21492
+ return startTimeInMs - now;
21493
+ }
21494
+ return t;
21495
+ };
21395
21496
  _proto.callAwake = function callAwake(item) {
21396
21497
  for(var _iterator = _create_for_of_iterator_helper_loose(item.components), _step; !(_step = _iterator()).done;){
21397
21498
  var component = _step.value;
@@ -21436,18 +21537,14 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
21436
21537
  };
21437
21538
  /**
21438
21539
  * 更新主合成组件
21439
- */ _proto.updateCompositionTime = function updateCompositionTime(deltaTime) {
21540
+ */ _proto.updateRootComposition = function updateRootComposition(deltaTime) {
21440
21541
  if (this.rootComposition.state === PlayState.Paused || !this.rootComposition.isActiveAndEnabled) {
21441
21542
  return;
21442
21543
  }
21443
- // 相对于合成开始时间的时间
21444
- var localTime = this.time + deltaTime - this.startTime;
21445
- if (deltaTime < 0 && localTime < 0) {
21446
- localTime = 0;
21447
- }
21544
+ var localTime = parseFloat((this.time + deltaTime - this.rootItem.start).toFixed(3));
21545
+ var isEnded = false;
21448
21546
  var duration = this.rootItem.duration;
21449
21547
  var endBehavior = this.rootItem.endBehavior;
21450
- var isEnded = false;
21451
21548
  if (localTime - duration > 0.001) {
21452
21549
  isEnded = true;
21453
21550
  switch(endBehavior){
@@ -21472,7 +21569,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
21472
21569
  }
21473
21570
  }
21474
21571
  }
21475
- this.rootComposition.time = localTime + this.startTime;
21572
+ this.rootComposition.time = localTime;
21476
21573
  // end state changed, handle onEnd flags
21477
21574
  if (this.isEnded !== isEnded) {
21478
21575
  if (isEnded) {
@@ -22628,15 +22725,6 @@ var ColorPlayable = /*#__PURE__*/ function(Playable) {
22628
22725
  return ColorPlayable;
22629
22726
  }(Playable);
22630
22727
 
22631
- var singleSplits = [
22632
- [
22633
- 0,
22634
- 0,
22635
- 1,
22636
- 1,
22637
- undefined
22638
- ]
22639
- ];
22640
22728
  var seed$2 = 0;
22641
22729
  var SpriteColorPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
22642
22730
  _inherits(SpriteColorPlayableAsset, PlayableAsset);
@@ -22662,10 +22750,8 @@ var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
22662
22750
  function SpriteComponent(engine, props) {
22663
22751
  var _this;
22664
22752
  _this = BaseRenderComponent.call(this, engine) || this;
22665
- _this.splits = singleSplits;
22666
22753
  _this.frameAnimationLoop = false;
22667
22754
  _this.name = "MSprite" + seed$2++;
22668
- _this.geometry = _this.createGeometry();
22669
22755
  if (props) {
22670
22756
  _this.fromData(props);
22671
22757
  }
@@ -22755,111 +22841,10 @@ var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
22755
22841
  source.video.load();
22756
22842
  }
22757
22843
  };
22758
- _proto.getItemGeometryData = function getItemGeometryData(geometry) {
22759
- var _this = this, splits = _this.splits, textureSheetAnimation = _this.textureSheetAnimation;
22760
- var sx = 1, sy = 1;
22761
- var renderer = this.renderer;
22762
- if (renderer.shape) {
22763
- 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;
22764
- var point = new Float32Array(aPoint);
22765
- var position = [];
22766
- var atlasOffset = [];
22767
- for(var i = 0; i < point.length; i += 6){
22768
- point[i] *= sx;
22769
- point[i + 1] *= sy;
22770
- atlasOffset.push(aPoint[i + 2], aPoint[i + 3]);
22771
- position.push(point[i], point[i + 1], 0.0);
22772
- }
22773
- geometry.setAttributeData("aPos", new Float32Array(position));
22774
- return {
22775
- index: index,
22776
- atlasOffset: atlasOffset
22777
- };
22778
- }
22779
- var originData = [
22780
- -.5,
22781
- .5,
22782
- -.5,
22783
- -.5,
22784
- .5,
22785
- .5,
22786
- .5,
22787
- -.5
22788
- ];
22789
- var atlasOffset1 = [];
22790
- var index1 = [];
22791
- var col = 2;
22792
- var row = 2;
22793
- if (splits.length === 1) {
22794
- col = 1;
22795
- row = 1;
22796
- }
22797
- var position1 = [];
22798
- for(var x = 0; x < col; x++){
22799
- for(var y = 0; y < row; y++){
22800
- var base = (y * 2 + x) * 4;
22801
- // @ts-expect-error
22802
- var split = textureSheetAnimation ? [
22803
- 0,
22804
- 0,
22805
- 1,
22806
- 1,
22807
- splits[0][4]
22808
- ] : splits[y * 2 + x];
22809
- var texOffset = split[4] ? [
22810
- 0,
22811
- 0,
22812
- 1,
22813
- 0,
22814
- 0,
22815
- 1,
22816
- 1,
22817
- 1
22818
- ] : [
22819
- 0,
22820
- 1,
22821
- 0,
22822
- 0,
22823
- 1,
22824
- 1,
22825
- 1,
22826
- 0
22827
- ];
22828
- var dw = ((x + x + 1) / col - 1) / 2;
22829
- var dh = ((y + y + 1) / row - 1) / 2;
22830
- var tox = split[0];
22831
- var toy = split[1];
22832
- var tsx = split[4] ? split[3] : split[2];
22833
- var tsy = split[4] ? split[2] : split[3];
22834
- var origin = [
22835
- originData[0] / col + dw,
22836
- originData[1] / row + dh,
22837
- originData[2] / col + dw,
22838
- originData[3] / row + dh,
22839
- originData[4] / col + dw,
22840
- originData[5] / row + dh,
22841
- originData[6] / col + dw,
22842
- originData[7] / row + dh
22843
- ];
22844
- atlasOffset1.push(texOffset[0] * tsx + tox, texOffset[1] * tsy + toy, texOffset[2] * tsx + tox, texOffset[3] * tsy + toy, texOffset[4] * tsx + tox, texOffset[5] * tsy + toy, texOffset[6] * tsx + tox, texOffset[7] * tsy + toy);
22845
- position1.push(origin[0] * sx, origin[1] * sy, 0.0, origin[2] * sx, origin[3] * sy, 0.0, origin[4] * sx, origin[5] * sy, 0.0, origin[6] * sx, origin[7] * sy, 0.0);
22846
- index1.push(base, 1 + base, 2 + base, 2 + base, 1 + base, 3 + base);
22847
- }
22848
- }
22849
- geometry.setAttributeData("aPos", new Float32Array(position1));
22850
- return {
22851
- index: index1,
22852
- atlasOffset: atlasOffset1
22853
- };
22854
- };
22855
22844
  _proto.fromData = function fromData(data) {
22856
22845
  BaseRenderComponent.prototype.fromData.call(this, data);
22857
22846
  var interaction = data.interaction, options = data.options;
22858
22847
  this.interaction = interaction;
22859
- this.splits = data.splits || singleSplits;
22860
- this.textureSheetAnimation = data.textureSheetAnimation;
22861
- var geometry = this.createGeometry();
22862
- this.geometry = geometry;
22863
22848
  var startColor = options.startColor || [
22864
22849
  1,
22865
22850
  1,
@@ -26138,7 +26123,6 @@ var TextComponent = /*#__PURE__*/ function(BaseRenderComponent) {
26138
26123
  _this.SCALE_FACTOR = 0.1;
26139
26124
  _this.ALPHA_FIX_VALUE = 1 / 255;
26140
26125
  _this.name = "MText" + seed$1++;
26141
- _this.geometry = _this.createGeometry();
26142
26126
  if (props) {
26143
26127
  _this.fromData(props);
26144
26128
  }
@@ -27019,11 +27003,6 @@ function colorToArr(hex, normalized) {
27019
27003
  parseInt(m[2], 16),
27020
27004
  parseInt(m[3], 16),
27021
27005
  255
27022
- ] || [
27023
- 0,
27024
- 0,
27025
- 0,
27026
- 255
27027
27006
  ];
27028
27007
  }
27029
27008
  } else if (_instanceof1(hex, Array)) {
@@ -31622,7 +31601,7 @@ registerPlugin("sprite", SpriteLoader, VFXItem);
31622
31601
  registerPlugin("particle", ParticleLoader, VFXItem);
31623
31602
  registerPlugin("cal", CalculateLoader, VFXItem);
31624
31603
  registerPlugin("interact", InteractLoader, VFXItem);
31625
- var version = "2.4.8";
31604
+ var version = "2.5.0-alpha.0";
31626
31605
  logger.info("Core version: " + version + ".");
31627
31606
 
31628
31607
  export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, Asset, AssetLoader, AssetManager, AssetService, BYTES_TYPE_MAP, BaseRenderComponent, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, ColorCurve, ColorPropertyPlayableAsset, ColorPropertyTrack, Component, Composition, CompositionComponent, DEFAULT_FONTS, DEFAULT_FPS, 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, Ellipse, Engine, EventEmitter, EventSystem, Fake3DAnimationMode, Fake3DComponent, FilterMode, Float16ArrayWrapper, FloatPropertyPlayableAsset, FloatPropertyTrack, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, GraphicsPath, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, KTXTexture, LineSegments, LinearValue, MaskMode, MaskProcessor, Material, MaterialDataBlock, MaterialRenderType, MaterialTrack, Mesh, MeshCollider, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, ParticleTrack, PassTextureCache, PathSegments, PluginSystem, PolyStar, Polygon, PostProcessVolume, PropertyTrack, 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, Scene, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderFactory, ShaderType, ShaderVariant, ShapeComponent, ShapePath, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StarType, 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, Vector2Curve, Vector2PropertyPlayableAsset, Vector2PropertyTrack, Vector4Curve, Vector4PropertyPlayableAsset, Vector4PropertyTrack, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, buildLine, calculateTranslation, canvasPool, closePointEps, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, curveEps, decimalEqual, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, 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, isOpenHarmony, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrame_frag as 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, passRenderLevel, pluginLoaderMap, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, sortByOrder, index$1 as spec, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecFill, vecMulCombine, version, vertexFormatType2GLType };