Skip to content

Commit

Permalink
Add ability to skip the first frame in a preview for a custom animation
Browse files Browse the repository at this point in the history
For example could be used like this

```
  walk_128: {
    frameSize: 128,
    skipFirstFrameInPreview: true,
    frames: [
      ["walk-n,1", "walk-n,2", "walk-n,3", "walk-n,4", "walk-n,5", "walk-n,6", "walk-n,7", "walk-n,8"],
      ["walk-w,1", "walk-w,2", "walk-w,3", "walk-w,4", "walk-w,5", "walk-w,6", "walk-w,7", "walk-w,8"],
      ["walk-s,1", "walk-s,2", "walk-s,3", "walk-s,4", "walk-s,5", "walk-s,6", "walk-s,7", "walk-s,8"],
      ["walk-e,1", "walk-e,2", "walk-e,3", "walk-e,4", "walk-e,5", "walk-e,6", "walk-e,7", "walk-e,8"]
    ]
  },
```
  • Loading branch information
Frenken, S.H. (Sander) committed Mar 9, 2024
1 parent 5a6dbf1 commit 6b3e0b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sources/chargen.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ $(document).ready(function() {
animRowNum = selectedCustomAnimation.frames.length;
animRowStart = 0;
for (var i = 0; i < selectedCustomAnimation.frames[0].length; ++i) {
if (selectedCustomAnimation.skipFirstFrameInPreview && i === 0 ) {
continue;
}
animationItems.push(i);
}
return
Expand Down

0 comments on commit 6b3e0b5

Please sign in to comment.