Sweetie

Sweetie

A Sweetie is a Spice which can be animated by itself. It is created when calling the method sweet().

Constructor

new Sweetie()

Since:
  • 1.0.0
Source:
Example
import { sweet } from 'paprika-tween';
const { sweetie, spice } = await sweet({
    duration: 2000,
    from: { width: 100 },
    to:   { width: 200 }
    render: (props, interpolation) => { ... }
});
spice.pause();
spice.resume();
await sweetie({
    to:   { width: 0 }
});
spice.dispose();

Members

running :Boolean

Returns whether the instance is running or not.
Source:
Type:
  • Boolean

Methods

dispose()

Stops the animation, removes its interpolatable properties and its callback functions.
Since:
  • 1.0.0
Source:

pause()

Pauses the animation.
Since:
  • 1.0.0
Source:

resume()

Resumes the animation.
Since:
  • 1.0.0
Source: