@galacean/effects-threejs 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.js +302 -123
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +302 -124
- package/dist/index.mjs.map +1 -1
- package/dist/three-composition.d.ts +1 -22
- package/dist/three-display-object.d.ts +4 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.0.0-alpha.
|
|
6
|
+
* Version: v2.0.0-alpha.32
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -4565,15 +4565,97 @@ function getDirectStore(target) {
|
|
|
4565
4565
|
return decoratorInitialStore.get(classKey);
|
|
4566
4566
|
}
|
|
4567
4567
|
|
|
4568
|
+
function _assert_this_initialized(self) {
|
|
4569
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4570
|
+
return self;
|
|
4571
|
+
}
|
|
4572
|
+
|
|
4573
|
+
var EventEmitter = function EventEmitter() {
|
|
4574
|
+
var _this = this;
|
|
4575
|
+
var _this1 = this;
|
|
4576
|
+
this.listeners = {};
|
|
4577
|
+
/**
|
|
4578
|
+
* 移除事件监听器
|
|
4579
|
+
* @param eventName - 事件名称
|
|
4580
|
+
* @param listener - 事件监听器
|
|
4581
|
+
* @returns
|
|
4582
|
+
*/ this.off = function(eventName, listener) {
|
|
4583
|
+
if (!_this.listeners[eventName]) {
|
|
4584
|
+
return;
|
|
4585
|
+
}
|
|
4586
|
+
_this.listeners[eventName] = _this.listeners[eventName].filter(function(param) {
|
|
4587
|
+
var l = param.listener;
|
|
4588
|
+
return l !== listener;
|
|
4589
|
+
});
|
|
4590
|
+
};
|
|
4591
|
+
/**
|
|
4592
|
+
* 监听事件
|
|
4593
|
+
* @param eventName - 事件名称
|
|
4594
|
+
* @param listener - 事件监听器
|
|
4595
|
+
* @param options - 事件监听器选项
|
|
4596
|
+
* @returns
|
|
4597
|
+
*/ this.on = function(eventName, listener, options) {
|
|
4598
|
+
_this.listeners[eventName] = _this.listeners[eventName] || [];
|
|
4599
|
+
_this.listeners[eventName].push({
|
|
4600
|
+
listener: listener,
|
|
4601
|
+
options: options
|
|
4602
|
+
});
|
|
4603
|
+
return function() {
|
|
4604
|
+
return _this.off(eventName, listener);
|
|
4605
|
+
};
|
|
4606
|
+
};
|
|
4607
|
+
/**
|
|
4608
|
+
* 一次性监听事件
|
|
4609
|
+
* @param eventName - 事件名称
|
|
4610
|
+
* @param listener - 事件监听器
|
|
4611
|
+
*/ this.once = function(eventName, listener) {
|
|
4612
|
+
_this.on(eventName, listener, {
|
|
4613
|
+
once: true
|
|
4614
|
+
});
|
|
4615
|
+
};
|
|
4616
|
+
/**
|
|
4617
|
+
* 触发事件
|
|
4618
|
+
* @param eventName - 事件名称
|
|
4619
|
+
* @param args - 事件参数
|
|
4620
|
+
*/ this.emit = function(eventName) {
|
|
4621
|
+
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
4622
|
+
args[_key - 1] = arguments[_key];
|
|
4623
|
+
}
|
|
4624
|
+
var _this_listeners_eventName;
|
|
4625
|
+
(_this_listeners_eventName = _this1.listeners[eventName]) == null ? void 0 : _this_listeners_eventName.forEach(function(param) {
|
|
4626
|
+
var listener = param.listener, options = param.options;
|
|
4627
|
+
listener.apply(void 0, [].concat(args));
|
|
4628
|
+
if (options == null ? void 0 : options.once) {
|
|
4629
|
+
_this1.off(eventName, listener);
|
|
4630
|
+
}
|
|
4631
|
+
});
|
|
4632
|
+
};
|
|
4633
|
+
/**
|
|
4634
|
+
* 获取事件名称对应的所有监听器
|
|
4635
|
+
* @param eventName - 事件名称
|
|
4636
|
+
* @returns - 返回事件名称对应的所有监听器
|
|
4637
|
+
*/ this.getListeners = function(eventName) {
|
|
4638
|
+
var _this_listeners_eventName;
|
|
4639
|
+
return ((_this_listeners_eventName = _this.listeners[eventName]) == null ? void 0 : _this_listeners_eventName.map(function(param) {
|
|
4640
|
+
var listener = param.listener;
|
|
4641
|
+
return listener;
|
|
4642
|
+
})) || [];
|
|
4643
|
+
};
|
|
4644
|
+
};
|
|
4645
|
+
|
|
4568
4646
|
/**
|
|
4569
4647
|
* @since 2.0.0
|
|
4570
4648
|
* @internal
|
|
4571
|
-
*/ var EffectsObject = /*#__PURE__*/ function() {
|
|
4649
|
+
*/ var EffectsObject = /*#__PURE__*/ function(EventEmitter) {
|
|
4650
|
+
_inherits(EffectsObject, EventEmitter);
|
|
4572
4651
|
function EffectsObject(engine) {
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4652
|
+
var _this;
|
|
4653
|
+
_this = EventEmitter.call(this) || this;
|
|
4654
|
+
_this.engine = engine;
|
|
4655
|
+
_this.guid = generateGUID();
|
|
4656
|
+
_this.taggedProperties = {};
|
|
4657
|
+
_this.engine.addInstance(_assert_this_initialized(_this));
|
|
4658
|
+
return _this;
|
|
4577
4659
|
}
|
|
4578
4660
|
var _proto = EffectsObject.prototype;
|
|
4579
4661
|
_proto.getInstanceId = function getInstanceId() {
|
|
@@ -4599,7 +4681,7 @@ function getDirectStore(target) {
|
|
|
4599
4681
|
return _instanceof1(obj, EffectsObject) && "guid" in obj;
|
|
4600
4682
|
};
|
|
4601
4683
|
return EffectsObject;
|
|
4602
|
-
}();
|
|
4684
|
+
}(EventEmitter);
|
|
4603
4685
|
|
|
4604
4686
|
/**
|
|
4605
4687
|
* @since 2.0.0
|
|
@@ -8410,7 +8492,8 @@ var seed$a = 1;
|
|
|
8410
8492
|
texture = Texture.create(engine, {
|
|
8411
8493
|
sourceType: TextureSourceType.image,
|
|
8412
8494
|
image: image,
|
|
8413
|
-
id: generateGUID()
|
|
8495
|
+
id: generateGUID(),
|
|
8496
|
+
flipY: true
|
|
8414
8497
|
});
|
|
8415
8498
|
texture.initialize();
|
|
8416
8499
|
return [
|
|
@@ -8988,6 +9071,9 @@ var MaterialRenderType;
|
|
|
8988
9071
|
* 初始化 GPU 资源
|
|
8989
9072
|
* @override
|
|
8990
9073
|
*/ _proto.initialize = function initialize() {
|
|
9074
|
+
// OVERRIDE
|
|
9075
|
+
};
|
|
9076
|
+
_proto.createShaderVariant = function createShaderVariant() {
|
|
8991
9077
|
// OVERRIDE
|
|
8992
9078
|
};
|
|
8993
9079
|
_proto.use = function use(render, globalUniforms) {
|
|
@@ -12698,6 +12784,7 @@ var GlobalUniforms = function GlobalUniforms() {
|
|
|
12698
12784
|
this.floats = {};
|
|
12699
12785
|
this.ints = {};
|
|
12700
12786
|
// vector3s: Record<string, vec3> = {};
|
|
12787
|
+
this.vector4s = {};
|
|
12701
12788
|
this.matrices = {};
|
|
12702
12789
|
//...
|
|
12703
12790
|
this.samplers = [] // 存放的sampler名称。
|
|
@@ -12934,6 +13021,9 @@ var Renderer = /*#__PURE__*/ function() {
|
|
|
12934
13021
|
_proto.setGlobalInt = function setGlobalInt(name, value) {
|
|
12935
13022
|
// OVERRIDE
|
|
12936
13023
|
};
|
|
13024
|
+
_proto.setGlobalVector4 = function setGlobalVector4(name, value) {
|
|
13025
|
+
// OVERRIDE
|
|
13026
|
+
};
|
|
12937
13027
|
_proto.setGlobalMatrix = function setGlobalMatrix(name, value) {
|
|
12938
13028
|
// OVERRIDE
|
|
12939
13029
|
};
|
|
@@ -13886,6 +13976,8 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13886
13976
|
function SpriteComponent(engine, props) {
|
|
13887
13977
|
var _this;
|
|
13888
13978
|
_this = RendererComponent.call(this, engine) || this;
|
|
13979
|
+
_this.cachePrefix = "-";
|
|
13980
|
+
_this.frameAnimationLoop = false;
|
|
13889
13981
|
_this.frameAnimationTime = 0;
|
|
13890
13982
|
_this.color = [
|
|
13891
13983
|
1,
|
|
@@ -13909,6 +14001,39 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13909
14001
|
}
|
|
13910
14002
|
}
|
|
13911
14003
|
};
|
|
14004
|
+
_this.name = "MSprite" + seed$4++;
|
|
14005
|
+
_this.renderer = {
|
|
14006
|
+
renderMode: RenderMode.BILLBOARD,
|
|
14007
|
+
blending: BlendingMode.ALPHA,
|
|
14008
|
+
texture: _this.engine.emptyTexture,
|
|
14009
|
+
occlusion: false,
|
|
14010
|
+
transparentOcclusion: false,
|
|
14011
|
+
side: SideMode.DOUBLE,
|
|
14012
|
+
mask: 0,
|
|
14013
|
+
maskMode: MaskMode.NONE,
|
|
14014
|
+
order: 0
|
|
14015
|
+
};
|
|
14016
|
+
_this.emptyTexture = _this.engine.emptyTexture;
|
|
14017
|
+
_this.splits = singleSplits;
|
|
14018
|
+
_this.renderInfo = getImageItemRenderInfo(_assert_this_initialized(_this));
|
|
14019
|
+
var geometry = _this.createGeometry(glContext.TRIANGLES);
|
|
14020
|
+
var material = _this.createMaterial(_this.renderInfo, 2);
|
|
14021
|
+
_this.worldMatrix = Matrix4.fromIdentity();
|
|
14022
|
+
_this.material = material;
|
|
14023
|
+
_this.geometry = geometry;
|
|
14024
|
+
_this.material.setVector4("_Color", new Vector4().setFromArray([
|
|
14025
|
+
1,
|
|
14026
|
+
1,
|
|
14027
|
+
1,
|
|
14028
|
+
1
|
|
14029
|
+
]));
|
|
14030
|
+
_this.material.setVector4("_TexOffset", new Vector4().setFromArray([
|
|
14031
|
+
0,
|
|
14032
|
+
0,
|
|
14033
|
+
1,
|
|
14034
|
+
1
|
|
14035
|
+
]));
|
|
14036
|
+
_this.setItem();
|
|
13912
14037
|
if (props) {
|
|
13913
14038
|
_this.fromData(props);
|
|
13914
14039
|
}
|
|
@@ -13962,9 +14087,13 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13962
14087
|
this.frameAnimationTime += dt / 1000;
|
|
13963
14088
|
var time = this.frameAnimationTime;
|
|
13964
14089
|
var duration = this.item.duration;
|
|
14090
|
+
if (time > duration && this.frameAnimationLoop) {
|
|
14091
|
+
time = time % duration;
|
|
14092
|
+
}
|
|
13965
14093
|
var life = Math.min(Math.max(time / duration, 0.0), 1.0);
|
|
13966
14094
|
var ta = this.textureSheetAnimation;
|
|
13967
14095
|
if (ta) {
|
|
14096
|
+
var _this_material_getVector4;
|
|
13968
14097
|
var total = ta.total || ta.row * ta.col;
|
|
13969
14098
|
var texRectX = 0;
|
|
13970
14099
|
var texRectY = 0;
|
|
@@ -14010,7 +14139,7 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14010
14139
|
dy
|
|
14011
14140
|
];
|
|
14012
14141
|
}
|
|
14013
|
-
this.material.getVector4("_TexOffset").setFromArray([
|
|
14142
|
+
(_this_material_getVector4 = this.material.getVector4("_TexOffset")) == null ? void 0 : _this_material_getVector4.setFromArray([
|
|
14014
14143
|
texRectX + texOffset[0],
|
|
14015
14144
|
texRectH + texRectY - texOffset[1],
|
|
14016
14145
|
dx,
|
|
@@ -14023,12 +14152,9 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14023
14152
|
this.item.composition.destroyTextures(this.getTextures());
|
|
14024
14153
|
}
|
|
14025
14154
|
};
|
|
14026
|
-
_proto.getItemInitData = function getItemInitData(
|
|
14027
|
-
|
|
14028
|
-
|
|
14029
|
-
geoData = item.geoData = this.getItemGeometryData(item, idx);
|
|
14030
|
-
}
|
|
14031
|
-
var index = geoData.index;
|
|
14155
|
+
_proto.getItemInitData = function getItemInitData() {
|
|
14156
|
+
this.geoData = this.getItemGeometryData();
|
|
14157
|
+
var _this_geoData = this.geoData, index = _this_geoData.index, atlasOffset = _this_geoData.atlasOffset;
|
|
14032
14158
|
var idxCount = index.length;
|
|
14033
14159
|
// @ts-expect-error
|
|
14034
14160
|
var indexData = this.wireframe ? new Uint8Array([
|
|
@@ -14043,11 +14169,11 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14043
14169
|
]) : new index.constructor(idxCount);
|
|
14044
14170
|
if (!this.wireframe) {
|
|
14045
14171
|
for(var i = 0; i < idxCount; i++){
|
|
14046
|
-
indexData[i] =
|
|
14172
|
+
indexData[i] = 0 + index[i];
|
|
14047
14173
|
}
|
|
14048
14174
|
}
|
|
14049
14175
|
return {
|
|
14050
|
-
atlasOffset:
|
|
14176
|
+
atlasOffset: atlasOffset,
|
|
14051
14177
|
index: indexData
|
|
14052
14178
|
};
|
|
14053
14179
|
};
|
|
@@ -14058,8 +14184,7 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14058
14184
|
addItem(textures, texture);
|
|
14059
14185
|
}
|
|
14060
14186
|
texture = this.renderer.texture;
|
|
14061
|
-
var
|
|
14062
|
-
var data = this.getItemInitData(this, 0, 0, textureIndex);
|
|
14187
|
+
var data = this.getItemInitData();
|
|
14063
14188
|
var renderer = this.renderer;
|
|
14064
14189
|
var texParams = this.material.getVector4("_TexParams");
|
|
14065
14190
|
texParams.x = renderer.occlusion ? +renderer.transparentOcclusion : 1;
|
|
@@ -14150,6 +14275,7 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14150
14275
|
setBlendMode(material, states.blendMode);
|
|
14151
14276
|
setMaskMode(material, states.maskMode);
|
|
14152
14277
|
setSideMode(material, states.side);
|
|
14278
|
+
material.shader.shaderData.properties = 'uSampler0("uSampler0",2D) = "white" {}';
|
|
14153
14279
|
if (!material.hasUniform("_Color")) {
|
|
14154
14280
|
material.setVector4("_Color", new Vector4(0, 0, 0, 1));
|
|
14155
14281
|
}
|
|
@@ -14161,8 +14287,8 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14161
14287
|
}
|
|
14162
14288
|
return material;
|
|
14163
14289
|
};
|
|
14164
|
-
_proto.getItemGeometryData = function getItemGeometryData(
|
|
14165
|
-
var splits =
|
|
14290
|
+
_proto.getItemGeometryData = function getItemGeometryData() {
|
|
14291
|
+
var _this = this, splits = _this.splits, renderer = _this.renderer, textureSheetAnimation = _this.textureSheetAnimation;
|
|
14166
14292
|
var sx = 1, sy = 1;
|
|
14167
14293
|
if (renderer.shape) {
|
|
14168
14294
|
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;
|
|
@@ -14317,7 +14443,6 @@ var SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14317
14443
|
this.worldMatrix = Matrix4.fromIdentity();
|
|
14318
14444
|
this.material = material;
|
|
14319
14445
|
this.geometry = geometry;
|
|
14320
|
-
this.name = "MSprite" + seed$4++;
|
|
14321
14446
|
var startColor = options.startColor || [
|
|
14322
14447
|
1,
|
|
14323
14448
|
1,
|
|
@@ -18434,11 +18559,6 @@ var CalculateLoader = /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
18434
18559
|
return CalculateLoader;
|
|
18435
18560
|
}(AbstractPlugin);
|
|
18436
18561
|
|
|
18437
|
-
function _assert_this_initialized(self) {
|
|
18438
|
-
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
18439
|
-
return self;
|
|
18440
|
-
}
|
|
18441
|
-
|
|
18442
18562
|
var AnimationStream = /*#__PURE__*/ function() {
|
|
18443
18563
|
function AnimationStream(playable) {
|
|
18444
18564
|
this.curveValues = {};
|
|
@@ -19233,6 +19353,9 @@ function compareTracks(a, b) {
|
|
|
19233
19353
|
_this.startTime = 0;
|
|
19234
19354
|
_this.items = [] // 场景的所有元素
|
|
19235
19355
|
;
|
|
19356
|
+
/**
|
|
19357
|
+
* 合成是否冻结标志位
|
|
19358
|
+
*/ _this.fezzed = false;
|
|
19236
19359
|
_this.reusable = false;
|
|
19237
19360
|
_this.sceneBindings = [];
|
|
19238
19361
|
_this.graph = new PlayableGraph();
|
|
@@ -19269,10 +19392,6 @@ function compareTracks(a, b) {
|
|
|
19269
19392
|
};
|
|
19270
19393
|
_proto.update = function update(dt) {
|
|
19271
19394
|
var time = this.time;
|
|
19272
|
-
// 主合成 rootItem 没有绑定轨道,增加结束行为判断。
|
|
19273
|
-
if (this.item.isEnded(this.time) && !this.item.parent) {
|
|
19274
|
-
this.item.ended = true;
|
|
19275
|
-
}
|
|
19276
19395
|
this.timelinePlayable.setTime(time);
|
|
19277
19396
|
this.graph.evaluate(dt);
|
|
19278
19397
|
};
|
|
@@ -19405,6 +19524,8 @@ function compareTracks(a, b) {
|
|
|
19405
19524
|
hitPositions: hitPositions,
|
|
19406
19525
|
behavior: hitParams.behavior
|
|
19407
19526
|
};
|
|
19527
|
+
// 触发单个元素的点击事件
|
|
19528
|
+
item.emit("click", region);
|
|
19408
19529
|
regions.push(region);
|
|
19409
19530
|
if (stop(region)) {
|
|
19410
19531
|
return {
|
|
@@ -20640,8 +20761,6 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
20640
20761
|
this.parentId = parentId;
|
|
20641
20762
|
this.duration = duration;
|
|
20642
20763
|
this.endBehavior = endBehavior;
|
|
20643
|
-
//@ts-expect-error
|
|
20644
|
-
this.oldId = data.oldId;
|
|
20645
20764
|
if (!data.content) {
|
|
20646
20765
|
data.content = {
|
|
20647
20766
|
options: {}
|
|
@@ -24650,89 +24769,93 @@ var listOrder = 0;
|
|
|
24650
24769
|
* 合成抽象类:核心对象,通常一个场景只包含一个合成,可能会有多个合成。
|
|
24651
24770
|
* 合成中包含了相关的 Item 元素,支持对 Item 元素的创建、更新和销毁。
|
|
24652
24771
|
* 也负责 Item 相关的动画播放控制,和持有渲染帧数据。
|
|
24653
|
-
*/ var Composition = /*#__PURE__*/ function() {
|
|
24772
|
+
*/ var Composition = /*#__PURE__*/ function(EventEmitter) {
|
|
24773
|
+
_inherits(Composition, EventEmitter);
|
|
24654
24774
|
function Composition(props, scene) {
|
|
24655
|
-
var _this
|
|
24775
|
+
var _this;
|
|
24776
|
+
_this = EventEmitter.call(this) || this;
|
|
24656
24777
|
/**
|
|
24657
24778
|
* 动画播放速度
|
|
24658
|
-
*/
|
|
24779
|
+
*/ _this.speed = 1;
|
|
24659
24780
|
/**
|
|
24660
24781
|
* 用于保存与当前合成相关的插件数据
|
|
24661
|
-
*/
|
|
24782
|
+
*/ _this.loaderData = {};
|
|
24662
24783
|
/**
|
|
24663
24784
|
* 预合成数组
|
|
24664
|
-
*/
|
|
24785
|
+
*/ _this.refContent = [];
|
|
24665
24786
|
/**
|
|
24666
24787
|
* 预合成的合成属性,在 content 中会被其元素属性覆盖
|
|
24667
|
-
*/
|
|
24788
|
+
*/ _this.refCompositionProps = new Map();
|
|
24668
24789
|
// TODO: 待优化
|
|
24669
|
-
|
|
24790
|
+
_this.assigned = false;
|
|
24670
24791
|
/**
|
|
24671
24792
|
* 销毁状态位
|
|
24672
|
-
*/
|
|
24673
|
-
|
|
24793
|
+
*/ _this.destroyed = false;
|
|
24794
|
+
_this.postLoaders = [];
|
|
24674
24795
|
/**
|
|
24675
24796
|
* 合成暂停/播放 标识
|
|
24676
|
-
*/
|
|
24677
|
-
|
|
24678
|
-
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,
|
|
24679
|
-
|
|
24797
|
+
*/ _this.paused = false;
|
|
24798
|
+
_this.lastVideoUpdateTime = 0;
|
|
24799
|
+
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;
|
|
24800
|
+
_this.compositionSourceManager = new CompositionSourceManager(scene, renderer.engine);
|
|
24680
24801
|
scene.jsonScene.imgUsage = undefined;
|
|
24681
24802
|
if (reusable) {
|
|
24682
|
-
|
|
24803
|
+
_this.keepResource = true;
|
|
24683
24804
|
scene.textures = undefined;
|
|
24684
24805
|
scene.consumed = true;
|
|
24685
24806
|
}
|
|
24686
|
-
var _this_compositionSourceManager =
|
|
24807
|
+
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;
|
|
24687
24808
|
assertExist(sourceContent);
|
|
24688
|
-
|
|
24689
|
-
|
|
24690
|
-
|
|
24691
|
-
|
|
24692
|
-
|
|
24693
|
-
|
|
24694
|
-
|
|
24809
|
+
_this.renderer = renderer;
|
|
24810
|
+
_this.refCompositionProps = refCompositionProps;
|
|
24811
|
+
_this.rootItem = new VFXItem(_this.getEngine(), sourceContent);
|
|
24812
|
+
_this.rootItem.name = "rootItem";
|
|
24813
|
+
_this.rootItem.composition = _assert_this_initialized(_this);
|
|
24814
|
+
_this.rootComposition = _this.rootItem.addComponent(CompositionComponent);
|
|
24815
|
+
_this.rootComposition.startTime = sourceContent.startTime;
|
|
24816
|
+
_this.rootComposition.data = sourceContent;
|
|
24695
24817
|
var imageUsage = !reusable && imgUsage;
|
|
24696
|
-
|
|
24697
|
-
|
|
24698
|
-
|
|
24699
|
-
|
|
24700
|
-
|
|
24701
|
-
|
|
24702
|
-
|
|
24818
|
+
_this.width = width;
|
|
24819
|
+
_this.height = height;
|
|
24820
|
+
_this.renderOrder = baseRenderOrder;
|
|
24821
|
+
_this.id = sourceContent.id;
|
|
24822
|
+
_this.renderer = renderer;
|
|
24823
|
+
_this.texInfo = imageUsage != null ? imageUsage : {};
|
|
24824
|
+
_this.event = event;
|
|
24703
24825
|
var _scene_startTime, _scene_timeInfos_asyncCompile;
|
|
24704
|
-
|
|
24826
|
+
_this.statistic = {
|
|
24705
24827
|
loadTime: totalTime != null ? totalTime : 0,
|
|
24706
24828
|
loadStart: (_scene_startTime = scene.startTime) != null ? _scene_startTime : 0,
|
|
24707
24829
|
firstFrameTime: 0,
|
|
24708
24830
|
precompileTime: (_scene_timeInfos_asyncCompile = scene.timeInfos["asyncCompile"]) != null ? _scene_timeInfos_asyncCompile : scene.timeInfos["syncCompile"]
|
|
24709
24831
|
};
|
|
24710
|
-
|
|
24711
|
-
|
|
24712
|
-
|
|
24713
|
-
|
|
24714
|
-
|
|
24715
|
-
|
|
24716
|
-
|
|
24832
|
+
_this.reusable = reusable;
|
|
24833
|
+
_this.speed = speed;
|
|
24834
|
+
_this.autoRefTex = !_this.keepResource && imageUsage && _this.rootItem.endBehavior !== EndBehavior.restart;
|
|
24835
|
+
_this.name = sourceContent.name;
|
|
24836
|
+
_this.pluginSystem = pluginSystem;
|
|
24837
|
+
_this.pluginSystem.initializeComposition(_assert_this_initialized(_this), scene);
|
|
24838
|
+
_this.camera = new Camera(_this.name, _extends({}, sourceContent == null ? void 0 : sourceContent.camera, {
|
|
24717
24839
|
aspect: width / height
|
|
24718
24840
|
}));
|
|
24719
|
-
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
|
|
24723
|
-
|
|
24724
|
-
|
|
24725
|
-
|
|
24726
|
-
|
|
24727
|
-
|
|
24728
|
-
|
|
24729
|
-
this.buildItemTree(this.rootItem);
|
|
24730
|
-
this.rootItem.onEnd = function() {
|
|
24841
|
+
_this.url = scene.url;
|
|
24842
|
+
_this.assigned = true;
|
|
24843
|
+
_this.globalTime = 0;
|
|
24844
|
+
_this.interactive = true;
|
|
24845
|
+
_this.handleItemMessage = handleItemMessage;
|
|
24846
|
+
_this.createRenderFrame();
|
|
24847
|
+
_this.rendererOptions = null;
|
|
24848
|
+
_this.rootComposition.createContent();
|
|
24849
|
+
_this.buildItemTree(_this.rootItem);
|
|
24850
|
+
_this.rootItem.onEnd = function() {
|
|
24731
24851
|
window.setTimeout(function() {
|
|
24732
|
-
_this.
|
|
24852
|
+
_this.emit("end", {
|
|
24853
|
+
composition: _assert_this_initialized(_this)
|
|
24854
|
+
});
|
|
24733
24855
|
}, 0);
|
|
24734
24856
|
};
|
|
24735
|
-
|
|
24857
|
+
_this.pluginSystem.resetComposition(_assert_this_initialized(_this), _this.renderFrame);
|
|
24858
|
+
return _this;
|
|
24736
24859
|
}
|
|
24737
24860
|
var _proto = Composition.prototype;
|
|
24738
24861
|
/**
|
|
@@ -24783,7 +24906,7 @@ var listOrder = 0;
|
|
|
24783
24906
|
if (this.rootItem.ended && this.reusable) {
|
|
24784
24907
|
this.restart();
|
|
24785
24908
|
}
|
|
24786
|
-
if (
|
|
24909
|
+
if (this.rootComposition.started) {
|
|
24787
24910
|
this.gotoAndPlay(this.time - this.startTime);
|
|
24788
24911
|
} else {
|
|
24789
24912
|
this.gotoAndPlay(0);
|
|
@@ -24806,18 +24929,14 @@ var listOrder = 0;
|
|
|
24806
24929
|
* 跳转合成到指定时间播放
|
|
24807
24930
|
* @param time - 相对 startTime 的时间
|
|
24808
24931
|
*/ _proto.gotoAndPlay = function gotoAndPlay(time) {
|
|
24932
|
+
this.setTime(time);
|
|
24809
24933
|
this.resume();
|
|
24810
|
-
if (!this.rootComposition.started) {
|
|
24811
|
-
this.rootComposition.start();
|
|
24812
|
-
this.rootComposition.started = true;
|
|
24813
|
-
}
|
|
24814
|
-
this.forwardTime(time + this.startTime);
|
|
24815
24934
|
};
|
|
24816
24935
|
/**
|
|
24817
24936
|
* 跳转合成到指定时间并暂停
|
|
24818
24937
|
* @param time - 相对 startTime 的时间
|
|
24819
24938
|
*/ _proto.gotoAndStop = function gotoAndStop(time) {
|
|
24820
|
-
this.
|
|
24939
|
+
this.setTime(time);
|
|
24821
24940
|
this.pause();
|
|
24822
24941
|
};
|
|
24823
24942
|
/**
|
|
@@ -24844,7 +24963,7 @@ var listOrder = 0;
|
|
|
24844
24963
|
this.rootComposition.start();
|
|
24845
24964
|
this.rootComposition.started = true;
|
|
24846
24965
|
}
|
|
24847
|
-
this.forwardTime(time + this.startTime
|
|
24966
|
+
this.forwardTime(time + this.startTime);
|
|
24848
24967
|
if (pause) {
|
|
24849
24968
|
this.pause();
|
|
24850
24969
|
}
|
|
@@ -24857,17 +24976,16 @@ var listOrder = 0;
|
|
|
24857
24976
|
* 前进合成到指定时间
|
|
24858
24977
|
* @param time - 相对0时刻的时间
|
|
24859
24978
|
* @param skipRender - 是否跳过渲染
|
|
24860
|
-
*/ _proto.forwardTime = function forwardTime(time
|
|
24861
|
-
if (skipRender === void 0) skipRender = false;
|
|
24979
|
+
*/ _proto.forwardTime = function forwardTime(time) {
|
|
24862
24980
|
var deltaTime = time * 1000 - this.rootComposition.time * 1000;
|
|
24863
24981
|
var reverse = deltaTime < 0;
|
|
24864
24982
|
var step = 15;
|
|
24865
24983
|
var t = Math.abs(deltaTime);
|
|
24866
24984
|
var ss = reverse ? -step : step;
|
|
24867
24985
|
for(t; t > step; t -= step){
|
|
24868
|
-
this.update(ss
|
|
24986
|
+
this.update(ss);
|
|
24869
24987
|
}
|
|
24870
|
-
this.update(reverse ? -t : t
|
|
24988
|
+
this.update(reverse ? -t : t);
|
|
24871
24989
|
};
|
|
24872
24990
|
/**
|
|
24873
24991
|
* 重置状态函数
|
|
@@ -24908,8 +25026,9 @@ var listOrder = 0;
|
|
|
24908
25026
|
* 是否合成需要重新播放
|
|
24909
25027
|
* @returns 重新播放合成标志位
|
|
24910
25028
|
*/ _proto.shouldRestart = function shouldRestart() {
|
|
24911
|
-
var _this_rootItem = this.rootItem,
|
|
24912
|
-
|
|
25029
|
+
var _this_rootItem = this.rootItem, duration = _this_rootItem.duration, endBehavior = _this_rootItem.endBehavior;
|
|
25030
|
+
var time = this.rootComposition.time;
|
|
25031
|
+
return endBehavior === EndBehavior.restart && duration - time < 0.02;
|
|
24913
25032
|
};
|
|
24914
25033
|
/**
|
|
24915
25034
|
* 是否合成需要销毁
|
|
@@ -24918,44 +25037,45 @@ var listOrder = 0;
|
|
|
24918
25037
|
if (this.reusable) {
|
|
24919
25038
|
return false;
|
|
24920
25039
|
}
|
|
24921
|
-
var
|
|
25040
|
+
var endBehavior = this.rootItem.endBehavior;
|
|
25041
|
+
if (this.rootItem.isEnded(this.time)) {
|
|
25042
|
+
this.rootItem.ended = true;
|
|
25043
|
+
}
|
|
24922
25044
|
// TODO: 合成结束行为
|
|
24923
|
-
return ended &&
|
|
25045
|
+
return this.rootItem.ended && endBehavior === EndBehavior.destroy;
|
|
24924
25046
|
};
|
|
24925
25047
|
/**
|
|
24926
25048
|
* 合成更新,针对所有 item 的更新
|
|
24927
25049
|
* @param deltaTime - 更新的时间步长
|
|
24928
25050
|
* @param skipRender - 是否需要渲染
|
|
24929
|
-
*/ _proto.update = function update(deltaTime
|
|
24930
|
-
if (skipRender === void 0) skipRender = false;
|
|
25051
|
+
*/ _proto.update = function update(deltaTime) {
|
|
24931
25052
|
if (!this.assigned || this.paused) {
|
|
24932
25053
|
return;
|
|
24933
25054
|
}
|
|
25055
|
+
var time = this.getUpdateTime(deltaTime * this.speed);
|
|
25056
|
+
this.globalTime += time;
|
|
25057
|
+
this.updateRootComposition();
|
|
24934
25058
|
if (this.shouldRestart()) {
|
|
25059
|
+
this.emit("end", {
|
|
25060
|
+
composition: this
|
|
25061
|
+
});
|
|
24935
25062
|
this.restart();
|
|
24936
25063
|
// restart then tick to avoid flicker
|
|
24937
25064
|
}
|
|
24938
|
-
var time = this.getUpdateTime(deltaTime * this.speed);
|
|
24939
|
-
this.globalTime += time;
|
|
24940
|
-
if (this.rootComposition.isActiveAndEnabled) {
|
|
24941
|
-
var localTime = this.toLocalTime(this.globalTime / 1000);
|
|
24942
|
-
this.rootComposition.time = localTime;
|
|
24943
|
-
}
|
|
24944
25065
|
this.updateVideo();
|
|
24945
25066
|
// 更新 model-tree-plugin
|
|
24946
25067
|
this.updatePluginLoaders(deltaTime);
|
|
24947
25068
|
this.callStart(this.rootItem);
|
|
24948
25069
|
this.callUpdate(this.rootItem, time);
|
|
24949
25070
|
this.callLateUpdate(this.rootItem, time);
|
|
24950
|
-
// this.extraCamera?.getComponent(TimelineComponent)?.update(deltaTime);
|
|
24951
25071
|
this.updateCamera();
|
|
24952
25072
|
if (this.shouldDispose()) {
|
|
24953
|
-
this.
|
|
25073
|
+
this.emit("end", {
|
|
25074
|
+
composition: this
|
|
25075
|
+
});
|
|
24954
25076
|
this.dispose();
|
|
24955
25077
|
} else {
|
|
24956
|
-
|
|
24957
|
-
this.prepareRender();
|
|
24958
|
-
}
|
|
25078
|
+
this.prepareRender();
|
|
24959
25079
|
}
|
|
24960
25080
|
};
|
|
24961
25081
|
_proto.toLocalTime = function toLocalTime(time) {
|
|
@@ -24966,13 +25086,20 @@ var listOrder = 0;
|
|
|
24966
25086
|
localTime = localTime % duration;
|
|
24967
25087
|
} else if (this.rootItem.endBehavior === EndBehavior.freeze) {
|
|
24968
25088
|
localTime = Math.min(duration, localTime);
|
|
25089
|
+
if (localTime === duration) {
|
|
25090
|
+
if (!this.rootComposition.fezzed) {
|
|
25091
|
+
this.rootComposition.fezzed = true;
|
|
25092
|
+
this.emit("end", {
|
|
25093
|
+
composition: this
|
|
25094
|
+
});
|
|
25095
|
+
}
|
|
25096
|
+
}
|
|
24969
25097
|
}
|
|
24970
25098
|
}
|
|
24971
25099
|
return localTime;
|
|
24972
25100
|
};
|
|
24973
25101
|
_proto.getUpdateTime = function getUpdateTime(t) {
|
|
24974
25102
|
var startTimeInMs = this.startTime * 1000;
|
|
24975
|
-
// const content = this.rootItem;
|
|
24976
25103
|
var now = this.rootComposition.time * 1000;
|
|
24977
25104
|
if (t < 0 && now + t < startTimeInMs) {
|
|
24978
25105
|
return startTimeInMs - now;
|
|
@@ -25120,6 +25247,14 @@ var listOrder = 0;
|
|
|
25120
25247
|
});
|
|
25121
25248
|
};
|
|
25122
25249
|
/**
|
|
25250
|
+
* 更新主合成组件
|
|
25251
|
+
*/ _proto.updateRootComposition = function updateRootComposition() {
|
|
25252
|
+
if (this.rootComposition.isActiveAndEnabled) {
|
|
25253
|
+
var localTime = this.toLocalTime(this.globalTime / 1000);
|
|
25254
|
+
this.rootComposition.time = localTime;
|
|
25255
|
+
}
|
|
25256
|
+
};
|
|
25257
|
+
/**
|
|
25123
25258
|
* 通过名称获取元素
|
|
25124
25259
|
* @param name - 元素名称
|
|
25125
25260
|
* @returns 元素对象
|
|
@@ -25168,12 +25303,17 @@ var listOrder = 0;
|
|
|
25168
25303
|
* @param type - 交互类型
|
|
25169
25304
|
*/ _proto.addInteractiveItem = function addInteractiveItem(item, type) {
|
|
25170
25305
|
if (type === InteractType.MESSAGE) {
|
|
25171
|
-
this.
|
|
25306
|
+
this.handleItemMessage({
|
|
25172
25307
|
name: item.name,
|
|
25173
25308
|
phrase: MESSAGE_ITEM_PHRASE_BEGIN,
|
|
25174
25309
|
id: item.id,
|
|
25175
25310
|
compositionId: this.id
|
|
25176
25311
|
});
|
|
25312
|
+
item.emit("message", {
|
|
25313
|
+
name: item.name,
|
|
25314
|
+
phrase: MESSAGE_ITEM_PHRASE_BEGIN,
|
|
25315
|
+
id: item.id
|
|
25316
|
+
});
|
|
25177
25317
|
return item.id;
|
|
25178
25318
|
}
|
|
25179
25319
|
};
|
|
@@ -25182,14 +25322,19 @@ var listOrder = 0;
|
|
|
25182
25322
|
* @param item - 交互元素
|
|
25183
25323
|
* @param type - 交互类型
|
|
25184
25324
|
*/ _proto.removeInteractiveItem = function removeInteractiveItem(item, type) {
|
|
25185
|
-
// MESSAGE ITEM的结束行为
|
|
25325
|
+
// MESSAGE ITEM 的结束行为
|
|
25186
25326
|
if (type === InteractType.MESSAGE) {
|
|
25187
|
-
this.
|
|
25327
|
+
this.handleItemMessage({
|
|
25188
25328
|
name: item.name,
|
|
25189
25329
|
phrase: MESSAGE_ITEM_PHRASE_END,
|
|
25190
25330
|
id: item.id,
|
|
25191
25331
|
compositionId: this.id
|
|
25192
25332
|
});
|
|
25333
|
+
item.emit("message", {
|
|
25334
|
+
name: item.name,
|
|
25335
|
+
phrase: MESSAGE_ITEM_PHRASE_END,
|
|
25336
|
+
id: item.id
|
|
25337
|
+
});
|
|
25193
25338
|
}
|
|
25194
25339
|
};
|
|
25195
25340
|
/**
|
|
@@ -25285,7 +25430,6 @@ var listOrder = 0;
|
|
|
25285
25430
|
this.update = function() {
|
|
25286
25431
|
logger.error("Update disposed composition: " + _this.name + ".");
|
|
25287
25432
|
};
|
|
25288
|
-
this.onPlayerPause = noop;
|
|
25289
25433
|
this.dispose = noop;
|
|
25290
25434
|
if (textures && this.keepResource) {
|
|
25291
25435
|
textures.forEach(function(tex) {
|
|
@@ -25483,7 +25627,7 @@ var listOrder = 0;
|
|
|
25483
25627
|
}
|
|
25484
25628
|
]);
|
|
25485
25629
|
return Composition;
|
|
25486
|
-
}();
|
|
25630
|
+
}(EventEmitter);
|
|
25487
25631
|
|
|
25488
25632
|
var SIZEOF_SHORT = 2;
|
|
25489
25633
|
var SIZEOF_INT = 4;
|
|
@@ -27447,7 +27591,7 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
|
|
|
27447
27591
|
registerPlugin("particle", ParticleLoader, VFXItem, true);
|
|
27448
27592
|
registerPlugin("cal", CalculateLoader, VFXItem, true);
|
|
27449
27593
|
registerPlugin("interact", InteractLoader, VFXItem, true);
|
|
27450
|
-
var version$1 = "2.0.0-alpha.
|
|
27594
|
+
var version$1 = "2.0.0-alpha.32";
|
|
27451
27595
|
logger.info("Core version: " + version$1 + ".");
|
|
27452
27596
|
|
|
27453
27597
|
var _obj;
|
|
@@ -27521,6 +27665,13 @@ var _obj3;
|
|
|
27521
27665
|
*/ _this.uniforms = {};
|
|
27522
27666
|
var shader = props == null ? void 0 : props.shader;
|
|
27523
27667
|
var level = engine.gpuCapability.level;
|
|
27668
|
+
_this.shader = new Shader(engine);
|
|
27669
|
+
_this.shader.shaderData = _extends({}, shader, {
|
|
27670
|
+
id: generateGUID(),
|
|
27671
|
+
dataType: DataType.Shader,
|
|
27672
|
+
vertex: (shader == null ? void 0 : shader.vertex) || "",
|
|
27673
|
+
fragment: (shader == null ? void 0 : shader.fragment) || ""
|
|
27674
|
+
});
|
|
27524
27675
|
for(var i = 0; i < maxSpriteMeshItemCount; i++){
|
|
27525
27676
|
_this.uniforms["uSampler" + i] = new THREE.Uniform(null);
|
|
27526
27677
|
}
|
|
@@ -28701,6 +28852,8 @@ var ThreeRenderer = /*#__PURE__*/ function(Renderer) {
|
|
|
28701
28852
|
var _this;
|
|
28702
28853
|
_this = Renderer.call(this) || this;
|
|
28703
28854
|
_this.engine = new ThreeEngine(gl);
|
|
28855
|
+
_this.engine.renderer = _assert_this_initialized(_this);
|
|
28856
|
+
_this.env = "";
|
|
28704
28857
|
_this.renderingData = {
|
|
28705
28858
|
//@ts-expect-error
|
|
28706
28859
|
currentFrame: {}
|
|
@@ -28728,8 +28881,8 @@ var ThreeRenderer = /*#__PURE__*/ function(Renderer) {
|
|
|
28728
28881
|
var _this;
|
|
28729
28882
|
_this = _THREE_Group.call(this) || this;
|
|
28730
28883
|
_this.compositions = [];
|
|
28731
|
-
_this.baseCompositionIndex = 0;
|
|
28732
28884
|
_this.env = "";
|
|
28885
|
+
_this.baseCompositionIndex = 0;
|
|
28733
28886
|
var width = options.width, height = options.height, camera = options.camera;
|
|
28734
28887
|
_this.renderer = new ThreeRenderer(context);
|
|
28735
28888
|
_this.width = width;
|
|
@@ -28798,6 +28951,19 @@ var ThreeRenderer = /*#__PURE__*/ function(Renderer) {
|
|
|
28798
28951
|
});
|
|
28799
28952
|
})();
|
|
28800
28953
|
};
|
|
28954
|
+
_proto.pause = function pause() {
|
|
28955
|
+
this.dispatchEvent({
|
|
28956
|
+
type: "pause"
|
|
28957
|
+
});
|
|
28958
|
+
this.compositions.forEach(function(composition) {
|
|
28959
|
+
composition.pause();
|
|
28960
|
+
});
|
|
28961
|
+
};
|
|
28962
|
+
_proto.resume = function resume() {
|
|
28963
|
+
this.compositions.forEach(function(composition) {
|
|
28964
|
+
composition.resume();
|
|
28965
|
+
});
|
|
28966
|
+
};
|
|
28801
28967
|
_proto.createComposition = function createComposition(url, options) {
|
|
28802
28968
|
if (options === void 0) options = {};
|
|
28803
28969
|
var _this = this;
|
|
@@ -28854,8 +29020,20 @@ var ThreeRenderer = /*#__PURE__*/ function(Renderer) {
|
|
|
28854
29020
|
composition = new ThreeComposition(_extends({}, opts, {
|
|
28855
29021
|
width: _this.width,
|
|
28856
29022
|
height: _this.height,
|
|
28857
|
-
renderer: _this.renderer
|
|
29023
|
+
renderer: _this.renderer,
|
|
29024
|
+
handleItemMessage: function(message) {
|
|
29025
|
+
_this.dispatchEvent({
|
|
29026
|
+
type: "message",
|
|
29027
|
+
message: message
|
|
29028
|
+
});
|
|
29029
|
+
}
|
|
28858
29030
|
}), scene);
|
|
29031
|
+
composition.on("end", function() {
|
|
29032
|
+
_this.dispatchEvent({
|
|
29033
|
+
type: "end",
|
|
29034
|
+
composition: composition
|
|
29035
|
+
});
|
|
29036
|
+
});
|
|
28859
29037
|
_this.renderer.engine.setOptions({
|
|
28860
29038
|
threeCamera: _this.camera,
|
|
28861
29039
|
threeGroup: _this,
|
|
@@ -29080,8 +29258,8 @@ setMaxSpriteMeshItemCount(8);
|
|
|
29080
29258
|
*/ Mesh.create = function(engine, props) {
|
|
29081
29259
|
return new ThreeMesh(engine, props);
|
|
29082
29260
|
};
|
|
29083
|
-
var version = "2.0.0-alpha.
|
|
29261
|
+
var version = "2.0.0-alpha.32";
|
|
29084
29262
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
29085
29263
|
|
|
29086
|
-
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, CONSTANT_MAP_BLEND, CONSTANT_MAP_DEPTH, CONSTANT_MAP_STENCIL_FUNC, CONSTANT_MAP_STENCIL_OP, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, Component, Composition, CompositionComponent, CompositionSourceManager, DEFAULT_FONTS, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Engine, EventSystem, FilterMode, Float16ArrayWrapper, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, ItemBehaviour, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, PostProcessVolume, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTextureFormat, Renderbuffer, Renderer, RendererComponent, RuntimeClip, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0, SEMANTIC_PRE_COLOR_ATTACHMENT_0, SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0, SPRITE_VERTEX_STRIDE, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderType, ShaderVariant, SpriteColorPlayable, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMacros, createShape, createValueGetter, decimalEqual, defaultGlobalVolume, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTemplateCanvasPool, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrameFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, pointOnLine, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
|
|
29264
|
+
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, AssetLoader, AssetManager, BYTES_TYPE_MAP, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, CONSTANT_MAP_BLEND, CONSTANT_MAP_DEPTH, CONSTANT_MAP_STENCIL_FUNC, CONSTANT_MAP_STENCIL_OP, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, Component, Composition, CompositionComponent, CompositionSourceManager, DEFAULT_FONTS, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Engine, 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, TEXTURE_UNIFORM_MAP, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, createCopyShader, createGLContext, createKeyFrameMeta, createShaderWithMacros, createShape, createValueGetter, decimalEqual, defaultGlobalVolume, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTemplateCanvasPool, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isSceneJSON, isSceneURL, isSceneWithOptions, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrameFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, pointOnLine, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version, vertexFormatType2GLType };
|
|
29087
29265
|
//# sourceMappingURL=index.mjs.map
|