@galacean/effects-core 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/comp-vfx-item.d.ts +1 -1
- package/dist/components/post-process-volume.d.ts +2 -3
- package/dist/components/shape-component.d.ts +1 -1
- package/dist/composition.d.ts +5 -3
- package/dist/index.js +575 -279
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +573 -279
- package/dist/index.mjs.map +1 -1
- package/dist/math/index.d.ts +1 -1
- package/dist/math/translate.d.ts +1 -1
- package/dist/math/value-getters/color-curve.d.ts +12 -0
- package/dist/math/value-getters/index.d.ts +4 -0
- package/dist/math/value-getters/value-getter-map.d.ts +2 -0
- package/dist/math/{value-getter.d.ts → value-getters/value-getter.d.ts} +3 -4
- package/dist/math/value-getters/vector4-curve.d.ts +12 -0
- package/dist/plugins/cal/calculate-item.d.ts +1 -0
- package/dist/plugins/cal/playable-graph.d.ts +1 -1
- package/dist/plugins/interact/interact-item.d.ts +11 -0
- package/dist/plugins/shape/graphics-path.d.ts +27 -1
- package/dist/plugins/shape/rectangle.d.ts +129 -0
- package/dist/plugins/shape/triangle.d.ts +89 -0
- package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playable-assets/timeline-asset.d.ts +3 -0
- package/dist/plugins/timeline/playable-assets/vector4-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/playables/index.d.ts +3 -1
- package/dist/plugins/timeline/playables/{float-property-clip-playable.d.ts → property-clip-playable.d.ts} +3 -3
- package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/track-instance.d.ts +14 -0
- package/dist/plugins/timeline/track.d.ts +1 -1
- package/dist/plugins/timeline/tracks/color-property-track.d.ts +5 -0
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +3 -5
- package/dist/plugins/timeline/tracks/index.d.ts +4 -0
- package/dist/plugins/timeline/tracks/material-track.d.ts +5 -0
- package/dist/plugins/timeline/tracks/property-track.d.ts +8 -0
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +1 -1
- package/dist/plugins/timeline/tracks/vector4-property-track.d.ts +5 -0
- package/dist/render/index.d.ts +0 -1
- package/dist/render/render-frame.d.ts +5 -1
- package/dist/vfx-item.d.ts +0 -8
- package/package.json +2 -2
- package/dist/render/global-volume.d.ts +0 -17
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.1.0-alpha.
|
|
6
|
+
* Version: v2.1.0-alpha.8
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -952,7 +952,6 @@ var PluginSystem = /*#__PURE__*/ function() {
|
|
|
952
952
|
var pluginInfoMap = {
|
|
953
953
|
"alipay-downgrade": "@galacean/effects-plugin-alipay-downgrade",
|
|
954
954
|
"editor-gizmo": "@galacean/effects-plugin-editor-gizmo",
|
|
955
|
-
"tree": "@galacean/effects-plugin-model",
|
|
956
955
|
"model": "@galacean/effects-plugin-model",
|
|
957
956
|
"orientation-transformer": "@galacean/effects-plugin-orientation-transformer",
|
|
958
957
|
"spine": "@galacean/effects-plugin-spine"
|
|
@@ -1384,6 +1383,12 @@ var CameraClipMode;
|
|
|
1384
1383
|
/**
|
|
1385
1384
|
* 贝塞尔曲线四元数
|
|
1386
1385
|
*/ ValueType[ValueType["BEZIER_CURVE_QUAT"] = 23] = "BEZIER_CURVE_QUAT";
|
|
1386
|
+
/**
|
|
1387
|
+
* 颜色曲线
|
|
1388
|
+
*/ ValueType[ValueType["COLOR_CURVE"] = 24] = "COLOR_CURVE";
|
|
1389
|
+
/**
|
|
1390
|
+
* Vector4 曲线
|
|
1391
|
+
*/ ValueType[ValueType["VECTOR4_CURVE"] = 25] = "VECTOR4_CURVE";
|
|
1387
1392
|
})(ValueType || (ValueType = {}));
|
|
1388
1393
|
/**
|
|
1389
1394
|
* 关键帧类型
|
|
@@ -1620,10 +1625,15 @@ var DataType;
|
|
|
1620
1625
|
DataType["SpriteColorTrack"] = "SpriteColorTrack";
|
|
1621
1626
|
DataType["ActivationTrack"] = "ActivationTrack";
|
|
1622
1627
|
DataType["SubCompositionTrack"] = "SubCompositionTrack";
|
|
1628
|
+
DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
|
|
1629
|
+
DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
|
|
1630
|
+
DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
|
|
1623
1631
|
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
1624
1632
|
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
1625
1633
|
DataType["ActivationPlayableAsset"] = "ActivationPlayableAsset";
|
|
1626
1634
|
DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
|
|
1635
|
+
DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
|
|
1636
|
+
DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
|
|
1627
1637
|
// FIXME: 先完成ECS的场景转换,后面移到spec中
|
|
1628
1638
|
DataType["MeshComponent"] = "MeshComponent";
|
|
1629
1639
|
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
@@ -5243,9 +5253,8 @@ var PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
5243
5253
|
function PostProcessVolume() {
|
|
5244
5254
|
var _this;
|
|
5245
5255
|
_this = Behaviour.apply(this, arguments) || this;
|
|
5246
|
-
_this.useHDR = true;
|
|
5247
5256
|
// Bloom
|
|
5248
|
-
_this.
|
|
5257
|
+
_this.bloomEnabled = true;
|
|
5249
5258
|
_this.threshold = 1.0;
|
|
5250
5259
|
_this.bloomIntensity = 1.0;
|
|
5251
5260
|
// ColorAdjustments
|
|
@@ -5257,7 +5266,7 @@ var PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
5257
5266
|
_this.vignetteSmoothness = 0.4;
|
|
5258
5267
|
_this.vignetteRoundness = 1.0;
|
|
5259
5268
|
// ToneMapping
|
|
5260
|
-
_this.
|
|
5269
|
+
_this.toneMappingEnabled = true // 1: true, 0: false
|
|
5261
5270
|
;
|
|
5262
5271
|
return _this;
|
|
5263
5272
|
}
|
|
@@ -5265,18 +5274,14 @@ var PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
5265
5274
|
_proto.onStart = function onStart() {
|
|
5266
5275
|
var composition = this.item.composition;
|
|
5267
5276
|
if (composition) {
|
|
5268
|
-
composition.globalVolume = this;
|
|
5269
|
-
composition.createRenderFrame();
|
|
5277
|
+
composition.renderFrame.globalVolume = this;
|
|
5270
5278
|
}
|
|
5271
5279
|
};
|
|
5272
5280
|
return PostProcessVolume;
|
|
5273
5281
|
}(Behaviour);
|
|
5274
5282
|
__decorate([
|
|
5275
5283
|
serialize()
|
|
5276
|
-
], PostProcessVolume.prototype, "
|
|
5277
|
-
__decorate([
|
|
5278
|
-
serialize()
|
|
5279
|
-
], PostProcessVolume.prototype, "useBloom", void 0);
|
|
5284
|
+
], PostProcessVolume.prototype, "bloomEnabled", void 0);
|
|
5280
5285
|
__decorate([
|
|
5281
5286
|
serialize()
|
|
5282
5287
|
], PostProcessVolume.prototype, "threshold", void 0);
|
|
@@ -5303,7 +5308,7 @@ __decorate([
|
|
|
5303
5308
|
], PostProcessVolume.prototype, "vignetteRoundness", void 0);
|
|
5304
5309
|
__decorate([
|
|
5305
5310
|
serialize()
|
|
5306
|
-
], PostProcessVolume.prototype, "
|
|
5311
|
+
], PostProcessVolume.prototype, "toneMappingEnabled", void 0);
|
|
5307
5312
|
PostProcessVolume = __decorate([
|
|
5308
5313
|
effectsClass("PostProcessVolume")
|
|
5309
5314
|
], PostProcessVolume);
|
|
@@ -10340,13 +10345,15 @@ var BloomThresholdPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10340
10345
|
renderer.setFramebuffer(this.framebuffer);
|
|
10341
10346
|
};
|
|
10342
10347
|
_proto.execute = function execute(renderer) {
|
|
10348
|
+
var _renderer_renderingData_currentFrame_globalVolume;
|
|
10343
10349
|
renderer.clear({
|
|
10344
10350
|
colorAction: TextureStoreAction.clear,
|
|
10345
10351
|
depthAction: TextureStoreAction.clear,
|
|
10346
10352
|
stencilAction: TextureStoreAction.clear
|
|
10347
10353
|
});
|
|
10348
10354
|
this.screenMesh.material.setTexture("_MainTex", this.mainTexture);
|
|
10349
|
-
var
|
|
10355
|
+
var _renderer_renderingData_currentFrame_globalVolume_threshold;
|
|
10356
|
+
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;
|
|
10350
10357
|
this.screenMesh.material.setFloat("_Threshold", threshold);
|
|
10351
10358
|
renderer.renderMeshes([
|
|
10352
10359
|
this.screenMesh
|
|
@@ -10559,13 +10566,14 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10559
10566
|
depthAction: TextureStoreAction.clear,
|
|
10560
10567
|
stencilAction: TextureStoreAction.clear
|
|
10561
10568
|
});
|
|
10562
|
-
var _renderer_renderingData_currentFrame_globalVolume
|
|
10569
|
+
var _renderer_renderingData_currentFrame_globalVolume;
|
|
10570
|
+
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;
|
|
10563
10571
|
this.screenMesh.material.setTexture("_SceneTex", this.sceneTextureHandle.texture);
|
|
10564
10572
|
this.screenMesh.material.setFloat("_Brightness", brightness);
|
|
10565
10573
|
this.screenMesh.material.setFloat("_Saturation", saturation);
|
|
10566
10574
|
this.screenMesh.material.setFloat("_Contrast", contrast);
|
|
10567
|
-
this.screenMesh.material.setInt("_UseBloom", Number(
|
|
10568
|
-
if (
|
|
10575
|
+
this.screenMesh.material.setInt("_UseBloom", Number(bloomEnabled));
|
|
10576
|
+
if (bloomEnabled) {
|
|
10569
10577
|
this.screenMesh.material.setTexture("_GaussianTex", this.mainTexture);
|
|
10570
10578
|
this.screenMesh.material.setFloat("_BloomIntensity", bloomIntensity);
|
|
10571
10579
|
}
|
|
@@ -10576,7 +10584,7 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10576
10584
|
this.screenMesh.material.setVector2("_VignetteCenter", new Vector2(0.5, 0.5));
|
|
10577
10585
|
this.screenMesh.material.setVector3("_VignetteColor", new Vector3(0.0, 0.0, 0.0));
|
|
10578
10586
|
}
|
|
10579
|
-
this.screenMesh.material.setInt("_UseToneMapping", Number(
|
|
10587
|
+
this.screenMesh.material.setInt("_UseToneMapping", Number(toneMappingEnabled));
|
|
10580
10588
|
renderer.renderMeshes([
|
|
10581
10589
|
this.screenMesh
|
|
10582
10590
|
]);
|
|
@@ -10600,7 +10608,7 @@ var seed$5 = 1;
|
|
|
10600
10608
|
1,
|
|
10601
10609
|
0,
|
|
10602
10610
|
0
|
|
10603
|
-
] : _options_editorTransform, globalVolume = options.globalVolume, _options_clearAction = options.clearAction, clearAction = _options_clearAction === void 0 ? {
|
|
10611
|
+
] : _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 ? {
|
|
10604
10612
|
colorAction: TextureLoadAction.whatever,
|
|
10605
10613
|
stencilAction: TextureLoadAction.clear,
|
|
10606
10614
|
depthAction: TextureLoadAction.whatever
|
|
@@ -10614,10 +10622,10 @@ var seed$5 = 1;
|
|
|
10614
10622
|
var depthStencilAttachment;
|
|
10615
10623
|
var drawObjectPassClearAction = {};
|
|
10616
10624
|
this.renderer = renderer;
|
|
10617
|
-
if (
|
|
10618
|
-
var
|
|
10625
|
+
if (postProcessingEnabled) {
|
|
10626
|
+
var enableHDR = true;
|
|
10619
10627
|
// 使用HDR浮点纹理,FLOAT在IOS上报错,使用HALF_FLOAT
|
|
10620
|
-
var textureType =
|
|
10628
|
+
var textureType = enableHDR ? glContext.HALF_FLOAT : glContext.UNSIGNED_BYTE;
|
|
10621
10629
|
attachments = [
|
|
10622
10630
|
{
|
|
10623
10631
|
texture: {
|
|
@@ -10649,7 +10657,7 @@ var seed$5 = 1;
|
|
|
10649
10657
|
})
|
|
10650
10658
|
];
|
|
10651
10659
|
this.setRenderPasses(renderPasses);
|
|
10652
|
-
if (
|
|
10660
|
+
if (postProcessingEnabled) {
|
|
10653
10661
|
var sceneTextureHandle = new RenderTargetHandle(engine); //保存后处理前的屏幕图像
|
|
10654
10662
|
var gaussianStep = 7; // 高斯模糊的迭代次数,次数越高模糊范围越大
|
|
10655
10663
|
var viewport = [
|
|
@@ -10659,7 +10667,8 @@ var seed$5 = 1;
|
|
|
10659
10667
|
this.renderer.getHeight() / 2
|
|
10660
10668
|
];
|
|
10661
10669
|
var gaussianDownResults = new Array(gaussianStep); //存放多个高斯Pass的模糊结果,用于Bloom
|
|
10662
|
-
var
|
|
10670
|
+
var enableHDR1 = true;
|
|
10671
|
+
var textureType1 = enableHDR1 ? glContext.HALF_FLOAT : glContext.UNSIGNED_BYTE;
|
|
10663
10672
|
var bloomThresholdPass = new BloomThresholdPass(renderer, {
|
|
10664
10673
|
name: "BloomThresholdPass",
|
|
10665
10674
|
attachments: [
|
|
@@ -11655,28 +11664,6 @@ var Renderer = /*#__PURE__*/ function() {
|
|
|
11655
11664
|
return Renderer;
|
|
11656
11665
|
}();
|
|
11657
11666
|
|
|
11658
|
-
/**
|
|
11659
|
-
* 后处理配置
|
|
11660
|
-
*/ var defaultGlobalVolume = {
|
|
11661
|
-
useHDR: false,
|
|
11662
|
-
/***** Material Uniform *****/ // Bloom
|
|
11663
|
-
useBloom: true,
|
|
11664
|
-
threshold: 1.0,
|
|
11665
|
-
bloomIntensity: 1.0,
|
|
11666
|
-
// ColorAdjustments
|
|
11667
|
-
brightness: 1.0,
|
|
11668
|
-
saturation: 1.0,
|
|
11669
|
-
contrast: 1.0,
|
|
11670
|
-
// Vignette
|
|
11671
|
-
// vignetteColor: new math.Color(0, 0, 0, 1),
|
|
11672
|
-
// vignetteCenter: new math.Vector2(0.5, 0.5),
|
|
11673
|
-
vignetteIntensity: 0.2,
|
|
11674
|
-
vignetteSmoothness: 0.4,
|
|
11675
|
-
vignetteRoundness: 1.0,
|
|
11676
|
-
// ToneMapping
|
|
11677
|
-
useToneMapping: true
|
|
11678
|
-
};
|
|
11679
|
-
|
|
11680
11667
|
var toHalf = function() {
|
|
11681
11668
|
var floatView = new Float32Array(1);
|
|
11682
11669
|
var int32View = new Int32Array(floatView.buffer);
|
|
@@ -11915,35 +11902,6 @@ function numberToFix(a, fixed) {
|
|
|
11915
11902
|
return Math.floor(a * base) / base;
|
|
11916
11903
|
}
|
|
11917
11904
|
|
|
11918
|
-
function _is_native_reflect_construct() {
|
|
11919
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
11920
|
-
if (Reflect.construct.sham) return false;
|
|
11921
|
-
if (typeof Proxy === "function") return true;
|
|
11922
|
-
try {
|
|
11923
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
11924
|
-
return true;
|
|
11925
|
-
} catch (e) {
|
|
11926
|
-
return false;
|
|
11927
|
-
}
|
|
11928
|
-
}
|
|
11929
|
-
|
|
11930
|
-
function _construct(Parent, args, Class) {
|
|
11931
|
-
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
11932
|
-
else {
|
|
11933
|
-
_construct = function construct(Parent, args, Class) {
|
|
11934
|
-
var a = [
|
|
11935
|
-
null
|
|
11936
|
-
];
|
|
11937
|
-
a.push.apply(a, args);
|
|
11938
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
11939
|
-
var instance = new Constructor();
|
|
11940
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
11941
|
-
return instance;
|
|
11942
|
-
};
|
|
11943
|
-
}
|
|
11944
|
-
return _construct.apply(null, arguments);
|
|
11945
|
-
}
|
|
11946
|
-
|
|
11947
11905
|
var keyframeInfo = {
|
|
11948
11906
|
/**
|
|
11949
11907
|
* 根据不同关键帧类型,获取位于曲线上的点
|
|
@@ -12487,17 +12445,6 @@ var QuaternionInner = /*#__PURE__*/ function() {
|
|
|
12487
12445
|
return QuaternionInner;
|
|
12488
12446
|
}();
|
|
12489
12447
|
|
|
12490
|
-
var SPRITE_VERTEX_STRIDE = 6;
|
|
12491
|
-
var SEMANTIC_PRE_COLOR_ATTACHMENT_0 = "PRE_COLOR_0";
|
|
12492
|
-
var SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_COLOR_SIZE_0";
|
|
12493
|
-
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0 = "PRE_MAIN_COLOR_0";
|
|
12494
|
-
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_MAIN_COLOR_SIZE_0";
|
|
12495
|
-
var PLAYER_OPTIONS_ENV_EDITOR = "editor";
|
|
12496
|
-
var HELP_LINK = {
|
|
12497
|
-
"Item duration can't be less than 0": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#AOnQS",
|
|
12498
|
-
"ValueType: 21/22 is not supported": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#smO1b"
|
|
12499
|
-
};
|
|
12500
|
-
|
|
12501
12448
|
var CURVE_PRO_TIME = 0;
|
|
12502
12449
|
var CURVE_PRO_VALUE = 1;
|
|
12503
12450
|
var CURVE_PRO_IN_TANGENT = 2;
|
|
@@ -13188,67 +13135,6 @@ var BezierCurveQuat = /*#__PURE__*/ function(ValueGetter) {
|
|
|
13188
13135
|
};
|
|
13189
13136
|
return BezierCurveQuat;
|
|
13190
13137
|
}(ValueGetter);
|
|
13191
|
-
var _obj$3;
|
|
13192
|
-
var map$1 = (_obj$3 = {}, _obj$3[ValueType.RANDOM] = function(props) {
|
|
13193
|
-
if (_instanceof1(props[0], Array)) {
|
|
13194
|
-
return new RandomVectorValue(props);
|
|
13195
|
-
}
|
|
13196
|
-
return new RandomValue(props);
|
|
13197
|
-
}, _obj$3[ValueType.CONSTANT] = function(props) {
|
|
13198
|
-
return new StaticValue(props);
|
|
13199
|
-
}, _obj$3[ValueType.CONSTANT_VEC2] = function(props) {
|
|
13200
|
-
return new StaticValue(props);
|
|
13201
|
-
}, _obj$3[ValueType.CONSTANT_VEC3] = function(props) {
|
|
13202
|
-
return new StaticValue(props);
|
|
13203
|
-
}, _obj$3[ValueType.CONSTANT_VEC4] = function(props) {
|
|
13204
|
-
return new StaticValue(props);
|
|
13205
|
-
}, _obj$3[ValueType.RGBA_COLOR] = function(props) {
|
|
13206
|
-
return new StaticValue(props);
|
|
13207
|
-
}, _obj$3[ValueType.COLORS] = function(props) {
|
|
13208
|
-
return new RandomSetValue(props.map(function(c) {
|
|
13209
|
-
return colorToArr$1(c, false);
|
|
13210
|
-
}));
|
|
13211
|
-
}, _obj$3[ValueType.LINE] = function(props) {
|
|
13212
|
-
if (props.length === 2 && props[0][0] === 0 && props[1][0] === 1) {
|
|
13213
|
-
return new LinearValue([
|
|
13214
|
-
props[0][1],
|
|
13215
|
-
props[1][1]
|
|
13216
|
-
]);
|
|
13217
|
-
}
|
|
13218
|
-
return new LineSegments(props);
|
|
13219
|
-
}, _obj$3[ValueType.GRADIENT_COLOR] = function(props) {
|
|
13220
|
-
return new GradientValue(props);
|
|
13221
|
-
}, _obj$3[ValueType.LINEAR_PATH] = function(pros) {
|
|
13222
|
-
return new PathSegments(pros);
|
|
13223
|
-
}, _obj$3[ValueType.BEZIER_CURVE] = function(props) {
|
|
13224
|
-
if (props.length === 1) {
|
|
13225
|
-
return new StaticValue(props[0][1][1]);
|
|
13226
|
-
}
|
|
13227
|
-
return new BezierCurve(props);
|
|
13228
|
-
}, _obj$3[ValueType.BEZIER_CURVE_PATH] = function(props) {
|
|
13229
|
-
if (props[0].length === 1) {
|
|
13230
|
-
return new StaticValue(_construct(Vector3, [].concat(props[1][0])));
|
|
13231
|
-
}
|
|
13232
|
-
return new BezierCurvePath(props);
|
|
13233
|
-
}, _obj$3[ValueType.BEZIER_CURVE_QUAT] = function(props) {
|
|
13234
|
-
if (props[0].length === 1) {
|
|
13235
|
-
return new StaticValue(_construct(Quaternion, [].concat(props[1][0])));
|
|
13236
|
-
}
|
|
13237
|
-
return new BezierCurveQuat(props);
|
|
13238
|
-
}, _obj$3);
|
|
13239
|
-
function createValueGetter(args) {
|
|
13240
|
-
if (!args || !isNaN(+args)) {
|
|
13241
|
-
return new StaticValue(args || 0);
|
|
13242
|
-
}
|
|
13243
|
-
if (_instanceof1(args, ValueGetter)) {
|
|
13244
|
-
return args;
|
|
13245
|
-
}
|
|
13246
|
-
if (isFunction(map$1[args[0]])) {
|
|
13247
|
-
return map$1[args[0]](args[1]);
|
|
13248
|
-
} else {
|
|
13249
|
-
throw new Error("ValueType: " + args[0] + " is not supported, see " + HELP_LINK["ValueType: 21/22 is not supported"] + ".");
|
|
13250
|
-
}
|
|
13251
|
-
}
|
|
13252
13138
|
function lineSegIntegrate(t, t0, t1, y0, y1) {
|
|
13253
13139
|
var h = t - t0;
|
|
13254
13140
|
return (y0 + y0 + (y1 - y0) * h / (t1 - t0)) * h / 2;
|
|
@@ -13325,6 +13211,164 @@ function createKeyFrameMeta() {
|
|
|
13325
13211
|
};
|
|
13326
13212
|
}
|
|
13327
13213
|
|
|
13214
|
+
function _is_native_reflect_construct() {
|
|
13215
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
13216
|
+
if (Reflect.construct.sham) return false;
|
|
13217
|
+
if (typeof Proxy === "function") return true;
|
|
13218
|
+
try {
|
|
13219
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
13220
|
+
return true;
|
|
13221
|
+
} catch (e) {
|
|
13222
|
+
return false;
|
|
13223
|
+
}
|
|
13224
|
+
}
|
|
13225
|
+
|
|
13226
|
+
function _construct(Parent, args, Class) {
|
|
13227
|
+
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
13228
|
+
else {
|
|
13229
|
+
_construct = function construct(Parent, args, Class) {
|
|
13230
|
+
var a = [
|
|
13231
|
+
null
|
|
13232
|
+
];
|
|
13233
|
+
a.push.apply(a, args);
|
|
13234
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
13235
|
+
var instance = new Constructor();
|
|
13236
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
13237
|
+
return instance;
|
|
13238
|
+
};
|
|
13239
|
+
}
|
|
13240
|
+
return _construct.apply(null, arguments);
|
|
13241
|
+
}
|
|
13242
|
+
|
|
13243
|
+
var Vector4Curve = /*#__PURE__*/ function(ValueGetter) {
|
|
13244
|
+
_inherits(Vector4Curve, ValueGetter);
|
|
13245
|
+
function Vector4Curve() {
|
|
13246
|
+
var _this;
|
|
13247
|
+
_this = ValueGetter.apply(this, arguments) || this;
|
|
13248
|
+
_this.value = new Vector4();
|
|
13249
|
+
return _this;
|
|
13250
|
+
}
|
|
13251
|
+
var _proto = Vector4Curve.prototype;
|
|
13252
|
+
_proto.onCreate = function onCreate(arg) {
|
|
13253
|
+
this.xCurve = createValueGetter(arg.x);
|
|
13254
|
+
this.yCurve = createValueGetter(arg.y);
|
|
13255
|
+
this.zCurve = createValueGetter(arg.z);
|
|
13256
|
+
this.wCurve = createValueGetter(arg.w);
|
|
13257
|
+
};
|
|
13258
|
+
_proto.getValue = function getValue(t) {
|
|
13259
|
+
var x = this.xCurve.getValue(t);
|
|
13260
|
+
var y = this.yCurve.getValue(t);
|
|
13261
|
+
var z = this.zCurve.getValue(t);
|
|
13262
|
+
var w = this.wCurve.getValue(t);
|
|
13263
|
+
this.value.set(x, y, z, w);
|
|
13264
|
+
return this.value;
|
|
13265
|
+
};
|
|
13266
|
+
return Vector4Curve;
|
|
13267
|
+
}(ValueGetter);
|
|
13268
|
+
|
|
13269
|
+
var SPRITE_VERTEX_STRIDE = 6;
|
|
13270
|
+
var SEMANTIC_PRE_COLOR_ATTACHMENT_0 = "PRE_COLOR_0";
|
|
13271
|
+
var SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_COLOR_SIZE_0";
|
|
13272
|
+
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0 = "PRE_MAIN_COLOR_0";
|
|
13273
|
+
var SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0 = "PRE_MAIN_COLOR_SIZE_0";
|
|
13274
|
+
var PLAYER_OPTIONS_ENV_EDITOR = "editor";
|
|
13275
|
+
var HELP_LINK = {
|
|
13276
|
+
"Item duration can't be less than 0": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#AOnQS",
|
|
13277
|
+
"ValueType: 21/22 is not supported": "https://galacean.antgroup.com/effects/user/gasrv4ka5sacrwpg#smO1b"
|
|
13278
|
+
};
|
|
13279
|
+
|
|
13280
|
+
var _obj$3;
|
|
13281
|
+
var map$1 = (_obj$3 = {}, _obj$3[ValueType.RANDOM] = function(props) {
|
|
13282
|
+
if (_instanceof1(props[0], Array)) {
|
|
13283
|
+
return new RandomVectorValue(props);
|
|
13284
|
+
}
|
|
13285
|
+
return new RandomValue(props);
|
|
13286
|
+
}, _obj$3[ValueType.CONSTANT] = function(props) {
|
|
13287
|
+
return new StaticValue(props);
|
|
13288
|
+
}, _obj$3[ValueType.CONSTANT_VEC2] = function(props) {
|
|
13289
|
+
return new StaticValue(props);
|
|
13290
|
+
}, _obj$3[ValueType.CONSTANT_VEC3] = function(props) {
|
|
13291
|
+
return new StaticValue(props);
|
|
13292
|
+
}, _obj$3[ValueType.CONSTANT_VEC4] = function(props) {
|
|
13293
|
+
return new StaticValue(props);
|
|
13294
|
+
}, _obj$3[ValueType.RGBA_COLOR] = function(props) {
|
|
13295
|
+
return new StaticValue(props);
|
|
13296
|
+
}, _obj$3[ValueType.COLORS] = function(props) {
|
|
13297
|
+
return new RandomSetValue(props.map(function(c) {
|
|
13298
|
+
return colorToArr$1(c, false);
|
|
13299
|
+
}));
|
|
13300
|
+
}, _obj$3[ValueType.LINE] = function(props) {
|
|
13301
|
+
if (props.length === 2 && props[0][0] === 0 && props[1][0] === 1) {
|
|
13302
|
+
return new LinearValue([
|
|
13303
|
+
props[0][1],
|
|
13304
|
+
props[1][1]
|
|
13305
|
+
]);
|
|
13306
|
+
}
|
|
13307
|
+
return new LineSegments(props);
|
|
13308
|
+
}, _obj$3[ValueType.GRADIENT_COLOR] = function(props) {
|
|
13309
|
+
return new GradientValue(props);
|
|
13310
|
+
}, _obj$3[ValueType.LINEAR_PATH] = function(pros) {
|
|
13311
|
+
return new PathSegments(pros);
|
|
13312
|
+
}, _obj$3[ValueType.BEZIER_CURVE] = function(props) {
|
|
13313
|
+
if (props.length === 1) {
|
|
13314
|
+
return new StaticValue(props[0][1][1]);
|
|
13315
|
+
}
|
|
13316
|
+
return new BezierCurve(props);
|
|
13317
|
+
}, _obj$3[ValueType.BEZIER_CURVE_PATH] = function(props) {
|
|
13318
|
+
if (props[0].length === 1) {
|
|
13319
|
+
return new StaticValue(_construct(Vector3, [].concat(props[1][0])));
|
|
13320
|
+
}
|
|
13321
|
+
return new BezierCurvePath(props);
|
|
13322
|
+
}, _obj$3[ValueType.BEZIER_CURVE_QUAT] = function(props) {
|
|
13323
|
+
if (props[0].length === 1) {
|
|
13324
|
+
return new StaticValue(_construct(Quaternion, [].concat(props[1][0])));
|
|
13325
|
+
}
|
|
13326
|
+
return new BezierCurveQuat(props);
|
|
13327
|
+
}, _obj$3[ValueType.COLOR_CURVE] = function(props) {
|
|
13328
|
+
return new ColorCurve(props);
|
|
13329
|
+
}, _obj$3[ValueType.VECTOR4_CURVE] = function(props) {
|
|
13330
|
+
return new Vector4Curve(props);
|
|
13331
|
+
}, _obj$3);
|
|
13332
|
+
function createValueGetter(args) {
|
|
13333
|
+
if (!args || !isNaN(+args)) {
|
|
13334
|
+
return new StaticValue(args || 0);
|
|
13335
|
+
}
|
|
13336
|
+
if (_instanceof1(args, ValueGetter)) {
|
|
13337
|
+
return args;
|
|
13338
|
+
}
|
|
13339
|
+
if (isFunction(map$1[args[0]])) {
|
|
13340
|
+
return map$1[args[0]](args[1]);
|
|
13341
|
+
} else {
|
|
13342
|
+
throw new Error("ValueType: " + args[0] + " is not supported, see " + HELP_LINK["ValueType: 21/22 is not supported"] + ".");
|
|
13343
|
+
}
|
|
13344
|
+
}
|
|
13345
|
+
|
|
13346
|
+
var ColorCurve = /*#__PURE__*/ function(ValueGetter) {
|
|
13347
|
+
_inherits(ColorCurve, ValueGetter);
|
|
13348
|
+
function ColorCurve() {
|
|
13349
|
+
var _this;
|
|
13350
|
+
_this = ValueGetter.apply(this, arguments) || this;
|
|
13351
|
+
_this.value = new Color();
|
|
13352
|
+
return _this;
|
|
13353
|
+
}
|
|
13354
|
+
var _proto = ColorCurve.prototype;
|
|
13355
|
+
_proto.onCreate = function onCreate(arg) {
|
|
13356
|
+
this.rCurve = createValueGetter(arg.r);
|
|
13357
|
+
this.gCurve = createValueGetter(arg.g);
|
|
13358
|
+
this.bCurve = createValueGetter(arg.b);
|
|
13359
|
+
this.aCurve = createValueGetter(arg.a);
|
|
13360
|
+
};
|
|
13361
|
+
_proto.getValue = function getValue(t) {
|
|
13362
|
+
var r = this.rCurve.getValue(t);
|
|
13363
|
+
var g = this.gCurve.getValue(t);
|
|
13364
|
+
var b = this.bCurve.getValue(t);
|
|
13365
|
+
var a = this.aCurve.getValue(t);
|
|
13366
|
+
this.value.set(r, g, b, a);
|
|
13367
|
+
return this.value;
|
|
13368
|
+
};
|
|
13369
|
+
return ColorCurve;
|
|
13370
|
+
}(ValueGetter);
|
|
13371
|
+
|
|
13328
13372
|
var BaseRenderComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
13329
13373
|
_inherits(BaseRenderComponent, RendererComponent);
|
|
13330
13374
|
function BaseRenderComponent(engine) {
|
|
@@ -15360,7 +15404,12 @@ var GraphicsPath = /*#__PURE__*/ function() {
|
|
|
15360
15404
|
this.dirty = true;
|
|
15361
15405
|
return this;
|
|
15362
15406
|
};
|
|
15363
|
-
|
|
15407
|
+
/**
|
|
15408
|
+
* Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.
|
|
15409
|
+
* @param x - The x-coordinate for the starting point.
|
|
15410
|
+
* @param y - The y-coordinate for the starting point.
|
|
15411
|
+
* @returns The instance of the current object for chaining.
|
|
15412
|
+
*/ _proto.moveTo = function moveTo(x, y) {
|
|
15364
15413
|
this.instructions.push({
|
|
15365
15414
|
action: "moveTo",
|
|
15366
15415
|
data: [
|
|
@@ -15371,7 +15420,16 @@ var GraphicsPath = /*#__PURE__*/ function() {
|
|
|
15371
15420
|
this.dirty = true;
|
|
15372
15421
|
return this;
|
|
15373
15422
|
};
|
|
15374
|
-
|
|
15423
|
+
/**
|
|
15424
|
+
* Draws an ellipse at the specified location and with the given x and y radii.
|
|
15425
|
+
* An optional transformation can be applied, allowing for rotation, scaling, and translation.
|
|
15426
|
+
* @param x - The x-coordinate of the center of the ellipse.
|
|
15427
|
+
* @param y - The y-coordinate of the center of the ellipse.
|
|
15428
|
+
* @param radiusX - The horizontal radius of the ellipse.
|
|
15429
|
+
* @param radiusY - The vertical radius of the ellipse.
|
|
15430
|
+
* @param transform - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.
|
|
15431
|
+
* @returns The instance of the current object for chaining.
|
|
15432
|
+
*/ _proto.ellipse = function ellipse(x, y, radiusX, radiusY, transform) {
|
|
15375
15433
|
this.instructions.push({
|
|
15376
15434
|
action: "ellipse",
|
|
15377
15435
|
data: [
|
|
@@ -15379,7 +15437,29 @@ var GraphicsPath = /*#__PURE__*/ function() {
|
|
|
15379
15437
|
y,
|
|
15380
15438
|
radiusX,
|
|
15381
15439
|
radiusY,
|
|
15382
|
-
|
|
15440
|
+
transform
|
|
15441
|
+
]
|
|
15442
|
+
});
|
|
15443
|
+
this.dirty = true;
|
|
15444
|
+
return this;
|
|
15445
|
+
};
|
|
15446
|
+
/**
|
|
15447
|
+
* Draws a rectangle shape. This method adds a new rectangle path to the current drawing.
|
|
15448
|
+
* @param x - The x-coordinate of the top-left corner of the rectangle.
|
|
15449
|
+
* @param y - The y-coordinate of the top-left corner of the rectangle.
|
|
15450
|
+
* @param w - The width of the rectangle.
|
|
15451
|
+
* @param h - The height of the rectangle.
|
|
15452
|
+
* @param transform - An optional `Matrix` object to apply a transformation to the rectangle.
|
|
15453
|
+
* @returns The instance of the current object for chaining.
|
|
15454
|
+
*/ _proto.rect = function rect(x, y, w, h, transform) {
|
|
15455
|
+
this.instructions.push({
|
|
15456
|
+
action: "rect",
|
|
15457
|
+
data: [
|
|
15458
|
+
x,
|
|
15459
|
+
y,
|
|
15460
|
+
w,
|
|
15461
|
+
h,
|
|
15462
|
+
transform
|
|
15383
15463
|
]
|
|
15384
15464
|
});
|
|
15385
15465
|
this.dirty = true;
|
|
@@ -15418,9 +15498,9 @@ var ShapeComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15418
15498
|
_this = RendererComponent.call(this, engine) || this;
|
|
15419
15499
|
_this.path = new GraphicsPath();
|
|
15420
15500
|
_this.curveValues = [];
|
|
15421
|
-
_this.
|
|
15422
|
-
_this.vert = "\nprecision highp float;\n\nattribute vec3 aPos;//x y\n\
|
|
15423
|
-
_this.frag = "\nprecision highp float;\n\
|
|
15501
|
+
_this.animated = false;
|
|
15502
|
+
_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";
|
|
15503
|
+
_this.frag = "\nprecision highp float;\n\nuniform vec4 _Color;\n\nvoid main() {\n vec4 color = _Color;\n gl_FragColor = color;\n}\n";
|
|
15424
15504
|
if (!_this.geometry) {
|
|
15425
15505
|
_this.geometry = Geometry.create(engine, {
|
|
15426
15506
|
attributes: {
|
|
@@ -15470,10 +15550,9 @@ var ShapeComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15470
15550
|
}
|
|
15471
15551
|
var _proto = ShapeComponent.prototype;
|
|
15472
15552
|
_proto.onUpdate = function onUpdate(dt) {
|
|
15473
|
-
if (this.
|
|
15553
|
+
if (this.animated) {
|
|
15474
15554
|
this.buildPath(this.data);
|
|
15475
15555
|
this.buildGeometryFromPath(this.path.shapePath);
|
|
15476
|
-
// this.dirty = false;
|
|
15477
15556
|
}
|
|
15478
15557
|
};
|
|
15479
15558
|
_proto.render = function render(renderer) {
|
|
@@ -15580,7 +15659,7 @@ var ShapeComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15580
15659
|
_proto.fromData = function fromData(data) {
|
|
15581
15660
|
RendererComponent.prototype.fromData.call(this, data);
|
|
15582
15661
|
this.data = data;
|
|
15583
|
-
this.
|
|
15662
|
+
this.animated = true;
|
|
15584
15663
|
};
|
|
15585
15664
|
return ShapeComponent;
|
|
15586
15665
|
}(RendererComponent);
|
|
@@ -15968,6 +16047,18 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15968
16047
|
1,
|
|
15969
16048
|
1
|
|
15970
16049
|
];
|
|
16050
|
+
/**
|
|
16051
|
+
* 拖拽X范围
|
|
16052
|
+
*/ _this.dragRange = {
|
|
16053
|
+
dxRange: [
|
|
16054
|
+
0,
|
|
16055
|
+
0
|
|
16056
|
+
],
|
|
16057
|
+
dyRange: [
|
|
16058
|
+
0,
|
|
16059
|
+
0
|
|
16060
|
+
]
|
|
16061
|
+
};
|
|
15971
16062
|
/** 是否响应点击和拖拽交互事件 */ _this._interactive = true;
|
|
15972
16063
|
_this.hasBeenAddedToComposition = false;
|
|
15973
16064
|
_this.getHitTestParams = function(force) {
|
|
@@ -15987,6 +16078,24 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
15987
16078
|
return _this;
|
|
15988
16079
|
}
|
|
15989
16080
|
var _proto = InteractComponent.prototype;
|
|
16081
|
+
_proto.getDragRangeX = function getDragRangeX() {
|
|
16082
|
+
return this.dragRange.dxRange;
|
|
16083
|
+
};
|
|
16084
|
+
_proto.setDragRangeX = function setDragRangeX(min, max) {
|
|
16085
|
+
this.dragRange.dxRange = [
|
|
16086
|
+
min,
|
|
16087
|
+
max
|
|
16088
|
+
];
|
|
16089
|
+
};
|
|
16090
|
+
_proto.getDragRangeY = function getDragRangeY() {
|
|
16091
|
+
return this.dragRange.dyRange;
|
|
16092
|
+
};
|
|
16093
|
+
_proto.setDragRangeY = function setDragRangeY(min, max) {
|
|
16094
|
+
this.dragRange.dyRange = [
|
|
16095
|
+
min,
|
|
16096
|
+
max
|
|
16097
|
+
];
|
|
16098
|
+
};
|
|
15990
16099
|
_proto.onStart = function onStart() {
|
|
15991
16100
|
var _this = this;
|
|
15992
16101
|
var options = this.item.props.content.options;
|
|
@@ -16030,6 +16139,10 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16030
16139
|
}
|
|
16031
16140
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16032
16141
|
if (!this.hasBeenAddedToComposition && this.item.composition) {
|
|
16142
|
+
var type = this.interactData.options.type;
|
|
16143
|
+
if (type === InteractType.CLICK) {
|
|
16144
|
+
this.clickable = true;
|
|
16145
|
+
}
|
|
16033
16146
|
var options = this.item.props.content.options;
|
|
16034
16147
|
this.item.composition.addInteractiveItem(this.item, options.type);
|
|
16035
16148
|
this.hasBeenAddedToComposition = true;
|
|
@@ -16061,7 +16174,6 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16061
16174
|
if (!(evt == null ? void 0 : evt.cameraParam) || !this.canInteract() || !this.item.composition) {
|
|
16062
16175
|
return;
|
|
16063
16176
|
}
|
|
16064
|
-
var options = this.item.props.content.options;
|
|
16065
16177
|
var _evt_cameraParam = evt.cameraParam, position = _evt_cameraParam.position, fov = _evt_cameraParam.fov;
|
|
16066
16178
|
var dy = event.dy;
|
|
16067
16179
|
var dx = event.dx * event.width / event.height;
|
|
@@ -16069,23 +16181,20 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16069
16181
|
var sp = Math.tan(fov * Math.PI / 180 / 2) * Math.abs(depth);
|
|
16070
16182
|
var height = dy * sp;
|
|
16071
16183
|
var width = dx * sp;
|
|
16184
|
+
var _this_dragRange = this.dragRange, dxRange = _this_dragRange.dxRange, dyRange = _this_dragRange.dyRange;
|
|
16072
16185
|
var nx = position[0] - this.dragRatio[0] * width;
|
|
16073
16186
|
var ny = position[1] - this.dragRatio[1] * height;
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
}
|
|
16082
|
-
if (
|
|
16083
|
-
var
|
|
16084
|
-
|
|
16085
|
-
if (ny !== min1 && ny !== max1 && min1 !== max1) {
|
|
16086
|
-
var _event_origin1;
|
|
16087
|
-
(_event_origin1 = event.origin) == null ? void 0 : _event_origin1.preventDefault();
|
|
16088
|
-
}
|
|
16187
|
+
var xMin = dxRange[0], xMax = dxRange[1];
|
|
16188
|
+
var yMin = dyRange[0], yMax = dyRange[1];
|
|
16189
|
+
nx = clamp$1(nx, xMin, xMax);
|
|
16190
|
+
ny = clamp$1(ny, yMin, yMax);
|
|
16191
|
+
if (nx !== xMin && nx !== xMax && xMin !== xMax) {
|
|
16192
|
+
var _event_origin;
|
|
16193
|
+
(_event_origin = event.origin) == null ? void 0 : _event_origin.preventDefault();
|
|
16194
|
+
}
|
|
16195
|
+
if (ny !== yMin && ny !== yMax && yMin !== yMax) {
|
|
16196
|
+
var _event_origin1;
|
|
16197
|
+
(_event_origin1 = event.origin) == null ? void 0 : _event_origin1.preventDefault();
|
|
16089
16198
|
}
|
|
16090
16199
|
this.item.composition.camera.position = new Vector3(nx, ny, depth);
|
|
16091
16200
|
};
|
|
@@ -16166,6 +16275,15 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16166
16275
|
_proto.fromData = function fromData(data) {
|
|
16167
16276
|
RendererComponent.prototype.fromData.call(this, data);
|
|
16168
16277
|
this.interactData = data;
|
|
16278
|
+
if (data.options.type === InteractType.DRAG) {
|
|
16279
|
+
var options = data.options;
|
|
16280
|
+
if (options.dxRange) {
|
|
16281
|
+
this.dragRange.dxRange = options.dxRange;
|
|
16282
|
+
}
|
|
16283
|
+
if (options.dyRange) {
|
|
16284
|
+
this.dragRange.dyRange = options.dyRange;
|
|
16285
|
+
}
|
|
16286
|
+
}
|
|
16169
16287
|
};
|
|
16170
16288
|
_proto.canInteract = function canInteract() {
|
|
16171
16289
|
var _this_item_composition;
|
|
@@ -16540,7 +16658,7 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
16540
16658
|
};
|
|
16541
16659
|
}
|
|
16542
16660
|
var _proto = PlayableOutput.prototype;
|
|
16543
|
-
_proto.
|
|
16661
|
+
_proto.setSourcePlayable = function setSourcePlayable(playable, port) {
|
|
16544
16662
|
if (port === void 0) port = 0;
|
|
16545
16663
|
this.sourcePlayable = playable;
|
|
16546
16664
|
this.sourceOutputPort = port;
|
|
@@ -17323,21 +17441,6 @@ var VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
17323
17441
|
return tf;
|
|
17324
17442
|
};
|
|
17325
17443
|
/**
|
|
17326
|
-
* 获取元素内部节点的变换,目前只有场景树元素在使用
|
|
17327
|
-
* @param itemId 元素id信息,如果带^就返回内部节点变换,否则返回自己的变换
|
|
17328
|
-
* @returns 元素变换或内部节点变换
|
|
17329
|
-
*/ _proto.getNodeTransform = function getNodeTransform(itemId) {
|
|
17330
|
-
for(var i = 0; i < this.components.length; i++){
|
|
17331
|
-
var comp = this.components[1];
|
|
17332
|
-
// @ts-expect-error
|
|
17333
|
-
if (comp.getNodeTransform) {
|
|
17334
|
-
// @ts-expect-error
|
|
17335
|
-
return comp.getNodeTransform(itemId);
|
|
17336
|
-
}
|
|
17337
|
-
}
|
|
17338
|
-
return this.transform;
|
|
17339
|
-
};
|
|
17340
|
-
/**
|
|
17341
17444
|
* 设置元素在 3D 坐标轴上相对移动
|
|
17342
17445
|
*/ _proto.translate = function translate(x, y, z) {
|
|
17343
17446
|
this.transform.translate(x, y, z);
|
|
@@ -17816,7 +17919,7 @@ var SpriteColorPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
17816
17919
|
return SpriteColorPlayableAsset;
|
|
17817
17920
|
}(PlayableAsset);
|
|
17818
17921
|
SpriteColorPlayableAsset = __decorate([
|
|
17819
|
-
effectsClass(
|
|
17922
|
+
effectsClass(DataType.SpriteColorPlayableAsset)
|
|
17820
17923
|
], SpriteColorPlayableAsset);
|
|
17821
17924
|
var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
17822
17925
|
_inherits(SpriteComponent, BaseRenderComponent);
|
|
@@ -17835,6 +17938,7 @@ var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
17835
17938
|
}
|
|
17836
17939
|
var _proto = SpriteComponent.prototype;
|
|
17837
17940
|
_proto.onUpdate = function onUpdate(dt) {
|
|
17941
|
+
var _this = this;
|
|
17838
17942
|
if (!this.isManualTimeSet) {
|
|
17839
17943
|
this.frameAnimationTime += dt / 1000;
|
|
17840
17944
|
this.isManualTimeSet = false;
|
|
@@ -17900,6 +18004,16 @@ var SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
17900
18004
|
dy
|
|
17901
18005
|
]);
|
|
17902
18006
|
}
|
|
18007
|
+
var video = this.renderer.texture.source.video;
|
|
18008
|
+
if (video) {
|
|
18009
|
+
if (time === 0 || time === this.item.duration) {
|
|
18010
|
+
video.pause();
|
|
18011
|
+
} else {
|
|
18012
|
+
video.play().catch(function(e) {
|
|
18013
|
+
_this.engine.renderErrors.add(e);
|
|
18014
|
+
});
|
|
18015
|
+
}
|
|
18016
|
+
}
|
|
17903
18017
|
};
|
|
17904
18018
|
_proto.onDestroy = function onDestroy() {
|
|
17905
18019
|
if (this.item && this.item.composition) {
|
|
@@ -22405,7 +22519,7 @@ var TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
22405
22519
|
var _proto = TrackAsset.prototype;
|
|
22406
22520
|
/**
|
|
22407
22521
|
* 重写该方法以获取自定义对象绑定
|
|
22408
|
-
*/ _proto.
|
|
22522
|
+
*/ _proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
22409
22523
|
if (this.parent) {
|
|
22410
22524
|
this.boundObject = this.parent.boundObject;
|
|
22411
22525
|
}
|
|
@@ -22536,6 +22650,8 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
22536
22650
|
this.playable.play();
|
|
22537
22651
|
}
|
|
22538
22652
|
this.parentMixer.setInputWeight(this.playable, weight);
|
|
22653
|
+
var clipTime = clip.toLocalTime(localTime);
|
|
22654
|
+
this.playable.setTime(clipTime);
|
|
22539
22655
|
// 判断动画是否结束
|
|
22540
22656
|
if (ended) {
|
|
22541
22657
|
if (_instanceof1(boundObject, VFXItem) && !boundObject.ended) {
|
|
@@ -22550,8 +22666,6 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
22550
22666
|
this.playable.pause();
|
|
22551
22667
|
}
|
|
22552
22668
|
}
|
|
22553
|
-
var clipTime = clip.toLocalTime(localTime);
|
|
22554
|
-
this.playable.setTime(clipTime);
|
|
22555
22669
|
};
|
|
22556
22670
|
_create_class(RuntimeClip, [
|
|
22557
22671
|
{
|
|
@@ -22630,16 +22744,16 @@ ActivationTrack = __decorate([
|
|
|
22630
22744
|
effectsClass(DataType.ActivationTrack)
|
|
22631
22745
|
], ActivationTrack);
|
|
22632
22746
|
|
|
22633
|
-
var
|
|
22634
|
-
_inherits(
|
|
22635
|
-
function
|
|
22747
|
+
var PropertyClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
22748
|
+
_inherits(PropertyClipPlayable, Playable);
|
|
22749
|
+
function PropertyClipPlayable() {
|
|
22636
22750
|
return Playable.apply(this, arguments);
|
|
22637
22751
|
}
|
|
22638
|
-
var _proto =
|
|
22752
|
+
var _proto = PropertyClipPlayable.prototype;
|
|
22639
22753
|
_proto.processFrame = function processFrame(context) {
|
|
22640
22754
|
this.value = this.curve.getValue(this.time);
|
|
22641
22755
|
};
|
|
22642
|
-
return
|
|
22756
|
+
return PropertyClipPlayable;
|
|
22643
22757
|
}(Playable);
|
|
22644
22758
|
|
|
22645
22759
|
var FloatPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
@@ -22663,7 +22777,7 @@ var FloatPropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
22663
22777
|
var weight = this.getInputWeight(i);
|
|
22664
22778
|
if (weight > 0) {
|
|
22665
22779
|
var propertyClipPlayable = this.getInput(i);
|
|
22666
|
-
if (!_instanceof1(propertyClipPlayable,
|
|
22780
|
+
if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
|
|
22667
22781
|
console.error("FloatPropertyTrack added non-FloatPropertyPlayableAsset");
|
|
22668
22782
|
continue;
|
|
22669
22783
|
}
|
|
@@ -23178,11 +23292,11 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23178
23292
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.items), _step; !(_step = _iterator()).done;){
|
|
23179
23293
|
var item = _step.value;
|
|
23180
23294
|
item.composition = this.item.composition;
|
|
23181
|
-
var itemData = item.props;
|
|
23182
23295
|
// 设置预合成作为元素时的时长、结束行为和渲染延时
|
|
23183
|
-
if (
|
|
23296
|
+
if (VFXItem.isComposition(item)) {
|
|
23184
23297
|
this.item.composition.refContent.push(item);
|
|
23185
|
-
var
|
|
23298
|
+
var compositionContent = item.props.content;
|
|
23299
|
+
var refId = compositionContent.options.refId;
|
|
23186
23300
|
var props = this.item.composition.refCompositionProps.get(refId);
|
|
23187
23301
|
if (!props) {
|
|
23188
23302
|
throw new Error("Referenced precomposition with Id: " + refId + " does not exist.");
|
|
@@ -23227,7 +23341,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23227
23341
|
_proto.hitTest = function hitTest(ray, x, y, regions, force, options) {
|
|
23228
23342
|
var _this, _loop = function(i) {
|
|
23229
23343
|
var item = _this.items[i];
|
|
23230
|
-
if (item.getVisible() && item.transform.getValid() && !
|
|
23344
|
+
if (item.getVisible() && item.transform.getValid() && !VFXItem.isComposition(item) && !skip(item)) {
|
|
23231
23345
|
var hitParams = item.getHitTestParams(force);
|
|
23232
23346
|
if (hitParams) {
|
|
23233
23347
|
var success = false;
|
|
@@ -23316,16 +23430,19 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23316
23430
|
var sceneBinding = _step.value;
|
|
23317
23431
|
sceneBinding.key.boundObject = sceneBinding.value;
|
|
23318
23432
|
}
|
|
23433
|
+
// 未了通过帧对比,需要保证和原有的 update 时机一致。
|
|
23434
|
+
// 因此这边更新一次对象绑定,后续 timeline playable 中 sort tracks 的排序才能和原先的版本对上。
|
|
23435
|
+
// 如果不需要严格保证和之前的 updata 时机一致,这边的更新和 timeline playable 中的 sortTracks 都能去掉。
|
|
23319
23436
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(this.timelineAsset.tracks), _step1; !(_step1 = _iterator1()).done;){
|
|
23320
23437
|
var masterTrack = _step1.value;
|
|
23321
|
-
this.
|
|
23438
|
+
this.updateTrackAnimatedObject(masterTrack);
|
|
23322
23439
|
}
|
|
23323
23440
|
};
|
|
23324
|
-
_proto.
|
|
23441
|
+
_proto.updateTrackAnimatedObject = function updateTrackAnimatedObject(track) {
|
|
23325
23442
|
for(var _iterator = _create_for_of_iterator_helper_loose(track.getChildTracks()), _step; !(_step = _iterator()).done;){
|
|
23326
23443
|
var subTrack = _step.value;
|
|
23327
|
-
subTrack.
|
|
23328
|
-
this.
|
|
23444
|
+
subTrack.updateAnimatedObject();
|
|
23445
|
+
this.updateTrackAnimatedObject(subTrack);
|
|
23329
23446
|
}
|
|
23330
23447
|
};
|
|
23331
23448
|
return CompositionComponent;
|
|
@@ -23374,23 +23491,101 @@ var SubCompositionMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23374
23491
|
return SubCompositionMixerPlayable;
|
|
23375
23492
|
}(Playable);
|
|
23376
23493
|
|
|
23377
|
-
var
|
|
23378
|
-
_inherits(
|
|
23379
|
-
function
|
|
23494
|
+
var Vector4PropertyMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
23495
|
+
_inherits(Vector4PropertyMixerPlayable, Playable);
|
|
23496
|
+
function Vector4PropertyMixerPlayable() {
|
|
23497
|
+
var _this;
|
|
23498
|
+
_this = Playable.apply(this, arguments) || this;
|
|
23499
|
+
_this.propertyName = "";
|
|
23500
|
+
return _this;
|
|
23501
|
+
}
|
|
23502
|
+
var _proto = Vector4PropertyMixerPlayable.prototype;
|
|
23503
|
+
_proto.processFrame = function processFrame(context) {
|
|
23504
|
+
var boundObject = context.output.getUserData();
|
|
23505
|
+
if (!boundObject) {
|
|
23506
|
+
return;
|
|
23507
|
+
}
|
|
23508
|
+
var hasInput = false;
|
|
23509
|
+
var value = boundObject[this.propertyName];
|
|
23510
|
+
if (!_instanceof1(value, Vector4)) {
|
|
23511
|
+
return;
|
|
23512
|
+
}
|
|
23513
|
+
value.setZero();
|
|
23514
|
+
// evaluate the curve
|
|
23515
|
+
for(var i = 0; i < this.getInputCount(); i++){
|
|
23516
|
+
var weight = this.getInputWeight(i);
|
|
23517
|
+
if (weight > 0) {
|
|
23518
|
+
var propertyClipPlayable = this.getInput(i);
|
|
23519
|
+
if (!_instanceof1(propertyClipPlayable, PropertyClipPlayable)) {
|
|
23520
|
+
console.error("Vector4PropertyTrack added non-Vector4PropertyPlayableAsset");
|
|
23521
|
+
continue;
|
|
23522
|
+
}
|
|
23523
|
+
var curveValue = propertyClipPlayable.value;
|
|
23524
|
+
value.x += curveValue.x * weight;
|
|
23525
|
+
value.y += curveValue.y * weight;
|
|
23526
|
+
value.z += curveValue.z * weight;
|
|
23527
|
+
value.w += curveValue.w * weight;
|
|
23528
|
+
hasInput = true;
|
|
23529
|
+
}
|
|
23530
|
+
}
|
|
23531
|
+
// set value
|
|
23532
|
+
if (hasInput) {
|
|
23533
|
+
boundObject[this.propertyName] = value;
|
|
23534
|
+
}
|
|
23535
|
+
};
|
|
23536
|
+
return Vector4PropertyMixerPlayable;
|
|
23537
|
+
}(Playable);
|
|
23538
|
+
|
|
23539
|
+
var PropertyTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
23540
|
+
_inherits(PropertyTrack, TrackAsset);
|
|
23541
|
+
function PropertyTrack() {
|
|
23380
23542
|
var _this;
|
|
23381
23543
|
_this = TrackAsset.apply(this, arguments) || this;
|
|
23544
|
+
_this.propertyNames = [];
|
|
23382
23545
|
_this.path = "";
|
|
23383
|
-
_this.propertyName = "";
|
|
23384
23546
|
return _this;
|
|
23385
23547
|
}
|
|
23548
|
+
var _proto = PropertyTrack.prototype;
|
|
23549
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23550
|
+
var propertyNames = this.propertyNames;
|
|
23551
|
+
var target = this.parent.boundObject;
|
|
23552
|
+
for(var i = 0; i < propertyNames.length - 1; i++){
|
|
23553
|
+
var property = target[propertyNames[i]];
|
|
23554
|
+
if (property === undefined) {
|
|
23555
|
+
console.error("The " + propertyNames[i] + " property of " + target + " was not found");
|
|
23556
|
+
}
|
|
23557
|
+
target = property;
|
|
23558
|
+
}
|
|
23559
|
+
this.boundObject = target;
|
|
23560
|
+
};
|
|
23561
|
+
_proto.fromData = function fromData(data) {
|
|
23562
|
+
TrackAsset.prototype.fromData.call(this, data);
|
|
23563
|
+
var propertyNames = this.path.split(".");
|
|
23564
|
+
this.propertyNames = propertyNames;
|
|
23565
|
+
};
|
|
23566
|
+
return PropertyTrack;
|
|
23567
|
+
}(TrackAsset);
|
|
23568
|
+
__decorate([
|
|
23569
|
+
serialize()
|
|
23570
|
+
], PropertyTrack.prototype, "path", void 0);
|
|
23571
|
+
|
|
23572
|
+
var FloatPropertyTrack = /*#__PURE__*/ function(PropertyTrack) {
|
|
23573
|
+
_inherits(FloatPropertyTrack, PropertyTrack);
|
|
23574
|
+
function FloatPropertyTrack() {
|
|
23575
|
+
return PropertyTrack.apply(this, arguments);
|
|
23576
|
+
}
|
|
23386
23577
|
var _proto = FloatPropertyTrack.prototype;
|
|
23387
23578
|
_proto.createTrackMixer = function createTrackMixer(graph) {
|
|
23388
23579
|
var mixer = new FloatPropertyMixerPlayable(graph);
|
|
23389
|
-
|
|
23580
|
+
var propertyNames = this.propertyNames;
|
|
23581
|
+
if (propertyNames.length > 0) {
|
|
23582
|
+
var propertyName = propertyNames[propertyNames.length - 1];
|
|
23583
|
+
mixer.propertyName = propertyName;
|
|
23584
|
+
}
|
|
23390
23585
|
return mixer;
|
|
23391
23586
|
};
|
|
23392
|
-
_proto.
|
|
23393
|
-
var propertyNames = this.
|
|
23587
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23588
|
+
var propertyNames = this.propertyNames;
|
|
23394
23589
|
var target = this.parent.boundObject;
|
|
23395
23590
|
for(var i = 0; i < propertyNames.length - 1; i++){
|
|
23396
23591
|
var property = target[propertyNames[i]];
|
|
@@ -23399,18 +23594,12 @@ var FloatPropertyTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
|
23399
23594
|
}
|
|
23400
23595
|
target = property;
|
|
23401
23596
|
}
|
|
23402
|
-
if (propertyNames.length > 0) {
|
|
23403
|
-
this.propertyName = propertyNames[propertyNames.length - 1];
|
|
23404
|
-
}
|
|
23405
23597
|
this.boundObject = target;
|
|
23406
23598
|
};
|
|
23407
23599
|
return FloatPropertyTrack;
|
|
23408
|
-
}(
|
|
23409
|
-
__decorate([
|
|
23410
|
-
serialize()
|
|
23411
|
-
], FloatPropertyTrack.prototype, "path", void 0);
|
|
23600
|
+
}(PropertyTrack);
|
|
23412
23601
|
FloatPropertyTrack = __decorate([
|
|
23413
|
-
effectsClass(
|
|
23602
|
+
effectsClass(DataType.FloatPropertyTrack)
|
|
23414
23603
|
], FloatPropertyTrack);
|
|
23415
23604
|
|
|
23416
23605
|
var SpriteColorTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
@@ -23430,7 +23619,7 @@ var SubCompositionTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
|
23430
23619
|
return TrackAsset.apply(this, arguments);
|
|
23431
23620
|
}
|
|
23432
23621
|
var _proto = SubCompositionTrack.prototype;
|
|
23433
|
-
_proto.
|
|
23622
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23434
23623
|
if (!this.parent || !_instanceof1(this.parent.boundObject, VFXItem)) {
|
|
23435
23624
|
throw new Error("SubCompositionTrack needs to be set under the VFXItem track.");
|
|
23436
23625
|
}
|
|
@@ -23456,6 +23645,70 @@ TransformTrack = __decorate([
|
|
|
23456
23645
|
effectsClass(DataType.TransformTrack)
|
|
23457
23646
|
], TransformTrack);
|
|
23458
23647
|
|
|
23648
|
+
var MaterialTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
23649
|
+
_inherits(MaterialTrack, TrackAsset);
|
|
23650
|
+
function MaterialTrack() {
|
|
23651
|
+
return TrackAsset.apply(this, arguments);
|
|
23652
|
+
}
|
|
23653
|
+
var _proto = MaterialTrack.prototype;
|
|
23654
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {
|
|
23655
|
+
if (!_instanceof1(this.parent.boundObject, RendererComponent)) {
|
|
23656
|
+
return;
|
|
23657
|
+
}
|
|
23658
|
+
this.parent.boundObject;
|
|
23659
|
+
this.boundObject = this.parent.boundObject.materials[this.index];
|
|
23660
|
+
};
|
|
23661
|
+
return MaterialTrack;
|
|
23662
|
+
}(TrackAsset);
|
|
23663
|
+
__decorate([
|
|
23664
|
+
serialize()
|
|
23665
|
+
], MaterialTrack.prototype, "index", void 0);
|
|
23666
|
+
MaterialTrack = __decorate([
|
|
23667
|
+
effectsClass("MaterialTrack")
|
|
23668
|
+
], MaterialTrack);
|
|
23669
|
+
|
|
23670
|
+
var Vector4PropertyTrack = /*#__PURE__*/ function(PropertyTrack) {
|
|
23671
|
+
_inherits(Vector4PropertyTrack, PropertyTrack);
|
|
23672
|
+
function Vector4PropertyTrack() {
|
|
23673
|
+
return PropertyTrack.apply(this, arguments);
|
|
23674
|
+
}
|
|
23675
|
+
var _proto = Vector4PropertyTrack.prototype;
|
|
23676
|
+
_proto.createTrackMixer = function createTrackMixer(graph) {
|
|
23677
|
+
var mixer = new Vector4PropertyMixerPlayable(graph);
|
|
23678
|
+
var propertyNames = this.propertyNames;
|
|
23679
|
+
if (propertyNames.length > 0) {
|
|
23680
|
+
var propertyName = propertyNames[propertyNames.length - 1];
|
|
23681
|
+
mixer.propertyName = propertyName;
|
|
23682
|
+
}
|
|
23683
|
+
return mixer;
|
|
23684
|
+
};
|
|
23685
|
+
return Vector4PropertyTrack;
|
|
23686
|
+
}(PropertyTrack);
|
|
23687
|
+
Vector4PropertyTrack = __decorate([
|
|
23688
|
+
effectsClass(DataType.Vector4PropertyTrack)
|
|
23689
|
+
], Vector4PropertyTrack);
|
|
23690
|
+
|
|
23691
|
+
var ColorPropertyTrack = /*#__PURE__*/ function(PropertyTrack) {
|
|
23692
|
+
_inherits(ColorPropertyTrack, PropertyTrack);
|
|
23693
|
+
function ColorPropertyTrack() {
|
|
23694
|
+
return PropertyTrack.apply(this, arguments);
|
|
23695
|
+
}
|
|
23696
|
+
var _proto = ColorPropertyTrack.prototype;
|
|
23697
|
+
_proto.createTrackMixer = function createTrackMixer(graph) {
|
|
23698
|
+
var mixer = new FloatPropertyMixerPlayable(graph);
|
|
23699
|
+
var propertyNames = this.propertyNames;
|
|
23700
|
+
if (propertyNames.length > 0) {
|
|
23701
|
+
var propertyName = propertyNames[propertyNames.length - 1];
|
|
23702
|
+
mixer.propertyName = propertyName;
|
|
23703
|
+
}
|
|
23704
|
+
return mixer;
|
|
23705
|
+
};
|
|
23706
|
+
return ColorPropertyTrack;
|
|
23707
|
+
}(PropertyTrack);
|
|
23708
|
+
ColorPropertyTrack = __decorate([
|
|
23709
|
+
effectsClass(DataType.ColorPropertyTrack)
|
|
23710
|
+
], ColorPropertyTrack);
|
|
23711
|
+
|
|
23459
23712
|
var FloatPropertyPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
23460
23713
|
_inherits(FloatPropertyPlayableAsset, PlayableAsset);
|
|
23461
23714
|
function FloatPropertyPlayableAsset() {
|
|
@@ -23463,7 +23716,7 @@ var FloatPropertyPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
23463
23716
|
}
|
|
23464
23717
|
var _proto = FloatPropertyPlayableAsset.prototype;
|
|
23465
23718
|
_proto.createPlayable = function createPlayable(graph) {
|
|
23466
|
-
var clipPlayable = new
|
|
23719
|
+
var clipPlayable = new PropertyClipPlayable(graph);
|
|
23467
23720
|
clipPlayable.curve = createValueGetter(this.curveData);
|
|
23468
23721
|
clipPlayable.value = clipPlayable.curve.getValue(0);
|
|
23469
23722
|
return clipPlayable;
|
|
@@ -23474,7 +23727,7 @@ __decorate([
|
|
|
23474
23727
|
serialize()
|
|
23475
23728
|
], FloatPropertyPlayableAsset.prototype, "curveData", void 0);
|
|
23476
23729
|
FloatPropertyPlayableAsset = __decorate([
|
|
23477
|
-
effectsClass(
|
|
23730
|
+
effectsClass(DataType.FloatPropertyPlayableAsset)
|
|
23478
23731
|
], FloatPropertyPlayableAsset);
|
|
23479
23732
|
|
|
23480
23733
|
var SubCompositionPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
@@ -23492,6 +23745,23 @@ SubCompositionPlayableAsset = __decorate([
|
|
|
23492
23745
|
effectsClass(DataType.SubCompositionPlayableAsset)
|
|
23493
23746
|
], SubCompositionPlayableAsset);
|
|
23494
23747
|
|
|
23748
|
+
/**
|
|
23749
|
+
* A class that stores track assets and the generated mixer playables and playable outputs.
|
|
23750
|
+
* It is used to query the corresponding playable object based on the track asset.
|
|
23751
|
+
*/ var TrackInstance = /*#__PURE__*/ function() {
|
|
23752
|
+
function TrackInstance(trackAsset, mixer, output) {
|
|
23753
|
+
this.children = [];
|
|
23754
|
+
this.trackAsset = trackAsset;
|
|
23755
|
+
this.mixer = mixer;
|
|
23756
|
+
this.output = output;
|
|
23757
|
+
}
|
|
23758
|
+
var _proto = TrackInstance.prototype;
|
|
23759
|
+
_proto.addChild = function addChild(trackInstance) {
|
|
23760
|
+
this.children.push(trackInstance);
|
|
23761
|
+
};
|
|
23762
|
+
return TrackInstance;
|
|
23763
|
+
}();
|
|
23764
|
+
|
|
23495
23765
|
var TimelineAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
23496
23766
|
_inherits(TimelineAsset, PlayableAsset);
|
|
23497
23767
|
function TimelineAsset() {
|
|
@@ -23534,6 +23804,7 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23534
23804
|
var _this;
|
|
23535
23805
|
_this = Playable.apply(this, arguments) || this;
|
|
23536
23806
|
_this.clips = [];
|
|
23807
|
+
_this.masterTrackInstances = [];
|
|
23537
23808
|
return _this;
|
|
23538
23809
|
}
|
|
23539
23810
|
var _proto = TimelinePlayable.prototype;
|
|
@@ -23542,6 +23813,8 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23542
23813
|
};
|
|
23543
23814
|
_proto.evaluate = function evaluate() {
|
|
23544
23815
|
var time = this.getTime();
|
|
23816
|
+
// update all tracks binding
|
|
23817
|
+
this.updateTrackAnimatedObject(this.masterTrackInstances);
|
|
23545
23818
|
// TODO search active clips
|
|
23546
23819
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.clips), _step; !(_step = _iterator()).done;){
|
|
23547
23820
|
var clip = _step.value;
|
|
@@ -23551,19 +23824,50 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23551
23824
|
_proto.compileTracks = function compileTracks(graph, tracks) {
|
|
23552
23825
|
this.sortTracks(tracks);
|
|
23553
23826
|
var outputTrack = [];
|
|
23827
|
+
// flatten track tree
|
|
23554
23828
|
for(var _iterator = _create_for_of_iterator_helper_loose(tracks), _step; !(_step = _iterator()).done;){
|
|
23555
23829
|
var masterTrack = _step.value;
|
|
23556
23830
|
outputTrack.push(masterTrack);
|
|
23557
23831
|
this.addSubTracksRecursive(masterTrack, outputTrack);
|
|
23558
23832
|
}
|
|
23833
|
+
// map for searching track instance with track asset guid
|
|
23834
|
+
var trackInstanceMap = {};
|
|
23559
23835
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(outputTrack), _step1; !(_step1 = _iterator1()).done;){
|
|
23560
23836
|
var track = _step1.value;
|
|
23837
|
+
// create track mixer and track output
|
|
23561
23838
|
var trackMixPlayable = track.createPlayableGraph(graph, this.clips);
|
|
23562
23839
|
this.addInput(trackMixPlayable, 0);
|
|
23563
23840
|
var trackOutput = track.createOutput();
|
|
23564
23841
|
trackOutput.setUserData(track.boundObject);
|
|
23565
23842
|
graph.addOutput(trackOutput);
|
|
23566
|
-
trackOutput.
|
|
23843
|
+
trackOutput.setSourcePlayable(this, this.getInputCount() - 1);
|
|
23844
|
+
// create track instance
|
|
23845
|
+
var trackInstance = new TrackInstance(track, trackMixPlayable, trackOutput);
|
|
23846
|
+
trackInstanceMap[track.getInstanceId()] = trackInstance;
|
|
23847
|
+
if (!track.parent) {
|
|
23848
|
+
this.masterTrackInstances.push(trackInstance);
|
|
23849
|
+
}
|
|
23850
|
+
}
|
|
23851
|
+
// build trackInstance tree
|
|
23852
|
+
for(var _iterator2 = _create_for_of_iterator_helper_loose(outputTrack), _step2; !(_step2 = _iterator2()).done;){
|
|
23853
|
+
var track1 = _step2.value;
|
|
23854
|
+
var trackInstance1 = trackInstanceMap[track1.getInstanceId()];
|
|
23855
|
+
for(var _iterator3 = _create_for_of_iterator_helper_loose(track1.getChildTracks()), _step3; !(_step3 = _iterator3()).done;){
|
|
23856
|
+
var child = _step3.value;
|
|
23857
|
+
var childTrackInstance = trackInstanceMap[child.getInstanceId()];
|
|
23858
|
+
trackInstance1.addChild(childTrackInstance);
|
|
23859
|
+
}
|
|
23860
|
+
}
|
|
23861
|
+
};
|
|
23862
|
+
_proto.updateTrackAnimatedObject = function updateTrackAnimatedObject(trackInstances) {
|
|
23863
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(trackInstances), _step; !(_step = _iterator()).done;){
|
|
23864
|
+
var trackInstance = _step.value;
|
|
23865
|
+
var trackAsset = trackInstance.trackAsset;
|
|
23866
|
+
// update track binding use custom method
|
|
23867
|
+
trackAsset.updateAnimatedObject();
|
|
23868
|
+
trackInstance.output.setUserData(trackAsset.boundObject);
|
|
23869
|
+
// update children tracks
|
|
23870
|
+
this.updateTrackAnimatedObject(trackInstance.children);
|
|
23567
23871
|
}
|
|
23568
23872
|
};
|
|
23569
23873
|
_proto.sortTracks = function sortTracks(tracks) {
|
|
@@ -23615,6 +23919,7 @@ var ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
|
|
|
23615
23919
|
return TrackAsset1.apply(this, arguments);
|
|
23616
23920
|
}
|
|
23617
23921
|
var _proto = ObjectBindingTrack.prototype;
|
|
23922
|
+
_proto.updateAnimatedObject = function updateAnimatedObject() {};
|
|
23618
23923
|
_proto.create = function create(timelineAsset) {
|
|
23619
23924
|
if (!_instanceof1(this.boundObject, VFXItem)) {
|
|
23620
23925
|
return;
|
|
@@ -27615,6 +27920,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27615
27920
|
_inherits(Composition, EventEmitter);
|
|
27616
27921
|
function Composition(props, scene) {
|
|
27617
27922
|
var _this;
|
|
27923
|
+
var _scene_jsonScene_renderSettings;
|
|
27618
27924
|
_this = EventEmitter.call(this) || this;
|
|
27619
27925
|
_this.sceneTicking = new SceneTicking();
|
|
27620
27926
|
/**
|
|
@@ -27629,6 +27935,9 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27629
27935
|
/**
|
|
27630
27936
|
* 预合成的合成属性,在 content 中会被其元素属性覆盖
|
|
27631
27937
|
*/ _this.refCompositionProps = new Map();
|
|
27938
|
+
/**
|
|
27939
|
+
* 是否开启后处理
|
|
27940
|
+
*/ _this.postProcessingEnabled = false;
|
|
27632
27941
|
// TODO: 待优化
|
|
27633
27942
|
_this.assigned = false;
|
|
27634
27943
|
/**
|
|
@@ -27647,6 +27956,8 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27647
27956
|
scene.consumed = true;
|
|
27648
27957
|
}
|
|
27649
27958
|
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;
|
|
27959
|
+
var _scene_jsonScene_renderSettings_postProcessingEnabled;
|
|
27960
|
+
_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;
|
|
27650
27961
|
assertExist(sourceContent);
|
|
27651
27962
|
_this.renderer = renderer;
|
|
27652
27963
|
_this.refCompositionProps = refCompositionProps;
|
|
@@ -27687,27 +27998,10 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27687
27998
|
SerializationHelper.deserialize(sourceContent, _this.rootComposition);
|
|
27688
27999
|
_this.rootComposition.createContent();
|
|
27689
28000
|
_this.buildItemTree(_this.rootItem);
|
|
27690
|
-
_this.rootItem.onEnd = function() {
|
|
27691
|
-
window.setTimeout(function() {
|
|
27692
|
-
_this.emit("end", {
|
|
27693
|
-
composition: _assert_this_initialized(_this)
|
|
27694
|
-
});
|
|
27695
|
-
}, 0);
|
|
27696
|
-
};
|
|
27697
28001
|
_this.pluginSystem.resetComposition(_assert_this_initialized(_this), _this.renderFrame);
|
|
27698
28002
|
return _this;
|
|
27699
28003
|
}
|
|
27700
28004
|
var _proto = Composition.prototype;
|
|
27701
|
-
_proto.initializeSceneTicking = function initializeSceneTicking(item) {
|
|
27702
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.components), _step; !(_step = _iterator()).done;){
|
|
27703
|
-
var component = _step.value;
|
|
27704
|
-
this.sceneTicking.addComponent(component);
|
|
27705
|
-
}
|
|
27706
|
-
for(var _iterator1 = _create_for_of_iterator_helper_loose(item.children), _step1; !(_step1 = _iterator1()).done;){
|
|
27707
|
-
var child = _step1.value;
|
|
27708
|
-
this.initializeSceneTicking(child);
|
|
27709
|
-
}
|
|
27710
|
-
};
|
|
27711
28005
|
/**
|
|
27712
28006
|
* 获取合成的时长
|
|
27713
28007
|
*/ _proto.getDuration = function getDuration() {
|
|
@@ -27796,7 +28090,8 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27796
28090
|
camera: this.camera,
|
|
27797
28091
|
renderer: this.renderer,
|
|
27798
28092
|
keepColorBuffer: this.keepColorBuffer,
|
|
27799
|
-
globalVolume: this.globalVolume
|
|
28093
|
+
globalVolume: this.globalVolume,
|
|
28094
|
+
postProcessingEnabled: this.postProcessingEnabled
|
|
27800
28095
|
});
|
|
27801
28096
|
// TODO 考虑放到构造函数
|
|
27802
28097
|
this.renderFrame.cachedTextures = this.textures;
|
|
@@ -27899,40 +28194,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
27899
28194
|
this.dispose();
|
|
27900
28195
|
}
|
|
27901
28196
|
};
|
|
27902
|
-
_proto.toLocalTime = function toLocalTime(time) {
|
|
27903
|
-
var localTime = time - this.rootItem.start;
|
|
27904
|
-
var duration = this.rootItem.duration;
|
|
27905
|
-
if (localTime - duration > 0.001) {
|
|
27906
|
-
if (!this.rootItem.ended) {
|
|
27907
|
-
this.rootItem.ended = true;
|
|
27908
|
-
this.emit("end", {
|
|
27909
|
-
composition: this
|
|
27910
|
-
});
|
|
27911
|
-
}
|
|
27912
|
-
switch(this.rootItem.endBehavior){
|
|
27913
|
-
case EndBehavior.restart:
|
|
27914
|
-
{
|
|
27915
|
-
localTime = localTime % duration;
|
|
27916
|
-
this.restart();
|
|
27917
|
-
break;
|
|
27918
|
-
}
|
|
27919
|
-
case EndBehavior.freeze:
|
|
27920
|
-
{
|
|
27921
|
-
localTime = Math.min(duration, localTime);
|
|
27922
|
-
break;
|
|
27923
|
-
}
|
|
27924
|
-
case EndBehavior.forward:
|
|
27925
|
-
{
|
|
27926
|
-
break;
|
|
27927
|
-
}
|
|
27928
|
-
case EndBehavior.destroy:
|
|
27929
|
-
{
|
|
27930
|
-
break;
|
|
27931
|
-
}
|
|
27932
|
-
}
|
|
27933
|
-
}
|
|
27934
|
-
return localTime;
|
|
27935
|
-
};
|
|
27936
28197
|
_proto.shouldDispose = function shouldDispose() {
|
|
27937
28198
|
return this.rootItem.ended && this.rootItem.endBehavior === EndBehavior.destroy && !this.reusable;
|
|
27938
28199
|
};
|
|
@@ -28024,8 +28285,41 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28024
28285
|
* 更新主合成组件
|
|
28025
28286
|
*/ _proto.updateRootComposition = function updateRootComposition(deltaTime) {
|
|
28026
28287
|
if (this.rootComposition.isActiveAndEnabled) {
|
|
28027
|
-
var localTime = this.
|
|
28288
|
+
var localTime = this.time + deltaTime - this.rootItem.start;
|
|
28289
|
+
var ended = false;
|
|
28290
|
+
var duration = this.rootItem.duration;
|
|
28291
|
+
var endBehavior = this.rootItem.endBehavior;
|
|
28292
|
+
if (localTime - duration > 0.001) {
|
|
28293
|
+
ended = true;
|
|
28294
|
+
switch(endBehavior){
|
|
28295
|
+
case EndBehavior.restart:
|
|
28296
|
+
{
|
|
28297
|
+
localTime = localTime % duration;
|
|
28298
|
+
this.restart();
|
|
28299
|
+
break;
|
|
28300
|
+
}
|
|
28301
|
+
case EndBehavior.freeze:
|
|
28302
|
+
{
|
|
28303
|
+
localTime = Math.min(duration, localTime);
|
|
28304
|
+
break;
|
|
28305
|
+
}
|
|
28306
|
+
case EndBehavior.forward:
|
|
28307
|
+
{
|
|
28308
|
+
break;
|
|
28309
|
+
}
|
|
28310
|
+
case EndBehavior.destroy:
|
|
28311
|
+
{
|
|
28312
|
+
break;
|
|
28313
|
+
}
|
|
28314
|
+
}
|
|
28315
|
+
}
|
|
28028
28316
|
this.rootComposition.time = localTime;
|
|
28317
|
+
if (ended && !this.rootItem.ended) {
|
|
28318
|
+
this.rootItem.ended = true;
|
|
28319
|
+
this.emit("end", {
|
|
28320
|
+
composition: this
|
|
28321
|
+
});
|
|
28322
|
+
}
|
|
28029
28323
|
}
|
|
28030
28324
|
};
|
|
28031
28325
|
/**
|
|
@@ -30350,8 +30644,8 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
|
|
|
30350
30644
|
registerPlugin("particle", ParticleLoader, VFXItem, true);
|
|
30351
30645
|
registerPlugin("cal", CalculateLoader, VFXItem, true);
|
|
30352
30646
|
registerPlugin("interact", InteractLoader, VFXItem, true);
|
|
30353
|
-
var version = "2.1.0-alpha.
|
|
30647
|
+
var version = "2.1.0-alpha.8";
|
|
30354
30648
|
logger.info("Core version: " + version + ".");
|
|
30355
30649
|
|
|
30356
|
-
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, Asset, AssetLoader, AssetManager, BYTES_TYPE_MAP, BaseRenderComponent, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, 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, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, decimalEqual,
|
|
30650
|
+
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, Asset, AssetLoader, AssetManager, BYTES_TYPE_MAP, BaseRenderComponent, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, ColorCurve, 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, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, 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, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecFill, vecMulCombine, version, vertexFormatType2GLType };
|
|
30357
30651
|
//# sourceMappingURL=index.mjs.map
|