mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Ensure array size passed to draw mesh also for editor instance.
This commit is contained in:
parent
4225edeede
commit
50a8a47ff0
@ -125,8 +125,14 @@ class SpineC3PluginInstance extends SDK.IWorldInstanceBase {
|
||||
while (command) {
|
||||
const { numVertices, positions, uvs, colors, indices, numIndices, blendMode } = command;
|
||||
|
||||
const vertices = this.tempVertices;
|
||||
const c3colors = this.tempColors;
|
||||
const vertices = this.tempVertices.length < numVertices * 3
|
||||
? (this.tempVertices = new Float32Array(numVertices * 3))
|
||||
: this.tempVertices;
|
||||
|
||||
const c3colors = this.tempColors.length < numVertices * 4
|
||||
? (this.tempColors = new Float32Array(numVertices * 4))
|
||||
: this.tempColors;
|
||||
|
||||
for (let i = 0; i < numVertices; i++) {
|
||||
const srcIndex = i * 2;
|
||||
const dstIndex = i * 3;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user