@galacean/effects-threejs 2.1.0-alpha.7 → 2.1.0-alpha.8
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 +579 -321
- 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 +577 -321
- package/dist/index.mjs.map +1 -1
- package/dist/three-composition.d.ts +0 -4
- package/dist/three-texture.d.ts +0 -5
- 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.1.0-alpha.
|
|
6
|
+
* Version: v2.1.0-alpha.8
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -954,7 +954,6 @@ var PluginSystem = /*#__PURE__*/ function() {
|
|
|
954
954
|
var pluginInfoMap = {
|
|
955
955
|
"alipay-downgrade": "@galacean/effects-plugin-alipay-downgrade",
|
|
956
956
|
"editor-gizmo": "@galacean/effects-plugin-editor-gizmo",
|
|
957
|
-
"tree": "@galacean/effects-plugin-model",
|
|
958
957
|
"model": "@galacean/effects-plugin-model",
|
|
959
958
|
"orientation-transformer": "@galacean/effects-plugin-orientation-transformer",
|
|
960
959
|
"spine": "@galacean/effects-plugin-spine"
|
|
@@ -1386,6 +1385,12 @@ var CameraClipMode;
|
|
|
1386
1385
|
/**
|
|
1387
1386
|
* 贝塞尔曲线四元数
|
|
1388
1387
|
*/ ValueType[ValueType["BEZIER_CURVE_QUAT"] = 23] = "BEZIER_CURVE_QUAT";
|
|
1388
|
+
/**
|
|
1389
|
+
* 颜色曲线
|
|
1390
|
+
*/ ValueType[ValueType["COLOR_CURVE"] = 24] = "COLOR_CURVE";
|
|
1391
|
+
/**
|
|
1392
|
+
* Vector4 曲线
|
|
1393
|
+
*/ ValueType[ValueType["VECTOR4_CURVE"] = 25] = "VECTOR4_CURVE";
|
|
1389
1394
|
})(ValueType || (ValueType = {}));
|
|
1390
1395
|
/**
|
|
1391
1396
|
* 关键帧类型
|
|
@@ -1622,10 +1627,15 @@ var DataType;
|
|
|
1622
1627
|
DataType["SpriteColorTrack"] = "SpriteColorTrack";
|
|
1623
1628
|
DataType["ActivationTrack"] = "ActivationTrack";
|
|
1624
1629
|
DataType["SubCompositionTrack"] = "SubCompositionTrack";
|
|
1630
|
+
DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
|
|
1631
|
+
DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
|
|
1632
|
+
DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
|
|
1625
1633
|
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
1626
1634
|
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
1627
1635
|
DataType["ActivationPlayableAsset"] = "ActivationPlayableAsset";
|
|
1628
1636
|
DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
|
|
1637
|
+
DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
|
|
1638
|
+
DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
|
|
1629
1639
|
// FIXME: 先完成ECS的场景转换,后面移到spec中
|
|
1630
1640
|
DataType["MeshComponent"] = "MeshComponent";
|
|
1631
1641
|
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
@@ -5245,9 +5255,8 @@ var PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
5245
5255
|
function PostProcessVolume() {
|
|
5246
5256
|
var _this;
|
|
5247
5257
|
_this = Behaviour.apply(this, arguments) || this;
|
|
5248
|
-
_this.useHDR = true;
|
|
5249
5258
|
// Bloom
|
|
5250
|
-
_this.
|
|
5259
|
+
_this.bloomEnabled = true;
|
|
5251
5260
|
_this.threshold = 1.0;
|
|
5252
5261
|
_this.bloomIntensity = 1.0;
|
|
5253
5262
|
// ColorAdjustments
|
|
@@ -5259,7 +5268,7 @@ var PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
5259
5268
|
_this.vignetteSmoothness = 0.4;
|
|
5260
5269
|
_this.vignetteRoundness = 1.0;
|
|
5261
5270
|
// ToneMapping
|
|
5262
|
-
_this.
|
|
5271
|
+
_this.toneMappingEnabled = true // 1: true, 0: false
|
|
5263
5272
|
;
|
|
5264
5273
|
return _this;
|
|
5265
5274
|
}
|
|
@@ -5267,18 +5276,14 @@ var PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
5267
5276
|
_proto.onStart = function onStart() {
|
|
5268
5277
|
var composition = this.item.composition;
|
|
5269
5278
|
if (composition) {
|
|
5270
|
-
composition.globalVolume = this;
|
|
5271
|
-
composition.createRenderFrame();
|
|
5279
|
+
composition.renderFrame.globalVolume = this;
|
|
5272
5280
|
}
|
|
5273
5281
|
};
|
|
5274
5282
|
return PostProcessVolume;
|
|
5275
5283
|
}(Behaviour);
|
|
5276
5284
|
__decorate([
|
|
5277
5285
|
serialize()
|
|
5278
|
-
], PostProcessVolume.prototype, "
|
|
5279
|
-
__decorate([
|
|
5280
|
-
serialize()
|
|
5281
|
-
], PostProcessVolume.prototype, "useBloom", void 0);
|
|
5286
|
+
], PostProcessVolume.prototype, "bloomEnabled", void 0);
|
|
5282
5287
|
__decorate([
|
|
5283
5288
|
serialize()
|
|
5284
5289
|
], PostProcessVolume.prototype, "threshold", void 0);
|
|
@@ -5305,7 +5310,7 @@ __decorate([
|
|
|
5305
5310
|
], PostProcessVolume.prototype, "vignetteRoundness", void 0);
|
|
5306
5311
|
__decorate([
|
|
5307
5312
|
serialize()
|
|
5308
|
-
], PostProcessVolume.prototype, "
|
|
5313
|
+
], PostProcessVolume.prototype, "toneMappingEnabled", void 0);
|
|
5309
5314
|
PostProcessVolume = __decorate([
|
|
5310
5315
|
effectsClass("PostProcessVolume")
|
|
5311
5316
|
], PostProcessVolume);
|
|
@@ -10342,13 +10347,15 @@ var BloomThresholdPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10342
10347
|
renderer.setFramebuffer(this.framebuffer);
|
|
10343
10348
|
};
|
|
10344
10349
|
_proto.execute = function execute(renderer) {
|
|
10350
|
+
var _renderer_renderingData_currentFrame_globalVolume;
|
|
10345
10351
|
renderer.clear({
|
|
10346
10352
|
colorAction: TextureStoreAction.clear,
|
|
10347
10353
|
depthAction: TextureStoreAction.clear,
|
|
10348
10354
|
stencilAction: TextureStoreAction.clear
|
|
10349
10355
|
});
|
|
10350
10356
|
this.screenMesh.material.setTexture("_MainTex", this.mainTexture);
|
|
10351
|
-
var
|
|
10357
|
+
var _renderer_renderingData_currentFrame_globalVolume_threshold;
|
|
10358
|
+
var threshold = (_renderer_renderingData_currentFrame_globalVolume_threshold = (_renderer_renderingData_currentFrame_globalVolume = renderer.renderingData.currentFrame.globalVolume) == null ? void 0 : _renderer_renderingData_currentFrame_globalVolume.threshold) != null ? _renderer_renderingData_currentFrame_globalVolume_threshold : 1.0;
|
|
10352
10359
|
this.screenMesh.material.setFloat("_Threshold", threshold);
|
|
10353
10360
|
renderer.renderMeshes([
|
|
10354
10361
|
this.screenMesh
|
|
@@ -10561,13 +10568,14 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10561
10568
|
depthAction: TextureStoreAction.clear,
|
|
10562
10569
|
stencilAction: TextureStoreAction.clear
|
|
10563
10570
|
});
|
|
10564
|
-
var _renderer_renderingData_currentFrame_globalVolume
|
|
10571
|
+
var _renderer_renderingData_currentFrame_globalVolume;
|
|
10572
|
+
var _ref = (_renderer_renderingData_currentFrame_globalVolume = renderer.renderingData.currentFrame.globalVolume) != null ? _renderer_renderingData_currentFrame_globalVolume : {}, _ref_bloomEnabled = _ref.bloomEnabled, bloomEnabled = _ref_bloomEnabled === void 0 ? false : _ref_bloomEnabled, _ref_bloomIntensity = _ref.bloomIntensity, bloomIntensity = _ref_bloomIntensity === void 0 ? 1.0 : _ref_bloomIntensity, _ref_brightness = _ref.brightness, brightness = _ref_brightness === void 0 ? 1.0 : _ref_brightness, _ref_saturation = _ref.saturation, saturation = _ref_saturation === void 0 ? 1.0 : _ref_saturation, _ref_contrast = _ref.contrast, contrast = _ref_contrast === void 0 ? 1.0 : _ref_contrast, _ref_toneMappingEnabled = _ref.toneMappingEnabled, toneMappingEnabled = _ref_toneMappingEnabled === void 0 ? true : _ref_toneMappingEnabled, _ref_vignetteIntensity = _ref.vignetteIntensity, vignetteIntensity = _ref_vignetteIntensity === void 0 ? 0.2 : _ref_vignetteIntensity, _ref_vignetteSmoothness = _ref.vignetteSmoothness, vignetteSmoothness = _ref_vignetteSmoothness === void 0 ? 0.4 : _ref_vignetteSmoothness, _ref_vignetteRoundness = _ref.vignetteRoundness, vignetteRoundness = _ref_vignetteRoundness === void 0 ? 1.0 : _ref_vignetteRoundness;
|
|
10565
10573
|
this.screenMesh.material.setTexture("_SceneTex", this.sceneTextureHandle.texture);
|
|
10566
10574
|
this.screenMesh.material.setFloat("_Brightness", brightness);
|
|
10567
10575
|
this.screenMesh.material.setFloat("_Saturation", saturation);
|
|
10568
10576
|
this.screenMesh.material.setFloat("_Contrast", contrast);
|
|
10569
|
-
this.screenMesh.material.setInt("_UseBloom", Number(
|
|
10570
|
-
if (
|
|
10577
|
+
this.screenMesh.material.setInt("_UseBloom", Number(bloomEnabled));
|
|
10578
|
+
if (bloomEnabled) {
|
|
10571
10579
|
this.screenMesh.material.setTexture("_GaussianTex", this.mainTexture);
|
|
10572
10580
|
this.screenMesh.material.setFloat("_BloomIntensity", bloomIntensity);
|
|
10573
10581
|
}
|
|
@@ -10578,7 +10586,7 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10578
10586
|
this.screenMesh.material.setVector2("_VignetteCenter", new Vector2(0.5, 0.5));
|
|
10579
10587
|
this.screenMesh.material.setVector3("_VignetteColor", new Vector3(0.0, 0.0, 0.0));
|
|
10580
10588
|
}
|
|
10581
|
-
this.screenMesh.material.setInt("_UseToneMapping", Number(
|
|
10589
|
+
this.screenMesh.material.setInt("_UseToneMapping", Number(toneMappingEnabled));
|
|
10582
10590
|
renderer.renderMeshes([
|
|
10583
10591
|
this.screenMesh
|
|
10584
10592
|
]);
|
|
@@ -10602,7 +10610,7 @@ var seed$6 = 1;
|
|
|
10602
10610
|
1,
|
|
10603
10611
|
0,
|
|
10604
10612
|
0
|
|
10605
|
-
] : _options_editorTransform, globalVolume = options.globalVolume, _options_clearAction = options.clearAction, clearAction = _options_clearAction === void 0 ? {
|
|
10613
|
+
] : _options_editorTransform, globalVolume = options.globalVolume, _options_postProcessingEnabled = options.postProcessingEnabled, postProcessingEnabled = _options_postProcessingEnabled === void 0 ? false : _options_postProcessingEnabled, _options_clearAction = options.clearAction, clearAction = _options_clearAction === void 0 ? {
|
|
10606
10614
|
colorAction: TextureLoadAction.whatever,
|
|
10607
10615
|
stencilAction: TextureLoadAction.clear,
|
|
10608
10616
|
depthAction: TextureLoadAction.whatever
|
|
@@ -10616,10 +10624,10 @@ var seed$6 = 1;
|
|
|
10616
10624
|
var depthStencilAttachment;
|
|
10617
10625
|
var drawObjectPassClearAction = {};
|
|
10618
10626
|
this.renderer = renderer;
|
|
10619
|
-
if (
|
|
10620
|
-
var
|
|
10627
|
+
if (postProcessingEnabled) {
|
|
10628
|
+
var enableHDR = true;
|
|
10621
10629
|
// 使用HDR浮点纹理,FLOAT在IOS上报错,使用HALF_FLOAT
|
|
10622
|
-
var textureType =
|
|
10630
|
+
var textureType = enableHDR ? glContext.HALF_FLOAT : glContext.UNSIGNED_BYTE;
|
|
10623
10631
|
attachments = [
|
|
10624
10632
|
{
|
|
10625
10633
|
texture: {
|
|
@@ -10651,7 +10659,7 @@ var seed$6 = 1;
|
|
|
10651
10659
|
})
|
|
10652
10660
|
];
|
|
10653
10661
|
this.setRenderPasses(renderPasses);
|
|
10654
|
-
if (
|
|
10662
|
+
if (postProcessingEnabled) {
|
|
10655
10663
|
var sceneTextureHandle = new RenderTargetHandle(engine); //保存后处理前的屏幕图像
|
|
10656
10664
|
var gaussianStep = 7; // 高斯模糊的迭代次数,次数越高模糊范围越大
|
|
10657
10665
|
var viewport = [
|
|
@@ -10661,7 +10669,8 @@ var seed$6 = 1;
|
|
|
10661
10669
|
this.renderer.getHeight() / 2
|
|
10662
10670
|
];
|
|
10663
10671
|
var gaussianDownResults = new Array(gaussianStep); //存放多个高斯Pass的模糊结果,用于Bloom
|
|
10664
|
-
var
|
|
10672
|
+
var enableHDR1 = true;
|
|
10673
|
+
var textureType1 = enableHDR1 ? glContext.HALF_FLOAT : glContext.UNSIGNED_BYTE;
|
|
10665
10674
|
var bloomThresholdPass = new BloomThresholdPass(renderer, {
|
|
10666
10675
|
name: "BloomThresholdPass",
|
|
10667
10676
|
attachments: [
|
|
@@ -11657,28 +11666,6 @@ var Renderer = /*#__PURE__*/ function() {
|
|
|
11657
11666
|
return Renderer;
|
|
11658
11667
|
}();
|
|
11659
11668
|
|
|
11660
|
-
/**
|
|
11661
|
-
* 后处理配置
|
|
11662
|
-
*/ var defaultGlobalVolume = {
|
|
11663
|
-
useHDR: false,
|
|
11664
|
-
/***** Material Uniform *****/ // Bloom
|
|
11665
|
-
useBloom: true,
|
|
11666
|
-
threshold: 1.0,
|
|
11667
|
-
bloomIntensity: 1.0,
|
|
11668
|
-
// ColorAdjustments
|
|
11669
|
-
brightness: 1.0,
|
|
11670
|
-
saturation: 1.0,
|
|
11671
|
-
contrast: 1.0,
|
|
11672
|
-
// Vignette
|
|
11673
|
-
// vignetteColor: new math.Color(0, 0, 0, 1),
|
|
11674
|
-
// vignetteCenter: new math.Vector2(0.5, 0.5),
|
|
11675
|
-
vignetteIntensity: 0.2,
|
|
11676
|
-
vignetteSmoothness: 0.4,
|
|
11677
|
-
vignetteRoundness: 1.0,
|
|
11678
|
-
// ToneMapping
|
|
11679
|
-
useToneMapping: true
|
|
11680
|
-
};
|
|
11681
|
-
|
|
11682
11669
|
var toHalf = function() {
|
|
11683
11670
|
var floatView = new Float32Array(1);
|
|
11684
11671
|
var int32View = new Int32Array(floatView.buffer);
|
|
@@ -11917,35 +11904,6 @@ function numberToFix(a, fixed) {
|
|
|
11917
11904
|
return Math.floor(a * base) / base;
|
|
11918
11905
|
}
|
|
11919
11906
|
|
|
11920
|
-
function _is_native_reflect_construct() {
|
|
11921
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
11922
|
-
if (Reflect.construct.sham) return false;
|
|
11923
|
-
if (typeof Proxy === "function") return true;
|
|
11924
|
-
try {
|
|
11925
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
11926
|
-
return true;
|
|
11927
|
-
} catch (e) {
|
|
11928
|
-
return false;
|
|
11929
|
-
}
|
|
11930
|
-
}
|
|
11931
|
-
|
|
11932
|
-
function _construct(Parent, args, Class) {
|
|
11933
|
-
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
11934
|
-
else {
|
|
11935
|
-
_construct = function construct(Parent, args, Class) {
|
|
11936
|
-
var a = [
|
|
11937
|
-
null
|
|
11938
|
-
];
|
|
11939
|
-
a.push.apply(a, args);
|
|
11940
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
11941
|
-
var instance = new Constructor();
|
|
11942
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
11943
|
-
return instance;
|
|
11944
|
-
};
|
|
11945
|
-
}
|
|
11946
|
-
return _construct.apply(null, arguments);
|
|
11947
|
-
}
|
|
11948
|
-
|
|
11949
11907
|
var keyframeInfo = {
|
|
11950
11908
|
/**
|
|
11951
11909
|
* 根据不同关键帧类型,获取位于曲线上的点
|
|
@@ -12489,17 +12447,6 @@ var QuaternionInner = /*#__PURE__*/ function() {
|
|
|
12489
12447
|
return QuaternionInner;
|
|
12490
12448
|
}();
|
|
12491
12449
|
|
|
12492
|
-
var SPRITE_VERTEX_STRIDE = 6;
|
|
12493
|
-
var SEMANTIC_PRE_COLOR_ATTACHMENT_0 = "PRE_COLOR_0";
|
|
12494
|
-
var SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_COLOR_SIZE_0";
|
|
12495
|
-
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0 = "PRE_MAIN_COLOR_0";
|
|
12496
|
-
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_MAIN_COLOR_SIZE_0";
|
|
12497
|
-
var PLAYER_OPTIONS_ENV_EDITOR = "editor";
|
|
12498
|
-
var HELP_LINK = {
|
|
12499
|
-
"Item duration can't be less than 0": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#AOnQS",
|
|
12500
|
-
"ValueType: 21/22 is not supported": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#smO1b"
|
|
12501
|
-
};
|
|
12502
|
-
|
|
12503
12450
|
var CURVE_PRO_TIME = 0;
|
|
12504
12451
|
var CURVE_PRO_VALUE = 1;
|
|
12505
12452
|
var CURVE_PRO_IN_TANGENT = 2;
|
|
@@ -13190,67 +13137,6 @@ var BezierCurveQuat = /*#__PURE__*/ function(ValueGetter) {
|
|
|
13190
13137
|
};
|
|
13191
13138
|
return BezierCurveQuat;
|
|
13192
13139
|
}(ValueGetter);
|
|
13193
|
-
var _obj$4;
|
|
13194
|
-
var map$1 = (_obj$4 = {}, _obj$4[ValueType.RANDOM] = function(props) {
|
|
13195
|
-
if (_instanceof1(props[0], Array)) {
|
|
13196
|
-
return new RandomVectorValue(props);
|
|
13197
|
-
}
|
|
13198
|
-
return new RandomValue(props);
|
|
13199
|
-
}, _obj$4[ValueType.CONSTANT] = function(props) {
|
|
13200
|
-
return new StaticValue(props);
|
|
13201
|
-
}, _obj$4[ValueType.CONSTANT_VEC2] = function(props) {
|
|
13202
|
-
return new StaticValue(props);
|
|
13203
|
-
}, _obj$4[ValueType.CONSTANT_VEC3] = function(props) {
|
|
13204
|
-
return new StaticValue(props);
|
|
13205
|
-
}, _obj$4[ValueType.CONSTANT_VEC4] = function(props) {
|
|
13206
|
-
return new StaticValue(props);
|
|
13207
|
-
}, _obj$4[ValueType.RGBA_COLOR] = function(props) {
|
|
13208
|
-
return new StaticValue(props);
|
|
13209
|
-
}, _obj$4[ValueType.COLORS] = function(props) {
|
|
13210
|
-
return new RandomSetValue(props.map(function(c) {
|
|
13211
|
-
return colorToArr$1(c, false);
|
|
13212
|
-
}));
|
|
13213
|
-
}, _obj$4[ValueType.LINE] = function(props) {
|
|
13214
|
-
if (props.length === 2 && props[0][0] === 0 && props[1][0] === 1) {
|
|
13215
|
-
return new LinearValue([
|
|
13216
|
-
props[0][1],
|
|
13217
|
-
props[1][1]
|
|
13218
|
-
]);
|
|
13219
|
-
}
|
|
13220
|
-
return new LineSegments(props);
|
|
13221
|
-
}, _obj$4[ValueType.GRADIENT_COLOR] = function(props) {
|
|
13222
|
-
return new GradientValue(props);
|
|
13223
|
-
}, _obj$4[ValueType.LINEAR_PATH] = function(pros) {
|
|
13224
|
-
return new PathSegments(pros);
|
|
13225
|
-
}, _obj$4[ValueType.BEZIER_CURVE] = function(props) {
|
|
13226
|
-
if (props.length === 1) {
|
|
13227
|
-
return new StaticValue(props[0][1][1]);
|
|
13228
|
-
}
|
|
13229
|
-
return new BezierCurve(props);
|
|
13230
|
-
}, _obj$4[ValueType.BEZIER_CURVE_PATH] = function(props) {
|
|
13231
|
-
if (props[0].length === 1) {
|
|
13232
|
-
return new StaticValue(_construct(Vector3, [].concat(props[1][0])));
|
|
13233
|
-
}
|
|
13234
|
-
return new BezierCurvePath(props);
|
|
13235
|
-
}, _obj$4[ValueType.BEZIER_CURVE_QUAT] = function(props) {
|
|
13236
|
-
if (props[0].length === 1) {
|
|
13237
|
-
return new StaticValue(_construct(Quaternion, [].concat(props[1][0])));
|
|
13238
|
-
}
|
|
13239
|
-
return new BezierCurveQuat(props);
|
|
13240
|
-
}, _obj$4);
|
|
13241
|
-
function createValueGetter(args) {
|
|
13242
|
-
if (!args || !isNaN(+args)) {
|
|
13243
|
-
return new StaticValue(args || 0);
|
|
13244
|
-
}
|
|
13245
|
-
if (_instanceof1(args, ValueGetter)) {
|
|
13246
|
-
return args;
|
|
13247
|
-
}
|
|
13248
|
-
if (isFunction(map$1[args[0]])) {
|
|
13249
|
-
return map$1[args[0]](args[1]);
|
|
13250
|
-
} else {
|
|
13251
|
-
throw new Error("ValueType: " + args[0] + " is not supported, see " + HELP_LINK["ValueType: 21/22 is not supported"] + ".");
|
|
13252
|
-
}
|
|
13253
|
-
}
|
|
13254
13140
|
function lineSegIntegrate(t, t0, t1, y0, y1) {
|
|
13255
13141
|
var h = t - t0;
|
|
13256
13142
|
return (y0 + y0 + (y1 - y0) * h / (t1 - t0)) * h / 2;
|
|
@@ -13327,6 +13213,164 @@ function createKeyFrameMeta() {
|
|
|
13327
13213
|
};
|
|
13328
13214
|
}
|
|
13329
13215
|
|
|
13216
|
+
function _is_native_reflect_construct() {
|
|
13217
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
13218
|
+
if (Reflect.construct.sham) return false;
|
|
13219
|
+
if (typeof Proxy === "function") return true;
|
|
13220
|
+
try {
|
|
13221
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
13222
|
+
return true;
|
|
13223
|
+
} catch (e) {
|
|
13224
|
+
return false;
|
|
13225
|
+
}
|
|
13226
|
+
}
|
|
13227
|
+
|
|
13228
|
+
function _construct(Parent, args, Class) {
|
|
13229
|
+
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
13230
|
+
else {
|
|
13231
|
+
_construct = function construct(Parent, args, Class) {
|
|
13232
|
+
var a = [
|
|
13233
|
+
null
|
|
13234
|
+
];
|
|
13235
|
+
a.push.apply(a, args);
|
|
13236
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
13237
|
+
var instance = new Constructor();
|
|
13238
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
13239
|
+
return instance;
|
|
13240
|
+
};
|
|
13241
|
+
}
|
|
13242
|
+
return _construct.apply(null, arguments);
|
|
13243
|
+
}
|
|
13244
|
+
|
|
13245
|
+
var Vector4Curve = /*#__PURE__*/ function(ValueGetter) {
|
|
13246
|
+
_inherits(Vector4Curve, ValueGetter);
|
|
13247
|
+
function Vector4Curve() {
|
|
13248
|
+
var _this;
|
|
13249
|
+
_this = ValueGetter.apply(this, arguments) || this;
|
|
13250
|
+
_this.value = new Vector4();
|
|
13251
|
+
return _this;
|
|
13252
|
+
}
|
|
13253
|
+
var _proto = Vector4Curve.prototype;
|
|
13254
|
+
_proto.onCreate = function onCreate(arg) {
|
|
13255
|
+
this.xCurve = createValueGetter(arg.x);
|
|
13256
|
+
this.yCurve = createValueGetter(arg.y);
|
|
13257
|
+
this.zCurve = createValueGetter(arg.z);
|
|
13258
|
+
this.wCurve = createValueGetter(arg.w);
|
|
13259
|
+
};
|
|
13260
|
+
_proto.getValue = function getValue(t) {
|
|
13261
|
+
var x = this.xCurve.getValue(t);
|
|
13262
|
+
var y = this.yCurve.getValue(t);
|
|
13263
|
+
var z = this.zCurve.getValue(t);
|
|
13264
|
+
var w = this.wCurve.getValue(t);
|
|
13265
|
+
this.value.set(x, y, z, w);
|
|
13266
|
+
return this.value;
|
|
13267
|
+
};
|
|
13268
|
+
return Vector4Curve;
|
|
13269
|
+
}(ValueGetter);
|
|
13270
|
+
|
|
13271
|
+
var SPRITE_VERTEX_STRIDE = 6;
|
|
13272
|
+
var SEMANTIC_PRE_COLOR_ATTACHMENT_0 = "PRE_COLOR_0";
|
|
13273
|
+
var SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_COLOR_SIZE_0";
|
|
13274
|
+
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0 = "PRE_MAIN_COLOR_0";
|
|
13275
|
+
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_MAIN_COLOR_SIZE_0";
|
|
13276
|
+
var PLAYER_OPTIONS_ENV_EDITOR = "editor";
|
|
13277
|
+
var HELP_LINK = {
|
|
13278
|
+
"Item duration can't be less than 0": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#AOnQS",
|
|
13279
|
+
"ValueType: 21/22 is not supported": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#smO1b"
|
|
13280
|
+
};
|
|
13281
|
+
|
|
13282
|
+
var _obj$4;
|
|
13283
|
+
var map$1 = (_obj$4 = {}, _obj$4[ValueType.RANDOM] = function(props) {
|
|
13284
|
+
if (_instanceof1(props[0], Array)) {
|
|
13285
|
+
return new RandomVectorValue(props);
|
|
13286
|
+
}
|
|
13287
|
+
return new RandomValue(props);
|
|
13288
|
+
}, _obj$4[ValueType.CONSTANT] = function(props) {
|
|
13289
|
+
return new StaticValue(props);
|
|
13290
|
+
}, _obj$4[ValueType.CONSTANT_VEC2] = function(props) {
|
|
13291
|
+
return new StaticValue(props);
|
|
13292
|
+
}, _obj$4[ValueType.CONSTANT_VEC3] = function(props) {
|
|
13293
|
+
return new StaticValue(props);
|
|
13294
|
+
}, _obj$4[ValueType.CONSTANT_VEC4] = function(props) {
|
|
13295
|
+
return new StaticValue(props);
|
|
13296
|
+
}, _obj$4[ValueType.RGBA_COLOR] = function(props) {
|
|
13297
|
+
return new StaticValue(props);
|
|
13298
|
+
}, _obj$4[ValueType.COLORS] = function(props) {
|
|
13299
|
+
return new RandomSetValue(props.map(function(c) {
|
|
13300
|
+
return colorToArr$1(c, false);
|
|
13301
|
+
}));
|
|
13302
|
+
}, _obj$4[ValueType.LINE] = function(props) {
|
|
13303
|
+
if (props.length === 2 && props[0][0] === 0 && props[1][0] === 1) {
|
|
13304
|
+
return new LinearValue([
|
|
13305
|
+
props[0][1],
|
|
13306
|
+
props[1][1]
|
|
13307
|
+
]);
|
|
13308
|
+
}
|
|
13309
|
+
return new LineSegments(props);
|
|
13310
|
+
}, _obj$4[ValueType.GRADIENT_COLOR] = function(props) {
|
|
13311
|
+
return new GradientValue(props);
|
|
13312
|
+
}, _obj$4[ValueType.LINEAR_PATH] = function(pros) {
|
|
13313
|
+
return new PathSegments(pros);
|
|
13314
|
+
}, _obj$4[ValueType.BEZIER_CURVE] = function(props) {
|
|
13315
|
+
if (props.length === 1) {
|
|
13316
|
+
return new StaticValue(props[0][1][1]);
|
|
13317
|
+
}
|
|
13318
|
+
return new BezierCurve(props);
|
|
13319
|
+
}, _obj$4[ValueType.BEZIER_CURVE_PATH] = function(props) {
|
|
13320
|
+
if (props[0].length === 1) {
|
|
13321
|
+
return new StaticValue(_construct(Vector3, [].concat(props[1][0])));
|
|
13322
|
+
}
|
|
13323
|
+
return new BezierCurvePath(props);
|
|
13324
|
+
}, _obj$4[ValueType.BEZIER_CURVE_QUAT] = function(props) {
|
|
13325
|
+
if (props[0].length === 1) {
|
|
13326
|
+
return new StaticValue(_construct(Quaternion, [].concat(props[1][0])));
|
|
13327
|
+
}
|
|
13328
|
+
return new BezierCurveQuat(props);
|
|
13329
|
+
}, _obj$4[ValueType.COLOR_CURVE] = function(props) {
|
|
13330
|
+
return new ColorCurve(props);
|
|
13331
|
+
}, _obj$4[ValueType.VECTOR4_CURVE] = function(props) {
|
|
13332
|
+
return new Vector4Curve(props);
|
|
13333
|
+
}, _obj$4);
|
|
13334
|
+
function createValueGetter(args) {
|
|
13335
|
+
if (!args || !isNaN(+args)) {
|
|
13336
|
+
return new StaticValue(args || 0);
|
|
13337
|
+
}
|
|
13338
|
+
if (_instanceof1(args, ValueGetter)) {
|
|
13339
|
+
return args;
|
|
13340
|
+
}
|
|
13341
|
+
if (isFunction(map$1[args[0]])) {
|
|
13342
|
+
return map$1[args[0]](args[1]);
|
|
13343
|
+
} else {
|
|
13344
|
+
throw new Error("ValueType: " + args[0] + " is not supported, see " + HELP_LINK["ValueType: 21/22 is not supported"] + ".");
|
|
13345
|
+
}
|
|
13346
|
+
}
|
|
13347
|
+
|
|
13348
|
+
var ColorCurve = /*#__PURE__*/ function(ValueGetter) {
|
|
13349
|
+
_inherits(ColorCurve, ValueGetter);
|
|
13350
|
+
function ColorCurve() {
|
|
13351
|
+
var _this;
|
|
13352
|
+
_this = ValueGetter.apply(this, arguments) || this;
|
|
13353
|
+
_this.value = new Color();
|
|
13354
|
+
return _this;
|
|
13355
|
+
}
|
|
13356
|
+
var _proto = ColorCurve.prototype;
|
|
13357
|
+
_proto.onCreate = function onCreate(arg) {
|
|
13358
|
+
this.rCurve = createValueGetter(arg.r);
|
|
13359
|
+
this.gCurve = createValueGetter(arg.g);
|
|
13360
|
+
this.bCurve = createValueGetter(arg.b);
|
|
13361
|
+
this.aCurve = createValueGetter(arg.a);
|
|
13362
|
+
};
|
|
13363
|
+
_proto.getValue = function getValue(t) {
|
|
13364
|
+
var r = this.rCurve.getValue(t);
|
|
13365
|
+
var g = this.gCurve.getValue(t);
|
|
13366
|
+
var b = this.bCurve.getValue(t);
|
|
13367
|
+
var a = this.aCurve.getValue(t);
|
|
13368
|
+
this.value.set(r, g, b, a);
|
|
13369
|
+
return this.value;
|
|
13370
|
+
};
|
|
13371
|
+
return ColorCurve;
|
|
13372
|
+
}(ValueGetter);
|
|
13373
|
+
|
|
13330
13374
|
var BaseRenderComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
13331
13375
|
_inherits(BaseRenderComponent, RendererComponent);
|
|
13332
13376
|
function BaseRenderComponent(engine) {
|
|
@@ -15362,7 +15406,12 @@ var GraphicsPath = /*#__PURE__*/ function() {
|
|
|
15362
15406
|
this.dirty = true;
|
|
15363
15407
|
return this;
|
|
15364
15408
|
};
|
|
15365
|
-
|
|
15409
|
+
/**
|
|
15410
|
+
* Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.
|
|
15411
|
+
* @param x - The x-coordinate for the starting point.
|
|
15412
|
+
* @param y - The y-coordinate for the starting point.
|
|
15413
|
+
* @returns The instance of the current object for chaining.
|
|
15414
|
+
*/ _proto.moveTo = function moveTo(x, y) {
|
|
15366
15415
|
this.instructions.push({
|
|
15367
15416
|
action: "moveTo",
|
|
15368
15417
|
data: [
|
|
@@ -15373,7 +15422,16 @@ var GraphicsPath = /*#__PURE__*/ function() {
|
|
|
15373
15422
|
this.dirty = true;
|
|
15374
15423
|
return this;
|
|
15375
15424
|
};
|
|
15376
|
-
|
|
15425
|
+
/**
|
|
15426
|
+
* Draws an ellipse at the specified location and with the given x and y radii.
|
|
15427
|
+
* An optional transformation can be applied, allowing for rotation, scaling, and translation.
|
|
15428
|
+
* @param x - The x-coordinate of the center of the ellipse.
|
|
15429
|
+
* @param y - The y-coordinate of the center of the ellipse.
|
|
15430
|
+
* @param radiusX - The horizontal radius of the ellipse.
|
|
15431
|
+
* @param radiusY - The vertical radius of the ellipse.
|
|
15432
|
+
* @param transform - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.
|
|
15433
|
+
* @returns The instance of the current object for chaining.
|
|
15434
|
+
*/ _proto.ellipse = function ellipse(x, y, radiusX, radiusY, transform) {
|
|
15377
15435
|
this.instructions.push({
|
|
15378
15436
|
action: "ellipse",
|
|
15379
15437
|
data: [
|
|
@@ -15381,7 +15439,29 @@ var GraphicsPath = /*#__PURE__*/ function() {
|
|
|
15381
15439
|
y,
|
|
15382
15440
|
radiusX,
|
|
15383
15441
|
radiusY,
|
|
15384
|
-
|
|
15442
|
+
transform
|
|
15443
|
+
]
|
|
15444
|
+
});
|
|
15445
|
+
this.dirty = true;
|
|
15446
|
+
return this;
|
|
15447
|
+
};
|
|
15448
|
+
/**
|
|
15449
|
+
* Draws a rectangle shape. This method adds a new rectangle path to the current drawing.
|
|
15450
|
+
* @param x - The x-coordinate of the top-left corner of the rectangle.
|
|
15451
|
+
* @param y - The y-coordinate of the top-left corner of the rectangle.
|
|
15452
|
+
* @param w - The width of the rectangle.
|
|
15453
|
+
* @param h - The height of the rectangle.
|
|
15454
|
+
* @param transform - An optional `Matrix` object to apply a transformation to the rectangle.
|
|
15455
|
+
* @returns The instance of the current object for chaining.
|
|
15456
|
+
*/ _proto.rect = function rect(x, y, w, h, transform) {
|
|
15457
|
+
this.instructions.push({
|
|
15458
|
+
action: "rect",
|
|
15459
|
+
data: [
|
|
15460
|
+
x,
|
|
15461
|
+
y,
|
|
15462
|
+
w,
|
|
15463
|
+
h,
|
|
15464
|
+
transform
|
|
15385
15465
|
]
|
|
15386
15466
|
});
|
|
15387
15467
|
this.dirty = true;
|
|
@@ -15420,9 +15500,9 @@ var ShapeComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15420
15500
|
_this = RendererComponent.call(this, engine) || this;
|
|
15421
15501
|
_this.path = new GraphicsPath();
|
|
15422
15502
|
_this.curveValues = [];
|
|
15423
|
-
_this.
|
|
15424
|
-
_this.vert = "\nprecision highp float;\n\nattribute vec3 aPos;//x y\n\
|
|
15425
|
-
_this.frag = "\nprecision highp float;\n\
|
|
15503
|
+
_this.animated = false;
|
|
15504
|
+
_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";
|
|
15505
|
+
_this.frag = "\nprecision highp float;\n\nuniform vec4 _Color;\n\nvoid main() {\n vec4 color = _Color;\n gl_FragColor = color;\n}\n";
|
|
15426
15506
|
if (!_this.geometry) {
|
|
15427
15507
|
_this.geometry = Geometry.create(engine, {
|
|
15428
15508
|
attributes: {
|
|
@@ -15472,10 +15552,9 @@ var ShapeComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15472
15552
|
}
|
|
15473
15553
|
var _proto = ShapeComponent.prototype;
|
|
15474
15554
|
_proto.onUpdate = function onUpdate(dt) {
|
|
15475
|
-
if (this.
|
|
15555
|
+
if (this.animated) {
|
|
15476
15556
|
this.buildPath(this.data);
|
|
15477
15557
|
this.buildGeometryFromPath(this.path.shapePath);
|
|
15478
|
-
// this.dirty = false;
|
|
15479
15558
|
}
|
|
15480
15559
|
};
|
|
15481
15560
|
_proto.render = function render(renderer) {
|
|
@@ -15582,7 +15661,7 @@ var ShapeComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15582
15661
|
_proto.fromData = function fromData(data) {
|
|
15583
15662
|
RendererComponent.prototype.fromData.call(this, data);
|
|
15584
15663
|
this.data = data;
|
|
15585
|
-
this.
|
|
15664
|
+
this.animated = true;
|
|
15586
15665
|
};
|
|
15587
15666
|
return ShapeComponent;
|
|
15588
15667
|
}(RendererComponent);
|
|
@@ -15970,6 +16049,18 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15970
16049
|
1,
|
|
15971
16050
|
1
|
|
15972
16051
|
];
|
|
16052
|
+
/**
|
|
16053
|
+
* 拖拽X范围
|
|
16054
|
+
*/ _this.dragRange = {
|
|
16055
|
+
dxRange: [
|
|
16056
|
+
0,
|
|
16057
|
+
0
|
|
16058
|
+
],
|
|
16059
|
+
dyRange: [
|
|
16060
|
+
0,
|
|
16061
|
+
0
|
|
16062
|
+
]
|
|
16063
|
+
};
|
|
15973
16064
|
/** 是否响应点击和拖拽交互事件 */ _this._interactive = true;
|
|
15974
16065
|
_this.hasBeenAddedToComposition = false;
|
|
15975
16066
|
_this.getHitTestParams = function(force) {
|
|
@@ -15989,6 +16080,24 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15989
16080
|
return _this;
|
|
15990
16081
|
}
|
|
15991
16082
|
var _proto = InteractComponent.prototype;
|
|
16083
|
+
_proto.getDragRangeX = function getDragRangeX() {
|
|
16084
|
+
return this.dragRange.dxRange;
|
|
16085
|
+
};
|
|
16086
|
+
_proto.setDragRangeX = function setDragRangeX(min, max) {
|
|
16087
|
+
this.dragRange.dxRange = [
|
|
16088
|
+
min,
|
|
16089
|
+
max
|
|
16090
|
+
];
|
|
16091
|
+
};
|
|
16092
|
+
_proto.getDragRangeY = function getDragRangeY() {
|
|
16093
|
+
return this.dragRange.dyRange;
|
|
16094
|
+
};
|
|
16095
|
+
_proto.setDragRangeY = function setDragRangeY(min, max) {
|
|
16096
|
+
this.dragRange.dyRange = [
|
|
16097
|
+
min,
|
|
16098
|
+
max
|
|
16099
|
+
];
|
|
16100
|
+
};
|
|
15992
16101
|
_proto.onStart = function onStart() {
|
|
15993
16102
|
var _this = this;
|
|
15994
16103
|
var options = this.item.props.content.options;
|
|
@@ -16032,6 +16141,10 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16032
16141
|
}
|
|
16033
16142
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16034
16143
|
if (!this.hasBeenAddedToComposition && this.item.composition) {
|
|
16144
|
+
var type = this.interactData.options.type;
|
|
16145
|
+
if (type === InteractType.CLICK) {
|
|
16146
|
+
this.clickable = true;
|
|
16147
|
+
}
|
|
16035
16148
|
var options = this.item.props.content.options;
|
|
16036
16149
|
this.item.composition.addInteractiveItem(this.item, options.type);
|
|
16037
16150
|
this.hasBeenAddedToComposition = true;
|
|
@@ -16063,7 +16176,6 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16063
16176
|
if (!(evt == null ? void 0 : evt.cameraParam) || !this.canInteract() || !this.item.composition) {
|
|
16064
16177
|
return;
|
|
16065
16178
|
}
|
|
16066
|
-
var options = this.item.props.content.options;
|
|
16067
16179
|
var _evt_cameraParam = evt.cameraParam, position = _evt_cameraParam.position, fov = _evt_cameraParam.fov;
|
|
16068
16180
|
var dy = event.dy;
|
|
16069
16181
|
var dx = event.dx * event.width / event.height;
|
|
@@ -16071,23 +16183,20 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16071
16183
|
var sp = Math.tan(fov * Math.PI / 180 / 2) * Math.abs(depth);
|
|
16072
16184
|
var height = dy * sp;
|
|
16073
16185
|
var width = dx * sp;
|
|
16186
|
+
var _this_dragRange = this.dragRange, dxRange = _this_dragRange.dxRange, dyRange = _this_dragRange.dyRange;
|
|
16074
16187
|
var nx = position[0] - this.dragRatio[0] * width;
|
|
16075
16188
|
var ny = position[1] - this.dragRatio[1] * height;
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
}
|
|
16084
|
-
if (
|
|
16085
|
-
var
|
|
16086
|
-
|
|
16087
|
-
if (ny !== min1 && ny !== max1 && min1 !== max1) {
|
|
16088
|
-
var _event_origin1;
|
|
16089
|
-
(_event_origin1 = event.origin) == null ? void 0 : _event_origin1.preventDefault();
|
|
16090
|
-
}
|
|
16189
|
+
var xMin = dxRange[0], xMax = dxRange[1];
|
|
16190
|
+
var yMin = dyRange[0], yMax = dyRange[1];
|
|
16191
|
+
nx = clamp$1(nx, xMin, xMax);
|
|
16192
|
+
ny = clamp$1(ny, yMin, yMax);
|
|
16193
|
+
if (nx !== xMin && nx !== xMax && xMin !== xMax) {
|
|
16194
|
+
var _event_origin;
|
|
16195
|
+
(_event_origin = event.origin) == null ? void 0 : _event_origin.preventDefault();
|
|
16196
|
+
}
|
|
16197
|
+
if (ny !== yMin && ny !== yMax && yMin !== yMax) {
|
|
16198
|
+
var _event_origin1;
|
|
16199
|
+
(_event_origin1 = event.origin) == null ? void 0 : _event_origin1.preventDefault();
|
|
16091
16200
|
}
|
|
16092
16201
|
this.item.composition.camera.position = new Vector3(nx, ny, depth);
|
|
16093
16202
|
};
|
|
@@ -16168,6 +16277,15 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16168
16277
|
_proto.fromData = function fromData(data) {
|
|
16169
16278
|
RendererComponent.prototype.fromData.call(this, data);
|
|
16170
16279
|
this.interactData = data;
|
|
16280
|
+
if (data.options.type === InteractType.DRAG) {
|
|
16281
|
+
var options = data.options;
|
|
16282
|
+
if (options.dxRange) {
|
|
16283
|
+
this.dragRange.dxRange = options.dxRange;
|
|
16284
|
+
}
|
|
16285
|
+
if (options.dyRange) {
|
|
16286
|
+
this.dragRange.dyRange = options.dyRange;
|
|
16287
|
+
}
|
|
16288
|
+
}
|
|
16171
16289
|
};
|
|
16172
16290
|
_proto.canInteract = function canInteract() {
|
|
16173
16291
|
var _this_item_composition;
|
|
@@ -16542,7 +16660,7 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
16542
16660
|
};
|
|
16543
16661
|
}
|
|
16544
16662
|
var _proto = PlayableOutput.prototype;
|
|
16545
|
-
_proto.
|
|
16663
|
+
_proto.setSourcePlayable = function setSourcePlayable(playable, port) {
|
|
16546
16664
|
if (port === void 0) port = 0;
|
|
16547
16665
|
this.sourcePlayable = playable;
|
|
16548
16666
|
this.sourceOutputPort = port;
|
|
@@ -17325,21 +17443,6 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
17325
17443
|
return tf;
|
|
17326
17444
|
};
|
|
17327
17445
|
/**
|
|
17328
|
-
* 获取元素内部节点的变换,目前只有场景树元素在使用
|
|
17329
|
-
* @param itemId 元素id信息,如果带^就返回内部节点变换,否则返回自己的变换
|
|
17330
|
-
* @returns 元素变换或内部节点变换
|
|
17331
|
-
*/ _proto.getNodeTransform = function getNodeTransform(itemId) {
|
|
17332
|
-
for(var i = 0; i < this.components.length; i++){
|
|
17333
|
-
var comp = this.components[1];
|
|
17334
|
-
// @ts-expect-error
|
|
17335
|
-
if (comp.getNodeTransform) {
|
|
17336
|
-
// @ts-expect-error
|
|
17337
|
-
return comp.getNodeTransform(itemId);
|
|
17338
|
-
}
|
|
17339
|
-
}
|
|
17340
|
-
return this.transform;
|
|
17341
|
-
};
|
|
17342
|
-
/**
|
|
17343
17446
|
* 设置元素在 3D 坐标轴上相对移动
|
|
17344
17447
|
*/ _proto.translate = function translate(x, y, z) {
|
|
17345
17448
|
this.transform.translate(x, y, z);
|
|
@@ -17818,7 +17921,7 @@ var SpriteColorPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
17818
17921
|
return SpriteColorPlayableAsset;
|
|
17819
17922
|
}(PlayableAsset);
|
|
17820
17923
|
SpriteColorPlayableAsset = __decorate([
|
|
17821
|
-
effectsClass(
|
|
17924
|
+
effectsClass(DataType.SpriteColorPlayableAsset)
|
|
17822
17925
|
], SpriteColorPlayableAsset);
|
|
17823
17926
|
var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
17824
17927
|
_inherits(SpriteComponent, BaseRenderComponent);
|
|
@@ -17837,6 +17940,7 @@ var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
17837
17940
|
}
|
|
17838
17941
|
var _proto = SpriteComponent.prototype;
|
|
17839
17942
|
_proto.onUpdate = function onUpdate(dt) {
|
|
17943
|
+
var _this = this;
|
|
17840
17944
|
if (!this.isManualTimeSet) {
|
|
17841
17945
|
this.frameAnimationTime += dt / 1000;
|
|
17842
17946
|
this.isManualTimeSet = false;
|
|
@@ -17902,6 +18006,16 @@ var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
17902
18006
|
dy
|
|
17903
18007
|
]);
|
|
17904
18008
|
}
|
|
18009
|
+
var video = this.renderer.texture.source.video;
|
|
18010
|
+
if (video) {
|
|
18011
|
+
if (time === 0 || time === this.item.duration) {
|
|
18012
|
+
video.pause();
|
|
18013
|
+
} else {
|
|
18014
|
+
video.play().catch(function(e) {
|
|
18015
|
+
_this.engine.renderErrors.add(e);
|
|
18016
|
+
});
|
|
18017
|
+
}
|
|
18018
|
+
}
|
|
17905
18019
|
};
|
|
17906
18020
|
_proto.onDestroy = function onDestroy() {
|
|
17907
18021
|
if (this.item && this.item.composition) {
|
|
@@ -22407,7 +22521,7 @@ var TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
22407
22521
|
var _proto = TrackAsset.prototype;
|
|
22408
22522
|
/**
|
|
22409
22523
|
* 重写该方法以获取自定义对象绑定
|
|
22410
|
-
*/ _proto.
|
|
22524
|
+
*/ _proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
22411
22525
|
if (this.parent) {
|
|
22412
22526
|
this.boundObject = this.parent.boundObject;
|
|
22413
22527
|
}
|
|
@@ -22538,6 +22652,8 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
22538
22652
|
this.playable.play();
|
|
22539
22653
|
}
|
|
22540
22654
|
this.parentMixer.setInputWeight(this.playable, weight);
|
|
22655
|
+
var clipTime = clip.toLocalTime(localTime);
|
|
22656
|
+
this.playable.setTime(clipTime);
|
|
22541
22657
|
// 判断动画是否结束
|
|
22542
22658
|
if (ended) {
|
|
22543
22659
|
if (_instanceof1(boundObject, VFXItem) && !boundObject.ended) {
|
|
@@ -22552,8 +22668,6 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
22552
22668
|
this.playable.pause();
|
|
22553
22669
|
}
|
|
22554
22670
|
}
|
|
22555
|
-
var clipTime = clip.toLocalTime(localTime);
|
|
22556
|
-
this.playable.setTime(clipTime);
|
|
22557
22671
|
};
|
|
22558
22672
|
_create_class(RuntimeClip, [
|
|
22559
22673
|
{
|
|
@@ -22632,16 +22746,16 @@ ActivationTrack = __decorate([
|
|
|
22632
22746
|
effectsClass(DataType.ActivationTrack)
|
|
22633
22747
|
], ActivationTrack);
|
|
22634
22748
|
|
|
22635
|
-
var
|
|
22636
|
-
_inherits(
|
|
22637
|
-
function
|
|
22749
|
+
var PropertyClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
22750
|
+
_inherits(PropertyClipPlayable, Playable);
|
|
22751
|
+
function PropertyClipPlayable() {
|
|
22638
22752
|
return Playable.apply(this, arguments);
|
|
22639
22753
|
}
|
|
22640
|
-
var _proto =
|
|
22754
|
+
var _proto = PropertyClipPlayable.prototype;
|
|
22641
22755
|
_proto.processFrame = function processFrame(context) {
|
|
22642
22756
|
this.value = this.curve.getValue(this.time);
|
|
22643
22757
|
};
|
|
22644
|
-
return
|
|
22758
|
+
return PropertyClipPlayable;
|
|
22645
22759
|
}(Playable);
|
|
22646
22760
|
|
|
22647
22761
|
var FloatPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
@@ -22665,7 +22779,7 @@ var FloatPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
22665
22779
|
var weight = this.getInputWeight(i);
|
|
22666
22780
|
if (weight > 0) {
|
|
22667
22781
|
var propertyClipPlayable = this.getInput(i);
|
|
22668
|
-
if (!_instanceof1(propertyClipPlayable,
|
|
22782
|
+
if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
|
|
22669
22783
|
console.error("FloatPropertyTrack added non-FloatPropertyPlayableAsset");
|
|
22670
22784
|
continue;
|
|
22671
22785
|
}
|
|
@@ -23180,11 +23294,11 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23180
23294
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.items), _step; !(_step = _iterator()).done;){
|
|
23181
23295
|
var item = _step.value;
|
|
23182
23296
|
item.composition = this.item.composition;
|
|
23183
|
-
var itemData = item.props;
|
|
23184
23297
|
// 设置预合成作为元素时的时长、结束行为和渲染延时
|
|
23185
|
-
if (
|
|
23298
|
+
if (VFXItem.isComposition(item)) {
|
|
23186
23299
|
this.item.composition.refContent.push(item);
|
|
23187
|
-
var
|
|
23300
|
+
var compositionContent = item.props.content;
|
|
23301
|
+
var refId = compositionContent.options.refId;
|
|
23188
23302
|
var props = this.item.composition.refCompositionProps.get(refId);
|
|
23189
23303
|
if (!props) {
|
|
23190
23304
|
throw new Error("Referenced precomposition with Id: " + refId + " does not exist.");
|
|
@@ -23229,7 +23343,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23229
23343
|
_proto.hitTest = function hitTest(ray, x, y, regions, force, options) {
|
|
23230
23344
|
var _this, _loop = function(i) {
|
|
23231
23345
|
var item = _this.items[i];
|
|
23232
|
-
if (item.getVisible() && item.transform.getValid() && !
|
|
23346
|
+
if (item.getVisible() && item.transform.getValid() && !VFXItem.isComposition(item) && !skip(item)) {
|
|
23233
23347
|
var hitParams = item.getHitTestParams(force);
|
|
23234
23348
|
if (hitParams) {
|
|
23235
23349
|
var success = false;
|
|
@@ -23318,16 +23432,19 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23318
23432
|
var sceneBinding = _step.value;
|
|
23319
23433
|
sceneBinding.key.boundObject = sceneBinding.value;
|
|
23320
23434
|
}
|
|
23435
|
+
// 未了通过帧对比,需要保证和原有的 update 时机一致。
|
|
23436
|
+
// 因此这边更新一次对象绑定,后续 timeline playable 中 sort tracks 的排序才能和原先的版本对上。
|
|
23437
|
+
// 如果不需要严格保证和之前的 updata 时机一致,这边的更新和 timeline playable 中的 sortTracks 都能去掉。
|
|
23321
23438
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(this.timelineAsset.tracks), _step1; !(_step1 = _iterator1()).done;){
|
|
23322
23439
|
var masterTrack = _step1.value;
|
|
23323
|
-
this.
|
|
23440
|
+
this.updateTrackAnimatedObject(masterTrack);
|
|
23324
23441
|
}
|
|
23325
23442
|
};
|
|
23326
|
-
_proto.
|
|
23443
|
+
_proto.updateTrackAnimatedObject = function updateTrackAnimatedObject(track) {
|
|
23327
23444
|
for(var _iterator = _create_for_of_iterator_helper_loose(track.getChildTracks()), _step; !(_step = _iterator()).done;){
|
|
23328
23445
|
var subTrack = _step.value;
|
|
23329
|
-
subTrack.
|
|
23330
|
-
this.
|
|
23446
|
+
subTrack.updateAnimatedObject();
|
|
23447
|
+
this.updateTrackAnimatedObject(subTrack);
|
|
23331
23448
|
}
|
|
23332
23449
|
};
|
|
23333
23450
|
return CompositionComponent;
|
|
@@ -23376,23 +23493,101 @@ var SubCompositionMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23376
23493
|
return SubCompositionMixerPlayable;
|
|
23377
23494
|
}(Playable);
|
|
23378
23495
|
|
|
23379
|
-
var
|
|
23380
|
-
_inherits(
|
|
23381
|
-
function
|
|
23496
|
+
var Vector4PropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
23497
|
+
_inherits(Vector4PropertyMixerPlayable, Playable);
|
|
23498
|
+
function Vector4PropertyMixerPlayable() {
|
|
23499
|
+
var _this;
|
|
23500
|
+
_this = Playable.apply(this, arguments) || this;
|
|
23501
|
+
_this.propertyName = "";
|
|
23502
|
+
return _this;
|
|
23503
|
+
}
|
|
23504
|
+
var _proto = Vector4PropertyMixerPlayable.prototype;
|
|
23505
|
+
_proto.processFrame = function processFrame(context) {
|
|
23506
|
+
var boundObject = context.output.getUserData();
|
|
23507
|
+
if (!boundObject) {
|
|
23508
|
+
return;
|
|
23509
|
+
}
|
|
23510
|
+
var hasInput = false;
|
|
23511
|
+
var value = boundObject[this.propertyName];
|
|
23512
|
+
if (!_instanceof1(value, Vector4)) {
|
|
23513
|
+
return;
|
|
23514
|
+
}
|
|
23515
|
+
value.setZero();
|
|
23516
|
+
// evaluate the curve
|
|
23517
|
+
for(var i = 0; i < this.getInputCount(); i++){
|
|
23518
|
+
var weight = this.getInputWeight(i);
|
|
23519
|
+
if (weight > 0) {
|
|
23520
|
+
var propertyClipPlayable = this.getInput(i);
|
|
23521
|
+
if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
|
|
23522
|
+
console.error("Vector4PropertyTrack added non-Vector4PropertyPlayableAsset");
|
|
23523
|
+
continue;
|
|
23524
|
+
}
|
|
23525
|
+
var curveValue = propertyClipPlayable.value;
|
|
23526
|
+
value.x += curveValue.x * weight;
|
|
23527
|
+
value.y += curveValue.y * weight;
|
|
23528
|
+
value.z += curveValue.z * weight;
|
|
23529
|
+
value.w += curveValue.w * weight;
|
|
23530
|
+
hasInput = true;
|
|
23531
|
+
}
|
|
23532
|
+
}
|
|
23533
|
+
// set value
|
|
23534
|
+
if (hasInput) {
|
|
23535
|
+
boundObject[this.propertyName] = value;
|
|
23536
|
+
}
|
|
23537
|
+
};
|
|
23538
|
+
return Vector4PropertyMixerPlayable;
|
|
23539
|
+
}(Playable);
|
|
23540
|
+
|
|
23541
|
+
var PropertyTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
23542
|
+
_inherits(PropertyTrack, TrackAsset);
|
|
23543
|
+
function PropertyTrack() {
|
|
23382
23544
|
var _this;
|
|
23383
23545
|
_this = TrackAsset.apply(this, arguments) || this;
|
|
23546
|
+
_this.propertyNames = [];
|
|
23384
23547
|
_this.path = "";
|
|
23385
|
-
_this.propertyName = "";
|
|
23386
23548
|
return _this;
|
|
23387
23549
|
}
|
|
23550
|
+
var _proto = PropertyTrack.prototype;
|
|
23551
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23552
|
+
var propertyNames = this.propertyNames;
|
|
23553
|
+
var target = this.parent.boundObject;
|
|
23554
|
+
for(var i = 0; i < propertyNames.length - 1; i++){
|
|
23555
|
+
var property = target[propertyNames[i]];
|
|
23556
|
+
if (property === undefined) {
|
|
23557
|
+
console.error("The " + propertyNames[i] + " property of " + target + " was not found");
|
|
23558
|
+
}
|
|
23559
|
+
target = property;
|
|
23560
|
+
}
|
|
23561
|
+
this.boundObject = target;
|
|
23562
|
+
};
|
|
23563
|
+
_proto.fromData = function fromData(data) {
|
|
23564
|
+
TrackAsset.prototype.fromData.call(this, data);
|
|
23565
|
+
var propertyNames = this.path.split(".");
|
|
23566
|
+
this.propertyNames = propertyNames;
|
|
23567
|
+
};
|
|
23568
|
+
return PropertyTrack;
|
|
23569
|
+
}(TrackAsset);
|
|
23570
|
+
__decorate([
|
|
23571
|
+
serialize()
|
|
23572
|
+
], PropertyTrack.prototype, "path", void 0);
|
|
23573
|
+
|
|
23574
|
+
var FloatPropertyTrack = /*#__PURE__*/ function(PropertyTrack) {
|
|
23575
|
+
_inherits(FloatPropertyTrack, PropertyTrack);
|
|
23576
|
+
function FloatPropertyTrack() {
|
|
23577
|
+
return PropertyTrack.apply(this, arguments);
|
|
23578
|
+
}
|
|
23388
23579
|
var _proto = FloatPropertyTrack.prototype;
|
|
23389
23580
|
_proto.createTrackMixer = function createTrackMixer(graph) {
|
|
23390
23581
|
var mixer = new FloatPropertyMixerPlayable(graph);
|
|
23391
|
-
|
|
23582
|
+
var propertyNames = this.propertyNames;
|
|
23583
|
+
if (propertyNames.length > 0) {
|
|
23584
|
+
var propertyName = propertyNames[propertyNames.length - 1];
|
|
23585
|
+
mixer.propertyName = propertyName;
|
|
23586
|
+
}
|
|
23392
23587
|
return mixer;
|
|
23393
23588
|
};
|
|
23394
|
-
_proto.
|
|
23395
|
-
var propertyNames = this.
|
|
23589
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23590
|
+
var propertyNames = this.propertyNames;
|
|
23396
23591
|
var target = this.parent.boundObject;
|
|
23397
23592
|
for(var i = 0; i < propertyNames.length - 1; i++){
|
|
23398
23593
|
var property = target[propertyNames[i]];
|
|
@@ -23401,18 +23596,12 @@ var FloatPropertyTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
|
23401
23596
|
}
|
|
23402
23597
|
target = property;
|
|
23403
23598
|
}
|
|
23404
|
-
if (propertyNames.length > 0) {
|
|
23405
|
-
this.propertyName = propertyNames[propertyNames.length - 1];
|
|
23406
|
-
}
|
|
23407
23599
|
this.boundObject = target;
|
|
23408
23600
|
};
|
|
23409
23601
|
return FloatPropertyTrack;
|
|
23410
|
-
}(
|
|
23411
|
-
__decorate([
|
|
23412
|
-
serialize()
|
|
23413
|
-
], FloatPropertyTrack.prototype, "path", void 0);
|
|
23602
|
+
}(PropertyTrack);
|
|
23414
23603
|
FloatPropertyTrack = __decorate([
|
|
23415
|
-
effectsClass(
|
|
23604
|
+
effectsClass(DataType.FloatPropertyTrack)
|
|
23416
23605
|
], FloatPropertyTrack);
|
|
23417
23606
|
|
|
23418
23607
|
var SpriteColorTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
@@ -23432,7 +23621,7 @@ var SubCompositionTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
|
23432
23621
|
return TrackAsset.apply(this, arguments);
|
|
23433
23622
|
}
|
|
23434
23623
|
var _proto = SubCompositionTrack.prototype;
|
|
23435
|
-
_proto.
|
|
23624
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23436
23625
|
if (!this.parent || !_instanceof1(this.parent.boundObject, VFXItem)) {
|
|
23437
23626
|
throw new Error("SubCompositionTrack needs to be set under the VFXItem track.");
|
|
23438
23627
|
}
|
|
@@ -23458,6 +23647,70 @@ TransformTrack = __decorate([
|
|
|
23458
23647
|
effectsClass(DataType.TransformTrack)
|
|
23459
23648
|
], TransformTrack);
|
|
23460
23649
|
|
|
23650
|
+
var MaterialTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
23651
|
+
_inherits(MaterialTrack, TrackAsset);
|
|
23652
|
+
function MaterialTrack() {
|
|
23653
|
+
return TrackAsset.apply(this, arguments);
|
|
23654
|
+
}
|
|
23655
|
+
var _proto = MaterialTrack.prototype;
|
|
23656
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23657
|
+
if (!_instanceof1(this.parent.boundObject, RendererComponent)) {
|
|
23658
|
+
return;
|
|
23659
|
+
}
|
|
23660
|
+
this.parent.boundObject;
|
|
23661
|
+
this.boundObject = this.parent.boundObject.materials[this.index];
|
|
23662
|
+
};
|
|
23663
|
+
return MaterialTrack;
|
|
23664
|
+
}(TrackAsset);
|
|
23665
|
+
__decorate([
|
|
23666
|
+
serialize()
|
|
23667
|
+
], MaterialTrack.prototype, "index", void 0);
|
|
23668
|
+
MaterialTrack = __decorate([
|
|
23669
|
+
effectsClass("MaterialTrack")
|
|
23670
|
+
], MaterialTrack);
|
|
23671
|
+
|
|
23672
|
+
var Vector4PropertyTrack = /*#__PURE__*/ function(PropertyTrack) {
|
|
23673
|
+
_inherits(Vector4PropertyTrack, PropertyTrack);
|
|
23674
|
+
function Vector4PropertyTrack() {
|
|
23675
|
+
return PropertyTrack.apply(this, arguments);
|
|
23676
|
+
}
|
|
23677
|
+
var _proto = Vector4PropertyTrack.prototype;
|
|
23678
|
+
_proto.createTrackMixer = function createTrackMixer(graph) {
|
|
23679
|
+
var mixer = new Vector4PropertyMixerPlayable(graph);
|
|
23680
|
+
var propertyNames = this.propertyNames;
|
|
23681
|
+
if (propertyNames.length > 0) {
|
|
23682
|
+
var propertyName = propertyNames[propertyNames.length - 1];
|
|
23683
|
+
mixer.propertyName = propertyName;
|
|
23684
|
+
}
|
|
23685
|
+
return mixer;
|
|
23686
|
+
};
|
|
23687
|
+
return Vector4PropertyTrack;
|
|
23688
|
+
}(PropertyTrack);
|
|
23689
|
+
Vector4PropertyTrack = __decorate([
|
|
23690
|
+
effectsClass(DataType.Vector4PropertyTrack)
|
|
23691
|
+
], Vector4PropertyTrack);
|
|
23692
|
+
|
|
23693
|
+
var ColorPropertyTrack = /*#__PURE__*/ function(PropertyTrack) {
|
|
23694
|
+
_inherits(ColorPropertyTrack, PropertyTrack);
|
|
23695
|
+
function ColorPropertyTrack() {
|
|
23696
|
+
return PropertyTrack.apply(this, arguments);
|
|
23697
|
+
}
|
|
23698
|
+
var _proto = ColorPropertyTrack.prototype;
|
|
23699
|
+
_proto.createTrackMixer = function createTrackMixer(graph) {
|
|
23700
|
+
var mixer = new FloatPropertyMixerPlayable(graph);
|
|
23701
|
+
var propertyNames = this.propertyNames;
|
|
23702
|
+
if (propertyNames.length > 0) {
|
|
23703
|
+
var propertyName = propertyNames[propertyNames.length - 1];
|
|
23704
|
+
mixer.propertyName = propertyName;
|
|
23705
|
+
}
|
|
23706
|
+
return mixer;
|
|
23707
|
+
};
|
|
23708
|
+
return ColorPropertyTrack;
|
|
23709
|
+
}(PropertyTrack);
|
|
23710
|
+
ColorPropertyTrack = __decorate([
|
|
23711
|
+
effectsClass(DataType.ColorPropertyTrack)
|
|
23712
|
+
], ColorPropertyTrack);
|
|
23713
|
+
|
|
23461
23714
|
var FloatPropertyPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
23462
23715
|
_inherits(FloatPropertyPlayableAsset, PlayableAsset);
|
|
23463
23716
|
function FloatPropertyPlayableAsset() {
|
|
@@ -23465,7 +23718,7 @@ var FloatPropertyPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
23465
23718
|
}
|
|
23466
23719
|
var _proto = FloatPropertyPlayableAsset.prototype;
|
|
23467
23720
|
_proto.createPlayable = function createPlayable(graph) {
|
|
23468
|
-
var clipPlayable = new
|
|
23721
|
+
var clipPlayable = new PropertyClipPlayable(graph);
|
|
23469
23722
|
clipPlayable.curve = createValueGetter(this.curveData);
|
|
23470
23723
|
clipPlayable.value = clipPlayable.curve.getValue(0);
|
|
23471
23724
|
return clipPlayable;
|
|
@@ -23476,7 +23729,7 @@ __decorate([
|
|
|
23476
23729
|
serialize()
|
|
23477
23730
|
], FloatPropertyPlayableAsset.prototype, "curveData", void 0);
|
|
23478
23731
|
FloatPropertyPlayableAsset = __decorate([
|
|
23479
|
-
effectsClass(
|
|
23732
|
+
effectsClass(DataType.FloatPropertyPlayableAsset)
|
|
23480
23733
|
], FloatPropertyPlayableAsset);
|
|
23481
23734
|
|
|
23482
23735
|
var SubCompositionPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
@@ -23494,6 +23747,23 @@ SubCompositionPlayableAsset = __decorate([
|
|
|
23494
23747
|
effectsClass(DataType.SubCompositionPlayableAsset)
|
|
23495
23748
|
], SubCompositionPlayableAsset);
|
|
23496
23749
|
|
|
23750
|
+
/**
|
|
23751
|
+
* A class that stores track assets and the generated mixer playables and playable outputs.
|
|
23752
|
+
* It is used to query the corresponding playable object based on the track asset.
|
|
23753
|
+
*/ var TrackInstance = /*#__PURE__*/ function() {
|
|
23754
|
+
function TrackInstance(trackAsset, mixer, output) {
|
|
23755
|
+
this.children = [];
|
|
23756
|
+
this.trackAsset = trackAsset;
|
|
23757
|
+
this.mixer = mixer;
|
|
23758
|
+
this.output = output;
|
|
23759
|
+
}
|
|
23760
|
+
var _proto = TrackInstance.prototype;
|
|
23761
|
+
_proto.addChild = function addChild(trackInstance) {
|
|
23762
|
+
this.children.push(trackInstance);
|
|
23763
|
+
};
|
|
23764
|
+
return TrackInstance;
|
|
23765
|
+
}();
|
|
23766
|
+
|
|
23497
23767
|
var TimelineAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
23498
23768
|
_inherits(TimelineAsset, PlayableAsset);
|
|
23499
23769
|
function TimelineAsset() {
|
|
@@ -23536,6 +23806,7 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23536
23806
|
var _this;
|
|
23537
23807
|
_this = Playable.apply(this, arguments) || this;
|
|
23538
23808
|
_this.clips = [];
|
|
23809
|
+
_this.masterTrackInstances = [];
|
|
23539
23810
|
return _this;
|
|
23540
23811
|
}
|
|
23541
23812
|
var _proto = TimelinePlayable.prototype;
|
|
@@ -23544,6 +23815,8 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23544
23815
|
};
|
|
23545
23816
|
_proto.evaluate = function evaluate() {
|
|
23546
23817
|
var time = this.getTime();
|
|
23818
|
+
// update all tracks binding
|
|
23819
|
+
this.updateTrackAnimatedObject(this.masterTrackInstances);
|
|
23547
23820
|
// TODO search active clips
|
|
23548
23821
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.clips), _step; !(_step = _iterator()).done;){
|
|
23549
23822
|
var clip = _step.value;
|
|
@@ -23553,19 +23826,50 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23553
23826
|
_proto.compileTracks = function compileTracks(graph, tracks) {
|
|
23554
23827
|
this.sortTracks(tracks);
|
|
23555
23828
|
var outputTrack = [];
|
|
23829
|
+
// flatten track tree
|
|
23556
23830
|
for(var _iterator = _create_for_of_iterator_helper_loose(tracks), _step; !(_step = _iterator()).done;){
|
|
23557
23831
|
var masterTrack = _step.value;
|
|
23558
23832
|
outputTrack.push(masterTrack);
|
|
23559
23833
|
this.addSubTracksRecursive(masterTrack, outputTrack);
|
|
23560
23834
|
}
|
|
23835
|
+
// map for searching track instance with track asset guid
|
|
23836
|
+
var trackInstanceMap = {};
|
|
23561
23837
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(outputTrack), _step1; !(_step1 = _iterator1()).done;){
|
|
23562
23838
|
var track = _step1.value;
|
|
23839
|
+
// create track mixer and track output
|
|
23563
23840
|
var trackMixPlayable = track.createPlayableGraph(graph, this.clips);
|
|
23564
23841
|
this.addInput(trackMixPlayable, 0);
|
|
23565
23842
|
var trackOutput = track.createOutput();
|
|
23566
23843
|
trackOutput.setUserData(track.boundObject);
|
|
23567
23844
|
graph.addOutput(trackOutput);
|
|
23568
|
-
trackOutput.
|
|
23845
|
+
trackOutput.setSourcePlayable(this, this.getInputCount() - 1);
|
|
23846
|
+
// create track instance
|
|
23847
|
+
var trackInstance = new TrackInstance(track, trackMixPlayable, trackOutput);
|
|
23848
|
+
trackInstanceMap[track.getInstanceId()] = trackInstance;
|
|
23849
|
+
if (!track.parent) {
|
|
23850
|
+
this.masterTrackInstances.push(trackInstance);
|
|
23851
|
+
}
|
|
23852
|
+
}
|
|
23853
|
+
// build trackInstance tree
|
|
23854
|
+
for(var _iterator2 = _create_for_of_iterator_helper_loose(outputTrack), _step2; !(_step2 = _iterator2()).done;){
|
|
23855
|
+
var track1 = _step2.value;
|
|
23856
|
+
var trackInstance1 = trackInstanceMap[track1.getInstanceId()];
|
|
23857
|
+
for(var _iterator3 = _create_for_of_iterator_helper_loose(track1.getChildTracks()), _step3; !(_step3 = _iterator3()).done;){
|
|
23858
|
+
var child = _step3.value;
|
|
23859
|
+
var childTrackInstance = trackInstanceMap[child.getInstanceId()];
|
|
23860
|
+
trackInstance1.addChild(childTrackInstance);
|
|
23861
|
+
}
|
|
23862
|
+
}
|
|
23863
|
+
};
|
|
23864
|
+
_proto.updateTrackAnimatedObject = function updateTrackAnimatedObject(trackInstances) {
|
|
23865
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(trackInstances), _step; !(_step = _iterator()).done;){
|
|
23866
|
+
var trackInstance = _step.value;
|
|
23867
|
+
var trackAsset = trackInstance.trackAsset;
|
|
23868
|
+
// update track binding use custom method
|
|
23869
|
+
trackAsset.updateAnimatedObject();
|
|
23870
|
+
trackInstance.output.setUserData(trackAsset.boundObject);
|
|
23871
|
+
// update children tracks
|
|
23872
|
+
this.updateTrackAnimatedObject(trackInstance.children);
|
|
23569
23873
|
}
|
|
23570
23874
|
};
|
|
23571
23875
|
_proto.sortTracks = function sortTracks(tracks) {
|
|
@@ -23617,6 +23921,7 @@ var ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
|
|
|
23617
23921
|
return TrackAsset1.apply(this, arguments);
|
|
23618
23922
|
}
|
|
23619
23923
|
var _proto = ObjectBindingTrack.prototype;
|
|
23924
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {};
|
|
23620
23925
|
_proto.create = function create(timelineAsset) {
|
|
23621
23926
|
if (!_instanceof1(this.boundObject, VFXItem)) {
|
|
23622
23927
|
return;
|
|
@@ -27617,6 +27922,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27617
27922
|
_inherits(Composition, EventEmitter);
|
|
27618
27923
|
function Composition(props, scene) {
|
|
27619
27924
|
var _this;
|
|
27925
|
+
var _scene_jsonScene_renderSettings;
|
|
27620
27926
|
_this = EventEmitter.call(this) || this;
|
|
27621
27927
|
_this.sceneTicking = new SceneTicking();
|
|
27622
27928
|
/**
|
|
@@ -27631,6 +27937,9 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27631
27937
|
/**
|
|
27632
27938
|
* 预合成的合成属性,在 content 中会被其元素属性覆盖
|
|
27633
27939
|
*/ _this.refCompositionProps = new Map();
|
|
27940
|
+
/**
|
|
27941
|
+
* 是否开启后处理
|
|
27942
|
+
*/ _this.postProcessingEnabled = false;
|
|
27634
27943
|
// TODO: 待优化
|
|
27635
27944
|
_this.assigned = false;
|
|
27636
27945
|
/**
|
|
@@ -27649,6 +27958,8 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27649
27958
|
scene.consumed = true;
|
|
27650
27959
|
}
|
|
27651
27960
|
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;
|
|
27961
|
+
var _scene_jsonScene_renderSettings_postProcessingEnabled;
|
|
27962
|
+
_this.postProcessingEnabled = (_scene_jsonScene_renderSettings_postProcessingEnabled = (_scene_jsonScene_renderSettings = scene.jsonScene.renderSettings) == null ? void 0 : _scene_jsonScene_renderSettings.postProcessingEnabled) != null ? _scene_jsonScene_renderSettings_postProcessingEnabled : false;
|
|
27652
27963
|
assertExist(sourceContent);
|
|
27653
27964
|
_this.renderer = renderer;
|
|
27654
27965
|
_this.refCompositionProps = refCompositionProps;
|
|
@@ -27689,27 +28000,10 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27689
28000
|
SerializationHelper.deserialize(sourceContent, _this.rootComposition);
|
|
27690
28001
|
_this.rootComposition.createContent();
|
|
27691
28002
|
_this.buildItemTree(_this.rootItem);
|
|
27692
|
-
_this.rootItem.onEnd = function() {
|
|
27693
|
-
window.setTimeout(function() {
|
|
27694
|
-
_this.emit("end", {
|
|
27695
|
-
composition: _assert_this_initialized(_this)
|
|
27696
|
-
});
|
|
27697
|
-
}, 0);
|
|
27698
|
-
};
|
|
27699
28003
|
_this.pluginSystem.resetComposition(_assert_this_initialized(_this), _this.renderFrame);
|
|
27700
28004
|
return _this;
|
|
27701
28005
|
}
|
|
27702
28006
|
var _proto = Composition.prototype;
|
|
27703
|
-
_proto.initializeSceneTicking = function initializeSceneTicking(item) {
|
|
27704
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.components), _step; !(_step = _iterator()).done;){
|
|
27705
|
-
var component = _step.value;
|
|
27706
|
-
this.sceneTicking.addComponent(component);
|
|
27707
|
-
}
|
|
27708
|
-
for(var _iterator1 = _create_for_of_iterator_helper_loose(item.children), _step1; !(_step1 = _iterator1()).done;){
|
|
27709
|
-
var child = _step1.value;
|
|
27710
|
-
this.initializeSceneTicking(child);
|
|
27711
|
-
}
|
|
27712
|
-
};
|
|
27713
28007
|
/**
|
|
27714
28008
|
* 获取合成的时长
|
|
27715
28009
|
*/ _proto.getDuration = function getDuration() {
|
|
@@ -27798,7 +28092,8 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27798
28092
|
camera: this.camera,
|
|
27799
28093
|
renderer: this.renderer,
|
|
27800
28094
|
keepColorBuffer: this.keepColorBuffer,
|
|
27801
|
-
globalVolume: this.globalVolume
|
|
28095
|
+
globalVolume: this.globalVolume,
|
|
28096
|
+
postProcessingEnabled: this.postProcessingEnabled
|
|
27802
28097
|
});
|
|
27803
28098
|
// TODO 考虑放到构造函数
|
|
27804
28099
|
this.renderFrame.cachedTextures = this.textures;
|
|
@@ -27901,40 +28196,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27901
28196
|
this.dispose();
|
|
27902
28197
|
}
|
|
27903
28198
|
};
|
|
27904
|
-
_proto.toLocalTime = function toLocalTime(time) {
|
|
27905
|
-
var localTime = time - this.rootItem.start;
|
|
27906
|
-
var duration = this.rootItem.duration;
|
|
27907
|
-
if (localTime - duration > 0.001) {
|
|
27908
|
-
if (!this.rootItem.ended) {
|
|
27909
|
-
this.rootItem.ended = true;
|
|
27910
|
-
this.emit("end", {
|
|
27911
|
-
composition: this
|
|
27912
|
-
});
|
|
27913
|
-
}
|
|
27914
|
-
switch(this.rootItem.endBehavior){
|
|
27915
|
-
case EndBehavior.restart:
|
|
27916
|
-
{
|
|
27917
|
-
localTime = localTime % duration;
|
|
27918
|
-
this.restart();
|
|
27919
|
-
break;
|
|
27920
|
-
}
|
|
27921
|
-
case EndBehavior.freeze:
|
|
27922
|
-
{
|
|
27923
|
-
localTime = Math.min(duration, localTime);
|
|
27924
|
-
break;
|
|
27925
|
-
}
|
|
27926
|
-
case EndBehavior.forward:
|
|
27927
|
-
{
|
|
27928
|
-
break;
|
|
27929
|
-
}
|
|
27930
|
-
case EndBehavior.destroy:
|
|
27931
|
-
{
|
|
27932
|
-
break;
|
|
27933
|
-
}
|
|
27934
|
-
}
|
|
27935
|
-
}
|
|
27936
|
-
return localTime;
|
|
27937
|
-
};
|
|
27938
28199
|
_proto.shouldDispose = function shouldDispose() {
|
|
27939
28200
|
return this.rootItem.ended && this.rootItem.endBehavior === EndBehavior.destroy && !this.reusable;
|
|
27940
28201
|
};
|
|
@@ -28026,8 +28287,41 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28026
28287
|
* 更新主合成组件
|
|
28027
28288
|
*/ _proto.updateRootComposition = function updateRootComposition(deltaTime) {
|
|
28028
28289
|
if (this.rootComposition.isActiveAndEnabled) {
|
|
28029
|
-
var localTime = this.
|
|
28290
|
+
var localTime = this.time + deltaTime - this.rootItem.start;
|
|
28291
|
+
var ended = false;
|
|
28292
|
+
var duration = this.rootItem.duration;
|
|
28293
|
+
var endBehavior = this.rootItem.endBehavior;
|
|
28294
|
+
if (localTime - duration > 0.001) {
|
|
28295
|
+
ended = true;
|
|
28296
|
+
switch(endBehavior){
|
|
28297
|
+
case EndBehavior.restart:
|
|
28298
|
+
{
|
|
28299
|
+
localTime = localTime % duration;
|
|
28300
|
+
this.restart();
|
|
28301
|
+
break;
|
|
28302
|
+
}
|
|
28303
|
+
case EndBehavior.freeze:
|
|
28304
|
+
{
|
|
28305
|
+
localTime = Math.min(duration, localTime);
|
|
28306
|
+
break;
|
|
28307
|
+
}
|
|
28308
|
+
case EndBehavior.forward:
|
|
28309
|
+
{
|
|
28310
|
+
break;
|
|
28311
|
+
}
|
|
28312
|
+
case EndBehavior.destroy:
|
|
28313
|
+
{
|
|
28314
|
+
break;
|
|
28315
|
+
}
|
|
28316
|
+
}
|
|
28317
|
+
}
|
|
28030
28318
|
this.rootComposition.time = localTime;
|
|
28319
|
+
if (ended && !this.rootItem.ended) {
|
|
28320
|
+
this.rootItem.ended = true;
|
|
28321
|
+
this.emit("end", {
|
|
28322
|
+
composition: this
|
|
28323
|
+
});
|
|
28324
|
+
}
|
|
28031
28325
|
}
|
|
28032
28326
|
};
|
|
28033
28327
|
/**
|
|
@@ -30352,7 +30646,7 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
|
|
|
30352
30646
|
registerPlugin("particle", ParticleLoader, VFXItem, true);
|
|
30353
30647
|
registerPlugin("cal", CalculateLoader, VFXItem, true);
|
|
30354
30648
|
registerPlugin("interact", InteractLoader, VFXItem, true);
|
|
30355
|
-
var version$1 = "2.1.0-alpha.
|
|
30649
|
+
var version$1 = "2.1.0-alpha.8";
|
|
30356
30650
|
logger.info("Core version: " + version$1 + ".");
|
|
30357
30651
|
|
|
30358
30652
|
var _obj;
|
|
@@ -31045,6 +31339,7 @@ var seed = 1;
|
|
|
31045
31339
|
if (data.length > attributeBuffer.array.length) {
|
|
31046
31340
|
var buffer = new THREE.InterleavedBuffer(data, attributeBuffer.stride);
|
|
31047
31341
|
attributeBuffer = this.attributes[name].attribute.data = buffer;
|
|
31342
|
+
this.attributes[name].buffer = buffer;
|
|
31048
31343
|
this.geometry.setAttribute(name, this.attributes[name].attribute);
|
|
31049
31344
|
} else {
|
|
31050
31345
|
attributeBuffer.set(data, 0);
|
|
@@ -31354,6 +31649,7 @@ var seed = 1;
|
|
|
31354
31649
|
_this.texture = _this.createTextureByType(options);
|
|
31355
31650
|
}
|
|
31356
31651
|
_this.texture.needsUpdate = true;
|
|
31652
|
+
_this.source = {};
|
|
31357
31653
|
return _this;
|
|
31358
31654
|
}
|
|
31359
31655
|
var _proto = ThreeTexture.prototype;
|
|
@@ -31366,40 +31662,6 @@ var seed = 1;
|
|
|
31366
31662
|
this.texture.needsUpdate = true;
|
|
31367
31663
|
};
|
|
31368
31664
|
/**
|
|
31369
|
-
* 开始更新视频数据
|
|
31370
|
-
*
|
|
31371
|
-
*/ _proto.startVideo = function startVideo() {
|
|
31372
|
-
var _this = this;
|
|
31373
|
-
return _async_to_generator(function() {
|
|
31374
|
-
var video;
|
|
31375
|
-
return __generator(this, function(_state) {
|
|
31376
|
-
switch(_state.label){
|
|
31377
|
-
case 0:
|
|
31378
|
-
if (!(_this.sourceType === TextureSourceType.video)) return [
|
|
31379
|
-
3,
|
|
31380
|
-
2
|
|
31381
|
-
];
|
|
31382
|
-
video = _this.texture.source.data;
|
|
31383
|
-
if (!video.paused) return [
|
|
31384
|
-
3,
|
|
31385
|
-
2
|
|
31386
|
-
];
|
|
31387
|
-
return [
|
|
31388
|
-
4,
|
|
31389
|
-
video.play()
|
|
31390
|
-
];
|
|
31391
|
-
case 1:
|
|
31392
|
-
_state.sent();
|
|
31393
|
-
_state.label = 2;
|
|
31394
|
-
case 2:
|
|
31395
|
-
return [
|
|
31396
|
-
2
|
|
31397
|
-
];
|
|
31398
|
-
}
|
|
31399
|
-
});
|
|
31400
|
-
})();
|
|
31401
|
-
};
|
|
31402
|
-
/**
|
|
31403
31665
|
* 组装纹理选项
|
|
31404
31666
|
* @param options - 纹理选项
|
|
31405
31667
|
* @returns 组装后的纹理选项
|
|
@@ -31496,6 +31758,7 @@ var seed = 1;
|
|
|
31496
31758
|
texture.wrapT = THREE.MirroredRepeatWrapping;
|
|
31497
31759
|
this.width = this.height = 1;
|
|
31498
31760
|
}
|
|
31761
|
+
this.source = options;
|
|
31499
31762
|
if (texture) {
|
|
31500
31763
|
texture.flipY = !!flipY;
|
|
31501
31764
|
return texture;
|
|
@@ -31539,13 +31802,6 @@ var seed = 1;
|
|
|
31539
31802
|
return Composition.call(this, props, scene);
|
|
31540
31803
|
}
|
|
31541
31804
|
var _proto = ThreeComposition.prototype;
|
|
31542
|
-
/**
|
|
31543
|
-
* 更新 video texture 数据
|
|
31544
|
-
*/ _proto.updateVideo = function updateVideo() {
|
|
31545
|
-
void this.textures.map(function(tex) {
|
|
31546
|
-
return tex.startVideo();
|
|
31547
|
-
});
|
|
31548
|
-
};
|
|
31549
31805
|
_proto.prepareRender = function prepareRender() {
|
|
31550
31806
|
var render = this.renderer;
|
|
31551
31807
|
var frame = this.renderFrame;
|
|
@@ -32034,8 +32290,8 @@ setMaxSpriteMeshItemCount(8);
|
|
|
32034
32290
|
*/ Mesh.create = function(engine, props) {
|
|
32035
32291
|
return new ThreeMesh(engine, props);
|
|
32036
32292
|
};
|
|
32037
|
-
var version = "2.1.0-alpha.
|
|
32293
|
+
var version = "2.1.0-alpha.8";
|
|
32038
32294
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
32039
32295
|
|
|
32040
|
-
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, Asset, AssetLoader, AssetManager, BYTES_TYPE_MAP, BaseRenderComponent, 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, ComponentShapeType, Composition, CompositionComponent, CompositionSourceManager, 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, Engine, EventEmitter, EventSystem, FilterMode, Float16ArrayWrapper, FloatPropertyPlayableAsset, FloatPropertyTrack, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, 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, Scene, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderFactory, ShaderType, ShaderVariant, ShapeComponent, ShapeConnectType, ShapePointType, 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, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, decimalEqual,
|
|
32296
|
+
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, Asset, AssetLoader, AssetManager, BYTES_TYPE_MAP, BaseRenderComponent, 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, ColorCurve, ColorPropertyTrack, Component, ComponentShapeType, Composition, CompositionComponent, CompositionSourceManager, 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, Engine, EventEmitter, EventSystem, FilterMode, Float16ArrayWrapper, FloatPropertyPlayableAsset, FloatPropertyTrack, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, MaterialTrack, Mesh, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, 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, ShapeConnectType, ShapePointType, 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, Vector4Curve, Vector4PropertyTrack, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, 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, 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, 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, passRenderLevel, pluginLoaderMap, 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, vecFill, vecMulCombine, version, vertexFormatType2GLType };
|
|
32041
32297
|
//# sourceMappingURL=index.mjs.map
|