Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to animate scale and rotation #1

Open
manaliveadam opened this issue Feb 12, 2023 · 0 comments
Open

Add the ability to animate scale and rotation #1

manaliveadam opened this issue Feb 12, 2023 · 0 comments

Comments

@manaliveadam
Copy link

Currently, the tool generates a sprite sheet that animates an image's rotation since it's expensive to do at runtime. It could be useful to also integrate scale and opacity animation, since those are expensive as well. I have something similar here: https://github.com/manaliveadam/glitterbomb/blob/main/source/glitterglue.lua but it could work something like:

  1. Specify initial scale and end scale (with 1 being the image's native size). For every frame of the sprite sheet that's generated, lerp between the initial and end scale
  2. Specify initial opacity and end opacity, and use Playdate's built-in dithering to lerp between the initial and end opacity (I use kDitherTypeBayer8x8 but you could also allow users to specify the dithering technique)

The end result should be a sprite sheet that can animate an image's rotation, scale, and opacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant