@galacean/effects-core 2.0.0-alpha.30 → 2.0.0-alpha.32

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.30
6
+ * Version: v2.0.0-alpha.32
7
7
  */
8
8
 
9
9
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -4563,15 +4563,97 @@ function getDirectStore(target) {
4563
4563
  return decoratorInitialStore.get(classKey);
4564
4564
  }
4565
4565
 
4566
+ function _assert_this_initialized(self) {
4567
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4568
+ return self;
4569
+ }
4570
+
4571
+ var EventEmitter = function EventEmitter() {
4572
+ var _this = this;
4573
+ var _this1 = this;
4574
+ this.listeners = {};
4575
+ /**
4576
+ * 移除事件监听器
4577
+ * @param eventName - 事件名称
4578
+ * @param listener - 事件监听器
4579
+ * @returns
4580
+ */ this.off = function(eventName, listener) {
4581
+ if (!_this.listeners[eventName]) {
4582
+ return;
4583
+ }
4584
+ _this.listeners[eventName] = _this.listeners[eventName].filter(function(param) {
4585
+ var l = param.listener;
4586
+ return l !== listener;
4587
+ });
4588
+ };
4589
+ /**
4590
+ * 监听事件
4591
+ * @param eventName - 事件名称
4592
+ * @param listener - 事件监听器
4593
+ * @param options - 事件监听器选项
4594
+ * @returns
4595
+ */ this.on = function(eventName, listener, options) {
4596
+ _this.listeners[eventName] = _this.listeners[eventName] || [];
4597
+ _this.listeners[eventName].push({
4598
+ listener: listener,
4599
+ options: options
4600
+ });
4601
+ return function() {
4602
+ return _this.off(eventName, listener);
4603
+ };
4604
+ };
4605
+ /**
4606
+ * 一次性监听事件
4607
+ * @param eventName - 事件名称
4608
+ * @param listener - 事件监听器
4609
+ */ this.once = function(eventName, listener) {
4610
+ _this.on(eventName, listener, {
4611
+ once: true
4612
+ });
4613
+ };
4614
+ /**
4615
+ * 触发事件
4616
+ * @param eventName - 事件名称
4617
+ * @param args - 事件参数
4618
+ */ this.emit = function(eventName) {
4619
+ for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
4620
+ args[_key - 1] = arguments[_key];
4621
+ }
4622
+ var _this_listeners_eventName;
4623
+ (_this_listeners_eventName = _this1.listeners[eventName]) == null ? void 0 : _this_listeners_eventName.forEach(function(param) {
4624
+ var listener = param.listener, options = param.options;
4625
+ listener.apply(void 0, [].concat(args));
4626
+ if (options == null ? void 0 : options.once) {
4627
+ _this1.off(eventName, listener);
4628
+ }
4629
+ });
4630
+ };
4631
+ /**
4632
+ * 获取事件名称对应的所有监听器
4633
+ * @param eventName - 事件名称
4634
+ * @returns - 返回事件名称对应的所有监听器
4635
+ */ this.getListeners = function(eventName) {
4636
+ var _this_listeners_eventName;
4637
+ return ((_this_listeners_eventName = _this.listeners[eventName]) == null ? void 0 : _this_listeners_eventName.map(function(param) {
4638
+ var listener = param.listener;
4639
+ return listener;
4640
+ })) || [];
4641
+ };
4642
+ };
4643
+
4566
4644
  /**
4567
4645
  * @since 2.0.0
4568
4646
  * @internal
4569
- */ var EffectsObject = /*#__PURE__*/ function() {
4647
+ */ var EffectsObject = /*#__PURE__*/ function(EventEmitter) {
4648
+ _inherits(EffectsObject, EventEmitter);
4570
4649
  function EffectsObject(engine) {
4571
- this.engine = engine;
4572
- this.guid = generateGUID();
4573
- this.taggedProperties = {};
4574
- this.engine.addInstance(this);
4650
+ var _this;
4651
+ _this = EventEmitter.call(this) || this;
4652
+ _this.engine = engine;
4653
+ _this.guid = generateGUID();
4654
+ _this.taggedProperties = {};
4655
+ _this.engine.addInstance(_assert_this_initialized(_this));
4656
+ return _this;
4575
4657
  }
4576
4658
  var _proto = EffectsObject.prototype;
4577
4659
  _proto.getInstanceId = function getInstanceId() {
@@ -4597,7 +4679,7 @@ function getDirectStore(target) {
4597
4679
  return _instanceof1(obj, EffectsObject) && "guid" in obj;
4598
4680
  };
4599
4681
  return EffectsObject;
4600
- }();
4682
+ }(EventEmitter);
4601
4683
 
4602
4684
  /**
4603
4685
  * @since 2.0.0
@@ -8408,7 +8490,8 @@ var seed$9 = 1;
8408
8490
  texture = Texture.create(engine, {
8409
8491
  sourceType: TextureSourceType.image,
8410
8492
  image: image,
8411
- id: generateGUID()
8493
+ id: generateGUID(),
8494
+ flipY: true
8412
8495
  });
8413
8496
  texture.initialize();
8414
8497
  return [
@@ -8986,6 +9069,9 @@ var MaterialRenderType;
8986
9069
  * 初始化 GPU 资源
8987
9070
  * @override
8988
9071
  */ _proto.initialize = function initialize() {
9072
+ // OVERRIDE
9073
+ };
9074
+ _proto.createShaderVariant = function createShaderVariant() {
8989
9075
  // OVERRIDE
8990
9076
  };
8991
9077
  _proto.use = function use(render, globalUniforms) {
@@ -12696,6 +12782,7 @@ var GlobalUniforms = function GlobalUniforms() {
12696
12782
  this.floats = {};
12697
12783
  this.ints = {};
12698
12784
  // vector3s: Record<string, vec3> = {};
12785
+ this.vector4s = {};
12699
12786
  this.matrices = {};
12700
12787
  //...
12701
12788
  this.samplers = [] // 存放的sampler名称。
@@ -12932,6 +13019,9 @@ var Renderer = /*#__PURE__*/ function() {
12932
13019
  _proto.setGlobalInt = function setGlobalInt(name, value) {
12933
13020
  // OVERRIDE
12934
13021
  };
13022
+ _proto.setGlobalVector4 = function setGlobalVector4(name, value) {
13023
+ // OVERRIDE
13024
+ };
12935
13025
  _proto.setGlobalMatrix = function setGlobalMatrix(name, value) {
12936
13026
  // OVERRIDE
12937
13027
  };
@@ -13884,6 +13974,8 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
13884
13974
  function SpriteComponent(engine, props) {
13885
13975
  var _this;
13886
13976
  _this = RendererComponent.call(this, engine) || this;
13977
+ _this.cachePrefix = "-";
13978
+ _this.frameAnimationLoop = false;
13887
13979
  _this.frameAnimationTime = 0;
13888
13980
  _this.color = [
13889
13981
  1,
@@ -13907,6 +13999,39 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
13907
13999
  }
13908
14000
  }
13909
14001
  };
14002
+ _this.name = "MSprite" + seed$3++;
14003
+ _this.renderer = {
14004
+ renderMode: RenderMode.BILLBOARD,
14005
+ blending: BlendingMode.ALPHA,
14006
+ texture: _this.engine.emptyTexture,
14007
+ occlusion: false,
14008
+ transparentOcclusion: false,
14009
+ side: SideMode.DOUBLE,
14010
+ mask: 0,
14011
+ maskMode: MaskMode.NONE,
14012
+ order: 0
14013
+ };
14014
+ _this.emptyTexture = _this.engine.emptyTexture;
14015
+ _this.splits = singleSplits;
14016
+ _this.renderInfo = getImageItemRenderInfo(_assert_this_initialized(_this));
14017
+ var geometry = _this.createGeometry(glContext.TRIANGLES);
14018
+ var material = _this.createMaterial(_this.renderInfo, 2);
14019
+ _this.worldMatrix = Matrix4.fromIdentity();
14020
+ _this.material = material;
14021
+ _this.geometry = geometry;
14022
+ _this.material.setVector4("_Color", new Vector4().setFromArray([
14023
+ 1,
14024
+ 1,
14025
+ 1,
14026
+ 1
14027
+ ]));
14028
+ _this.material.setVector4("_TexOffset", new Vector4().setFromArray([
14029
+ 0,
14030
+ 0,
14031
+ 1,
14032
+ 1
14033
+ ]));
14034
+ _this.setItem();
13910
14035
  if (props) {
13911
14036
  _this.fromData(props);
13912
14037
  }
@@ -13960,9 +14085,13 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
13960
14085
  this.frameAnimationTime += dt / 1000;
13961
14086
  var time = this.frameAnimationTime;
13962
14087
  var duration = this.item.duration;
14088
+ if (time > duration && this.frameAnimationLoop) {
14089
+ time = time % duration;
14090
+ }
13963
14091
  var life = Math.min(Math.max(time / duration, 0.0), 1.0);
13964
14092
  var ta = this.textureSheetAnimation;
13965
14093
  if (ta) {
14094
+ var _this_material_getVector4;
13966
14095
  var total = ta.total || ta.row * ta.col;
13967
14096
  var texRectX = 0;
13968
14097
  var texRectY = 0;
@@ -14008,7 +14137,7 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
14008
14137
  dy
14009
14138
  ];
14010
14139
  }
14011
- this.material.getVector4("_TexOffset").setFromArray([
14140
+ (_this_material_getVector4 = this.material.getVector4("_TexOffset")) == null ? void 0 : _this_material_getVector4.setFromArray([
14012
14141
  texRectX + texOffset[0],
14013
14142
  texRectH + texRectY - texOffset[1],
14014
14143
  dx,
@@ -14021,12 +14150,9 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
14021
14150
  this.item.composition.destroyTextures(this.getTextures());
14022
14151
  }
14023
14152
  };
14024
- _proto.getItemInitData = function getItemInitData(item, idx, pointStartIndex, textureIndex) {
14025
- var geoData = item.geoData;
14026
- if (!geoData) {
14027
- geoData = item.geoData = this.getItemGeometryData(item, idx);
14028
- }
14029
- var index = geoData.index;
14153
+ _proto.getItemInitData = function getItemInitData() {
14154
+ this.geoData = this.getItemGeometryData();
14155
+ var _this_geoData = this.geoData, index = _this_geoData.index, atlasOffset = _this_geoData.atlasOffset;
14030
14156
  var idxCount = index.length;
14031
14157
  // @ts-expect-error
14032
14158
  var indexData = this.wireframe ? new Uint8Array([
@@ -14041,11 +14167,11 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
14041
14167
  ]) : new index.constructor(idxCount);
14042
14168
  if (!this.wireframe) {
14043
14169
  for(var i = 0; i < idxCount; i++){
14044
- indexData[i] = pointStartIndex + index[i];
14170
+ indexData[i] = 0 + index[i];
14045
14171
  }
14046
14172
  }
14047
14173
  return {
14048
- atlasOffset: geoData.atlasOffset,
14174
+ atlasOffset: atlasOffset,
14049
14175
  index: indexData
14050
14176
  };
14051
14177
  };
@@ -14056,8 +14182,7 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
14056
14182
  addItem(textures, texture);
14057
14183
  }
14058
14184
  texture = this.renderer.texture;
14059
- var textureIndex = texture ? textures.indexOf(texture) : -1;
14060
- var data = this.getItemInitData(this, 0, 0, textureIndex);
14185
+ var data = this.getItemInitData();
14061
14186
  var renderer = this.renderer;
14062
14187
  var texParams = this.material.getVector4("_TexParams");
14063
14188
  texParams.x = renderer.occlusion ? +renderer.transparentOcclusion : 1;
@@ -14148,6 +14273,7 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
14148
14273
  setBlendMode(material, states.blendMode);
14149
14274
  setMaskMode(material, states.maskMode);
14150
14275
  setSideMode(material, states.side);
14276
+ material.shader.shaderData.properties = 'uSampler0("uSampler0",2D) = "white" {}';
14151
14277
  if (!material.hasUniform("_Color")) {
14152
14278
  material.setVector4("_Color", new Vector4(0, 0, 0, 1));
14153
14279
  }
@@ -14159,8 +14285,8 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
14159
14285
  }
14160
14286
  return material;
14161
14287
  };
14162
- _proto.getItemGeometryData = function getItemGeometryData(item, aIndex) {
14163
- var splits = item.splits, renderer = item.renderer, textureSheetAnimation = item.textureSheetAnimation;
14288
+ _proto.getItemGeometryData = function getItemGeometryData() {
14289
+ var _this = this, splits = _this.splits, renderer = _this.renderer, textureSheetAnimation = _this.textureSheetAnimation;
14164
14290
  var sx = 1, sy = 1;
14165
14291
  if (renderer.shape) {
14166
14292
  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;
@@ -14315,7 +14441,6 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
14315
14441
  this.worldMatrix = Matrix4.fromIdentity();
14316
14442
  this.material = material;
14317
14443
  this.geometry = geometry;
14318
- this.name = "MSprite" + seed$3++;
14319
14444
  var startColor = options.startColor || [
14320
14445
  1,
14321
14446
  1,
@@ -18432,11 +18557,6 @@ var CalculateLoader = /*#__PURE__*/ function(AbstractPlugin) {
18432
18557
  return CalculateLoader;
18433
18558
  }(AbstractPlugin);
18434
18559
 
18435
- function _assert_this_initialized(self) {
18436
- if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
18437
- return self;
18438
- }
18439
-
18440
18560
  var AnimationStream = /*#__PURE__*/ function() {
18441
18561
  function AnimationStream(playable) {
18442
18562
  this.curveValues = {};
@@ -19231,6 +19351,9 @@ function compareTracks(a, b) {
19231
19351
  _this.startTime = 0;
19232
19352
  _this.items = [] // 场景的所有元素
19233
19353
  ;
19354
+ /**
19355
+ * 合成是否冻结标志位
19356
+ */ _this.fezzed = false;
19234
19357
  _this.reusable = false;
19235
19358
  _this.sceneBindings = [];
19236
19359
  _this.graph = new PlayableGraph();
@@ -19267,10 +19390,6 @@ function compareTracks(a, b) {
19267
19390
  };
19268
19391
  _proto.update = function update(dt) {
19269
19392
  var time = this.time;
19270
- // 主合成 rootItem 没有绑定轨道,增加结束行为判断。
19271
- if (this.item.isEnded(this.time) && !this.item.parent) {
19272
- this.item.ended = true;
19273
- }
19274
19393
  this.timelinePlayable.setTime(time);
19275
19394
  this.graph.evaluate(dt);
19276
19395
  };
@@ -19403,6 +19522,8 @@ function compareTracks(a, b) {
19403
19522
  hitPositions: hitPositions,
19404
19523
  behavior: hitParams.behavior
19405
19524
  };
19525
+ // 触发单个元素的点击事件
19526
+ item.emit("click", region);
19406
19527
  regions.push(region);
19407
19528
  if (stop(region)) {
19408
19529
  return {
@@ -20638,8 +20759,6 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
20638
20759
  this.parentId = parentId;
20639
20760
  this.duration = duration;
20640
20761
  this.endBehavior = endBehavior;
20641
- //@ts-expect-error
20642
- this.oldId = data.oldId;
20643
20762
  if (!data.content) {
20644
20763
  data.content = {
20645
20764
  options: {}
@@ -24648,89 +24767,93 @@ var listOrder = 0;
24648
24767
  * 合成抽象类:核心对象,通常一个场景只包含一个合成,可能会有多个合成。
24649
24768
  * 合成中包含了相关的 Item 元素,支持对 Item 元素的创建、更新和销毁。
24650
24769
  * 也负责 Item 相关的动画播放控制,和持有渲染帧数据。
24651
- */ var Composition = /*#__PURE__*/ function() {
24770
+ */ var Composition = /*#__PURE__*/ function(EventEmitter) {
24771
+ _inherits(Composition, EventEmitter);
24652
24772
  function Composition(props, scene) {
24653
- var _this = this;
24773
+ var _this;
24774
+ _this = EventEmitter.call(this) || this;
24654
24775
  /**
24655
24776
  * 动画播放速度
24656
- */ this.speed = 1;
24777
+ */ _this.speed = 1;
24657
24778
  /**
24658
24779
  * 用于保存与当前合成相关的插件数据
24659
- */ this.loaderData = {};
24780
+ */ _this.loaderData = {};
24660
24781
  /**
24661
24782
  * 预合成数组
24662
- */ this.refContent = [];
24783
+ */ _this.refContent = [];
24663
24784
  /**
24664
24785
  * 预合成的合成属性,在 content 中会被其元素属性覆盖
24665
- */ this.refCompositionProps = new Map();
24786
+ */ _this.refCompositionProps = new Map();
24666
24787
  // TODO: 待优化
24667
- this.assigned = false;
24788
+ _this.assigned = false;
24668
24789
  /**
24669
24790
  * 销毁状态位
24670
- */ this.destroyed = false;
24671
- this.postLoaders = [];
24791
+ */ _this.destroyed = false;
24792
+ _this.postLoaders = [];
24672
24793
  /**
24673
24794
  * 合成暂停/播放 标识
24674
- */ this.paused = false;
24675
- this.lastVideoUpdateTime = 0;
24676
- var _props_reusable = props.reusable, reusable = _props_reusable === void 0 ? false : _props_reusable, _props_speed = props.speed, speed = _props_speed === void 0 ? 1 : _props_speed, _props_baseRenderOrder = props.baseRenderOrder, baseRenderOrder = _props_baseRenderOrder === void 0 ? 0 : _props_baseRenderOrder, renderer = props.renderer, onPlayerPause = props.onPlayerPause, onMessageItem = props.onMessageItem, onEnd = props.onEnd, event = props.event, width = props.width, height = props.height;
24677
- this.compositionSourceManager = new CompositionSourceManager(scene, renderer.engine);
24795
+ */ _this.paused = false;
24796
+ _this.lastVideoUpdateTime = 0;
24797
+ var _props_reusable = props.reusable, reusable = _props_reusable === void 0 ? false : _props_reusable, _props_speed = props.speed, speed = _props_speed === void 0 ? 1 : _props_speed, _props_baseRenderOrder = props.baseRenderOrder, baseRenderOrder = _props_baseRenderOrder === void 0 ? 0 : _props_baseRenderOrder, renderer = props.renderer, event = props.event, width = props.width, height = props.height, handleItemMessage = props.handleItemMessage;
24798
+ _this.compositionSourceManager = new CompositionSourceManager(scene, renderer.engine);
24678
24799
  scene.jsonScene.imgUsage = undefined;
24679
24800
  if (reusable) {
24680
- this.keepResource = true;
24801
+ _this.keepResource = true;
24681
24802
  scene.textures = undefined;
24682
24803
  scene.consumed = true;
24683
24804
  }
24684
- var _this_compositionSourceManager = this.compositionSourceManager, sourceContent = _this_compositionSourceManager.sourceContent, pluginSystem = _this_compositionSourceManager.pluginSystem, imgUsage = _this_compositionSourceManager.imgUsage, totalTime = _this_compositionSourceManager.totalTime, refCompositionProps = _this_compositionSourceManager.refCompositionProps;
24805
+ var _this_compositionSourceManager = _this.compositionSourceManager, sourceContent = _this_compositionSourceManager.sourceContent, pluginSystem = _this_compositionSourceManager.pluginSystem, imgUsage = _this_compositionSourceManager.imgUsage, totalTime = _this_compositionSourceManager.totalTime, refCompositionProps = _this_compositionSourceManager.refCompositionProps;
24685
24806
  assertExist(sourceContent);
24686
- this.renderer = renderer;
24687
- this.refCompositionProps = refCompositionProps;
24688
- this.rootItem = new VFXItem(this.getEngine(), sourceContent);
24689
- this.rootItem.name = "rootItem";
24690
- this.rootItem.composition = this;
24691
- this.rootComposition = this.rootItem.addComponent(CompositionComponent);
24692
- this.rootComposition.data = sourceContent;
24807
+ _this.renderer = renderer;
24808
+ _this.refCompositionProps = refCompositionProps;
24809
+ _this.rootItem = new VFXItem(_this.getEngine(), sourceContent);
24810
+ _this.rootItem.name = "rootItem";
24811
+ _this.rootItem.composition = _assert_this_initialized(_this);
24812
+ _this.rootComposition = _this.rootItem.addComponent(CompositionComponent);
24813
+ _this.rootComposition.startTime = sourceContent.startTime;
24814
+ _this.rootComposition.data = sourceContent;
24693
24815
  var imageUsage = !reusable && imgUsage;
24694
- this.width = width;
24695
- this.height = height;
24696
- this.renderOrder = baseRenderOrder;
24697
- this.id = sourceContent.id;
24698
- this.renderer = renderer;
24699
- this.texInfo = imageUsage != null ? imageUsage : {};
24700
- this.event = event;
24816
+ _this.width = width;
24817
+ _this.height = height;
24818
+ _this.renderOrder = baseRenderOrder;
24819
+ _this.id = sourceContent.id;
24820
+ _this.renderer = renderer;
24821
+ _this.texInfo = imageUsage != null ? imageUsage : {};
24822
+ _this.event = event;
24701
24823
  var _scene_startTime, _scene_timeInfos_asyncCompile;
24702
- this.statistic = {
24824
+ _this.statistic = {
24703
24825
  loadTime: totalTime != null ? totalTime : 0,
24704
24826
  loadStart: (_scene_startTime = scene.startTime) != null ? _scene_startTime : 0,
24705
24827
  firstFrameTime: 0,
24706
24828
  precompileTime: (_scene_timeInfos_asyncCompile = scene.timeInfos["asyncCompile"]) != null ? _scene_timeInfos_asyncCompile : scene.timeInfos["syncCompile"]
24707
24829
  };
24708
- this.reusable = reusable;
24709
- this.speed = speed;
24710
- this.autoRefTex = !this.keepResource && imageUsage && this.rootItem.endBehavior !== EndBehavior.restart;
24711
- this.name = sourceContent.name;
24712
- this.pluginSystem = pluginSystem;
24713
- this.pluginSystem.initializeComposition(this, scene);
24714
- this.camera = new Camera(this.name, _extends({}, sourceContent == null ? void 0 : sourceContent.camera, {
24830
+ _this.reusable = reusable;
24831
+ _this.speed = speed;
24832
+ _this.autoRefTex = !_this.keepResource && imageUsage && _this.rootItem.endBehavior !== EndBehavior.restart;
24833
+ _this.name = sourceContent.name;
24834
+ _this.pluginSystem = pluginSystem;
24835
+ _this.pluginSystem.initializeComposition(_assert_this_initialized(_this), scene);
24836
+ _this.camera = new Camera(_this.name, _extends({}, sourceContent == null ? void 0 : sourceContent.camera, {
24715
24837
  aspect: width / height
24716
24838
  }));
24717
- this.url = scene.url;
24718
- this.assigned = true;
24719
- this.globalTime = 0;
24720
- this.interactive = true;
24721
- this.onPlayerPause = onPlayerPause;
24722
- this.onMessageItem = onMessageItem;
24723
- this.onEnd = onEnd;
24724
- this.createRenderFrame();
24725
- this.rendererOptions = null;
24726
- this.rootComposition.createContent();
24727
- this.buildItemTree(this.rootItem);
24728
- this.rootItem.onEnd = function() {
24839
+ _this.url = scene.url;
24840
+ _this.assigned = true;
24841
+ _this.globalTime = 0;
24842
+ _this.interactive = true;
24843
+ _this.handleItemMessage = handleItemMessage;
24844
+ _this.createRenderFrame();
24845
+ _this.rendererOptions = null;
24846
+ _this.rootComposition.createContent();
24847
+ _this.buildItemTree(_this.rootItem);
24848
+ _this.rootItem.onEnd = function() {
24729
24849
  window.setTimeout(function() {
24730
- _this.onEnd == null ? void 0 : _this.onEnd.call(_this, _this);
24850
+ _this.emit("end", {
24851
+ composition: _assert_this_initialized(_this)
24852
+ });
24731
24853
  }, 0);
24732
24854
  };
24733
- this.pluginSystem.resetComposition(this, this.renderFrame);
24855
+ _this.pluginSystem.resetComposition(_assert_this_initialized(_this), _this.renderFrame);
24856
+ return _this;
24734
24857
  }
24735
24858
  var _proto = Composition.prototype;
24736
24859
  /**
@@ -24781,7 +24904,7 @@ var listOrder = 0;
24781
24904
  if (this.rootItem.ended && this.reusable) {
24782
24905
  this.restart();
24783
24906
  }
24784
- if (!this.rootComposition.started) {
24907
+ if (this.rootComposition.started) {
24785
24908
  this.gotoAndPlay(this.time - this.startTime);
24786
24909
  } else {
24787
24910
  this.gotoAndPlay(0);
@@ -24804,18 +24927,14 @@ var listOrder = 0;
24804
24927
  * 跳转合成到指定时间播放
24805
24928
  * @param time - 相对 startTime 的时间
24806
24929
  */ _proto.gotoAndPlay = function gotoAndPlay(time) {
24930
+ this.setTime(time);
24807
24931
  this.resume();
24808
- if (!this.rootComposition.started) {
24809
- this.rootComposition.start();
24810
- this.rootComposition.started = true;
24811
- }
24812
- this.forwardTime(time + this.startTime);
24813
24932
  };
24814
24933
  /**
24815
24934
  * 跳转合成到指定时间并暂停
24816
24935
  * @param time - 相对 startTime 的时间
24817
24936
  */ _proto.gotoAndStop = function gotoAndStop(time) {
24818
- this.gotoAndPlay(time);
24937
+ this.setTime(time);
24819
24938
  this.pause();
24820
24939
  };
24821
24940
  /**
@@ -24842,7 +24961,7 @@ var listOrder = 0;
24842
24961
  this.rootComposition.start();
24843
24962
  this.rootComposition.started = true;
24844
24963
  }
24845
- this.forwardTime(time + this.startTime, true);
24964
+ this.forwardTime(time + this.startTime);
24846
24965
  if (pause) {
24847
24966
  this.pause();
24848
24967
  }
@@ -24855,17 +24974,16 @@ var listOrder = 0;
24855
24974
  * 前进合成到指定时间
24856
24975
  * @param time - 相对0时刻的时间
24857
24976
  * @param skipRender - 是否跳过渲染
24858
- */ _proto.forwardTime = function forwardTime(time, skipRender) {
24859
- if (skipRender === void 0) skipRender = false;
24977
+ */ _proto.forwardTime = function forwardTime(time) {
24860
24978
  var deltaTime = time * 1000 - this.rootComposition.time * 1000;
24861
24979
  var reverse = deltaTime < 0;
24862
24980
  var step = 15;
24863
24981
  var t = Math.abs(deltaTime);
24864
24982
  var ss = reverse ? -step : step;
24865
24983
  for(t; t > step; t -= step){
24866
- this.update(ss, skipRender);
24984
+ this.update(ss);
24867
24985
  }
24868
- this.update(reverse ? -t : t, skipRender);
24986
+ this.update(reverse ? -t : t);
24869
24987
  };
24870
24988
  /**
24871
24989
  * 重置状态函数
@@ -24906,8 +25024,9 @@ var listOrder = 0;
24906
25024
  * 是否合成需要重新播放
24907
25025
  * @returns 重新播放合成标志位
24908
25026
  */ _proto.shouldRestart = function shouldRestart() {
24909
- var _this_rootItem = this.rootItem, ended = _this_rootItem.ended, endBehavior = _this_rootItem.endBehavior;
24910
- return ended && endBehavior === EndBehavior.restart;
25027
+ var _this_rootItem = this.rootItem, duration = _this_rootItem.duration, endBehavior = _this_rootItem.endBehavior;
25028
+ var time = this.rootComposition.time;
25029
+ return endBehavior === EndBehavior.restart && duration - time < 0.02;
24911
25030
  };
24912
25031
  /**
24913
25032
  * 是否合成需要销毁
@@ -24916,44 +25035,45 @@ var listOrder = 0;
24916
25035
  if (this.reusable) {
24917
25036
  return false;
24918
25037
  }
24919
- var _this_rootItem = this.rootItem, ended = _this_rootItem.ended, endBehavior = _this_rootItem.endBehavior;
25038
+ var endBehavior = this.rootItem.endBehavior;
25039
+ if (this.rootItem.isEnded(this.time)) {
25040
+ this.rootItem.ended = true;
25041
+ }
24920
25042
  // TODO: 合成结束行为
24921
- return ended && (!endBehavior || endBehavior === END_BEHAVIOR_PAUSE_AND_DESTROY);
25043
+ return this.rootItem.ended && endBehavior === EndBehavior.destroy;
24922
25044
  };
24923
25045
  /**
24924
25046
  * 合成更新,针对所有 item 的更新
24925
25047
  * @param deltaTime - 更新的时间步长
24926
25048
  * @param skipRender - 是否需要渲染
24927
- */ _proto.update = function update(deltaTime, skipRender) {
24928
- if (skipRender === void 0) skipRender = false;
25049
+ */ _proto.update = function update(deltaTime) {
24929
25050
  if (!this.assigned || this.paused) {
24930
25051
  return;
24931
25052
  }
25053
+ var time = this.getUpdateTime(deltaTime * this.speed);
25054
+ this.globalTime += time;
25055
+ this.updateRootComposition();
24932
25056
  if (this.shouldRestart()) {
25057
+ this.emit("end", {
25058
+ composition: this
25059
+ });
24933
25060
  this.restart();
24934
25061
  // restart then tick to avoid flicker
24935
25062
  }
24936
- var time = this.getUpdateTime(deltaTime * this.speed);
24937
- this.globalTime += time;
24938
- if (this.rootComposition.isActiveAndEnabled) {
24939
- var localTime = this.toLocalTime(this.globalTime / 1000);
24940
- this.rootComposition.time = localTime;
24941
- }
24942
25063
  this.updateVideo();
24943
25064
  // 更新 model-tree-plugin
24944
25065
  this.updatePluginLoaders(deltaTime);
24945
25066
  this.callStart(this.rootItem);
24946
25067
  this.callUpdate(this.rootItem, time);
24947
25068
  this.callLateUpdate(this.rootItem, time);
24948
- // this.extraCamera?.getComponent(TimelineComponent)?.update(deltaTime);
24949
25069
  this.updateCamera();
24950
25070
  if (this.shouldDispose()) {
24951
- this.onEnd == null ? void 0 : this.onEnd.call(this, this);
25071
+ this.emit("end", {
25072
+ composition: this
25073
+ });
24952
25074
  this.dispose();
24953
25075
  } else {
24954
- if (!skipRender) {
24955
- this.prepareRender();
24956
- }
25076
+ this.prepareRender();
24957
25077
  }
24958
25078
  };
24959
25079
  _proto.toLocalTime = function toLocalTime(time) {
@@ -24964,13 +25084,20 @@ var listOrder = 0;
24964
25084
  localTime = localTime % duration;
24965
25085
  } else if (this.rootItem.endBehavior === EndBehavior.freeze) {
24966
25086
  localTime = Math.min(duration, localTime);
25087
+ if (localTime === duration) {
25088
+ if (!this.rootComposition.fezzed) {
25089
+ this.rootComposition.fezzed = true;
25090
+ this.emit("end", {
25091
+ composition: this
25092
+ });
25093
+ }
25094
+ }
24967
25095
  }
24968
25096
  }
24969
25097
  return localTime;
24970
25098
  };
24971
25099
  _proto.getUpdateTime = function getUpdateTime(t) {
24972
25100
  var startTimeInMs = this.startTime * 1000;
24973
- // const content = this.rootItem;
24974
25101
  var now = this.rootComposition.time * 1000;
24975
25102
  if (t < 0 && now + t < startTimeInMs) {
24976
25103
  return startTimeInMs - now;
@@ -25118,6 +25245,14 @@ var listOrder = 0;
25118
25245
  });
25119
25246
  };
25120
25247
  /**
25248
+ * 更新主合成组件
25249
+ */ _proto.updateRootComposition = function updateRootComposition() {
25250
+ if (this.rootComposition.isActiveAndEnabled) {
25251
+ var localTime = this.toLocalTime(this.globalTime / 1000);
25252
+ this.rootComposition.time = localTime;
25253
+ }
25254
+ };
25255
+ /**
25121
25256
  * 通过名称获取元素
25122
25257
  * @param name - 元素名称
25123
25258
  * @returns 元素对象
@@ -25166,12 +25301,17 @@ var listOrder = 0;
25166
25301
  * @param type - 交互类型
25167
25302
  */ _proto.addInteractiveItem = function addInteractiveItem(item, type) {
25168
25303
  if (type === InteractType.MESSAGE) {
25169
- this.onMessageItem == null ? void 0 : this.onMessageItem.call(this, {
25304
+ this.handleItemMessage({
25170
25305
  name: item.name,
25171
25306
  phrase: MESSAGE_ITEM_PHRASE_BEGIN,
25172
25307
  id: item.id,
25173
25308
  compositionId: this.id
25174
25309
  });
25310
+ item.emit("message", {
25311
+ name: item.name,
25312
+ phrase: MESSAGE_ITEM_PHRASE_BEGIN,
25313
+ id: item.id
25314
+ });
25175
25315
  return item.id;
25176
25316
  }
25177
25317
  };
@@ -25180,14 +25320,19 @@ var listOrder = 0;
25180
25320
  * @param item - 交互元素
25181
25321
  * @param type - 交互类型
25182
25322
  */ _proto.removeInteractiveItem = function removeInteractiveItem(item, type) {
25183
- // MESSAGE ITEM的结束行为
25323
+ // MESSAGE ITEM 的结束行为
25184
25324
  if (type === InteractType.MESSAGE) {
25185
- this.onMessageItem == null ? void 0 : this.onMessageItem.call(this, {
25325
+ this.handleItemMessage({
25186
25326
  name: item.name,
25187
25327
  phrase: MESSAGE_ITEM_PHRASE_END,
25188
25328
  id: item.id,
25189
25329
  compositionId: this.id
25190
25330
  });
25331
+ item.emit("message", {
25332
+ name: item.name,
25333
+ phrase: MESSAGE_ITEM_PHRASE_END,
25334
+ id: item.id
25335
+ });
25191
25336
  }
25192
25337
  };
25193
25338
  /**
@@ -25283,7 +25428,6 @@ var listOrder = 0;
25283
25428
  this.update = function() {
25284
25429
  logger.error("Update disposed composition: " + _this.name + ".");
25285
25430
  };
25286
- this.onPlayerPause = noop;
25287
25431
  this.dispose = noop;
25288
25432
  if (textures && this.keepResource) {
25289
25433
  textures.forEach(function(tex) {
@@ -25481,7 +25625,7 @@ var listOrder = 0;
25481
25625
  }
25482
25626
  ]);
25483
25627
  return Composition;
25484
- }();
25628
+ }(EventEmitter);
25485
25629
 
25486
25630
  var SIZEOF_SHORT = 2;
25487
25631
  var SIZEOF_INT = 4;
@@ -27445,8 +27589,8 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
27445
27589
  registerPlugin("particle", ParticleLoader, VFXItem, true);
27446
27590
  registerPlugin("cal", CalculateLoader, VFXItem, true);
27447
27591
  registerPlugin("interact", InteractLoader, VFXItem, true);
27448
- var version = "2.0.0-alpha.30";
27592
+ var version = "2.0.0-alpha.32";
27449
27593
  logger.info("Core version: " + version + ".");
27450
27594
 
27451
- 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, 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, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
27595
+ 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, EventEmitter, 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, 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, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
27452
27596
  //# sourceMappingURL=index.mjs.map