mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Fixed a bug where ffd would never be used. (#602)
Float32Array.length is read only and will not resize the array. This caused the .length to always be 0 and thus not use ffd in spine.WeightedMeshAttachment.computerWorldVertices(). This proposed fix instead creates a new array when the size has changed.
This commit is contained in:
parent
1ea57900c5
commit
1f4b6b1508
@ -989,8 +989,11 @@ spine.FfdTimeline.prototype = {
|
|||||||
var vertexCount = frameVertices[0].length;
|
var vertexCount = frameVertices[0].length;
|
||||||
|
|
||||||
var vertices = slot.attachmentVertices;
|
var vertices = slot.attachmentVertices;
|
||||||
if (vertices.length != vertexCount) alpha = 1;
|
if (vertices.length != vertexCount) {
|
||||||
vertices.length = vertexCount;
|
vertices = slot.attachmentVertices = new spine.Float32Array(vertexCount);
|
||||||
|
vertices.length = vertexCount;
|
||||||
|
alpha = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (time >= frames[frames.length - 1]) { // Time is after last frame.
|
if (time >= frames[frames.length - 1]) { // Time is after last frame.
|
||||||
var lastVertices = frameVertices[frames.length - 1];
|
var lastVertices = frameVertices[frames.length - 1];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user