Skip to content

Commit

Permalink
sprite builder fix - 'frameSize'
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzakm committed Feb 2, 2024
1 parent 478f268 commit 12bc029
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-cups-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@threejs-kit/instanced-sprite-mesh": minor
---

sprite builder utility fix for 'frameSize' autoframing option
8 changes: 8 additions & 0 deletions packages/instanced-sprite-mesh/src/spriteBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ class SpriteBuilder {
};
}

if (config.type == "frameSize") {
animation["auto"] = {
type: "frameSize",
w: config.w,
h: config.h,
};
}

this.animations.push(animation);
return this;
}
Expand Down

0 comments on commit 12bc029

Please sign in to comment.