@safe-engine/pixi 8.8.1 → 8.8.3
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/app.d.ts +1 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +20 -1
- package/dist/core/NodePool.d.ts +1 -1
- package/dist/core/Size.d.ts +0 -1
- package/dist/core/Size.d.ts.map +1 -1
- package/dist/dragonbones/DragonBonesComponent.d.ts +1 -1
- package/dist/dragonbones/DragonBonesComponent.d.ts.map +1 -1
- package/dist/dragonbones/DragonBonesComponent.js +1 -1
- package/dist/dragonbones/DragonBonesSystem.d.ts.map +1 -1
- package/dist/dragonbones/DragonBonesSystem.js +1 -1
- package/dist/dragonbones/db-pixi/PixiArmatureDisplay.d.ts +59 -0
- package/dist/dragonbones/db-pixi/PixiArmatureDisplay.d.ts.map +1 -0
- package/dist/dragonbones/db-pixi/PixiArmatureDisplay.js +180 -0
- package/dist/dragonbones/db-pixi/PixiFactory.d.ts +87 -0
- package/dist/dragonbones/db-pixi/PixiFactory.d.ts.map +1 -0
- package/dist/dragonbones/db-pixi/PixiFactory.js +159 -0
- package/dist/dragonbones/db-pixi/PixiSlot.d.ts +31 -0
- package/dist/dragonbones/db-pixi/PixiSlot.d.ts.map +1 -0
- package/dist/dragonbones/db-pixi/PixiSlot.js +332 -0
- package/dist/dragonbones/db-pixi/PixiTextureAtlasData.d.ts +38 -0
- package/dist/dragonbones/db-pixi/PixiTextureAtlasData.d.ts.map +1 -0
- package/dist/dragonbones/db-pixi/PixiTextureAtlasData.js +85 -0
- package/dist/dragonbones/db-pixi/index.d.ts +5 -0
- package/dist/dragonbones/db-pixi/index.d.ts.map +1 -0
- package/dist/dragonbones/db-pixi/index.js +4 -0
- package/dist/dragonbones/dragonBones/animation/Animation.d.ts +241 -0
- package/dist/dragonbones/dragonBones/animation/Animation.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/animation/Animation.js +692 -0
- package/dist/dragonbones/dragonBones/animation/AnimationState.d.ts +323 -0
- package/dist/dragonbones/dragonBones/animation/AnimationState.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/animation/AnimationState.js +1161 -0
- package/dist/dragonbones/dragonBones/animation/BaseTimelineState.d.ts +100 -0
- package/dist/dragonbones/dragonBones/animation/BaseTimelineState.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/animation/BaseTimelineState.js +479 -0
- package/dist/dragonbones/dragonBones/animation/IAnimatable.d.ts +38 -0
- package/dist/dragonbones/dragonBones/animation/IAnimatable.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/animation/IAnimatable.js +9 -0
- package/dist/dragonbones/dragonBones/animation/TimelineState.d.ts +159 -0
- package/dist/dragonbones/dragonBones/animation/TimelineState.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/animation/TimelineState.js +998 -0
- package/dist/dragonbones/dragonBones/animation/WorldClock.d.ts +74 -0
- package/dist/dragonbones/dragonBones/animation/WorldClock.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/animation/WorldClock.js +162 -0
- package/dist/dragonbones/dragonBones/armature/Armature.d.ts +314 -0
- package/dist/dragonbones/dragonBones/armature/Armature.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/armature/Armature.js +650 -0
- package/dist/dragonbones/dragonBones/armature/Bone.d.ts +123 -0
- package/dist/dragonbones/dragonBones/armature/Bone.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/armature/Bone.js +438 -0
- package/dist/dragonbones/dragonBones/armature/Constraint.d.ts +99 -0
- package/dist/dragonbones/dragonBones/armature/Constraint.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/armature/Constraint.js +672 -0
- package/dist/dragonbones/dragonBones/armature/IArmatureProxy.d.ts +47 -0
- package/dist/dragonbones/dragonBones/armature/IArmatureProxy.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/armature/IArmatureProxy.js +1 -0
- package/dist/dragonbones/dragonBones/armature/Slot.d.ts +357 -0
- package/dist/dragonbones/dragonBones/armature/Slot.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/armature/Slot.js +1009 -0
- package/dist/dragonbones/dragonBones/armature/Surface.d.ts +41 -0
- package/dist/dragonbones/dragonBones/armature/Surface.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/armature/Surface.js +463 -0
- package/dist/dragonbones/dragonBones/armature/TransformObject.d.ts +80 -0
- package/dist/dragonbones/dragonBones/armature/TransformObject.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/armature/TransformObject.js +77 -0
- package/dist/dragonbones/dragonBones/core/BaseObject.d.ts +53 -0
- package/dist/dragonbones/dragonBones/core/BaseObject.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/core/BaseObject.js +130 -0
- package/dist/dragonbones/dragonBones/core/DragonBones.d.ts +236 -0
- package/dist/dragonbones/dragonBones/core/DragonBones.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/core/DragonBones.js +61 -0
- package/dist/dragonbones/dragonBones/event/EventObject.d.ts +143 -0
- package/dist/dragonbones/dragonBones/event/EventObject.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/event/EventObject.js +99 -0
- package/dist/dragonbones/dragonBones/event/IEventDispatcher.d.ts +48 -0
- package/dist/dragonbones/dragonBones/event/IEventDispatcher.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/event/IEventDispatcher.js +1 -0
- package/dist/dragonbones/dragonBones/factory/BaseFactory.d.ts +292 -0
- package/dist/dragonbones/dragonBones/factory/BaseFactory.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/factory/BaseFactory.js +735 -0
- package/dist/dragonbones/dragonBones/geom/ColorTransform.d.ts +17 -0
- package/dist/dragonbones/dragonBones/geom/ColorTransform.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/geom/ColorTransform.js +33 -0
- package/dist/dragonbones/dragonBones/geom/Curve.d.ts +10 -0
- package/dist/dragonbones/dragonBones/geom/Curve.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/geom/Curve.js +26 -0
- package/dist/dragonbones/dragonBones/geom/Matrix.d.ts +105 -0
- package/dist/dragonbones/dragonBones/geom/Matrix.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/geom/Matrix.js +207 -0
- package/dist/dragonbones/dragonBones/geom/Point.d.ts +38 -0
- package/dist/dragonbones/dragonBones/geom/Point.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/geom/Point.js +31 -0
- package/dist/dragonbones/dragonBones/geom/Rectangle.d.ts +53 -0
- package/dist/dragonbones/dragonBones/geom/Rectangle.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/geom/Rectangle.js +37 -0
- package/dist/dragonbones/dragonBones/geom/Transform.d.ts +102 -0
- package/dist/dragonbones/dragonBones/geom/Transform.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/geom/Transform.js +170 -0
- package/dist/dragonbones/dragonBones/index.d.ts +37 -0
- package/dist/dragonbones/dragonBones/index.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/index.js +36 -0
- package/dist/dragonbones/dragonBones/model/AnimationConfig.d.ts +162 -0
- package/dist/dragonbones/dragonBones/model/AnimationConfig.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/AnimationConfig.js +81 -0
- package/dist/dragonbones/dragonBones/model/AnimationData.d.ts +174 -0
- package/dist/dragonbones/dragonBones/model/AnimationData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/AnimationData.js +256 -0
- package/dist/dragonbones/dragonBones/model/ArmatureData.d.ts +319 -0
- package/dist/dragonbones/dragonBones/model/ArmatureData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/ArmatureData.js +450 -0
- package/dist/dragonbones/dragonBones/model/BoundingBoxData.d.ts +188 -0
- package/dist/dragonbones/dragonBones/model/BoundingBoxData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/BoundingBoxData.js +500 -0
- package/dist/dragonbones/dragonBones/model/CanvasData.d.ts +15 -0
- package/dist/dragonbones/dragonBones/model/CanvasData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/CanvasData.js +17 -0
- package/dist/dragonbones/dragonBones/model/ConstraintData.d.ts +46 -0
- package/dist/dragonbones/dragonBones/model/ConstraintData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/ConstraintData.js +57 -0
- package/dist/dragonbones/dragonBones/model/DisplayData.d.ts +98 -0
- package/dist/dragonbones/dragonBones/model/DisplayData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/DisplayData.js +174 -0
- package/dist/dragonbones/dragonBones/model/DragonBonesData.d.ts +108 -0
- package/dist/dragonbones/dragonBones/model/DragonBonesData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/DragonBonesData.js +86 -0
- package/dist/dragonbones/dragonBones/model/SkinData.d.ts +40 -0
- package/dist/dragonbones/dragonBones/model/SkinData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/SkinData.js +68 -0
- package/dist/dragonbones/dragonBones/model/TextureAtlasData.d.ts +73 -0
- package/dist/dragonbones/dragonBones/model/TextureAtlasData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/TextureAtlasData.js +102 -0
- package/dist/dragonbones/dragonBones/model/UserData.d.ts +73 -0
- package/dist/dragonbones/dragonBones/model/UserData.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/model/UserData.js +101 -0
- package/dist/dragonbones/dragonBones/parser/BinaryDataParser.d.ts +29 -0
- package/dist/dragonbones/dragonBones/parser/BinaryDataParser.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/parser/BinaryDataParser.js +356 -0
- package/dist/dragonbones/dragonBones/parser/DataParser.d.ts +153 -0
- package/dist/dragonbones/dragonBones/parser/DataParser.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/parser/DataParser.js +283 -0
- package/dist/dragonbones/dragonBones/parser/ObjectDataParser.d.ts +130 -0
- package/dist/dragonbones/dragonBones/parser/ObjectDataParser.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones/parser/ObjectDataParser.js +2098 -0
- package/dist/dragonbones/index.js +1 -1
- package/dist/helper/utils.js +1 -1
- package/package.json +3 -4
|
@@ -0,0 +1,1161 @@
|
|
|
1
|
+
import { BaseObject } from "../core/BaseObject";
|
|
2
|
+
import { EventObject } from "../event/EventObject";
|
|
3
|
+
import { ActionTimelineState, ZOrderTimelineState, IKConstraintTimelineState, BoneAllTimelineState, BoneTranslateTimelineState, BoneRotateTimelineState, BoneScaleTimelineState, AlphaTimelineState, SurfaceTimelineState, SlotDisplayTimelineState, SlotZIndexTimelineState, SlotColorTimelineState, DeformTimelineState, AnimationProgressTimelineState, AnimationWeightTimelineState, AnimationParametersTimelineState, } from "./TimelineState";
|
|
4
|
+
/**
|
|
5
|
+
* - The animation state is generated when the animation data is played.
|
|
6
|
+
* @see dragonBones.Animation
|
|
7
|
+
* @see dragonBones.AnimationData
|
|
8
|
+
* @version DragonBones 3.0
|
|
9
|
+
* @language en_US
|
|
10
|
+
*/
|
|
11
|
+
export class AnimationState extends BaseObject {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this._boneMask = [];
|
|
15
|
+
this._boneTimelines = [];
|
|
16
|
+
this._boneBlendTimelines = [];
|
|
17
|
+
this._slotTimelines = [];
|
|
18
|
+
this._slotBlendTimelines = [];
|
|
19
|
+
this._constraintTimelines = [];
|
|
20
|
+
this._animationTimelines = [];
|
|
21
|
+
this._poseTimelines = [];
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
this._actionTimeline = null; // Initial value.
|
|
26
|
+
this._zOrderTimeline = null; // Initial value.
|
|
27
|
+
}
|
|
28
|
+
static toString() {
|
|
29
|
+
return "[class dragonBones.AnimationState]";
|
|
30
|
+
}
|
|
31
|
+
_onClear() {
|
|
32
|
+
for (const timeline of this._boneTimelines) {
|
|
33
|
+
timeline.returnToPool();
|
|
34
|
+
}
|
|
35
|
+
for (const timeline of this._boneBlendTimelines) {
|
|
36
|
+
timeline.returnToPool();
|
|
37
|
+
}
|
|
38
|
+
for (const timeline of this._slotTimelines) {
|
|
39
|
+
timeline.returnToPool();
|
|
40
|
+
}
|
|
41
|
+
for (const timeline of this._slotBlendTimelines) {
|
|
42
|
+
timeline.returnToPool();
|
|
43
|
+
}
|
|
44
|
+
for (const timeline of this._constraintTimelines) {
|
|
45
|
+
timeline.returnToPool();
|
|
46
|
+
}
|
|
47
|
+
for (const timeline of this._animationTimelines) {
|
|
48
|
+
const animationState = timeline.target;
|
|
49
|
+
if (animationState._parent === this) {
|
|
50
|
+
animationState._fadeState = 1;
|
|
51
|
+
animationState._subFadeState = 1;
|
|
52
|
+
animationState._parent = null;
|
|
53
|
+
}
|
|
54
|
+
timeline.returnToPool();
|
|
55
|
+
}
|
|
56
|
+
if (this._actionTimeline !== null) {
|
|
57
|
+
this._actionTimeline.returnToPool();
|
|
58
|
+
}
|
|
59
|
+
if (this._zOrderTimeline !== null) {
|
|
60
|
+
this._zOrderTimeline.returnToPool();
|
|
61
|
+
}
|
|
62
|
+
this.actionEnabled = false;
|
|
63
|
+
this.additive = false;
|
|
64
|
+
this.displayControl = false;
|
|
65
|
+
this.resetToPose = false;
|
|
66
|
+
this.blendType = 0 /* AnimationBlendType.None */;
|
|
67
|
+
this.playTimes = 1;
|
|
68
|
+
this.layer = 0;
|
|
69
|
+
this.timeScale = 1.0;
|
|
70
|
+
this._weight = 1.0;
|
|
71
|
+
this.parameterX = 0.0;
|
|
72
|
+
this.parameterY = 0.0;
|
|
73
|
+
this.positionX = 0.0;
|
|
74
|
+
this.positionY = 0.0;
|
|
75
|
+
this.autoFadeOutTime = 0.0;
|
|
76
|
+
this.fadeTotalTime = 0.0;
|
|
77
|
+
this.name = "";
|
|
78
|
+
this.group = "";
|
|
79
|
+
this._timelineDirty = 2;
|
|
80
|
+
this._playheadState = 0;
|
|
81
|
+
this._fadeState = -1;
|
|
82
|
+
this._subFadeState = -1;
|
|
83
|
+
this._position = 0.0;
|
|
84
|
+
this._duration = 0.0;
|
|
85
|
+
this._fadeTime = 0.0;
|
|
86
|
+
this._time = 0.0;
|
|
87
|
+
this._fadeProgress = 0.0;
|
|
88
|
+
this._weightResult = 0.0;
|
|
89
|
+
this._boneMask.length = 0;
|
|
90
|
+
this._boneTimelines.length = 0;
|
|
91
|
+
this._boneBlendTimelines.length = 0;
|
|
92
|
+
this._slotTimelines.length = 0;
|
|
93
|
+
this._slotBlendTimelines.length = 0;
|
|
94
|
+
this._constraintTimelines.length = 0;
|
|
95
|
+
this._animationTimelines.length = 0;
|
|
96
|
+
this._poseTimelines.length = 0;
|
|
97
|
+
// this._bonePoses.clear();
|
|
98
|
+
this._animationData = null; //
|
|
99
|
+
this._armature = null; //
|
|
100
|
+
this._actionTimeline = null; //
|
|
101
|
+
this._zOrderTimeline = null;
|
|
102
|
+
this._activeChildA = null;
|
|
103
|
+
this._activeChildB = null;
|
|
104
|
+
this._parent = null;
|
|
105
|
+
}
|
|
106
|
+
_updateTimelines() {
|
|
107
|
+
{
|
|
108
|
+
// Update constraint timelines.
|
|
109
|
+
for (const constraint of this._armature._constraints) {
|
|
110
|
+
const timelineDatas = this._animationData.getConstraintTimelines(constraint.name);
|
|
111
|
+
if (timelineDatas !== null) {
|
|
112
|
+
for (const timelineData of timelineDatas) {
|
|
113
|
+
switch (timelineData.type) {
|
|
114
|
+
case 30 /* TimelineType.IKConstraint */: {
|
|
115
|
+
const timeline = BaseObject.borrowObject(IKConstraintTimelineState);
|
|
116
|
+
timeline.target = constraint;
|
|
117
|
+
timeline.init(this._armature, this, timelineData);
|
|
118
|
+
this._constraintTimelines.push(timeline);
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
default:
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else if (this.resetToPose) {
|
|
127
|
+
// Pose timeline.
|
|
128
|
+
const timeline = BaseObject.borrowObject(IKConstraintTimelineState);
|
|
129
|
+
timeline.target = constraint;
|
|
130
|
+
timeline.init(this._armature, this, null);
|
|
131
|
+
this._constraintTimelines.push(timeline);
|
|
132
|
+
this._poseTimelines.push(timeline);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
_updateBoneAndSlotTimelines() {
|
|
138
|
+
{
|
|
139
|
+
// Update bone and surface timelines.
|
|
140
|
+
const boneTimelines = {};
|
|
141
|
+
// Create bone timelines map.
|
|
142
|
+
for (const timeline of this._boneTimelines) {
|
|
143
|
+
const timelineName = timeline.target.target
|
|
144
|
+
.name;
|
|
145
|
+
if (!(timelineName in boneTimelines)) {
|
|
146
|
+
boneTimelines[timelineName] = [];
|
|
147
|
+
}
|
|
148
|
+
boneTimelines[timelineName].push(timeline);
|
|
149
|
+
}
|
|
150
|
+
for (const timeline of this._boneBlendTimelines) {
|
|
151
|
+
const timelineName = timeline.target.target
|
|
152
|
+
.name;
|
|
153
|
+
if (!(timelineName in boneTimelines)) {
|
|
154
|
+
boneTimelines[timelineName] = [];
|
|
155
|
+
}
|
|
156
|
+
boneTimelines[timelineName].push(timeline);
|
|
157
|
+
}
|
|
158
|
+
//
|
|
159
|
+
for (const bone of this._armature.getBones()) {
|
|
160
|
+
const timelineName = bone.name;
|
|
161
|
+
if (!this.containsBoneMask(timelineName)) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (timelineName in boneTimelines) {
|
|
165
|
+
// Remove bone timeline from map.
|
|
166
|
+
delete boneTimelines[timelineName];
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
// Create new bone timeline.
|
|
170
|
+
const timelineDatas = this._animationData.getBoneTimelines(timelineName);
|
|
171
|
+
const blendState = this._armature.animation.getBlendState(BlendState.BONE_TRANSFORM, bone.name, bone);
|
|
172
|
+
if (timelineDatas !== null) {
|
|
173
|
+
for (const timelineData of timelineDatas) {
|
|
174
|
+
switch (timelineData.type) {
|
|
175
|
+
case 10 /* TimelineType.BoneAll */: {
|
|
176
|
+
const timeline = BaseObject.borrowObject(BoneAllTimelineState);
|
|
177
|
+
timeline.target = blendState;
|
|
178
|
+
timeline.init(this._armature, this, timelineData);
|
|
179
|
+
this._boneTimelines.push(timeline);
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
case 11 /* TimelineType.BoneTranslate */: {
|
|
183
|
+
const timeline = BaseObject.borrowObject(BoneTranslateTimelineState);
|
|
184
|
+
timeline.target = blendState;
|
|
185
|
+
timeline.init(this._armature, this, timelineData);
|
|
186
|
+
this._boneTimelines.push(timeline);
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
case 12 /* TimelineType.BoneRotate */: {
|
|
190
|
+
const timeline = BaseObject.borrowObject(BoneRotateTimelineState);
|
|
191
|
+
timeline.target = blendState;
|
|
192
|
+
timeline.init(this._armature, this, timelineData);
|
|
193
|
+
this._boneTimelines.push(timeline);
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
case 13 /* TimelineType.BoneScale */: {
|
|
197
|
+
const timeline = BaseObject.borrowObject(BoneScaleTimelineState);
|
|
198
|
+
timeline.target = blendState;
|
|
199
|
+
timeline.init(this._armature, this, timelineData);
|
|
200
|
+
this._boneTimelines.push(timeline);
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
case 60 /* TimelineType.BoneAlpha */: {
|
|
204
|
+
const timeline = BaseObject.borrowObject(AlphaTimelineState);
|
|
205
|
+
timeline.target = this._armature.animation.getBlendState(BlendState.BONE_ALPHA, bone.name, bone);
|
|
206
|
+
timeline.init(this._armature, this, timelineData);
|
|
207
|
+
this._boneBlendTimelines.push(timeline);
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
case 50 /* TimelineType.Surface */: {
|
|
211
|
+
const timeline = BaseObject.borrowObject(SurfaceTimelineState);
|
|
212
|
+
timeline.target = this._armature.animation.getBlendState(BlendState.SURFACE, bone.name, bone);
|
|
213
|
+
timeline.init(this._armature, this, timelineData);
|
|
214
|
+
this._boneBlendTimelines.push(timeline);
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
default:
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else if (this.resetToPose) {
|
|
223
|
+
// Pose timeline.
|
|
224
|
+
if (bone._boneData.type === 0 /* BoneType.Bone */) {
|
|
225
|
+
const timeline = BaseObject.borrowObject(BoneAllTimelineState);
|
|
226
|
+
timeline.target = blendState;
|
|
227
|
+
timeline.init(this._armature, this, null);
|
|
228
|
+
this._boneTimelines.push(timeline);
|
|
229
|
+
this._poseTimelines.push(timeline);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
const timeline = BaseObject.borrowObject(SurfaceTimelineState);
|
|
233
|
+
timeline.target = this._armature.animation.getBlendState(BlendState.SURFACE, bone.name, bone);
|
|
234
|
+
timeline.init(this._armature, this, null);
|
|
235
|
+
this._boneBlendTimelines.push(timeline);
|
|
236
|
+
this._poseTimelines.push(timeline);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
for (let k in boneTimelines) {
|
|
242
|
+
// Remove bone timelines.
|
|
243
|
+
for (const timeline of boneTimelines[k]) {
|
|
244
|
+
let index = this._boneTimelines.indexOf(timeline);
|
|
245
|
+
if (index >= 0) {
|
|
246
|
+
this._boneTimelines.splice(index, 1);
|
|
247
|
+
timeline.returnToPool();
|
|
248
|
+
}
|
|
249
|
+
index = this._boneBlendTimelines.indexOf(timeline);
|
|
250
|
+
if (index >= 0) {
|
|
251
|
+
this._boneBlendTimelines.splice(index, 1);
|
|
252
|
+
timeline.returnToPool();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
{
|
|
258
|
+
// Update slot timelines.
|
|
259
|
+
const slotTimelines = {};
|
|
260
|
+
const ffdFlags = [];
|
|
261
|
+
// Create slot timelines map.
|
|
262
|
+
for (const timeline of this._slotTimelines) {
|
|
263
|
+
const timelineName = timeline.target.name;
|
|
264
|
+
if (!(timelineName in slotTimelines)) {
|
|
265
|
+
slotTimelines[timelineName] = [];
|
|
266
|
+
}
|
|
267
|
+
slotTimelines[timelineName].push(timeline);
|
|
268
|
+
}
|
|
269
|
+
for (const timeline of this._slotBlendTimelines) {
|
|
270
|
+
const timelineName = timeline.target.target
|
|
271
|
+
.name;
|
|
272
|
+
if (!(timelineName in slotTimelines)) {
|
|
273
|
+
slotTimelines[timelineName] = [];
|
|
274
|
+
}
|
|
275
|
+
slotTimelines[timelineName].push(timeline);
|
|
276
|
+
}
|
|
277
|
+
//
|
|
278
|
+
for (const slot of this._armature.getSlots()) {
|
|
279
|
+
const boneName = slot.parent.name;
|
|
280
|
+
if (!this.containsBoneMask(boneName)) {
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
const timelineName = slot.name;
|
|
284
|
+
if (timelineName in slotTimelines) {
|
|
285
|
+
// Remove slot timeline from map.
|
|
286
|
+
delete slotTimelines[timelineName];
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
// Create new slot timeline.
|
|
290
|
+
let displayIndexFlag = false;
|
|
291
|
+
let colorFlag = false;
|
|
292
|
+
ffdFlags.length = 0;
|
|
293
|
+
const timelineDatas = this._animationData.getSlotTimelines(timelineName);
|
|
294
|
+
if (timelineDatas !== null) {
|
|
295
|
+
for (const timelineData of timelineDatas) {
|
|
296
|
+
switch (timelineData.type) {
|
|
297
|
+
case 20 /* TimelineType.SlotDisplay */: {
|
|
298
|
+
const timeline = BaseObject.borrowObject(SlotDisplayTimelineState);
|
|
299
|
+
timeline.target = slot;
|
|
300
|
+
timeline.init(this._armature, this, timelineData);
|
|
301
|
+
this._slotTimelines.push(timeline);
|
|
302
|
+
displayIndexFlag = true;
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
case 23 /* TimelineType.SlotZIndex */: {
|
|
306
|
+
const timeline = BaseObject.borrowObject(SlotZIndexTimelineState);
|
|
307
|
+
timeline.target = this._armature.animation.getBlendState(BlendState.SLOT_Z_INDEX, slot.name, slot);
|
|
308
|
+
timeline.init(this._armature, this, timelineData);
|
|
309
|
+
this._slotBlendTimelines.push(timeline);
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
case 21 /* TimelineType.SlotColor */: {
|
|
313
|
+
const timeline = BaseObject.borrowObject(SlotColorTimelineState);
|
|
314
|
+
timeline.target = slot;
|
|
315
|
+
timeline.init(this._armature, this, timelineData);
|
|
316
|
+
this._slotTimelines.push(timeline);
|
|
317
|
+
colorFlag = true;
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
case 22 /* TimelineType.SlotDeform */: {
|
|
321
|
+
const timeline = BaseObject.borrowObject(DeformTimelineState);
|
|
322
|
+
timeline.target = this._armature.animation.getBlendState(BlendState.SLOT_DEFORM, slot.name, slot);
|
|
323
|
+
timeline.init(this._armature, this, timelineData);
|
|
324
|
+
if (timeline.target !== null) {
|
|
325
|
+
this._slotBlendTimelines.push(timeline);
|
|
326
|
+
ffdFlags.push(timeline.geometryOffset);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
timeline.returnToPool();
|
|
330
|
+
}
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
case 24 /* TimelineType.SlotAlpha */: {
|
|
334
|
+
const timeline = BaseObject.borrowObject(AlphaTimelineState);
|
|
335
|
+
timeline.target = this._armature.animation.getBlendState(BlendState.SLOT_ALPHA, slot.name, slot);
|
|
336
|
+
timeline.init(this._armature, this, timelineData);
|
|
337
|
+
this._slotBlendTimelines.push(timeline);
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
default:
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (this.resetToPose) {
|
|
346
|
+
// Pose timeline.
|
|
347
|
+
if (!displayIndexFlag) {
|
|
348
|
+
const timeline = BaseObject.borrowObject(SlotDisplayTimelineState);
|
|
349
|
+
timeline.target = slot;
|
|
350
|
+
timeline.init(this._armature, this, null);
|
|
351
|
+
this._slotTimelines.push(timeline);
|
|
352
|
+
this._poseTimelines.push(timeline);
|
|
353
|
+
}
|
|
354
|
+
if (!colorFlag) {
|
|
355
|
+
const timeline = BaseObject.borrowObject(SlotColorTimelineState);
|
|
356
|
+
timeline.target = slot;
|
|
357
|
+
timeline.init(this._armature, this, null);
|
|
358
|
+
this._slotTimelines.push(timeline);
|
|
359
|
+
this._poseTimelines.push(timeline);
|
|
360
|
+
}
|
|
361
|
+
for (let i = 0, l = slot.displayFrameCount; i < l; ++i) {
|
|
362
|
+
const displayFrame = slot.getDisplayFrameAt(i);
|
|
363
|
+
if (displayFrame.deformVertices.length === 0) {
|
|
364
|
+
continue;
|
|
365
|
+
}
|
|
366
|
+
const geometryData = displayFrame.getGeometryData();
|
|
367
|
+
if (geometryData !== null &&
|
|
368
|
+
ffdFlags.indexOf(geometryData.offset) < 0) {
|
|
369
|
+
const timeline = BaseObject.borrowObject(DeformTimelineState);
|
|
370
|
+
timeline.geometryOffset = geometryData.offset; //
|
|
371
|
+
timeline.displayFrame = displayFrame; //
|
|
372
|
+
timeline.target = this._armature.animation.getBlendState(BlendState.SLOT_DEFORM, slot.name, slot);
|
|
373
|
+
timeline.init(this._armature, this, null);
|
|
374
|
+
this._slotBlendTimelines.push(timeline);
|
|
375
|
+
this._poseTimelines.push(timeline);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
for (let k in slotTimelines) {
|
|
382
|
+
// Remove slot timelines.
|
|
383
|
+
for (const timeline of slotTimelines[k]) {
|
|
384
|
+
let index = this._slotTimelines.indexOf(timeline);
|
|
385
|
+
if (index >= 0) {
|
|
386
|
+
this._slotTimelines.splice(index, 1);
|
|
387
|
+
timeline.returnToPool();
|
|
388
|
+
}
|
|
389
|
+
index = this._slotBlendTimelines.indexOf(timeline);
|
|
390
|
+
if (index >= 0) {
|
|
391
|
+
this._slotBlendTimelines.splice(index, 1);
|
|
392
|
+
timeline.returnToPool();
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
_advanceFadeTime(passedTime) {
|
|
399
|
+
const isFadeOut = this._fadeState > 0;
|
|
400
|
+
if (this._subFadeState < 0) {
|
|
401
|
+
// Fade start event.
|
|
402
|
+
this._subFadeState = 0;
|
|
403
|
+
const eventActive = this._parent === null && this.actionEnabled;
|
|
404
|
+
if (eventActive) {
|
|
405
|
+
const eventType = isFadeOut
|
|
406
|
+
? EventObject.FADE_OUT
|
|
407
|
+
: EventObject.FADE_IN;
|
|
408
|
+
if (this._armature.eventDispatcher.hasDBEventListener(eventType)) {
|
|
409
|
+
const eventObject = BaseObject.borrowObject(EventObject);
|
|
410
|
+
eventObject.type = eventType;
|
|
411
|
+
eventObject.armature = this._armature;
|
|
412
|
+
eventObject.animationState = this;
|
|
413
|
+
this._armature._dragonBones.bufferEvent(eventObject);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
if (passedTime < 0.0) {
|
|
418
|
+
passedTime = -passedTime;
|
|
419
|
+
}
|
|
420
|
+
this._fadeTime += passedTime;
|
|
421
|
+
if (this._fadeTime >= this.fadeTotalTime) {
|
|
422
|
+
// Fade complete.
|
|
423
|
+
this._subFadeState = 1;
|
|
424
|
+
this._fadeProgress = isFadeOut ? 0.0 : 1.0;
|
|
425
|
+
}
|
|
426
|
+
else if (this._fadeTime > 0.0) {
|
|
427
|
+
// Fading.
|
|
428
|
+
this._fadeProgress = isFadeOut
|
|
429
|
+
? 1.0 - this._fadeTime / this.fadeTotalTime
|
|
430
|
+
: this._fadeTime / this.fadeTotalTime;
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
// Before fade.
|
|
434
|
+
this._fadeProgress = isFadeOut ? 1.0 : 0.0;
|
|
435
|
+
}
|
|
436
|
+
if (this._subFadeState > 0) {
|
|
437
|
+
// Fade complete event.
|
|
438
|
+
if (!isFadeOut) {
|
|
439
|
+
this._playheadState |= 1; // x1
|
|
440
|
+
this._fadeState = 0;
|
|
441
|
+
}
|
|
442
|
+
const eventActive = this._parent === null && this.actionEnabled;
|
|
443
|
+
if (eventActive) {
|
|
444
|
+
const eventType = isFadeOut
|
|
445
|
+
? EventObject.FADE_OUT_COMPLETE
|
|
446
|
+
: EventObject.FADE_IN_COMPLETE;
|
|
447
|
+
if (this._armature.eventDispatcher.hasDBEventListener(eventType)) {
|
|
448
|
+
const eventObject = BaseObject.borrowObject(EventObject);
|
|
449
|
+
eventObject.type = eventType;
|
|
450
|
+
eventObject.armature = this._armature;
|
|
451
|
+
eventObject.animationState = this;
|
|
452
|
+
this._armature._dragonBones.bufferEvent(eventObject);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* @internal
|
|
459
|
+
*/
|
|
460
|
+
init(armature, animationData, animationConfig) {
|
|
461
|
+
if (this._armature !== null) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
this._armature = armature;
|
|
465
|
+
this._animationData = animationData;
|
|
466
|
+
//
|
|
467
|
+
this.resetToPose = animationConfig.resetToPose;
|
|
468
|
+
this.additive = animationConfig.additive;
|
|
469
|
+
this.displayControl = animationConfig.displayControl;
|
|
470
|
+
this.actionEnabled = animationConfig.actionEnabled;
|
|
471
|
+
this.blendType = animationData.blendType;
|
|
472
|
+
this.layer = animationConfig.layer;
|
|
473
|
+
this.playTimes = animationConfig.playTimes;
|
|
474
|
+
this.timeScale = animationConfig.timeScale;
|
|
475
|
+
this.fadeTotalTime = animationConfig.fadeInTime;
|
|
476
|
+
this.autoFadeOutTime = animationConfig.autoFadeOutTime;
|
|
477
|
+
this.name =
|
|
478
|
+
animationConfig.name.length > 0
|
|
479
|
+
? animationConfig.name
|
|
480
|
+
: animationConfig.animation;
|
|
481
|
+
this.group = animationConfig.group;
|
|
482
|
+
//
|
|
483
|
+
this._weight = animationConfig.weight;
|
|
484
|
+
if (animationConfig.pauseFadeIn) {
|
|
485
|
+
this._playheadState = 2; // 10
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
this._playheadState = 3; // 11
|
|
489
|
+
}
|
|
490
|
+
if (animationConfig.duration < 0.0) {
|
|
491
|
+
this._position = 0.0;
|
|
492
|
+
this._duration = this._animationData.duration;
|
|
493
|
+
if (animationConfig.position !== 0.0) {
|
|
494
|
+
if (this.timeScale >= 0.0) {
|
|
495
|
+
this._time = animationConfig.position;
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
this._time = animationConfig.position - this._duration;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
this._time = 0.0;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
this._position = animationConfig.position;
|
|
507
|
+
this._duration = animationConfig.duration;
|
|
508
|
+
this._time = 0.0;
|
|
509
|
+
}
|
|
510
|
+
if (this.timeScale < 0.0 && this._time === 0.0) {
|
|
511
|
+
this._time = -0.000001; // Turn to end.
|
|
512
|
+
}
|
|
513
|
+
if (this.fadeTotalTime <= 0.0) {
|
|
514
|
+
this._fadeProgress = 0.999999; // Make different.
|
|
515
|
+
}
|
|
516
|
+
if (animationConfig.boneMask.length > 0) {
|
|
517
|
+
this._boneMask.length = animationConfig.boneMask.length;
|
|
518
|
+
for (let i = 0, l = this._boneMask.length; i < l; ++i) {
|
|
519
|
+
this._boneMask[i] = animationConfig.boneMask[i];
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
this._actionTimeline = BaseObject.borrowObject(ActionTimelineState);
|
|
523
|
+
this._actionTimeline.init(this._armature, this, this._animationData.actionTimeline);
|
|
524
|
+
this._actionTimeline.currentTime = this._time;
|
|
525
|
+
if (this._actionTimeline.currentTime < 0.0) {
|
|
526
|
+
this._actionTimeline.currentTime =
|
|
527
|
+
this._duration - this._actionTimeline.currentTime;
|
|
528
|
+
}
|
|
529
|
+
if (this._animationData.zOrderTimeline !== null) {
|
|
530
|
+
this._zOrderTimeline = BaseObject.borrowObject(ZOrderTimelineState);
|
|
531
|
+
this._zOrderTimeline.init(this._armature, this, this._animationData.zOrderTimeline);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* @internal
|
|
536
|
+
*/
|
|
537
|
+
advanceTime(passedTime, cacheFrameRate) {
|
|
538
|
+
// Update fade time.
|
|
539
|
+
if (this._fadeState !== 0 || this._subFadeState !== 0) {
|
|
540
|
+
this._advanceFadeTime(passedTime);
|
|
541
|
+
}
|
|
542
|
+
// Update time.
|
|
543
|
+
if (this._playheadState === 3) {
|
|
544
|
+
// 11
|
|
545
|
+
if (this.timeScale !== 1.0) {
|
|
546
|
+
passedTime *= this.timeScale;
|
|
547
|
+
}
|
|
548
|
+
this._time += passedTime;
|
|
549
|
+
}
|
|
550
|
+
// Update timeline.
|
|
551
|
+
if (this._timelineDirty !== 0) {
|
|
552
|
+
if (this._timelineDirty === 2) {
|
|
553
|
+
this._updateTimelines();
|
|
554
|
+
}
|
|
555
|
+
this._timelineDirty = 0;
|
|
556
|
+
this._updateBoneAndSlotTimelines();
|
|
557
|
+
}
|
|
558
|
+
const isBlendDirty = this._fadeState !== 0 || this._subFadeState === 0;
|
|
559
|
+
const isCacheEnabled = this._fadeState === 0 && cacheFrameRate > 0.0;
|
|
560
|
+
let isUpdateTimeline = true;
|
|
561
|
+
let isUpdateBoneTimeline = true;
|
|
562
|
+
let time = this._time;
|
|
563
|
+
this._weightResult = this._weight * this._fadeProgress;
|
|
564
|
+
if (this._parent !== null) {
|
|
565
|
+
this._weightResult *= this._parent._weightResult;
|
|
566
|
+
}
|
|
567
|
+
if (this._actionTimeline.playState <= 0) {
|
|
568
|
+
// Update main timeline.
|
|
569
|
+
this._actionTimeline.update(time);
|
|
570
|
+
}
|
|
571
|
+
if (this._weight === 0.0) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
if (isCacheEnabled) {
|
|
575
|
+
// Cache time internval.
|
|
576
|
+
const internval = cacheFrameRate * 2.0;
|
|
577
|
+
this._actionTimeline.currentTime =
|
|
578
|
+
Math.floor(this._actionTimeline.currentTime * internval) / internval;
|
|
579
|
+
}
|
|
580
|
+
if (this._zOrderTimeline !== null && this._zOrderTimeline.playState <= 0) {
|
|
581
|
+
// Update zOrder timeline.
|
|
582
|
+
this._zOrderTimeline.update(time);
|
|
583
|
+
}
|
|
584
|
+
if (isCacheEnabled) {
|
|
585
|
+
// Update cache.
|
|
586
|
+
const cacheFrameIndex = Math.floor(this._actionTimeline.currentTime * cacheFrameRate); // uint
|
|
587
|
+
if (this._armature._cacheFrameIndex === cacheFrameIndex) {
|
|
588
|
+
// Same cache.
|
|
589
|
+
isUpdateTimeline = false;
|
|
590
|
+
isUpdateBoneTimeline = false;
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
this._armature._cacheFrameIndex = cacheFrameIndex;
|
|
594
|
+
if (this._animationData.cachedFrames[cacheFrameIndex]) {
|
|
595
|
+
// Cached.
|
|
596
|
+
isUpdateBoneTimeline = false;
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
599
|
+
// Cache.
|
|
600
|
+
this._animationData.cachedFrames[cacheFrameIndex] = true;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
if (isUpdateTimeline) {
|
|
605
|
+
let isBlend = false;
|
|
606
|
+
let prevTarget = null; //
|
|
607
|
+
if (isUpdateBoneTimeline) {
|
|
608
|
+
for (let i = 0, l = this._boneTimelines.length; i < l; ++i) {
|
|
609
|
+
const timeline = this._boneTimelines[i];
|
|
610
|
+
if (timeline.playState <= 0) {
|
|
611
|
+
timeline.update(time);
|
|
612
|
+
}
|
|
613
|
+
if (timeline.target !== prevTarget) {
|
|
614
|
+
const blendState = timeline.target;
|
|
615
|
+
isBlend = blendState.update(this);
|
|
616
|
+
prevTarget = blendState;
|
|
617
|
+
if (blendState.dirty === 1) {
|
|
618
|
+
const pose = blendState.target.animationPose;
|
|
619
|
+
pose.x = 0.0;
|
|
620
|
+
pose.y = 0.0;
|
|
621
|
+
pose.rotation = 0.0;
|
|
622
|
+
pose.skew = 0.0;
|
|
623
|
+
pose.scaleX = 1.0;
|
|
624
|
+
pose.scaleY = 1.0;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (isBlend) {
|
|
628
|
+
timeline.blend(isBlendDirty);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
for (let i = 0, l = this._boneBlendTimelines.length; i < l; ++i) {
|
|
633
|
+
const timeline = this._boneBlendTimelines[i];
|
|
634
|
+
if (timeline.playState <= 0) {
|
|
635
|
+
timeline.update(time);
|
|
636
|
+
}
|
|
637
|
+
if (timeline.target.update(this)) {
|
|
638
|
+
timeline.blend(isBlendDirty);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
if (this.displayControl) {
|
|
642
|
+
for (let i = 0, l = this._slotTimelines.length; i < l; ++i) {
|
|
643
|
+
const timeline = this._slotTimelines[i];
|
|
644
|
+
if (timeline.playState <= 0) {
|
|
645
|
+
const slot = timeline.target;
|
|
646
|
+
const displayController = slot.displayController;
|
|
647
|
+
if (displayController === null ||
|
|
648
|
+
displayController === this.name ||
|
|
649
|
+
displayController === this.group) {
|
|
650
|
+
timeline.update(time);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
for (let i = 0, l = this._slotBlendTimelines.length; i < l; ++i) {
|
|
656
|
+
const timeline = this._slotBlendTimelines[i];
|
|
657
|
+
if (timeline.playState <= 0) {
|
|
658
|
+
const blendState = timeline.target;
|
|
659
|
+
timeline.update(time);
|
|
660
|
+
if (blendState.update(this)) {
|
|
661
|
+
timeline.blend(isBlendDirty);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
for (let i = 0, l = this._constraintTimelines.length; i < l; ++i) {
|
|
666
|
+
const timeline = this._constraintTimelines[i];
|
|
667
|
+
if (timeline.playState <= 0) {
|
|
668
|
+
timeline.update(time);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
if (this._animationTimelines.length > 0) {
|
|
672
|
+
let dL = 100.0;
|
|
673
|
+
let dR = 100.0;
|
|
674
|
+
let leftState = null;
|
|
675
|
+
let rightState = null;
|
|
676
|
+
for (let i = 0, l = this._animationTimelines.length; i < l; ++i) {
|
|
677
|
+
const timeline = this._animationTimelines[i];
|
|
678
|
+
if (timeline.playState <= 0) {
|
|
679
|
+
timeline.update(time);
|
|
680
|
+
}
|
|
681
|
+
if (this.blendType === 1 /* AnimationBlendType.E1D */) {
|
|
682
|
+
// TODO
|
|
683
|
+
const animationState = timeline.target;
|
|
684
|
+
const d = this.parameterX - animationState.positionX;
|
|
685
|
+
if (d >= 0.0) {
|
|
686
|
+
if (d < dL) {
|
|
687
|
+
dL = d;
|
|
688
|
+
leftState = animationState;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
else {
|
|
692
|
+
if (-d < dR) {
|
|
693
|
+
dR = -d;
|
|
694
|
+
rightState = animationState;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
if (leftState !== null) {
|
|
700
|
+
if (this._activeChildA !== leftState) {
|
|
701
|
+
if (this._activeChildA !== null) {
|
|
702
|
+
this._activeChildA.weight = 0.0;
|
|
703
|
+
}
|
|
704
|
+
this._activeChildA = leftState;
|
|
705
|
+
this._activeChildA.activeTimeline();
|
|
706
|
+
}
|
|
707
|
+
if (this._activeChildB !== rightState) {
|
|
708
|
+
if (this._activeChildB !== null) {
|
|
709
|
+
this._activeChildB.weight = 0.0;
|
|
710
|
+
}
|
|
711
|
+
this._activeChildB = rightState;
|
|
712
|
+
}
|
|
713
|
+
leftState.weight = dR / (dL + dR);
|
|
714
|
+
if (rightState) {
|
|
715
|
+
rightState.weight = 1.0 - leftState.weight;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
if (this._fadeState === 0) {
|
|
721
|
+
if (this._subFadeState > 0) {
|
|
722
|
+
this._subFadeState = 0;
|
|
723
|
+
if (this._poseTimelines.length > 0) {
|
|
724
|
+
// Remove pose timelines.
|
|
725
|
+
for (const timeline of this._poseTimelines) {
|
|
726
|
+
let index = this._boneTimelines.indexOf(timeline);
|
|
727
|
+
if (index >= 0) {
|
|
728
|
+
this._boneTimelines.splice(index, 1);
|
|
729
|
+
timeline.returnToPool();
|
|
730
|
+
continue;
|
|
731
|
+
}
|
|
732
|
+
index = this._boneBlendTimelines.indexOf(timeline);
|
|
733
|
+
if (index >= 0) {
|
|
734
|
+
this._boneBlendTimelines.splice(index, 1);
|
|
735
|
+
timeline.returnToPool();
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
738
|
+
index = this._slotTimelines.indexOf(timeline);
|
|
739
|
+
if (index >= 0) {
|
|
740
|
+
this._slotTimelines.splice(index, 1);
|
|
741
|
+
timeline.returnToPool();
|
|
742
|
+
continue;
|
|
743
|
+
}
|
|
744
|
+
index = this._slotBlendTimelines.indexOf(timeline);
|
|
745
|
+
if (index >= 0) {
|
|
746
|
+
this._slotBlendTimelines.splice(index, 1);
|
|
747
|
+
timeline.returnToPool();
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
index = this._constraintTimelines.indexOf(timeline);
|
|
751
|
+
if (index >= 0) {
|
|
752
|
+
this._constraintTimelines.splice(index, 1);
|
|
753
|
+
timeline.returnToPool();
|
|
754
|
+
continue;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
this._poseTimelines.length = 0;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
if (this._actionTimeline.playState > 0) {
|
|
761
|
+
if (this.autoFadeOutTime >= 0.0) {
|
|
762
|
+
// Auto fade out.
|
|
763
|
+
this.fadeOut(this.autoFadeOutTime);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* - Continue play.
|
|
770
|
+
* @version DragonBones 3.0
|
|
771
|
+
* @language en_US
|
|
772
|
+
*/
|
|
773
|
+
play() {
|
|
774
|
+
this._playheadState = 3; // 11
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* - Stop play.
|
|
778
|
+
* @version DragonBones 3.0
|
|
779
|
+
* @language en_US
|
|
780
|
+
*/
|
|
781
|
+
stop() {
|
|
782
|
+
this._playheadState &= 1; // 0x
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* - Fade out the animation state.
|
|
786
|
+
* @param fadeOutTime - The fade out time. (In seconds)
|
|
787
|
+
* @param pausePlayhead - Whether to pause the animation playing when fade out.
|
|
788
|
+
* @version DragonBones 3.0
|
|
789
|
+
* @language en_US
|
|
790
|
+
*/
|
|
791
|
+
fadeOut(fadeOutTime, pausePlayhead = true) {
|
|
792
|
+
if (fadeOutTime < 0.0) {
|
|
793
|
+
fadeOutTime = 0.0;
|
|
794
|
+
}
|
|
795
|
+
if (pausePlayhead) {
|
|
796
|
+
this._playheadState &= 2; // x0
|
|
797
|
+
}
|
|
798
|
+
if (this._fadeState > 0) {
|
|
799
|
+
if (fadeOutTime > this.fadeTotalTime - this._fadeTime) {
|
|
800
|
+
// If the animation is already in fade out, the new fade out will be ignored.
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
else {
|
|
805
|
+
this._fadeState = 1;
|
|
806
|
+
this._subFadeState = -1;
|
|
807
|
+
if (fadeOutTime <= 0.0 || this._fadeProgress <= 0.0) {
|
|
808
|
+
this._fadeProgress = 0.000001; // Modify fade progress to different value.
|
|
809
|
+
}
|
|
810
|
+
for (const timeline of this._boneTimelines) {
|
|
811
|
+
timeline.fadeOut();
|
|
812
|
+
}
|
|
813
|
+
for (const timeline of this._boneBlendTimelines) {
|
|
814
|
+
timeline.fadeOut();
|
|
815
|
+
}
|
|
816
|
+
for (const timeline of this._slotTimelines) {
|
|
817
|
+
timeline.fadeOut();
|
|
818
|
+
}
|
|
819
|
+
for (const timeline of this._slotBlendTimelines) {
|
|
820
|
+
timeline.fadeOut();
|
|
821
|
+
}
|
|
822
|
+
for (const timeline of this._constraintTimelines) {
|
|
823
|
+
timeline.fadeOut();
|
|
824
|
+
}
|
|
825
|
+
for (const timeline of this._animationTimelines) {
|
|
826
|
+
timeline.fadeOut();
|
|
827
|
+
//
|
|
828
|
+
const animaitonState = timeline.target;
|
|
829
|
+
animaitonState.fadeOut(999999.0, true);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
this.displayControl = false; //
|
|
833
|
+
this.fadeTotalTime =
|
|
834
|
+
this._fadeProgress > 0.000001 ? fadeOutTime / this._fadeProgress : 0.0;
|
|
835
|
+
this._fadeTime = this.fadeTotalTime * (1.0 - this._fadeProgress);
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* - Check if a specific bone mask is included.
|
|
839
|
+
* @param boneName - The bone name.
|
|
840
|
+
* @version DragonBones 3.0
|
|
841
|
+
* @language en_US
|
|
842
|
+
*/
|
|
843
|
+
containsBoneMask(boneName) {
|
|
844
|
+
return this._boneMask.length === 0 || this._boneMask.indexOf(boneName) >= 0;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* - Add a specific bone mask.
|
|
848
|
+
* @param boneName - The bone name.
|
|
849
|
+
* @param recursive - Whether or not to add a mask to the bone's sub-bone.
|
|
850
|
+
* @version DragonBones 3.0
|
|
851
|
+
* @language en_US
|
|
852
|
+
*/
|
|
853
|
+
addBoneMask(boneName, recursive = true) {
|
|
854
|
+
const currentBone = this._armature.getBone(boneName);
|
|
855
|
+
if (currentBone === null) {
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
if (this._boneMask.indexOf(boneName) < 0) {
|
|
859
|
+
// Add mixing
|
|
860
|
+
this._boneMask.push(boneName);
|
|
861
|
+
}
|
|
862
|
+
if (recursive) {
|
|
863
|
+
// Add recursive mixing.
|
|
864
|
+
for (const bone of this._armature.getBones()) {
|
|
865
|
+
if (this._boneMask.indexOf(bone.name) < 0 &&
|
|
866
|
+
currentBone.contains(bone)) {
|
|
867
|
+
this._boneMask.push(bone.name);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
this._timelineDirty = 1;
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* - Remove the mask of a specific bone.
|
|
875
|
+
* @param boneName - The bone name.
|
|
876
|
+
* @param recursive - Whether to remove the bone's sub-bone mask.
|
|
877
|
+
* @version DragonBones 3.0
|
|
878
|
+
* @language en_US
|
|
879
|
+
*/
|
|
880
|
+
removeBoneMask(boneName, recursive = true) {
|
|
881
|
+
const index = this._boneMask.indexOf(boneName);
|
|
882
|
+
if (index >= 0) {
|
|
883
|
+
// Remove mixing.
|
|
884
|
+
this._boneMask.splice(index, 1);
|
|
885
|
+
}
|
|
886
|
+
if (recursive) {
|
|
887
|
+
const currentBone = this._armature.getBone(boneName);
|
|
888
|
+
if (currentBone !== null) {
|
|
889
|
+
const bones = this._armature.getBones();
|
|
890
|
+
if (this._boneMask.length > 0) {
|
|
891
|
+
// Remove recursive mixing.
|
|
892
|
+
for (const bone of bones) {
|
|
893
|
+
const index = this._boneMask.indexOf(bone.name);
|
|
894
|
+
if (index >= 0 && currentBone.contains(bone)) {
|
|
895
|
+
this._boneMask.splice(index, 1);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
// Add unrecursive mixing.
|
|
901
|
+
for (const bone of bones) {
|
|
902
|
+
if (bone === currentBone) {
|
|
903
|
+
continue;
|
|
904
|
+
}
|
|
905
|
+
if (!currentBone.contains(bone)) {
|
|
906
|
+
this._boneMask.push(bone.name);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
this._timelineDirty = 1;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* - Remove all bone masks.
|
|
916
|
+
* @version DragonBones 3.0
|
|
917
|
+
* @language en_US
|
|
918
|
+
*/
|
|
919
|
+
removeAllBoneMask() {
|
|
920
|
+
this._boneMask.length = 0;
|
|
921
|
+
this._timelineDirty = 1;
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* @private
|
|
925
|
+
*/
|
|
926
|
+
addState(animationState, timelineDatas = null) {
|
|
927
|
+
if (timelineDatas !== null) {
|
|
928
|
+
for (const timelineData of timelineDatas) {
|
|
929
|
+
switch (timelineData.type) {
|
|
930
|
+
case 40 /* TimelineType.AnimationProgress */: {
|
|
931
|
+
const timeline = BaseObject.borrowObject(AnimationProgressTimelineState);
|
|
932
|
+
timeline.target = animationState;
|
|
933
|
+
timeline.init(this._armature, this, timelineData);
|
|
934
|
+
this._animationTimelines.push(timeline);
|
|
935
|
+
if (this.blendType !== 0 /* AnimationBlendType.None */) {
|
|
936
|
+
const animaitonTimelineData = timelineData;
|
|
937
|
+
animationState.positionX = animaitonTimelineData.x;
|
|
938
|
+
animationState.positionY = animaitonTimelineData.y;
|
|
939
|
+
animationState.weight = 0.0;
|
|
940
|
+
}
|
|
941
|
+
animationState._parent = this;
|
|
942
|
+
this.resetToPose = false;
|
|
943
|
+
break;
|
|
944
|
+
}
|
|
945
|
+
case 41 /* TimelineType.AnimationWeight */: {
|
|
946
|
+
const timeline = BaseObject.borrowObject(AnimationWeightTimelineState);
|
|
947
|
+
timeline.target = animationState;
|
|
948
|
+
timeline.init(this._armature, this, timelineData);
|
|
949
|
+
this._animationTimelines.push(timeline);
|
|
950
|
+
break;
|
|
951
|
+
}
|
|
952
|
+
case 42 /* TimelineType.AnimationParameter */: {
|
|
953
|
+
const timeline = BaseObject.borrowObject(AnimationParametersTimelineState);
|
|
954
|
+
timeline.target = animationState;
|
|
955
|
+
timeline.init(this._armature, this, timelineData);
|
|
956
|
+
this._animationTimelines.push(timeline);
|
|
957
|
+
break;
|
|
958
|
+
}
|
|
959
|
+
default:
|
|
960
|
+
break;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
if (animationState._parent === null) {
|
|
965
|
+
animationState._parent = this;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* @internal
|
|
970
|
+
*/
|
|
971
|
+
activeTimeline() {
|
|
972
|
+
for (const timeline of this._slotTimelines) {
|
|
973
|
+
timeline.dirty = true;
|
|
974
|
+
timeline.currentTime = -1.0;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* - Whether the animation state is fading in.
|
|
979
|
+
* @version DragonBones 5.1
|
|
980
|
+
* @language en_US
|
|
981
|
+
*/
|
|
982
|
+
get isFadeIn() {
|
|
983
|
+
return this._fadeState < 0;
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* - Whether the animation state is fading out.
|
|
987
|
+
* @version DragonBones 5.1
|
|
988
|
+
* @language en_US
|
|
989
|
+
*/
|
|
990
|
+
get isFadeOut() {
|
|
991
|
+
return this._fadeState > 0;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* - Whether the animation state is fade completed.
|
|
995
|
+
* @version DragonBones 5.1
|
|
996
|
+
* @language en_US
|
|
997
|
+
*/
|
|
998
|
+
get isFadeComplete() {
|
|
999
|
+
return this._fadeState === 0;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* - Whether the animation state is playing.
|
|
1003
|
+
* @version DragonBones 3.0
|
|
1004
|
+
* @language en_US
|
|
1005
|
+
*/
|
|
1006
|
+
get isPlaying() {
|
|
1007
|
+
return ((this._playheadState & 2) !== 0 && this._actionTimeline.playState <= 0);
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* - Whether the animation state is play completed.
|
|
1011
|
+
* @version DragonBones 3.0
|
|
1012
|
+
* @language en_US
|
|
1013
|
+
*/
|
|
1014
|
+
get isCompleted() {
|
|
1015
|
+
return this._actionTimeline.playState > 0;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* - The times has been played.
|
|
1019
|
+
* @version DragonBones 3.0
|
|
1020
|
+
* @language en_US
|
|
1021
|
+
*/
|
|
1022
|
+
get currentPlayTimes() {
|
|
1023
|
+
return this._actionTimeline.currentPlayTimes;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* - The total time. (In seconds)
|
|
1027
|
+
* @version DragonBones 3.0
|
|
1028
|
+
* @language en_US
|
|
1029
|
+
*/
|
|
1030
|
+
get totalTime() {
|
|
1031
|
+
return this._duration;
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* - The time is currently playing. (In seconds)
|
|
1035
|
+
* @version DragonBones 3.0
|
|
1036
|
+
* @language en_US
|
|
1037
|
+
*/
|
|
1038
|
+
get currentTime() {
|
|
1039
|
+
return this._actionTimeline.currentTime;
|
|
1040
|
+
}
|
|
1041
|
+
set currentTime(value) {
|
|
1042
|
+
const currentPlayTimes = this._actionTimeline.currentPlayTimes -
|
|
1043
|
+
(this._actionTimeline.playState > 0 ? 1 : 0);
|
|
1044
|
+
if (value < 0 || this._duration < value) {
|
|
1045
|
+
value = (value % this._duration) + currentPlayTimes * this._duration;
|
|
1046
|
+
if (value < 0) {
|
|
1047
|
+
value += this._duration;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
if (this.playTimes > 0 &&
|
|
1051
|
+
currentPlayTimes === this.playTimes - 1 &&
|
|
1052
|
+
value === this._duration &&
|
|
1053
|
+
this._parent === null) {
|
|
1054
|
+
value = this._duration - 0.000001; //
|
|
1055
|
+
}
|
|
1056
|
+
if (this._time === value) {
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
this._time = value;
|
|
1060
|
+
this._actionTimeline.setCurrentTime(this._time);
|
|
1061
|
+
if (this._zOrderTimeline !== null) {
|
|
1062
|
+
this._zOrderTimeline.playState = -1;
|
|
1063
|
+
}
|
|
1064
|
+
for (const timeline of this._boneTimelines) {
|
|
1065
|
+
timeline.playState = -1;
|
|
1066
|
+
}
|
|
1067
|
+
for (const timeline of this._slotTimelines) {
|
|
1068
|
+
timeline.playState = -1;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* - The blend weight.
|
|
1073
|
+
* @default 1.0
|
|
1074
|
+
* @version DragonBones 5.0
|
|
1075
|
+
* @language en_US
|
|
1076
|
+
*/
|
|
1077
|
+
get weight() {
|
|
1078
|
+
return this._weight;
|
|
1079
|
+
}
|
|
1080
|
+
set weight(value) {
|
|
1081
|
+
if (this._weight === value) {
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
this._weight = value;
|
|
1085
|
+
for (const timeline of this._boneTimelines) {
|
|
1086
|
+
timeline.dirty = true;
|
|
1087
|
+
}
|
|
1088
|
+
for (const timeline of this._boneBlendTimelines) {
|
|
1089
|
+
timeline.dirty = true;
|
|
1090
|
+
}
|
|
1091
|
+
for (const timeline of this._slotBlendTimelines) {
|
|
1092
|
+
timeline.dirty = true;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* - The animation data.
|
|
1097
|
+
* @see dragonBones.AnimationData
|
|
1098
|
+
* @version DragonBones 3.0
|
|
1099
|
+
* @language en_US
|
|
1100
|
+
*/
|
|
1101
|
+
get animationData() {
|
|
1102
|
+
return this._animationData;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* @internal
|
|
1107
|
+
*/
|
|
1108
|
+
export class BlendState extends BaseObject {
|
|
1109
|
+
static toString() {
|
|
1110
|
+
return "[class dragonBones.BlendState]";
|
|
1111
|
+
}
|
|
1112
|
+
_onClear() {
|
|
1113
|
+
this.reset();
|
|
1114
|
+
this.target = null;
|
|
1115
|
+
}
|
|
1116
|
+
update(animationState) {
|
|
1117
|
+
const animationLayer = animationState.layer;
|
|
1118
|
+
let animationWeight = animationState._weightResult;
|
|
1119
|
+
if (this.dirty > 0) {
|
|
1120
|
+
if (this.leftWeight > 0.0) {
|
|
1121
|
+
if (this.layer !== animationLayer) {
|
|
1122
|
+
if (this.layerWeight >= this.leftWeight) {
|
|
1123
|
+
this.dirty++;
|
|
1124
|
+
this.layer = animationLayer;
|
|
1125
|
+
this.leftWeight = 0.0;
|
|
1126
|
+
this.blendWeight = 0.0;
|
|
1127
|
+
return false;
|
|
1128
|
+
}
|
|
1129
|
+
this.layer = animationLayer;
|
|
1130
|
+
this.leftWeight -= this.layerWeight;
|
|
1131
|
+
this.layerWeight = 0.0;
|
|
1132
|
+
}
|
|
1133
|
+
animationWeight *= this.leftWeight;
|
|
1134
|
+
this.dirty++;
|
|
1135
|
+
this.blendWeight = animationWeight;
|
|
1136
|
+
this.layerWeight += this.blendWeight;
|
|
1137
|
+
return true;
|
|
1138
|
+
}
|
|
1139
|
+
return false;
|
|
1140
|
+
}
|
|
1141
|
+
this.dirty++;
|
|
1142
|
+
this.layer = animationLayer;
|
|
1143
|
+
this.leftWeight = 1.0;
|
|
1144
|
+
this.blendWeight = animationWeight;
|
|
1145
|
+
this.layerWeight = animationWeight;
|
|
1146
|
+
return true;
|
|
1147
|
+
}
|
|
1148
|
+
reset() {
|
|
1149
|
+
this.dirty = 0;
|
|
1150
|
+
this.layer = 0;
|
|
1151
|
+
this.leftWeight = 0.0;
|
|
1152
|
+
this.layerWeight = 0.0;
|
|
1153
|
+
this.blendWeight = 0.0;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
BlendState.BONE_TRANSFORM = "boneTransform";
|
|
1157
|
+
BlendState.BONE_ALPHA = "boneAlpha";
|
|
1158
|
+
BlendState.SURFACE = "surface";
|
|
1159
|
+
BlendState.SLOT_DEFORM = "slotDeform";
|
|
1160
|
+
BlendState.SLOT_ALPHA = "slotAlpha";
|
|
1161
|
+
BlendState.SLOT_Z_INDEX = "slotZIndex";
|