|
@@ -27,10 +27,12 @@
|
|
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*****************************************************************************/
|
|
*****************************************************************************/
|
|
|
|
|
|
-import { Animation, Timeline, AttachmentTimeline, RGBATimeline, RGBTimeline, RGBA2Timeline, RGB2Timeline, AlphaTimeline, RotateTimeline, TranslateTimeline, TranslateXTimeline, TranslateYTimeline, ScaleTimeline, ScaleXTimeline, ScaleYTimeline, ShearTimeline, ShearXTimeline, ShearYTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline, PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline, CurveTimeline1, CurveTimeline2, CurveTimeline } from "./Animation";
|
|
|
|
|
|
+import { Animation, Timeline, AttachmentTimeline, RGBATimeline, RGBTimeline, RGBA2Timeline, RGB2Timeline, AlphaTimeline, RotateTimeline, TranslateTimeline, TranslateXTimeline, TranslateYTimeline, ScaleTimeline, ScaleXTimeline, ScaleYTimeline, ShearTimeline, ShearXTimeline, ShearYTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline, PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline, CurveTimeline1, CurveTimeline2, CurveTimeline, SequenceTimeline } from "./Animation";
|
|
import { VertexAttachment, Attachment } from "./attachments/Attachment";
|
|
import { VertexAttachment, Attachment } from "./attachments/Attachment";
|
|
import { AttachmentLoader } from "./attachments/AttachmentLoader";
|
|
import { AttachmentLoader } from "./attachments/AttachmentLoader";
|
|
|
|
+import { HasTextureRegion } from "./attachments/HasTextureRegion";
|
|
import { MeshAttachment } from "./attachments/MeshAttachment";
|
|
import { MeshAttachment } from "./attachments/MeshAttachment";
|
|
|
|
+import { Sequence, SequenceModeValues } from "./attachments/Sequence";
|
|
import { BoneData } from "./BoneData";
|
|
import { BoneData } from "./BoneData";
|
|
import { Event } from "./Event";
|
|
import { Event } from "./Event";
|
|
import { EventData } from "./EventData";
|
|
import { EventData } from "./EventData";
|
|
@@ -219,9 +221,9 @@ export class SkeletonBinary {
|
|
let linkedMesh = this.linkedMeshes[i];
|
|
let linkedMesh = this.linkedMeshes[i];
|
|
let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);
|
|
let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);
|
|
let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
|
let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
|
- linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent as VertexAttachment : linkedMesh.mesh;
|
|
|
|
|
|
+ linkedMesh.mesh.timelineAttahment = linkedMesh.inheritTimeline ? parent as VertexAttachment : linkedMesh.mesh;
|
|
linkedMesh.mesh.setParentMesh(parent as MeshAttachment);
|
|
linkedMesh.mesh.setParentMesh(parent as MeshAttachment);
|
|
- linkedMesh.mesh.updateUVs();
|
|
|
|
|
|
+ if (linkedMesh.mesh.region != null) linkedMesh.mesh.updateRegion();
|
|
}
|
|
}
|
|
this.linkedMeshes.length = 0;
|
|
this.linkedMeshes.length = 0;
|
|
|
|
|
|
@@ -299,9 +301,10 @@ export class SkeletonBinary {
|
|
let width = input.readFloat();
|
|
let width = input.readFloat();
|
|
let height = input.readFloat();
|
|
let height = input.readFloat();
|
|
let color = input.readInt32();
|
|
let color = input.readInt32();
|
|
|
|
+ let sequence = this.readSequence(input);
|
|
|
|
|
|
if (!path) path = name;
|
|
if (!path) path = name;
|
|
- let region = this.attachmentLoader.newRegionAttachment(skin, name, path);
|
|
|
|
|
|
+ let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);
|
|
if (!region) return null;
|
|
if (!region) return null;
|
|
region.path = path;
|
|
region.path = path;
|
|
region.x = x * scale;
|
|
region.x = x * scale;
|
|
@@ -312,7 +315,8 @@ export class SkeletonBinary {
|
|
region.width = width * scale;
|
|
region.width = width * scale;
|
|
region.height = height * scale;
|
|
region.height = height * scale;
|
|
Color.rgba8888ToColor(region.color, color);
|
|
Color.rgba8888ToColor(region.color, color);
|
|
- region.updateOffset();
|
|
|
|
|
|
+ region.sequence = sequence;
|
|
|
|
+ if (sequence == null) region.updateRegion();
|
|
return region;
|
|
return region;
|
|
}
|
|
}
|
|
case AttachmentType.BoundingBox: {
|
|
case AttachmentType.BoundingBox: {
|
|
@@ -336,6 +340,7 @@ export class SkeletonBinary {
|
|
let triangles = this.readShortArray(input);
|
|
let triangles = this.readShortArray(input);
|
|
let vertices = this.readVertices(input, vertexCount);
|
|
let vertices = this.readVertices(input, vertexCount);
|
|
let hullLength = input.readInt(true);
|
|
let hullLength = input.readInt(true);
|
|
|
|
+ let sequence = this.readSequence(input);
|
|
let edges = null;
|
|
let edges = null;
|
|
let width = 0, height = 0;
|
|
let width = 0, height = 0;
|
|
if (nonessential) {
|
|
if (nonessential) {
|
|
@@ -345,7 +350,7 @@ export class SkeletonBinary {
|
|
}
|
|
}
|
|
|
|
|
|
if (!path) path = name;
|
|
if (!path) path = name;
|
|
- let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);
|
|
|
|
|
|
+ let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);
|
|
if (!mesh) return null;
|
|
if (!mesh) return null;
|
|
mesh.path = path;
|
|
mesh.path = path;
|
|
Color.rgba8888ToColor(mesh.color, color);
|
|
Color.rgba8888ToColor(mesh.color, color);
|
|
@@ -354,8 +359,9 @@ export class SkeletonBinary {
|
|
mesh.worldVerticesLength = vertexCount << 1;
|
|
mesh.worldVerticesLength = vertexCount << 1;
|
|
mesh.triangles = triangles;
|
|
mesh.triangles = triangles;
|
|
mesh.regionUVs = uvs;
|
|
mesh.regionUVs = uvs;
|
|
- mesh.updateUVs();
|
|
|
|
|
|
+ if (sequence == null) mesh.updateRegion();
|
|
mesh.hullLength = hullLength << 1;
|
|
mesh.hullLength = hullLength << 1;
|
|
|
|
+ mesh.sequence = sequence;
|
|
if (nonessential) {
|
|
if (nonessential) {
|
|
mesh.edges = edges;
|
|
mesh.edges = edges;
|
|
mesh.width = width * scale;
|
|
mesh.width = width * scale;
|
|
@@ -368,7 +374,8 @@ export class SkeletonBinary {
|
|
let color = input.readInt32();
|
|
let color = input.readInt32();
|
|
let skinName = input.readStringRef();
|
|
let skinName = input.readStringRef();
|
|
let parent = input.readStringRef();
|
|
let parent = input.readStringRef();
|
|
- let inheritDeform = input.readBoolean();
|
|
|
|
|
|
+ let inheritTimelines = input.readBoolean();
|
|
|
|
+ let sequence = this.readSequence(input);
|
|
let width = 0, height = 0;
|
|
let width = 0, height = 0;
|
|
if (nonessential) {
|
|
if (nonessential) {
|
|
width = input.readFloat();
|
|
width = input.readFloat();
|
|
@@ -376,15 +383,16 @@ export class SkeletonBinary {
|
|
}
|
|
}
|
|
|
|
|
|
if (!path) path = name;
|
|
if (!path) path = name;
|
|
- let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);
|
|
|
|
|
|
+ let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);
|
|
if (!mesh) return null;
|
|
if (!mesh) return null;
|
|
mesh.path = path;
|
|
mesh.path = path;
|
|
Color.rgba8888ToColor(mesh.color, color);
|
|
Color.rgba8888ToColor(mesh.color, color);
|
|
|
|
+ mesh.sequence = sequence;
|
|
if (nonessential) {
|
|
if (nonessential) {
|
|
mesh.width = width * scale;
|
|
mesh.width = width * scale;
|
|
mesh.height = height * scale;
|
|
mesh.height = height * scale;
|
|
}
|
|
}
|
|
- this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritDeform));
|
|
|
|
|
|
+ this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));
|
|
return mesh;
|
|
return mesh;
|
|
}
|
|
}
|
|
case AttachmentType.Path: {
|
|
case AttachmentType.Path: {
|
|
@@ -441,6 +449,15 @@ export class SkeletonBinary {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private readSequence (input: BinaryInput) {
|
|
|
|
+ if (!input.readBoolean()) return null;
|
|
|
|
+ let sequence = new Sequence(input.readInt(true));
|
|
|
|
+ sequence.start = input.readInt(true);
|
|
|
|
+ sequence.digits = input.readInt(true);
|
|
|
|
+ sequence.setupIndex = input.readInt(true);
|
|
|
|
+ return sequence;
|
|
|
|
+ }
|
|
|
|
+
|
|
private readVertices (input: BinaryInput, vertexCount: number): Vertices {
|
|
private readVertices (input: BinaryInput, vertexCount: number): Vertices {
|
|
let scale = this.scale;
|
|
let scale = this.scale;
|
|
let verticesLength = vertexCount << 1;
|
|
let verticesLength = vertexCount << 1;
|
|
@@ -697,7 +714,6 @@ export class SkeletonBinary {
|
|
a = a2;
|
|
a = a2;
|
|
}
|
|
}
|
|
timelines.push(timeline);
|
|
timelines.push(timeline);
|
|
- break;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -850,112 +866,130 @@ export class SkeletonBinary {
|
|
let slotIndex = input.readInt(true);
|
|
let slotIndex = input.readInt(true);
|
|
for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {
|
|
for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {
|
|
let attachmentName = input.readStringRef();
|
|
let attachmentName = input.readStringRef();
|
|
- let attachment = skin.getAttachment(slotIndex, attachmentName) as VertexAttachment;
|
|
|
|
- let weighted = attachment.bones;
|
|
|
|
- let vertices = attachment.vertices;
|
|
|
|
- let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;
|
|
|
|
-
|
|
|
|
|
|
+ let attachment = skin.getAttachment(slotIndex, attachmentName);
|
|
|
|
+ let timelineType = input.readByte();
|
|
let frameCount = input.readInt(true);
|
|
let frameCount = input.readInt(true);
|
|
let frameLast = frameCount - 1;
|
|
let frameLast = frameCount - 1;
|
|
- let bezierCount = input.readInt(true);
|
|
|
|
- let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, attachment);
|
|
|
|
|
|
|
|
- let time = input.readFloat();
|
|
|
|
- for (let frame = 0, bezier = 0; ; frame++) {
|
|
|
|
- let deform;
|
|
|
|
- let end = input.readInt(true);
|
|
|
|
- if (end == 0)
|
|
|
|
- deform = weighted ? Utils.newFloatArray(deformLength) : vertices;
|
|
|
|
- else {
|
|
|
|
- deform = Utils.newFloatArray(deformLength);
|
|
|
|
- let start = input.readInt(true);
|
|
|
|
- end += start;
|
|
|
|
- if (scale == 1) {
|
|
|
|
- for (let v = start; v < end; v++)
|
|
|
|
- deform[v] = input.readFloat();
|
|
|
|
- } else {
|
|
|
|
- for (let v = start; v < end; v++)
|
|
|
|
- deform[v] = input.readFloat() * scale;
|
|
|
|
- }
|
|
|
|
- if (!weighted) {
|
|
|
|
- for (let v = 0, vn = deform.length; v < vn; v++)
|
|
|
|
- deform[v] += vertices[v];
|
|
|
|
|
|
+ switch (timelineType) {
|
|
|
|
+ case ATTACHMENT_DEFORM: {
|
|
|
|
+ let vertexAttachment = attachment as VertexAttachment;
|
|
|
|
+ let weighted = vertexAttachment.bones;
|
|
|
|
+ let vertices = vertexAttachment.vertices;
|
|
|
|
+ let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let bezierCount = input.readInt(true);
|
|
|
|
+ let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);
|
|
|
|
+
|
|
|
|
+ let time = input.readFloat();
|
|
|
|
+ for (let frame = 0, bezier = 0; ; frame++) {
|
|
|
|
+ let deform;
|
|
|
|
+ let end = input.readInt(true);
|
|
|
|
+ if (end == 0)
|
|
|
|
+ deform = weighted ? Utils.newFloatArray(deformLength) : vertices;
|
|
|
|
+ else {
|
|
|
|
+ deform = Utils.newFloatArray(deformLength);
|
|
|
|
+ let start = input.readInt(true);
|
|
|
|
+ end += start;
|
|
|
|
+ if (scale == 1) {
|
|
|
|
+ for (let v = start; v < end; v++)
|
|
|
|
+ deform[v] = input.readFloat();
|
|
|
|
+ } else {
|
|
|
|
+ for (let v = start; v < end; v++)
|
|
|
|
+ deform[v] = input.readFloat() * scale;
|
|
|
|
+ }
|
|
|
|
+ if (!weighted) {
|
|
|
|
+ for (let v = 0, vn = deform.length; v < vn; v++)
|
|
|
|
+ deform[v] += vertices[v];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ timeline.setFrame(frame, time, deform);
|
|
|
|
+ if (frame == frameLast) break;
|
|
|
|
+ let time2 = input.readFloat();
|
|
|
|
+ switch (input.readByte()) {
|
|
|
|
+ case CURVE_STEPPED:
|
|
|
|
+ timeline.setStepped(frame);
|
|
|
|
+ break;
|
|
|
|
+ case CURVE_BEZIER:
|
|
|
|
+ setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);
|
|
|
|
+ }
|
|
|
|
+ time = time2;
|
|
}
|
|
}
|
|
|
|
+ timelines.push(timeline);
|
|
}
|
|
}
|
|
-
|
|
|
|
- timeline.setFrame(frame, time, deform);
|
|
|
|
- if (frame == frameLast) break;
|
|
|
|
- let time2 = input.readFloat();
|
|
|
|
- switch (input.readByte()) {
|
|
|
|
- case CURVE_STEPPED:
|
|
|
|
- timeline.setStepped(frame);
|
|
|
|
- break;
|
|
|
|
- case CURVE_BEZIER:
|
|
|
|
- setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);
|
|
|
|
|
|
+ case ATTACHMENT_SEQUENCE: {
|
|
|
|
+ let timeline = new SequenceTimeline(frameCount, slotIndex, attachment as unknown as HasTextureRegion);
|
|
|
|
+ for (let frame = 0; frame < frameCount; frame++) {
|
|
|
|
+ let time = input.readFloat();
|
|
|
|
+ let modeAndIndex = input.readInt32();
|
|
|
|
+ timeline.setFrame(frame, time, SequenceModeValues[modeAndIndex & 0xf], modeAndIndex >> 4,
|
|
|
|
+ input.readFloat());
|
|
|
|
+ }
|
|
|
|
+ timelines.push(timeline);
|
|
}
|
|
}
|
|
- time = time2;
|
|
|
|
}
|
|
}
|
|
- timelines.push(timeline);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- // Draw order timeline.
|
|
|
|
- let drawOrderCount = input.readInt(true);
|
|
|
|
- if (drawOrderCount > 0) {
|
|
|
|
- let timeline = new DrawOrderTimeline(drawOrderCount);
|
|
|
|
- let slotCount = skeletonData.slots.length;
|
|
|
|
- for (let i = 0; i < drawOrderCount; i++) {
|
|
|
|
- let time = input.readFloat();
|
|
|
|
- let offsetCount = input.readInt(true);
|
|
|
|
- let drawOrder = Utils.newArray(slotCount, 0);
|
|
|
|
- for (let ii = slotCount - 1; ii >= 0; ii--)
|
|
|
|
- drawOrder[ii] = -1;
|
|
|
|
- let unchanged = Utils.newArray(slotCount - offsetCount, 0);
|
|
|
|
- let originalIndex = 0, unchangedIndex = 0;
|
|
|
|
- for (let ii = 0; ii < offsetCount; ii++) {
|
|
|
|
- let slotIndex = input.readInt(true);
|
|
|
|
- // Collect unchanged items.
|
|
|
|
- while (originalIndex != slotIndex)
|
|
|
|
|
|
+ // Draw order timeline.
|
|
|
|
+ let drawOrderCount = input.readInt(true);
|
|
|
|
+ if (drawOrderCount > 0) {
|
|
|
|
+ let timeline = new DrawOrderTimeline(drawOrderCount);
|
|
|
|
+ let slotCount = skeletonData.slots.length;
|
|
|
|
+ for (let i = 0; i < drawOrderCount; i++) {
|
|
|
|
+ let time = input.readFloat();
|
|
|
|
+ let offsetCount = input.readInt(true);
|
|
|
|
+ let drawOrder = Utils.newArray(slotCount, 0);
|
|
|
|
+ for (let ii = slotCount - 1; ii >= 0; ii--)
|
|
|
|
+ drawOrder[ii] = -1;
|
|
|
|
+ let unchanged = Utils.newArray(slotCount - offsetCount, 0);
|
|
|
|
+ let originalIndex = 0, unchangedIndex = 0;
|
|
|
|
+ for (let ii = 0; ii < offsetCount; ii++) {
|
|
|
|
+ let slotIndex = input.readInt(true);
|
|
|
|
+ // Collect unchanged items.
|
|
|
|
+ while (originalIndex != slotIndex)
|
|
|
|
+ unchanged[unchangedIndex++] = originalIndex++;
|
|
|
|
+ // Set changed items.
|
|
|
|
+ drawOrder[originalIndex + input.readInt(true)] = originalIndex++;
|
|
|
|
+ }
|
|
|
|
+ // Collect remaining unchanged items.
|
|
|
|
+ while (originalIndex < slotCount)
|
|
unchanged[unchangedIndex++] = originalIndex++;
|
|
unchanged[unchangedIndex++] = originalIndex++;
|
|
- // Set changed items.
|
|
|
|
- drawOrder[originalIndex + input.readInt(true)] = originalIndex++;
|
|
|
|
|
|
+ // Fill in unchanged items.
|
|
|
|
+ for (let ii = slotCount - 1; ii >= 0; ii--)
|
|
|
|
+ if (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex];
|
|
|
|
+ timeline.setFrame(i, time, drawOrder);
|
|
}
|
|
}
|
|
- // Collect remaining unchanged items.
|
|
|
|
- while (originalIndex < slotCount)
|
|
|
|
- unchanged[unchangedIndex++] = originalIndex++;
|
|
|
|
- // Fill in unchanged items.
|
|
|
|
- for (let ii = slotCount - 1; ii >= 0; ii--)
|
|
|
|
- if (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex];
|
|
|
|
- timeline.setFrame(i, time, drawOrder);
|
|
|
|
|
|
+ timelines.push(timeline);
|
|
}
|
|
}
|
|
- timelines.push(timeline);
|
|
|
|
- }
|
|
|
|
|
|
|
|
- // Event timeline.
|
|
|
|
- let eventCount = input.readInt(true);
|
|
|
|
- if (eventCount > 0) {
|
|
|
|
- let timeline = new EventTimeline(eventCount);
|
|
|
|
- for (let i = 0; i < eventCount; i++) {
|
|
|
|
- let time = input.readFloat();
|
|
|
|
- let eventData = skeletonData.events[input.readInt(true)];
|
|
|
|
- let event = new Event(time, eventData);
|
|
|
|
- event.intValue = input.readInt(false);
|
|
|
|
- event.floatValue = input.readFloat();
|
|
|
|
- event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;
|
|
|
|
- if (event.data.audioPath) {
|
|
|
|
- event.volume = input.readFloat();
|
|
|
|
- event.balance = input.readFloat();
|
|
|
|
|
|
+ // Event timeline.
|
|
|
|
+ let eventCount = input.readInt(true);
|
|
|
|
+ if (eventCount > 0) {
|
|
|
|
+ let timeline = new EventTimeline(eventCount);
|
|
|
|
+ for (let i = 0; i < eventCount; i++) {
|
|
|
|
+ let time = input.readFloat();
|
|
|
|
+ let eventData = skeletonData.events[input.readInt(true)];
|
|
|
|
+ let event = new Event(time, eventData);
|
|
|
|
+ event.intValue = input.readInt(false);
|
|
|
|
+ event.floatValue = input.readFloat();
|
|
|
|
+ event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;
|
|
|
|
+ if (event.data.audioPath) {
|
|
|
|
+ event.volume = input.readFloat();
|
|
|
|
+ event.balance = input.readFloat();
|
|
|
|
+ }
|
|
|
|
+ timeline.setFrame(i, event);
|
|
}
|
|
}
|
|
- timeline.setFrame(i, event);
|
|
|
|
|
|
+ timelines.push(timeline);
|
|
}
|
|
}
|
|
- timelines.push(timeline);
|
|
|
|
- }
|
|
|
|
|
|
|
|
- let duration = 0;
|
|
|
|
- for (let i = 0, n = timelines.length; i < n; i++)
|
|
|
|
- duration = Math.max(duration, timelines[i].getDuration());
|
|
|
|
- return new Animation(name, timelines, duration);
|
|
|
|
|
|
+ let duration = 0;
|
|
|
|
+ for (let i = 0, n = timelines.length; i < n; i++)
|
|
|
|
+ duration = Math.max(duration, timelines[i].getDuration());
|
|
|
|
+ return new Animation(name, timelines, duration);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1056,14 +1090,14 @@ class LinkedMesh {
|
|
parent: string; skin: string;
|
|
parent: string; skin: string;
|
|
slotIndex: number;
|
|
slotIndex: number;
|
|
mesh: MeshAttachment;
|
|
mesh: MeshAttachment;
|
|
- inheritDeform: boolean;
|
|
|
|
|
|
+ inheritTimeline: boolean;
|
|
|
|
|
|
constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {
|
|
constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {
|
|
this.mesh = mesh;
|
|
this.mesh = mesh;
|
|
this.skin = skin;
|
|
this.skin = skin;
|
|
this.slotIndex = slotIndex;
|
|
this.slotIndex = slotIndex;
|
|
this.parent = parent;
|
|
this.parent = parent;
|
|
- this.inheritDeform = inheritDeform;
|
|
|
|
|
|
+ this.inheritTimeline = inheritDeform;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1136,6 +1170,9 @@ const SLOT_RGBA2 = 3;
|
|
const SLOT_RGB2 = 4;
|
|
const SLOT_RGB2 = 4;
|
|
const SLOT_ALPHA = 5;
|
|
const SLOT_ALPHA = 5;
|
|
|
|
|
|
|
|
+const ATTACHMENT_DEFORM = 0;
|
|
|
|
+const ATTACHMENT_SEQUENCE = 1;
|
|
|
|
+
|
|
const PATH_POSITION = 0;
|
|
const PATH_POSITION = 0;
|
|
const PATH_SPACING = 1;
|
|
const PATH_SPACING = 1;
|
|
const PATH_MIX = 2;
|
|
const PATH_MIX = 2;
|