👟Animation API
Every Ninja Can Be Programmed Via Straight-Forward Animation API
Last updated
Every Ninja Can Be Programmed Via Straight-Forward Animation API
Last updated
For Ninjas, we aimed beyond merely incorporating a handful of animations for GIF exports. We developed a user-friendly animation API that enables the animation of each layer, frame by frame, with your chosen duration and style. Simply input your custom JSON code into the interface, and we even provide tailored error messages for guidance.
So, are you getting it now? Have you seen this on Ethereum PFP projects?😁
In our next version, we intend to enhance this API further, making it significantly more robust. Our goal is to introduce an intuitive graphical user interface, along with capabilities for resizing and rotate layers, as well as hide and show custom overlays.
Additionally, we'd like to offer more expressive options for defining nuanced and dynamic motions, such as:
Elastic Animation: This type of animation mimics an elastic material, stretching and bouncing back, ideal for creating playful and engaging UI elements.
Bounce Effect: Similar to elastic animation but with a more pronounced 'bounce' at the end of the movement, giving a lively feel to objects settling into place.
Ease-In and Ease-Out Transitions: These animations start slow, accelerate in the middle, and then slow down again towards the end. They are great for natural and smooth movements.
Spring Physics: This animation simulates the dynamics of a spring, providing a natural, physics-based interaction, often used for pull-to-refresh actions or interactive buttons.
Deceleration and Acceleration Curves: By manipulating the acceleration and deceleration of an animation, you can create a sense of momentum and weight, making UI interactions feel more realistic.
Path Animation: This involves moving an object along a complex predefined path, which could be curved, zigzagged, or any custom shape, offering creative ways to guide user attention.
Sequential Animations: Where one animation starts only after the previous one has finished, creating a coordinated sequence of movements.
These are just ideas at this stage, so we'd love to hear feedback from the community on what they'd like to see in the next version of our Animation API.
IMPORTANT: All layers must be on the canvas for the first frame or they will lose their color. In this example, the first frame is the same as the last frame in the animation and the second frame is off the canvas starting the bouncing up animation.
Below you will see the animation only changes the X coordinates of each layer, starting with 0 in the first frame (matching the top to the top of the screen), 2000 in the second frame (completely off the current 2,000px canvas), and then slowly geometrically decreasing from 2000 back to 0 for a bounce up animation.
The final frame has a duration of 300ms, which gives it the equivalent duration of 6 frames (default is 50ms).
As of now, the API supports duration, layers, each layer number with an underscore, and an X and Y coordinate.