Skip to content

Commit

Permalink
fix(@pixi-spine/base): debug renderer was crashed updating offsets
Browse files Browse the repository at this point in the history
regionAttachment not always have an updateOffset function, not sure what that function does but trying to call it when it's not there for sure crashes :P
  • Loading branch information
miltoncandelero committed Jan 18, 2023
1 parent 00a3ea2 commit 5aae37b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/base/src/SpineDebugRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class SpineDebugRenderer implements ISpineDebugRenderer {

const vertices = new Float32Array(8);

regionAttachment?.updateOffset(); // We don't need this on all versions
if (regionAttachment.updateOffset) regionAttachment.updateOffset(); // We don't need this on all versions

regionAttachment.computeWorldVertices(slot, vertices, 0, 2);
debugDisplayObjects.regionAttachmentsShape.drawPolygon(Array.from(vertices.slice(0, 8)));
Expand Down

0 comments on commit 5aae37b

Please sign in to comment.