@esotericsoftware/spine-canvaskit 4.2.53 → 4.2.54

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.
@@ -11868,6 +11868,7 @@ var spine = (() => {
11868
11868
  tempColor2 = new Color();
11869
11869
  scratchPositions = Utils.newFloatArray(100);
11870
11870
  scratchColors = Utils.newFloatArray(100);
11871
+ scratchUVs = Utils.newFloatArray(100);
11871
11872
  /**
11872
11873
  * Renders a skeleton or skeleton drawable in its current pose to the canvas.
11873
11874
  * @param canvas the canvas to render to.
@@ -11940,7 +11941,7 @@ var spine = (() => {
11940
11941
  colors[i2 + 2] = finalColor.b;
11941
11942
  colors[i2 + 3] = finalColor.a;
11942
11943
  }
11943
- const scaledUvs = new Array(uvs.length);
11944
+ const scaledUvs = this.scratchUVs.length < uvs.length ? Utils.newFloatArray(uvs.length) : this.scratchUVs;
11944
11945
  const width = texture.getImage().image.width();
11945
11946
  const height = texture.getImage().image.height();
11946
11947
  for (let i2 = 0; i2 < uvs.length; i2 += 2) {
@@ -11950,6 +11951,7 @@ var spine = (() => {
11950
11951
  const blendMode = slot.data.blendMode;
11951
11952
  const vertices = this.ck.MakeVertices(this.ck.VertexMode.Triangles, positions, scaledUvs, colors, triangles, false);
11952
11953
  canvas.drawVertices(vertices, this.ck.BlendMode.Modulate, texture.getImage().paintPerBlendMode.get(blendMode));
11954
+ vertices.delete();
11953
11955
  }
11954
11956
  clipper.clipEndWithSlot(slot);
11955
11957
  }