@galacean/effects 2.0.0-alpha.13 → 2.0.0-alpha.14
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/alipay.js +149 -119
- package/dist/alipay.js.map +1 -1
- package/dist/alipay.mjs +148 -117
- package/dist/alipay.mjs.map +1 -1
- package/dist/index.js +150 -120
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +149 -118
- package/dist/index.mjs.map +1 -1
- package/dist/weapp.js +149 -119
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +148 -117
- package/dist/weapp.mjs.map +1 -1
- package/package.json +3 -3
package/dist/alipay.js
CHANGED
|
@@ -18492,7 +18492,7 @@ exports.TransformPlayableAsset = __decorate([
|
|
|
18492
18492
|
_proto.processFrame = function processFrame(context) {};
|
|
18493
18493
|
return ActivationPlayable;
|
|
18494
18494
|
}(Playable);
|
|
18495
|
-
|
|
18495
|
+
exports.ActivationPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
18496
18496
|
_inherits(ActivationPlayableAsset, PlayableAsset);
|
|
18497
18497
|
function ActivationPlayableAsset() {
|
|
18498
18498
|
return PlayableAsset.apply(this, arguments);
|
|
@@ -18503,6 +18503,9 @@ var ActivationPlayableAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
18503
18503
|
};
|
|
18504
18504
|
return ActivationPlayableAsset;
|
|
18505
18505
|
}(PlayableAsset);
|
|
18506
|
+
exports.ActivationPlayableAsset = __decorate([
|
|
18507
|
+
effectsClass("ActivationPlayableAsset")
|
|
18508
|
+
], exports.ActivationPlayableAsset);
|
|
18506
18509
|
exports.AnimationClip = /*#__PURE__*/ function(EffectsObject) {
|
|
18507
18510
|
_inherits(AnimationClip, EffectsObject);
|
|
18508
18511
|
function AnimationClip() {
|
|
@@ -18684,6 +18687,9 @@ exports.TrackAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
18684
18687
|
_proto.getChildTracks = function getChildTracks() {
|
|
18685
18688
|
return this.children;
|
|
18686
18689
|
};
|
|
18690
|
+
_proto.addChild = function addChild(child) {
|
|
18691
|
+
this.children.push(child);
|
|
18692
|
+
};
|
|
18687
18693
|
_proto.createClip = function createClip(classConstructor, name) {
|
|
18688
18694
|
var newClip = new exports.TimelineClip();
|
|
18689
18695
|
newClip.asset = new classConstructor(this.engine);
|
|
@@ -18761,9 +18767,10 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
18761
18767
|
var weight = 1.0;
|
|
18762
18768
|
var ended = false;
|
|
18763
18769
|
var started = false;
|
|
18770
|
+
var boundItem = this.track.binding;
|
|
18764
18771
|
if (localTime > clip.start + clip.duration + 0.001 && clip.endBehaviour === ItemEndBehavior.destroy) {
|
|
18765
|
-
var
|
|
18766
|
-
if (exports.VFXItem.isParticle(
|
|
18772
|
+
var _boundItem_getComponent;
|
|
18773
|
+
if (exports.VFXItem.isParticle(boundItem) && !((_boundItem_getComponent = boundItem.getComponent(exports.ParticleSystem)) == null ? void 0 : _boundItem_getComponent.destroyed)) {
|
|
18767
18774
|
weight = 1.0;
|
|
18768
18775
|
} else {
|
|
18769
18776
|
weight = 0.0;
|
|
@@ -18779,7 +18786,6 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
18779
18786
|
this.playable.play();
|
|
18780
18787
|
}
|
|
18781
18788
|
this.parentMixer.setInputWeight(this.playable, weight);
|
|
18782
|
-
var boundItem = this.track.binding;
|
|
18783
18789
|
// 判断动画是否结束
|
|
18784
18790
|
if (ended && !boundItem.ended) {
|
|
18785
18791
|
boundItem.ended = true;
|
|
@@ -18816,6 +18822,64 @@ var RuntimeClip = /*#__PURE__*/ function() {
|
|
|
18816
18822
|
return RuntimeClip;
|
|
18817
18823
|
}();
|
|
18818
18824
|
|
|
18825
|
+
exports.ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
|
|
18826
|
+
_inherits(ObjectBindingTrack, TrackAsset1);
|
|
18827
|
+
function ObjectBindingTrack() {
|
|
18828
|
+
return TrackAsset1.apply(this, arguments);
|
|
18829
|
+
}
|
|
18830
|
+
var _proto = ObjectBindingTrack.prototype;
|
|
18831
|
+
_proto.create = function create(timelineAsset) {
|
|
18832
|
+
var boundItem = this.binding;
|
|
18833
|
+
this.options = {
|
|
18834
|
+
start: boundItem.start,
|
|
18835
|
+
duration: boundItem.duration,
|
|
18836
|
+
looping: boundItem.endBehavior === ItemEndBehavior.loop,
|
|
18837
|
+
endBehavior: boundItem.endBehavior || ItemEndBehavior.destroy
|
|
18838
|
+
};
|
|
18839
|
+
this.name = boundItem.name;
|
|
18840
|
+
// 添加粒子动画 clip
|
|
18841
|
+
if (boundItem.getComponent(exports.ParticleSystem)) {
|
|
18842
|
+
var particleTrack = timelineAsset.createTrack(exports.TrackAsset, this, "ParticleTrack");
|
|
18843
|
+
particleTrack.binding = this.binding;
|
|
18844
|
+
var particleClip = particleTrack.createClip(ParticleBehaviourPlayableAsset);
|
|
18845
|
+
particleClip.start = boundItem.start;
|
|
18846
|
+
particleClip.duration = boundItem.duration;
|
|
18847
|
+
particleClip.endBehaviour = boundItem.endBehavior;
|
|
18848
|
+
}
|
|
18849
|
+
};
|
|
18850
|
+
_proto.toLocalTime = function toLocalTime(time) {
|
|
18851
|
+
var localTime = time - this.options.start;
|
|
18852
|
+
var duration = this.options.duration;
|
|
18853
|
+
if (localTime - duration > 0.001) {
|
|
18854
|
+
if (this.options.endBehavior === END_BEHAVIOR_RESTART) {
|
|
18855
|
+
localTime = localTime % duration;
|
|
18856
|
+
} else if (this.options.endBehavior === END_BEHAVIOR_FREEZE) {
|
|
18857
|
+
localTime = Math.min(duration, localTime);
|
|
18858
|
+
}
|
|
18859
|
+
}
|
|
18860
|
+
return localTime;
|
|
18861
|
+
};
|
|
18862
|
+
_proto.fromData = function fromData(data) {
|
|
18863
|
+
TrackAsset1.prototype.fromData.call(this, data);
|
|
18864
|
+
this.data = data;
|
|
18865
|
+
};
|
|
18866
|
+
return ObjectBindingTrack;
|
|
18867
|
+
}(exports.TrackAsset);
|
|
18868
|
+
exports.ObjectBindingTrack = __decorate([
|
|
18869
|
+
effectsClass("ObjectBindingTrack")
|
|
18870
|
+
], exports.ObjectBindingTrack);
|
|
18871
|
+
|
|
18872
|
+
exports.TransformTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
18873
|
+
_inherits(TransformTrack, TrackAsset);
|
|
18874
|
+
function TransformTrack() {
|
|
18875
|
+
return TrackAsset.apply(this, arguments);
|
|
18876
|
+
}
|
|
18877
|
+
return TransformTrack;
|
|
18878
|
+
}(exports.TrackAsset);
|
|
18879
|
+
exports.TransformTrack = __decorate([
|
|
18880
|
+
effectsClass("TransformTrack")
|
|
18881
|
+
], exports.TransformTrack);
|
|
18882
|
+
|
|
18819
18883
|
var ActivationMixerPlayable = /*#__PURE__*/ function(Playable) {
|
|
18820
18884
|
_inherits(ActivationMixerPlayable, Playable);
|
|
18821
18885
|
function ActivationMixerPlayable() {
|
|
@@ -18870,6 +18934,9 @@ exports.ActivationTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
|
18870
18934
|
return TrackAsset.apply(this, arguments);
|
|
18871
18935
|
}
|
|
18872
18936
|
var _proto = ActivationTrack.prototype;
|
|
18937
|
+
_proto.initializeBinding = function initializeBinding(parentBinding) {
|
|
18938
|
+
this.binding = parentBinding;
|
|
18939
|
+
};
|
|
18873
18940
|
_proto.createTrackMixer = function createTrackMixer(graph) {
|
|
18874
18941
|
return new ActivationMixerPlayable(graph);
|
|
18875
18942
|
};
|
|
@@ -18879,85 +18946,6 @@ exports.ActivationTrack = __decorate([
|
|
|
18879
18946
|
effectsClass("ActivationTrack")
|
|
18880
18947
|
], exports.ActivationTrack);
|
|
18881
18948
|
|
|
18882
|
-
exports.ObjectBindingTrack = /*#__PURE__*/ function(TrackAsset1) {
|
|
18883
|
-
_inherits(ObjectBindingTrack, TrackAsset1);
|
|
18884
|
-
function ObjectBindingTrack() {
|
|
18885
|
-
var _this;
|
|
18886
|
-
_this = TrackAsset1.apply(this, arguments) || this;
|
|
18887
|
-
_this.trackSeed = 0;
|
|
18888
|
-
return _this;
|
|
18889
|
-
}
|
|
18890
|
-
var _proto = ObjectBindingTrack.prototype;
|
|
18891
|
-
_proto.create = function create() {
|
|
18892
|
-
this.options = {
|
|
18893
|
-
start: this.binding.start,
|
|
18894
|
-
duration: this.binding.duration,
|
|
18895
|
-
looping: this.binding.endBehavior === ItemEndBehavior.loop,
|
|
18896
|
-
endBehavior: this.binding.endBehavior || ItemEndBehavior.destroy
|
|
18897
|
-
};
|
|
18898
|
-
this.id = this.binding.id;
|
|
18899
|
-
this.name = this.binding.name;
|
|
18900
|
-
var activationTrack = this.createTrack(exports.ActivationTrack, "ActivationTrack");
|
|
18901
|
-
activationTrack.binding = this.binding;
|
|
18902
|
-
activationTrack.createClip(ActivationPlayableAsset, "ActivationTimelineClip");
|
|
18903
|
-
// 添加粒子动画 clip
|
|
18904
|
-
if (this.binding.getComponent(exports.ParticleSystem)) {
|
|
18905
|
-
var particleTrack = this.createTrack(exports.TrackAsset, "ParticleTrack");
|
|
18906
|
-
particleTrack.binding = this.binding;
|
|
18907
|
-
particleTrack.createClip(ParticleBehaviourPlayableAsset);
|
|
18908
|
-
}
|
|
18909
|
-
// TODO TimelineClip 需要传入 start 和 duration 数据
|
|
18910
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(this.children), _step; !(_step = _iterator()).done;){
|
|
18911
|
-
var track = _step.value;
|
|
18912
|
-
for(var _iterator1 = _create_for_of_iterator_helper_loose(track.getClips()), _step1; !(_step1 = _iterator1()).done;){
|
|
18913
|
-
var clip = _step1.value;
|
|
18914
|
-
clip.start = this.binding.start;
|
|
18915
|
-
clip.duration = this.binding.duration;
|
|
18916
|
-
clip.endBehaviour = this.binding.endBehavior;
|
|
18917
|
-
}
|
|
18918
|
-
}
|
|
18919
|
-
};
|
|
18920
|
-
_proto.toLocalTime = function toLocalTime(time) {
|
|
18921
|
-
var localTime = time - this.options.start;
|
|
18922
|
-
var duration = this.options.duration;
|
|
18923
|
-
if (localTime - duration > 0.001) {
|
|
18924
|
-
if (this.options.endBehavior === END_BEHAVIOR_RESTART) {
|
|
18925
|
-
localTime = localTime % duration;
|
|
18926
|
-
} else if (this.options.endBehavior === END_BEHAVIOR_FREEZE) {
|
|
18927
|
-
localTime = Math.min(duration, localTime);
|
|
18928
|
-
}
|
|
18929
|
-
}
|
|
18930
|
-
return localTime;
|
|
18931
|
-
};
|
|
18932
|
-
_proto.createTrack = function createTrack(classConstructor, name) {
|
|
18933
|
-
var newTrack = new classConstructor(this.engine);
|
|
18934
|
-
newTrack.binding = this.binding;
|
|
18935
|
-
newTrack.id = (this.trackSeed++).toString();
|
|
18936
|
-
newTrack.name = name ? name : "Track" + newTrack.id;
|
|
18937
|
-
this.children.push(newTrack);
|
|
18938
|
-
return newTrack;
|
|
18939
|
-
};
|
|
18940
|
-
_proto.fromData = function fromData(data) {
|
|
18941
|
-
TrackAsset1.prototype.fromData.call(this, data);
|
|
18942
|
-
this.data = data;
|
|
18943
|
-
};
|
|
18944
|
-
return ObjectBindingTrack;
|
|
18945
|
-
}(exports.TrackAsset);
|
|
18946
|
-
exports.ObjectBindingTrack = __decorate([
|
|
18947
|
-
effectsClass("ObjectBindingTrack")
|
|
18948
|
-
], exports.ObjectBindingTrack);
|
|
18949
|
-
|
|
18950
|
-
exports.TransformTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
18951
|
-
_inherits(TransformTrack, TrackAsset);
|
|
18952
|
-
function TransformTrack() {
|
|
18953
|
-
return TrackAsset.apply(this, arguments);
|
|
18954
|
-
}
|
|
18955
|
-
return TransformTrack;
|
|
18956
|
-
}(exports.TrackAsset);
|
|
18957
|
-
exports.TransformTrack = __decorate([
|
|
18958
|
-
effectsClass("TransformTrack")
|
|
18959
|
-
], exports.TransformTrack);
|
|
18960
|
-
|
|
18961
18949
|
exports.SpriteColorTrack = /*#__PURE__*/ function(TrackAsset) {
|
|
18962
18950
|
_inherits(SpriteColorTrack, TrackAsset);
|
|
18963
18951
|
function SpriteColorTrack() {
|
|
@@ -18982,14 +18970,27 @@ exports.TimelineAsset = /*#__PURE__*/ function(PlayableAsset) {
|
|
|
18982
18970
|
this.graph = graph;
|
|
18983
18971
|
var timelinePlayable = new TimelinePlayable(graph);
|
|
18984
18972
|
timelinePlayable.setTraversalMode(PlayableTraversalMode.Passthrough);
|
|
18973
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.tracks), _step; !(_step = _iterator()).done;){
|
|
18974
|
+
var track = _step.value;
|
|
18975
|
+
if (_instanceof1(track, exports.ObjectBindingTrack)) {
|
|
18976
|
+
track.create(this);
|
|
18977
|
+
}
|
|
18978
|
+
}
|
|
18985
18979
|
timelinePlayable.compileTracks(graph, this.tracks);
|
|
18986
18980
|
return timelinePlayable;
|
|
18987
18981
|
};
|
|
18988
|
-
_proto.
|
|
18989
|
-
|
|
18982
|
+
_proto.createTrack = function createTrack(classConstructor, parent, name) {
|
|
18983
|
+
var newTrack = new classConstructor(this.engine);
|
|
18984
|
+
newTrack.name = name ? name : classConstructor.name;
|
|
18985
|
+
parent.addChild(newTrack);
|
|
18986
|
+
return newTrack;
|
|
18990
18987
|
};
|
|
18988
|
+
_proto.fromData = function fromData(data) {};
|
|
18991
18989
|
return TimelineAsset;
|
|
18992
18990
|
}(PlayableAsset);
|
|
18991
|
+
__decorate([
|
|
18992
|
+
serialize()
|
|
18993
|
+
], exports.TimelineAsset.prototype, "tracks", void 0);
|
|
18993
18994
|
exports.TimelineAsset = __decorate([
|
|
18994
18995
|
effectsClass("TimelineAsset")
|
|
18995
18996
|
], exports.TimelineAsset);
|
|
@@ -18999,7 +19000,6 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
18999
19000
|
var _this;
|
|
19000
19001
|
_this = Playable.apply(this, arguments) || this;
|
|
19001
19002
|
_this.clips = [];
|
|
19002
|
-
_this.masterTracks = [];
|
|
19003
19003
|
return _this;
|
|
19004
19004
|
}
|
|
19005
19005
|
var _proto = TimelinePlayable.prototype;
|
|
@@ -19016,25 +19016,18 @@ var TimelinePlayable = /*#__PURE__*/ function(Playable) {
|
|
|
19016
19016
|
};
|
|
19017
19017
|
_proto.compileTracks = function compileTracks(graph, tracks) {
|
|
19018
19018
|
this.sortTracks(tracks);
|
|
19019
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(tracks), _step; !(_step = _iterator()).done;){
|
|
19020
|
-
var track = _step.value;
|
|
19021
|
-
if (_instanceof1(track, exports.ObjectBindingTrack)) {
|
|
19022
|
-
track.create();
|
|
19023
|
-
}
|
|
19024
|
-
this.masterTracks.push(track);
|
|
19025
|
-
}
|
|
19026
19019
|
var outputTrack = [];
|
|
19027
|
-
for(var
|
|
19028
|
-
var masterTrack =
|
|
19020
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(tracks), _step; !(_step = _iterator()).done;){
|
|
19021
|
+
var masterTrack = _step.value;
|
|
19029
19022
|
outputTrack.push(masterTrack);
|
|
19030
19023
|
this.addSubTracksRecursive(masterTrack, outputTrack);
|
|
19031
19024
|
}
|
|
19032
|
-
for(var
|
|
19033
|
-
var
|
|
19034
|
-
var trackMixPlayable =
|
|
19025
|
+
for(var _iterator1 = _create_for_of_iterator_helper_loose(outputTrack), _step1; !(_step1 = _iterator1()).done;){
|
|
19026
|
+
var track = _step1.value;
|
|
19027
|
+
var trackMixPlayable = track.createPlayableGraph(graph, this.clips);
|
|
19035
19028
|
this.addInput(trackMixPlayable, 0);
|
|
19036
|
-
var trackOutput =
|
|
19037
|
-
trackOutput.setUserData(
|
|
19029
|
+
var trackOutput = track.createOutput();
|
|
19030
|
+
trackOutput.setUserData(track.binding);
|
|
19038
19031
|
graph.addOutput(trackOutput);
|
|
19039
19032
|
trackOutput.setSourcePlayeble(this, this.getInputCount() - 1);
|
|
19040
19033
|
}
|
|
@@ -19078,9 +19071,14 @@ function isAncestor(ancestorCandidate, descendantCandidate) {
|
|
|
19078
19071
|
return false;
|
|
19079
19072
|
}
|
|
19080
19073
|
function compareTracks(a, b) {
|
|
19081
|
-
|
|
19074
|
+
var bindingA = a.track.binding;
|
|
19075
|
+
var bindingB = b.track.binding;
|
|
19076
|
+
if (!_instanceof1(bindingA, exports.VFXItem) || !_instanceof1(bindingB, exports.VFXItem)) {
|
|
19077
|
+
return a.originalIndex - b.originalIndex;
|
|
19078
|
+
}
|
|
19079
|
+
if (isAncestor(bindingA, bindingB)) {
|
|
19082
19080
|
return -1;
|
|
19083
|
-
} else if (isAncestor(
|
|
19081
|
+
} else if (isAncestor(bindingB, bindingA)) {
|
|
19084
19082
|
return 1;
|
|
19085
19083
|
} else {
|
|
19086
19084
|
return a.originalIndex - b.originalIndex; // 非父子关系的元素保持原始顺序
|
|
@@ -22057,7 +22055,7 @@ function getStandardCameraContent(model) {
|
|
|
22057
22055
|
content1.renderer.anchor = convertAnchor(renderer1.anchor, renderer1.particleOrigin);
|
|
22058
22056
|
}
|
|
22059
22057
|
// 修复相机K帧缺失 asMovement 参数
|
|
22060
|
-
if (item.type === ItemType.camera) {
|
|
22058
|
+
if (item.type === ItemType.camera && item.content.positionOverLifetime && Object.keys(item.content.positionOverLifetime).length !== 0) {
|
|
22061
22059
|
item.content.positionOverLifetime.asMovement = true;
|
|
22062
22060
|
}
|
|
22063
22061
|
// 动画数据转化 TODO: 动画数据移到 TimelineComponentData
|
|
@@ -22222,8 +22220,32 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
|
|
|
22222
22220
|
var itemDataPath = _step.value;
|
|
22223
22221
|
var item = guidToItemMap[itemDataPath.id];
|
|
22224
22222
|
var subTrackDatas = [];
|
|
22223
|
+
var newActivationPlayableAsset = {
|
|
22224
|
+
id: generateGUID(),
|
|
22225
|
+
dataType: "ActivationPlayableAsset"
|
|
22226
|
+
};
|
|
22227
|
+
playableAssetDatas.push(newActivationPlayableAsset);
|
|
22228
|
+
var newActivationTrackData = {
|
|
22229
|
+
id: generateGUID(),
|
|
22230
|
+
dataType: "ActivationTrack",
|
|
22231
|
+
children: [],
|
|
22232
|
+
clips: [
|
|
22233
|
+
{
|
|
22234
|
+
start: item.delay,
|
|
22235
|
+
duration: item.duration,
|
|
22236
|
+
endBehaviour: item.endBehavior,
|
|
22237
|
+
asset: {
|
|
22238
|
+
id: newActivationPlayableAsset.id
|
|
22239
|
+
}
|
|
22240
|
+
}
|
|
22241
|
+
]
|
|
22242
|
+
};
|
|
22243
|
+
subTrackDatas.push({
|
|
22244
|
+
id: newActivationTrackData.id
|
|
22245
|
+
});
|
|
22246
|
+
trackDatas.push(newActivationTrackData);
|
|
22225
22247
|
if (item.type !== ItemType.particle) {
|
|
22226
|
-
var
|
|
22248
|
+
var newTransformPlayableAssetData = {
|
|
22227
22249
|
id: generateGUID(),
|
|
22228
22250
|
dataType: "TransformPlayableAsset",
|
|
22229
22251
|
//@ts-expect-error
|
|
@@ -22233,15 +22255,18 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
|
|
|
22233
22255
|
//@ts-expect-error
|
|
22234
22256
|
positionOverLifetime: item.content.positionOverLifetime
|
|
22235
22257
|
};
|
|
22236
|
-
playableAssetDatas.push(
|
|
22258
|
+
playableAssetDatas.push(newTransformPlayableAssetData);
|
|
22237
22259
|
var newTrackData = {
|
|
22238
22260
|
id: generateGUID(),
|
|
22239
22261
|
dataType: "TransformTrack",
|
|
22240
22262
|
children: [],
|
|
22241
22263
|
clips: [
|
|
22242
22264
|
{
|
|
22265
|
+
start: item.delay,
|
|
22266
|
+
duration: item.duration,
|
|
22267
|
+
endBehaviour: item.endBehavior,
|
|
22243
22268
|
asset: {
|
|
22244
|
-
id:
|
|
22269
|
+
id: newTransformPlayableAssetData.id
|
|
22245
22270
|
}
|
|
22246
22271
|
}
|
|
22247
22272
|
]
|
|
@@ -22252,21 +22277,24 @@ function convertTimelineAsset(composition, guidToItemMap, jsonScene) {
|
|
|
22252
22277
|
trackDatas.push(newTrackData);
|
|
22253
22278
|
}
|
|
22254
22279
|
if (item.type === ItemType.sprite) {
|
|
22255
|
-
var
|
|
22280
|
+
var newSpriteColorPlayableAssetData = {
|
|
22256
22281
|
id: generateGUID(),
|
|
22257
22282
|
dataType: "SpriteColorPlayableAsset",
|
|
22258
22283
|
colorOverLifetime: item.content.colorOverLifetime,
|
|
22259
22284
|
startColor: item.content.options.startColor
|
|
22260
22285
|
};
|
|
22261
|
-
playableAssetDatas.push(
|
|
22286
|
+
playableAssetDatas.push(newSpriteColorPlayableAssetData);
|
|
22262
22287
|
var newTrackData1 = {
|
|
22263
22288
|
id: generateGUID(),
|
|
22264
22289
|
dataType: "SpriteColorTrack",
|
|
22265
22290
|
children: [],
|
|
22266
22291
|
clips: [
|
|
22267
22292
|
{
|
|
22293
|
+
start: item.delay,
|
|
22294
|
+
duration: item.duration,
|
|
22295
|
+
endBehaviour: item.endBehavior,
|
|
22268
22296
|
asset: {
|
|
22269
|
-
id:
|
|
22297
|
+
id: newSpriteColorPlayableAssetData.id
|
|
22270
22298
|
}
|
|
22271
22299
|
}
|
|
22272
22300
|
]
|
|
@@ -23896,14 +23924,17 @@ var tmpScale = new Vector3(1, 1, 1);
|
|
|
23896
23924
|
this.timelinePlayable.play();
|
|
23897
23925
|
for(var _iterator1 = _create_for_of_iterator_helper_loose(this.timelineAsset.tracks), _step1; !(_step1 = _iterator1()).done;){
|
|
23898
23926
|
var track = _step1.value;
|
|
23899
|
-
|
|
23900
|
-
if (
|
|
23901
|
-
|
|
23902
|
-
|
|
23903
|
-
|
|
23904
|
-
|
|
23905
|
-
|
|
23906
|
-
subCompositionComponent
|
|
23927
|
+
var binding = track.binding;
|
|
23928
|
+
if (_instanceof1(binding, exports.VFXItem)) {
|
|
23929
|
+
// 重播不销毁元素
|
|
23930
|
+
if (this.item.endBehavior !== ItemEndBehavior.destroy || this.reusable) {
|
|
23931
|
+
if (_instanceof1(track, exports.ObjectBindingTrack)) {
|
|
23932
|
+
binding.reusable = true;
|
|
23933
|
+
}
|
|
23934
|
+
var subCompositionComponent = binding.getComponent(CompositionComponent);
|
|
23935
|
+
if (subCompositionComponent) {
|
|
23936
|
+
subCompositionComponent.reusable = true;
|
|
23937
|
+
}
|
|
23907
23938
|
}
|
|
23908
23939
|
}
|
|
23909
23940
|
this.masterTracks.push(track);
|
|
@@ -30924,12 +30955,11 @@ Renderer.create = function(canvas, framework, renderOptions) {
|
|
|
30924
30955
|
Engine.create = function(gl) {
|
|
30925
30956
|
return new GLEngine(gl);
|
|
30926
30957
|
};
|
|
30927
|
-
var version = "2.0.0-alpha.
|
|
30958
|
+
var version = "2.0.0-alpha.14";
|
|
30928
30959
|
logger.info("player version: " + version);
|
|
30929
30960
|
|
|
30930
30961
|
exports.AbstractPlugin = AbstractPlugin;
|
|
30931
30962
|
exports.ActivationPlayable = ActivationPlayable;
|
|
30932
|
-
exports.ActivationPlayableAsset = ActivationPlayableAsset;
|
|
30933
30963
|
exports.AnimationClipPlayable = AnimationClipPlayable;
|
|
30934
30964
|
exports.AssetLoader = AssetLoader;
|
|
30935
30965
|
exports.AssetManager = AssetManager;
|