@galacean/effects-core 2.1.0-alpha.10 → 2.1.0-alpha.12
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 +2 -2
- package/dist/components/post-process-volume.d.ts +7 -10
- package/dist/components/shape-component.d.ts +18 -24
- package/dist/composition.d.ts +5 -0
- package/dist/index.js +263 -228
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -235
- package/dist/index.mjs.map +1 -1
- package/dist/material/material.d.ts +4 -1
- package/dist/plugins/cal/playable-graph.d.ts +3 -0
- package/dist/plugins/interact/interact-item.d.ts +3 -1
- package/dist/plugins/text/text-item.d.ts +2 -0
- package/dist/plugins/timeline/playables/activation-mixer-playable.d.ts +0 -2
- package/dist/vfx-item.d.ts +22 -22
- package/package.json +2 -2
package/dist/index.js
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.12
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -2023,7 +2023,7 @@ function getDirectStore(target) {
|
|
|
2023
2023
|
this.onAwake();
|
|
2024
2024
|
this.isAwakeCalled = true;
|
|
2025
2025
|
}
|
|
2026
|
-
if (item.
|
|
2026
|
+
if (item.isActive && this.enabled) {
|
|
2027
2027
|
this.start();
|
|
2028
2028
|
this.enable();
|
|
2029
2029
|
}
|
|
@@ -2068,7 +2068,7 @@ function getDirectStore(target) {
|
|
|
2068
2068
|
get: /**
|
|
2069
2069
|
* 组件是否可以更新,true 更新,false 不更新
|
|
2070
2070
|
*/ function get() {
|
|
2071
|
-
return this.item.
|
|
2071
|
+
return this.item.isActive && this.enabled;
|
|
2072
2072
|
}
|
|
2073
2073
|
},
|
|
2074
2074
|
{
|
|
@@ -3770,24 +3770,29 @@ exports.EffectComponent = __decorate([
|
|
|
3770
3770
|
|
|
3771
3771
|
exports.PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
3772
3772
|
_inherits(PostProcessVolume, Behaviour);
|
|
3773
|
-
function PostProcessVolume() {
|
|
3773
|
+
function PostProcessVolume(engine) {
|
|
3774
3774
|
var _this;
|
|
3775
|
-
_this = Behaviour.
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
_this.
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
_this.
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3775
|
+
_this = Behaviour.call(this, engine) || this;
|
|
3776
|
+
_this.bloom = {
|
|
3777
|
+
threshold: 0,
|
|
3778
|
+
intensity: 0,
|
|
3779
|
+
active: false
|
|
3780
|
+
};
|
|
3781
|
+
_this.vignette = {
|
|
3782
|
+
intensity: 0,
|
|
3783
|
+
smoothness: 0,
|
|
3784
|
+
roundness: 0,
|
|
3785
|
+
active: false
|
|
3786
|
+
};
|
|
3787
|
+
_this.tonemapping = {
|
|
3788
|
+
active: false
|
|
3789
|
+
};
|
|
3790
|
+
_this.colorAdjustments = {
|
|
3791
|
+
brightness: 0,
|
|
3792
|
+
saturation: 0,
|
|
3793
|
+
contrast: 0,
|
|
3794
|
+
active: false
|
|
3795
|
+
};
|
|
3791
3796
|
return _this;
|
|
3792
3797
|
}
|
|
3793
3798
|
var _proto = PostProcessVolume.prototype;
|
|
@@ -3801,36 +3806,18 @@ exports.PostProcessVolume = /*#__PURE__*/ function(Behaviour) {
|
|
|
3801
3806
|
}(Behaviour);
|
|
3802
3807
|
__decorate([
|
|
3803
3808
|
serialize()
|
|
3804
|
-
], exports.PostProcessVolume.prototype, "
|
|
3805
|
-
__decorate([
|
|
3806
|
-
serialize()
|
|
3807
|
-
], exports.PostProcessVolume.prototype, "threshold", void 0);
|
|
3809
|
+
], exports.PostProcessVolume.prototype, "bloom", void 0);
|
|
3808
3810
|
__decorate([
|
|
3809
3811
|
serialize()
|
|
3810
|
-
], exports.PostProcessVolume.prototype, "
|
|
3812
|
+
], exports.PostProcessVolume.prototype, "vignette", void 0);
|
|
3811
3813
|
__decorate([
|
|
3812
3814
|
serialize()
|
|
3813
|
-
], exports.PostProcessVolume.prototype, "
|
|
3815
|
+
], exports.PostProcessVolume.prototype, "tonemapping", void 0);
|
|
3814
3816
|
__decorate([
|
|
3815
3817
|
serialize()
|
|
3816
|
-
], exports.PostProcessVolume.prototype, "
|
|
3817
|
-
__decorate([
|
|
3818
|
-
serialize()
|
|
3819
|
-
], exports.PostProcessVolume.prototype, "contrast", void 0);
|
|
3820
|
-
__decorate([
|
|
3821
|
-
serialize()
|
|
3822
|
-
], exports.PostProcessVolume.prototype, "vignetteIntensity", void 0);
|
|
3823
|
-
__decorate([
|
|
3824
|
-
serialize()
|
|
3825
|
-
], exports.PostProcessVolume.prototype, "vignetteSmoothness", void 0);
|
|
3826
|
-
__decorate([
|
|
3827
|
-
serialize()
|
|
3828
|
-
], exports.PostProcessVolume.prototype, "vignetteRoundness", void 0);
|
|
3829
|
-
__decorate([
|
|
3830
|
-
serialize()
|
|
3831
|
-
], exports.PostProcessVolume.prototype, "toneMappingEnabled", void 0);
|
|
3818
|
+
], exports.PostProcessVolume.prototype, "colorAdjustments", void 0);
|
|
3832
3819
|
exports.PostProcessVolume = __decorate([
|
|
3833
|
-
effectsClass(
|
|
3820
|
+
effectsClass(DataType.PostProcessVolume)
|
|
3834
3821
|
], exports.PostProcessVolume);
|
|
3835
3822
|
|
|
3836
3823
|
function _assert_this_initialized(self) {
|
|
@@ -6917,6 +6904,7 @@ exports.MaterialRenderType = void 0;
|
|
|
6917
6904
|
_this.enabledMacros = {};
|
|
6918
6905
|
_this.destroyed = false;
|
|
6919
6906
|
_this.initialized = false;
|
|
6907
|
+
_this.shaderDirty = true;
|
|
6920
6908
|
if (props) {
|
|
6921
6909
|
var _props_name = props.name, name = _props_name === void 0 ? "Material" + seed$8++ : _props_name, _props_renderType = props.renderType, renderType = _props_renderType === void 0 ? 0 : _props_renderType, shader = props.shader, uniformSemantics = props.uniformSemantics;
|
|
6922
6910
|
_this.name = name;
|
|
@@ -6944,6 +6932,19 @@ exports.MaterialRenderType = void 0;
|
|
|
6944
6932
|
// OVERRIDE
|
|
6945
6933
|
};
|
|
6946
6934
|
_create_class(Material, [
|
|
6935
|
+
{
|
|
6936
|
+
key: "shader",
|
|
6937
|
+
get: function get() {
|
|
6938
|
+
return this._shader;
|
|
6939
|
+
},
|
|
6940
|
+
set: function set(value) {
|
|
6941
|
+
if (this._shader === value) {
|
|
6942
|
+
return;
|
|
6943
|
+
}
|
|
6944
|
+
this._shader = value;
|
|
6945
|
+
this.shaderDirty = true;
|
|
6946
|
+
}
|
|
6947
|
+
},
|
|
6947
6948
|
{
|
|
6948
6949
|
key: "blending",
|
|
6949
6950
|
set: /******** effects-core 中会调用 引擎必须实现 ***********************/ /**
|
|
@@ -10311,15 +10312,15 @@ var BloomThresholdPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10311
10312
|
renderer.setFramebuffer(this.framebuffer);
|
|
10312
10313
|
};
|
|
10313
10314
|
_proto.execute = function execute(renderer) {
|
|
10314
|
-
var _renderer_renderingData_currentFrame_globalVolume;
|
|
10315
|
+
var _renderer_renderingData_currentFrame_globalVolume_bloom, _renderer_renderingData_currentFrame_globalVolume;
|
|
10315
10316
|
renderer.clear({
|
|
10316
10317
|
colorAction: exports.TextureStoreAction.clear,
|
|
10317
10318
|
depthAction: exports.TextureStoreAction.clear,
|
|
10318
10319
|
stencilAction: exports.TextureStoreAction.clear
|
|
10319
10320
|
});
|
|
10320
10321
|
this.screenMesh.material.setTexture("_MainTex", this.mainTexture);
|
|
10321
|
-
var
|
|
10322
|
-
var threshold = (
|
|
10322
|
+
var _renderer_renderingData_currentFrame_globalVolume_bloom_threshold;
|
|
10323
|
+
var threshold = (_renderer_renderingData_currentFrame_globalVolume_bloom_threshold = (_renderer_renderingData_currentFrame_globalVolume = renderer.renderingData.currentFrame.globalVolume) == null ? void 0 : (_renderer_renderingData_currentFrame_globalVolume_bloom = _renderer_renderingData_currentFrame_globalVolume.bloom) == null ? void 0 : _renderer_renderingData_currentFrame_globalVolume_bloom.threshold) != null ? _renderer_renderingData_currentFrame_globalVolume_bloom_threshold : 1.0;
|
|
10323
10324
|
this.screenMesh.material.setFloat("_Threshold", threshold);
|
|
10324
10325
|
renderer.renderMeshes([
|
|
10325
10326
|
this.screenMesh
|
|
@@ -10532,25 +10533,44 @@ var ToneMappingPass = /*#__PURE__*/ function(RenderPass) {
|
|
|
10532
10533
|
depthAction: exports.TextureStoreAction.clear,
|
|
10533
10534
|
stencilAction: exports.TextureStoreAction.clear
|
|
10534
10535
|
});
|
|
10535
|
-
var
|
|
10536
|
-
var
|
|
10536
|
+
var globalVolume = renderer.renderingData.currentFrame.globalVolume;
|
|
10537
|
+
var bloom = _extends({
|
|
10538
|
+
threshold: 0,
|
|
10539
|
+
intensity: 0,
|
|
10540
|
+
active: false
|
|
10541
|
+
}, globalVolume == null ? void 0 : globalVolume.bloom);
|
|
10542
|
+
var vignette = _extends({
|
|
10543
|
+
intensity: 0,
|
|
10544
|
+
smoothness: 0,
|
|
10545
|
+
roundness: 0,
|
|
10546
|
+
active: false
|
|
10547
|
+
}, globalVolume == null ? void 0 : globalVolume.vignette);
|
|
10548
|
+
var colorAdjustments = _extends({
|
|
10549
|
+
brightness: 0,
|
|
10550
|
+
saturation: 0,
|
|
10551
|
+
contrast: 0,
|
|
10552
|
+
active: false
|
|
10553
|
+
}, globalVolume == null ? void 0 : globalVolume.colorAdjustments);
|
|
10554
|
+
var tonemapping = _extends({
|
|
10555
|
+
active: false
|
|
10556
|
+
}, globalVolume == null ? void 0 : globalVolume.tonemapping);
|
|
10537
10557
|
this.screenMesh.material.setTexture("_SceneTex", this.sceneTextureHandle.texture);
|
|
10538
|
-
this.screenMesh.material.setFloat("_Brightness", brightness);
|
|
10539
|
-
this.screenMesh.material.setFloat("_Saturation", saturation);
|
|
10540
|
-
this.screenMesh.material.setFloat("_Contrast", contrast);
|
|
10541
|
-
this.screenMesh.material.setInt("_UseBloom", Number(
|
|
10542
|
-
if (
|
|
10558
|
+
this.screenMesh.material.setFloat("_Brightness", Math.pow(2, colorAdjustments.brightness));
|
|
10559
|
+
this.screenMesh.material.setFloat("_Saturation", colorAdjustments.saturation * 0.01 + 1);
|
|
10560
|
+
this.screenMesh.material.setFloat("_Contrast", colorAdjustments.contrast * 0.01 + 1);
|
|
10561
|
+
this.screenMesh.material.setInt("_UseBloom", Number(bloom.active));
|
|
10562
|
+
if (bloom.active) {
|
|
10543
10563
|
this.screenMesh.material.setTexture("_GaussianTex", this.mainTexture);
|
|
10544
|
-
this.screenMesh.material.setFloat("_BloomIntensity",
|
|
10564
|
+
this.screenMesh.material.setFloat("_BloomIntensity", bloom.intensity);
|
|
10545
10565
|
}
|
|
10546
|
-
if (
|
|
10547
|
-
this.screenMesh.material.setFloat("_VignetteIntensity",
|
|
10548
|
-
this.screenMesh.material.setFloat("_VignetteSmoothness",
|
|
10549
|
-
this.screenMesh.material.setFloat("_VignetteRoundness",
|
|
10566
|
+
if (vignette.intensity > 0) {
|
|
10567
|
+
this.screenMesh.material.setFloat("_VignetteIntensity", vignette.intensity);
|
|
10568
|
+
this.screenMesh.material.setFloat("_VignetteSmoothness", vignette.smoothness);
|
|
10569
|
+
this.screenMesh.material.setFloat("_VignetteRoundness", vignette.roundness);
|
|
10550
10570
|
this.screenMesh.material.setVector2("_VignetteCenter", new Vector2(0.5, 0.5));
|
|
10551
10571
|
this.screenMesh.material.setVector3("_VignetteColor", new Vector3(0.0, 0.0, 0.0));
|
|
10552
10572
|
}
|
|
10553
|
-
this.screenMesh.material.setInt("_UseToneMapping", Number(
|
|
10573
|
+
this.screenMesh.material.setInt("_UseToneMapping", Number(tonemapping.active));
|
|
10554
10574
|
renderer.renderMeshes([
|
|
10555
10575
|
this.screenMesh
|
|
10556
10576
|
]);
|
|
@@ -15761,70 +15781,79 @@ exports.ShapeComponent = /*#__PURE__*/ function(MeshComponent) {
|
|
|
15761
15781
|
};
|
|
15762
15782
|
_proto.buildPath = function buildPath(data) {
|
|
15763
15783
|
this.path.clear();
|
|
15764
|
-
|
|
15765
|
-
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
this.curveValues.push({
|
|
15781
|
-
point: points[pointIndex.point],
|
|
15782
|
-
controlPoint1: easingOuts[lastPointIndex.easingOut],
|
|
15783
|
-
controlPoint2: easingIns[pointIndex.easingIn]
|
|
15784
|
-
});
|
|
15785
|
-
}
|
|
15786
|
-
// Push the last curve
|
|
15784
|
+
var shapeData = data;
|
|
15785
|
+
switch(shapeData.type){
|
|
15786
|
+
case 0:
|
|
15787
|
+
{
|
|
15788
|
+
var customData = shapeData;
|
|
15789
|
+
var points = customData.points;
|
|
15790
|
+
var easingIns = customData.easingIns;
|
|
15791
|
+
var easingOuts = customData.easingOuts;
|
|
15792
|
+
this.curveValues = [];
|
|
15793
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(customData.shapes), _step; !(_step = _iterator()).done;){
|
|
15794
|
+
var shape = _step.value;
|
|
15795
|
+
this.setFillColor(shape.fill);
|
|
15796
|
+
var indices = shape.indexes;
|
|
15797
|
+
for(var i = 1; i < indices.length; i++){
|
|
15798
|
+
var pointIndex = indices[i];
|
|
15799
|
+
var lastPointIndex = indices[i - 1];
|
|
15787
15800
|
this.curveValues.push({
|
|
15788
|
-
point: points[
|
|
15789
|
-
controlPoint1: easingOuts[
|
|
15790
|
-
controlPoint2: easingIns[
|
|
15801
|
+
point: points[pointIndex.point],
|
|
15802
|
+
controlPoint1: easingOuts[lastPointIndex.easingOut],
|
|
15803
|
+
controlPoint2: easingIns[pointIndex.easingIn]
|
|
15791
15804
|
});
|
|
15792
15805
|
}
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
this.path.bezierCurveTo(control1.x, control1.y, control2.x, control2.y, point.x, point.y, 1);
|
|
15800
|
-
}
|
|
15801
|
-
break;
|
|
15802
|
-
}
|
|
15803
|
-
case 2:
|
|
15804
|
-
{
|
|
15805
|
-
var ellipseData = shapeData;
|
|
15806
|
-
this.path.ellipse(0, 0, ellipseData.xRadius, ellipseData.yRadius);
|
|
15807
|
-
break;
|
|
15808
|
-
}
|
|
15809
|
-
case 1:
|
|
15810
|
-
{
|
|
15811
|
-
var rectangleData = shapeData;
|
|
15812
|
-
this.path.rect(-rectangleData.width / 2, rectangleData.height / 2, rectangleData.width, rectangleData.height);
|
|
15813
|
-
break;
|
|
15814
|
-
}
|
|
15815
|
-
case 4:
|
|
15816
|
-
{
|
|
15817
|
-
var starData = shapeData;
|
|
15818
|
-
this.path.polyStar(starData.pointCount, starData.outerRadius, starData.innerRadius, starData.outerRoundness, starData.innerRoundness, StarType.Star);
|
|
15819
|
-
break;
|
|
15806
|
+
// Push the last curve
|
|
15807
|
+
this.curveValues.push({
|
|
15808
|
+
point: points[indices[0].point],
|
|
15809
|
+
controlPoint1: easingOuts[indices[indices.length - 1].easingOut],
|
|
15810
|
+
controlPoint2: easingIns[indices[0].easingIn]
|
|
15811
|
+
});
|
|
15820
15812
|
}
|
|
15821
|
-
|
|
15822
|
-
{
|
|
15823
|
-
var
|
|
15824
|
-
|
|
15825
|
-
|
|
15813
|
+
this.path.moveTo(this.curveValues[this.curveValues.length - 1].point.x, this.curveValues[this.curveValues.length - 1].point.y);
|
|
15814
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(this.curveValues), _step1; !(_step1 = _iterator1()).done;){
|
|
15815
|
+
var curveValue = _step1.value;
|
|
15816
|
+
var point = curveValue.point;
|
|
15817
|
+
var control1 = curveValue.controlPoint1;
|
|
15818
|
+
var control2 = curveValue.controlPoint2;
|
|
15819
|
+
this.path.bezierCurveTo(control1.x, control1.y, control2.x, control2.y, point.x, point.y, 1);
|
|
15826
15820
|
}
|
|
15827
|
-
|
|
15821
|
+
break;
|
|
15822
|
+
}
|
|
15823
|
+
case 2:
|
|
15824
|
+
{
|
|
15825
|
+
var ellipseData = shapeData;
|
|
15826
|
+
this.path.ellipse(0, 0, ellipseData.xRadius, ellipseData.yRadius);
|
|
15827
|
+
this.setFillColor(ellipseData.fill);
|
|
15828
|
+
break;
|
|
15829
|
+
}
|
|
15830
|
+
case 1:
|
|
15831
|
+
{
|
|
15832
|
+
var rectangleData = shapeData;
|
|
15833
|
+
this.path.rect(-rectangleData.width / 2, rectangleData.height / 2, rectangleData.width, rectangleData.height);
|
|
15834
|
+
this.setFillColor(rectangleData.fill);
|
|
15835
|
+
break;
|
|
15836
|
+
}
|
|
15837
|
+
case 4:
|
|
15838
|
+
{
|
|
15839
|
+
var starData = shapeData;
|
|
15840
|
+
this.path.polyStar(starData.pointCount, starData.outerRadius, starData.innerRadius, starData.outerRoundness, starData.innerRoundness, StarType.Star);
|
|
15841
|
+
this.setFillColor(starData.fill);
|
|
15842
|
+
break;
|
|
15843
|
+
}
|
|
15844
|
+
case 3:
|
|
15845
|
+
{
|
|
15846
|
+
var polygonData = shapeData;
|
|
15847
|
+
this.path.polyStar(polygonData.pointCount, polygonData.radius, polygonData.radius, polygonData.roundness, polygonData.roundness, StarType.Polygon);
|
|
15848
|
+
this.setFillColor(polygonData.fill);
|
|
15849
|
+
break;
|
|
15850
|
+
}
|
|
15851
|
+
}
|
|
15852
|
+
};
|
|
15853
|
+
_proto.setFillColor = function setFillColor(fill) {
|
|
15854
|
+
if (fill) {
|
|
15855
|
+
var color = fill.color;
|
|
15856
|
+
this.material.setColor("_Color", new Color(color.r, color.g, color.b, color.a));
|
|
15828
15857
|
}
|
|
15829
15858
|
};
|
|
15830
15859
|
_proto.fromData = function fromData(data) {
|
|
@@ -15844,26 +15873,24 @@ exports.ShapeComponent = /*#__PURE__*/ function(MeshComponent) {
|
|
|
15844
15873
|
exports.ShapeComponent = __decorate([
|
|
15845
15874
|
effectsClass("ShapeComponent")
|
|
15846
15875
|
], exports.ShapeComponent);
|
|
15847
|
-
exports.
|
|
15848
|
-
(function(
|
|
15876
|
+
exports.ShapePrimitiveType = void 0;
|
|
15877
|
+
(function(ShapePrimitiveType) {
|
|
15849
15878
|
/**
|
|
15850
15879
|
* 自定义图形
|
|
15851
|
-
*/
|
|
15880
|
+
*/ ShapePrimitiveType[ShapePrimitiveType["Custom"] = 0] = "Custom";
|
|
15852
15881
|
/**
|
|
15853
15882
|
* 矩形
|
|
15854
|
-
*/
|
|
15883
|
+
*/ ShapePrimitiveType[ShapePrimitiveType["Rectangle"] = 1] = "Rectangle";
|
|
15855
15884
|
/**
|
|
15856
15885
|
* 椭圆
|
|
15857
|
-
*/
|
|
15886
|
+
*/ ShapePrimitiveType[ShapePrimitiveType["Ellipse"] = 2] = "Ellipse";
|
|
15858
15887
|
/**
|
|
15859
15888
|
* 多边形
|
|
15860
|
-
*/
|
|
15889
|
+
*/ ShapePrimitiveType[ShapePrimitiveType["Polygon"] = 3] = "Polygon";
|
|
15861
15890
|
/**
|
|
15862
15891
|
* 星形
|
|
15863
|
-
*/
|
|
15864
|
-
})(exports.
|
|
15865
|
-
var ShapeData = function ShapeData() {
|
|
15866
|
-
};
|
|
15892
|
+
*/ ShapePrimitiveType[ShapePrimitiveType["Star"] = 4] = "Star";
|
|
15893
|
+
})(exports.ShapePrimitiveType || (exports.ShapePrimitiveType = {}));
|
|
15867
15894
|
exports.ShapeConnectType = void 0;
|
|
15868
15895
|
(function(ShapeConnectType) {})(exports.ShapeConnectType || (exports.ShapeConnectType = {}));
|
|
15869
15896
|
exports.ShapePointType = void 0;
|
|
@@ -16365,8 +16392,8 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16365
16392
|
0
|
|
16366
16393
|
]
|
|
16367
16394
|
};
|
|
16395
|
+
_this.duringPlay = false;
|
|
16368
16396
|
/** 是否响应点击和拖拽交互事件 */ _this._interactive = true;
|
|
16369
|
-
_this.hasBeenAddedToComposition = false;
|
|
16370
16397
|
_this.getHitTestParams = function(force) {
|
|
16371
16398
|
if (!_this.clickable) {
|
|
16372
16399
|
return;
|
|
@@ -16403,7 +16430,6 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16403
16430
|
];
|
|
16404
16431
|
};
|
|
16405
16432
|
_proto.onStart = function onStart() {
|
|
16406
|
-
var _this = this;
|
|
16407
16433
|
var options = this.item.props.content.options;
|
|
16408
16434
|
var env = this.item.engine.renderer.env;
|
|
16409
16435
|
var composition = this.item.composition;
|
|
@@ -16427,32 +16453,35 @@ exports.InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16427
16453
|
this.materials = this.previewContent.mesh.materials;
|
|
16428
16454
|
}
|
|
16429
16455
|
this.item.getHitTestParams = this.getHitTestParams;
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
|
|
16433
|
-
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
_this.endDragTarget();
|
|
16456
|
+
};
|
|
16457
|
+
_proto.onDisable = function onDisable() {
|
|
16458
|
+
if (this.item && this.item.composition) {
|
|
16459
|
+
var _this_previewContent;
|
|
16460
|
+
if (this.duringPlay) {
|
|
16461
|
+
this.item.composition.removeInteractiveItem(this.item, this.item.props.content.options.type);
|
|
16462
|
+
this.duringPlay = false;
|
|
16438
16463
|
}
|
|
16439
|
-
|
|
16464
|
+
this.clickable = false;
|
|
16465
|
+
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
|
|
16466
|
+
this.endDragTarget();
|
|
16467
|
+
}
|
|
16468
|
+
};
|
|
16469
|
+
_proto.onEnable = function onEnable() {
|
|
16470
|
+
var type = this.interactData.options.type;
|
|
16471
|
+
if (type === InteractType.CLICK) {
|
|
16472
|
+
this.clickable = true;
|
|
16473
|
+
}
|
|
16440
16474
|
};
|
|
16441
16475
|
_proto.onUpdate = function onUpdate(dt) {
|
|
16442
16476
|
var _this_previewContent;
|
|
16443
|
-
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16447
|
-
if (!this.hasBeenAddedToComposition && this.item.composition) {
|
|
16448
|
-
var type = this.interactData.options.type;
|
|
16449
|
-
if (type === InteractType.CLICK) {
|
|
16450
|
-
this.clickable = true;
|
|
16451
|
-
}
|
|
16477
|
+
this.duringPlay = true;
|
|
16478
|
+
// trigger messageBegin when item enter
|
|
16479
|
+
if (this.item.time > 0 && this.item.time - dt / 1000 <= 0) {
|
|
16480
|
+
var _this_item_composition;
|
|
16452
16481
|
var options = this.item.props.content.options;
|
|
16453
|
-
this.item.composition.addInteractiveItem(this.item, options.type);
|
|
16454
|
-
this.hasBeenAddedToComposition = true;
|
|
16482
|
+
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
|
|
16455
16483
|
}
|
|
16484
|
+
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16456
16485
|
if (!this.dragEvent || !this.bouncingArg) {
|
|
16457
16486
|
return;
|
|
16458
16487
|
}
|
|
@@ -16866,6 +16895,7 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
16866
16895
|
if (inputCount === void 0) inputCount = 0;
|
|
16867
16896
|
this.onPlayablePlayFlag = true;
|
|
16868
16897
|
this.onPlayablePauseFlag = false;
|
|
16898
|
+
this.duration = 0;
|
|
16869
16899
|
this.destroyed = false;
|
|
16870
16900
|
this.inputs = [];
|
|
16871
16901
|
this.inputOuputPorts = [];
|
|
@@ -16958,6 +16988,12 @@ var SpriteLoader = /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
16958
16988
|
_proto.getTime = function getTime() {
|
|
16959
16989
|
return this.time;
|
|
16960
16990
|
};
|
|
16991
|
+
_proto.setDuration = function setDuration(duration) {
|
|
16992
|
+
this.duration = duration;
|
|
16993
|
+
};
|
|
16994
|
+
_proto.getDuration = function getDuration() {
|
|
16995
|
+
return this.duration;
|
|
16996
|
+
};
|
|
16961
16997
|
_proto.getPlayState = function getPlayState() {
|
|
16962
16998
|
return this.playState;
|
|
16963
16999
|
};
|
|
@@ -17674,17 +17710,15 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
17674
17710
|
/**
|
|
17675
17711
|
* 元素动画结束时行为(如何处理元素)
|
|
17676
17712
|
*/ _this.endBehavior = EndBehavior.forward;
|
|
17677
|
-
/**
|
|
17678
|
-
* 元素是否可用
|
|
17679
|
-
*/ _this.ended = false;
|
|
17680
|
-
_this.reusable = false;
|
|
17681
17713
|
_this.type = ItemType.base;
|
|
17682
17714
|
_this.isDuringPlay = false;
|
|
17683
17715
|
_this.components = [];
|
|
17684
17716
|
_this.rendererComponents = [];
|
|
17685
17717
|
/**
|
|
17686
|
-
*
|
|
17687
|
-
|
|
17718
|
+
* 元素是否激活
|
|
17719
|
+
*/ _this.active = true;
|
|
17720
|
+
/**
|
|
17721
|
+
* 元素组件是否显示,用于批量开关元素组件
|
|
17688
17722
|
*/ _this.visible = true;
|
|
17689
17723
|
/**
|
|
17690
17724
|
* 元素动画的速度
|
|
@@ -17815,12 +17849,6 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
17815
17849
|
}
|
|
17816
17850
|
};
|
|
17817
17851
|
/**
|
|
17818
|
-
* 元素动画结束播放时回调函数
|
|
17819
|
-
* @override
|
|
17820
|
-
*/ _proto.onEnd = function onEnd() {
|
|
17821
|
-
// OVERRIDE
|
|
17822
|
-
};
|
|
17823
|
-
/**
|
|
17824
17852
|
* 通过指定 r、g、b、a 值设置元素的颜色
|
|
17825
17853
|
* @param {number} r
|
|
17826
17854
|
* @param {number} g
|
|
@@ -17833,17 +17861,27 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
17833
17861
|
* @param opacity - 透明度值,范围 [0,1]
|
|
17834
17862
|
*/ _proto.setOpacity = function setOpacity(opacity) {};
|
|
17835
17863
|
/**
|
|
17836
|
-
*
|
|
17837
|
-
*/ _proto.
|
|
17838
|
-
|
|
17864
|
+
* 激活或停用 VFXItem
|
|
17865
|
+
*/ _proto.setActive = function setActive(value) {
|
|
17866
|
+
if (this.active !== value) {
|
|
17867
|
+
this.active = !!value;
|
|
17868
|
+
this.onActiveChanged();
|
|
17869
|
+
}
|
|
17839
17870
|
};
|
|
17840
17871
|
/**
|
|
17841
|
-
*
|
|
17872
|
+
* 设置元素的显隐,该设置会批量开关元素组件
|
|
17842
17873
|
*/ _proto.setVisible = function setVisible(visible) {
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17874
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.components), _step; !(_step = _iterator()).done;){
|
|
17875
|
+
var component = _step.value;
|
|
17876
|
+
component.enabled = visible;
|
|
17846
17877
|
}
|
|
17878
|
+
this.visible = visible;
|
|
17879
|
+
};
|
|
17880
|
+
/**
|
|
17881
|
+
* 元素组件显隐状态
|
|
17882
|
+
* @deprecated use isVisible instead
|
|
17883
|
+
*/ _proto.getVisible = function getVisible() {
|
|
17884
|
+
return this.visible;
|
|
17847
17885
|
};
|
|
17848
17886
|
/**
|
|
17849
17887
|
* 获取元素变换包括位置、旋转、缩放
|
|
@@ -17925,14 +17963,6 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
17925
17963
|
this.transform.assignWorldTRS(pos);
|
|
17926
17964
|
return pos;
|
|
17927
17965
|
};
|
|
17928
|
-
/**
|
|
17929
|
-
* 是否到达元素的结束时间
|
|
17930
|
-
* @param now
|
|
17931
|
-
* @returns
|
|
17932
|
-
*/ _proto.isEnded = function isEnded(now) {
|
|
17933
|
-
// at least 1 ms
|
|
17934
|
-
return now - this.duration > 0.001;
|
|
17935
|
-
};
|
|
17936
17966
|
_proto.find = function find(name) {
|
|
17937
17967
|
var _queue;
|
|
17938
17968
|
if (this.name === name) {
|
|
@@ -17956,7 +17986,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
17956
17986
|
* @internal
|
|
17957
17987
|
*/ _proto.beginPlay = function beginPlay() {
|
|
17958
17988
|
this.isDuringPlay = true;
|
|
17959
|
-
if (this.composition && this.
|
|
17989
|
+
if (this.composition && this.active && !this.isEnabled) {
|
|
17960
17990
|
this.onEnable();
|
|
17961
17991
|
}
|
|
17962
17992
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.children), _step; !(_step = _iterator()).done;){
|
|
@@ -18232,6 +18262,22 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
18232
18262
|
}
|
|
18233
18263
|
}
|
|
18234
18264
|
}
|
|
18265
|
+
},
|
|
18266
|
+
{
|
|
18267
|
+
key: "isActive",
|
|
18268
|
+
get: /**
|
|
18269
|
+
* 当前 VFXItem 是否激活
|
|
18270
|
+
*/ function get() {
|
|
18271
|
+
return this.active;
|
|
18272
|
+
}
|
|
18273
|
+
},
|
|
18274
|
+
{
|
|
18275
|
+
key: "isVisible",
|
|
18276
|
+
get: /**
|
|
18277
|
+
* 元素组件显隐状态
|
|
18278
|
+
*/ function get() {
|
|
18279
|
+
return this.visible;
|
|
18280
|
+
}
|
|
18235
18281
|
}
|
|
18236
18282
|
]);
|
|
18237
18283
|
return VFXItem;
|
|
@@ -22996,6 +23042,7 @@ exports.TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
22996
23042
|
for(var _iterator = _create_for_of_iterator_helper_loose(timelineClips), _step; !(_step = _iterator()).done;){
|
|
22997
23043
|
var timelineClip = _step.value;
|
|
22998
23044
|
var clipPlayable = this.createClipPlayable(graph, timelineClip);
|
|
23045
|
+
clipPlayable.setDuration(timelineClip.duration);
|
|
22999
23046
|
var clip = new RuntimeClip(timelineClip, clipPlayable, mixer, this);
|
|
23000
23047
|
runtimeClips.push(clip);
|
|
23001
23048
|
mixer.addInput(clipPlayable, 0);
|
|
@@ -23099,14 +23146,6 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
23099
23146
|
this.playable.setTime(clipTime);
|
|
23100
23147
|
// 判断动画是否结束
|
|
23101
23148
|
if (ended) {
|
|
23102
|
-
if (_instanceof1(boundObject, exports.VFXItem) && !boundObject.ended) {
|
|
23103
|
-
boundObject.ended = true;
|
|
23104
|
-
boundObject.onEnd();
|
|
23105
|
-
if (!boundObject.compositionReusable && !boundObject.reusable) {
|
|
23106
|
-
boundObject.dispose();
|
|
23107
|
-
this.playable.dispose();
|
|
23108
|
-
}
|
|
23109
|
-
}
|
|
23110
23149
|
if (this.playable.getPlayState() === PlayState.Playing) {
|
|
23111
23150
|
this.playable.pause();
|
|
23112
23151
|
}
|
|
@@ -23149,26 +23188,10 @@ var ActivationMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23149
23188
|
}
|
|
23150
23189
|
if (hasInput) {
|
|
23151
23190
|
boundItem.transform.setValid(true);
|
|
23152
|
-
|
|
23191
|
+
boundItem.setActive(true);
|
|
23153
23192
|
} else {
|
|
23154
23193
|
boundItem.transform.setValid(false);
|
|
23155
|
-
|
|
23156
|
-
}
|
|
23157
|
-
};
|
|
23158
|
-
_proto.hideRendererComponents = function hideRendererComponents(item) {
|
|
23159
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.rendererComponents), _step; !(_step = _iterator()).done;){
|
|
23160
|
-
var rendererComponent = _step.value;
|
|
23161
|
-
if (rendererComponent.enabled) {
|
|
23162
|
-
rendererComponent.enabled = false;
|
|
23163
|
-
}
|
|
23164
|
-
}
|
|
23165
|
-
};
|
|
23166
|
-
_proto.showRendererComponents = function showRendererComponents(item) {
|
|
23167
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(item.rendererComponents), _step; !(_step = _iterator()).done;){
|
|
23168
|
-
var rendererComponent = _step.value;
|
|
23169
|
-
if (!rendererComponent.enabled) {
|
|
23170
|
-
rendererComponent.enabled = true;
|
|
23171
|
-
}
|
|
23194
|
+
boundItem.setActive(false);
|
|
23172
23195
|
}
|
|
23173
23196
|
};
|
|
23174
23197
|
return ActivationMixerPlayable;
|
|
@@ -23196,7 +23219,7 @@ var PropertyClipPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23196
23219
|
}
|
|
23197
23220
|
var _proto = PropertyClipPlayable.prototype;
|
|
23198
23221
|
_proto.processFrame = function processFrame(context) {
|
|
23199
|
-
this.value = this.curve.getValue(this.time);
|
|
23222
|
+
this.value = this.curve.getValue(this.time / this.getDuration());
|
|
23200
23223
|
};
|
|
23201
23224
|
return PropertyClipPlayable;
|
|
23202
23225
|
}(Playable);
|
|
@@ -23714,9 +23737,6 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23714
23737
|
var track = _step.value;
|
|
23715
23738
|
var boundObject = track.boundObject;
|
|
23716
23739
|
if (_instanceof1(boundObject, exports.VFXItem)) {
|
|
23717
|
-
if (_instanceof1(track, exports.ObjectBindingTrack)) {
|
|
23718
|
-
boundObject.reusable = value;
|
|
23719
|
-
}
|
|
23720
23740
|
var subCompositionComponent = boundObject.getComponent(CompositionComponent);
|
|
23721
23741
|
if (subCompositionComponent) {
|
|
23722
23742
|
subCompositionComponent.setReusable(value);
|
|
@@ -23761,16 +23781,16 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23761
23781
|
}
|
|
23762
23782
|
}
|
|
23763
23783
|
};
|
|
23764
|
-
_proto.
|
|
23784
|
+
_proto.onEnable = function onEnable() {
|
|
23765
23785
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.items), _step; !(_step = _iterator()).done;){
|
|
23766
23786
|
var item = _step.value;
|
|
23767
|
-
item.
|
|
23787
|
+
item.setActive(true);
|
|
23768
23788
|
}
|
|
23769
23789
|
};
|
|
23770
|
-
_proto.
|
|
23790
|
+
_proto.onDisable = function onDisable() {
|
|
23771
23791
|
for(var _iterator = _create_for_of_iterator_helper_loose(this.items), _step; !(_step = _iterator()).done;){
|
|
23772
23792
|
var item = _step.value;
|
|
23773
|
-
item.
|
|
23793
|
+
item.setActive(false);
|
|
23774
23794
|
}
|
|
23775
23795
|
};
|
|
23776
23796
|
_proto.onDestroy = function onDestroy() {
|
|
@@ -23786,7 +23806,7 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
23786
23806
|
_proto.hitTest = function hitTest(ray, x, y, regions, force, options) {
|
|
23787
23807
|
var _this, _loop = function(i) {
|
|
23788
23808
|
var item = _this.items[i];
|
|
23789
|
-
if (item.
|
|
23809
|
+
if (item.isActive && item.transform.getValid() && !exports.VFXItem.isComposition(item) && !skip(item)) {
|
|
23790
23810
|
var hitParams = item.getHitTestParams(force);
|
|
23791
23811
|
if (hitParams) {
|
|
23792
23812
|
var success = false;
|
|
@@ -23928,9 +23948,9 @@ var SubCompositionMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
23928
23948
|
}
|
|
23929
23949
|
}
|
|
23930
23950
|
if (hasInput) {
|
|
23931
|
-
compositionComponent.
|
|
23951
|
+
compositionComponent.item.setActive(true);
|
|
23932
23952
|
} else {
|
|
23933
|
-
compositionComponent.
|
|
23953
|
+
compositionComponent.item.setActive(false);
|
|
23934
23954
|
}
|
|
23935
23955
|
};
|
|
23936
23956
|
return SubCompositionMixerPlayable;
|
|
@@ -24595,6 +24615,8 @@ exports.TextComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
24595
24615
|
/**
|
|
24596
24616
|
* 文本行数
|
|
24597
24617
|
*/ _this.lineCount = 0;
|
|
24618
|
+
_this.SCALE_FACTOR = 0.1;
|
|
24619
|
+
_this.ALPHA_FIX_VALUE = 1 / 255;
|
|
24598
24620
|
_this.name = "MText" + seed$1++;
|
|
24599
24621
|
_this.geometry = _this.createGeometry(glContext.TRIANGLES);
|
|
24600
24622
|
if (props) {
|
|
@@ -28385,6 +28407,9 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28385
28407
|
* 动画播放速度
|
|
28386
28408
|
*/ _this.speed = 1;
|
|
28387
28409
|
/**
|
|
28410
|
+
* 合成是否结束
|
|
28411
|
+
*/ _this.isEnded = false;
|
|
28412
|
+
/**
|
|
28388
28413
|
* 用于保存与当前合成相关的插件数据
|
|
28389
28414
|
*/ _this.loaderData = {};
|
|
28390
28415
|
/**
|
|
@@ -28406,6 +28431,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28406
28431
|
* 合成暂停/播放 标识
|
|
28407
28432
|
*/ _this.paused = false;
|
|
28408
28433
|
_this.lastVideoUpdateTime = 0;
|
|
28434
|
+
_this.isEndCalled = false;
|
|
28409
28435
|
var _props_reusable = props.reusable, reusable = _props_reusable === void 0 ? false : _props_reusable, _props_speed = props.speed, speed = _props_speed === void 0 ? 1 : _props_speed, _props_baseRenderOrder = props.baseRenderOrder, baseRenderOrder = _props_baseRenderOrder === void 0 ? 0 : _props_baseRenderOrder, renderer = props.renderer, event = props.event, width = props.width, height = props.height, handleItemMessage = props.handleItemMessage;
|
|
28410
28436
|
_this.compositionSourceManager = new CompositionSourceManager(scene, renderer.engine);
|
|
28411
28437
|
if (reusable) {
|
|
@@ -28495,7 +28521,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28495
28521
|
* @param visible - 是否可见
|
|
28496
28522
|
*/ _proto.setVisible = function setVisible(visible) {
|
|
28497
28523
|
this.items.forEach(function(item) {
|
|
28498
|
-
item.
|
|
28524
|
+
item.setActive(visible);
|
|
28499
28525
|
});
|
|
28500
28526
|
};
|
|
28501
28527
|
/**
|
|
@@ -28505,7 +28531,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28505
28531
|
return this.speed;
|
|
28506
28532
|
};
|
|
28507
28533
|
_proto.play = function play() {
|
|
28508
|
-
if (this.
|
|
28534
|
+
if (this.isEnded && this.reusable) {
|
|
28509
28535
|
this.restart();
|
|
28510
28536
|
}
|
|
28511
28537
|
if (this.rootComposition.isStartCalled) {
|
|
@@ -28596,7 +28622,8 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28596
28622
|
* 重置状态函数
|
|
28597
28623
|
*/ _proto.reset = function reset() {
|
|
28598
28624
|
this.rendererOptions = null;
|
|
28599
|
-
this.
|
|
28625
|
+
this.isEnded = false;
|
|
28626
|
+
this.isEndCalled = false;
|
|
28600
28627
|
this.rootComposition.time = 0;
|
|
28601
28628
|
this.pluginSystem.resetComposition(this, this.renderFrame);
|
|
28602
28629
|
};
|
|
@@ -28648,12 +28675,18 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28648
28675
|
this.sceneTicking.lateUpdate.tick(dt);
|
|
28649
28676
|
this.updateCamera();
|
|
28650
28677
|
this.prepareRender();
|
|
28678
|
+
if (this.isEnded && !this.isEndCalled) {
|
|
28679
|
+
this.isEndCalled = true;
|
|
28680
|
+
this.emit("end", {
|
|
28681
|
+
composition: this
|
|
28682
|
+
});
|
|
28683
|
+
}
|
|
28651
28684
|
if (this.shouldDispose()) {
|
|
28652
28685
|
this.dispose();
|
|
28653
28686
|
}
|
|
28654
28687
|
};
|
|
28655
28688
|
_proto.shouldDispose = function shouldDispose() {
|
|
28656
|
-
return this.
|
|
28689
|
+
return this.isEnded && this.rootItem.endBehavior === EndBehavior.destroy && !this.reusable;
|
|
28657
28690
|
};
|
|
28658
28691
|
_proto.getUpdateTime = function getUpdateTime(t) {
|
|
28659
28692
|
var startTimeInMs = this.startTime * 1000;
|
|
@@ -28744,11 +28777,11 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28744
28777
|
*/ _proto.updateRootComposition = function updateRootComposition(deltaTime) {
|
|
28745
28778
|
if (this.rootComposition.isActiveAndEnabled) {
|
|
28746
28779
|
var localTime = this.time + deltaTime - this.rootItem.start;
|
|
28747
|
-
var
|
|
28780
|
+
var isEnded = false;
|
|
28748
28781
|
var duration = this.rootItem.duration;
|
|
28749
28782
|
var endBehavior = this.rootItem.endBehavior;
|
|
28750
28783
|
if (localTime - duration > 0.001) {
|
|
28751
|
-
|
|
28784
|
+
isEnded = true;
|
|
28752
28785
|
switch(endBehavior){
|
|
28753
28786
|
case EndBehavior.restart:
|
|
28754
28787
|
{
|
|
@@ -28772,11 +28805,14 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
28772
28805
|
}
|
|
28773
28806
|
}
|
|
28774
28807
|
this.rootComposition.time = localTime;
|
|
28775
|
-
|
|
28776
|
-
|
|
28777
|
-
|
|
28778
|
-
|
|
28779
|
-
}
|
|
28808
|
+
// end state changed, handle onEnd flags
|
|
28809
|
+
if (this.isEnded !== isEnded) {
|
|
28810
|
+
if (isEnded) {
|
|
28811
|
+
this.isEnded = true;
|
|
28812
|
+
} else {
|
|
28813
|
+
this.isEnded = false;
|
|
28814
|
+
this.isEndCalled = false;
|
|
28815
|
+
}
|
|
28780
28816
|
}
|
|
28781
28817
|
}
|
|
28782
28818
|
};
|
|
@@ -31102,7 +31138,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
31102
31138
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
31103
31139
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
31104
31140
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
31105
|
-
var version = "2.1.0-alpha.
|
|
31141
|
+
var version = "2.1.0-alpha.12";
|
|
31106
31142
|
logger.info("Core version: " + version + ".");
|
|
31107
31143
|
|
|
31108
31144
|
exports.AbstractPlugin = AbstractPlugin;
|
|
@@ -31194,7 +31230,6 @@ exports.SemanticMap = SemanticMap;
|
|
|
31194
31230
|
exports.SerializationHelper = SerializationHelper;
|
|
31195
31231
|
exports.ShaderFactory = ShaderFactory;
|
|
31196
31232
|
exports.ShaderVariant = ShaderVariant;
|
|
31197
|
-
exports.ShapeData = ShapeData;
|
|
31198
31233
|
exports.SpriteLoader = SpriteLoader;
|
|
31199
31234
|
exports.StaticValue = StaticValue;
|
|
31200
31235
|
exports.TEMPLATE_USE_OFFSCREEN_CANVAS = TEMPLATE_USE_OFFSCREEN_CANVAS;
|