mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
[ts] Fixed DeformTimeline additive blend after last frame.
This commit is contained in:
parent
070b3c98d8
commit
78a1df5c8e
@ -812,7 +812,7 @@ module spine {
|
||||
}
|
||||
} else {
|
||||
switch (blend) {
|
||||
case MixBlend.setup:
|
||||
case MixBlend.setup: {
|
||||
let vertexAttachment = slotAttachment as VertexAttachment;
|
||||
if (vertexAttachment.bones == null) {
|
||||
// Unweighted vertex positions, with alpha.
|
||||
@ -827,13 +827,24 @@ module spine {
|
||||
vertices[i] = lastVertices[i] * alpha;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MixBlend.first:
|
||||
case MixBlend.replace:
|
||||
for (let i = 0; i < vertexCount; i++)
|
||||
vertices[i] += (lastVertices[i] - vertices[i]) * alpha;
|
||||
case MixBlend.add:
|
||||
for (let i = 0; i < vertexCount; i++)
|
||||
vertices[i] += lastVertices[i] * alpha;
|
||||
let vertexAttachment = slotAttachment as VertexAttachment;
|
||||
if (vertexAttachment.bones == null) {
|
||||
// Unweighted vertex positions, with alpha.
|
||||
let setupVertices = vertexAttachment.vertices;
|
||||
for (let i = 0; i < vertexCount; i++) {
|
||||
vertices[i] += (lastVertices[i] - setupVertices[i]) * alpha;
|
||||
}
|
||||
} else {
|
||||
// Weighted deform offsets, with alpha.
|
||||
for (let i = 0; i < vertexCount; i++)
|
||||
vertices[i] += lastVertices[i] * alpha;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user