Private
_tweenablesThe Promises for all Tweenables in this Scene . Note that each call of tween or pause creates new Promises:
const scene = new Scene(new Tweenable());
scene.play();
Promise.all(scene.promises).then(() =>
// Plays the scene again upon completion, but a new promise is
// created so this line only runs once.
scene.play()
);
Generated using TypeDoc
The Scene class provides a way to control groups of Tweenables. It is lightweight, minimalistic, and meant to provide performant Tweenable batch control that users of Shifty might otherwise have to implement themselves. It is not a robust timeline solution, and it does not provide utilities for sophisticated animation sequencing or orchestration. If that is what you need for your project, consider using a more robust tool such as Rekapi (a timeline layer built on top of Shifty).
Please be aware that Scene does not perform any automatic tween cleanup. If you want to remove a Tweenable from a Scene, you must do so explicitly with either remove or empty.
See the Pen Shifty Scene Demo by Jeremy Kahn (@jeremyckahn) on CodePen.
See
https://codepen.io/jeremyckahn/pen/qvZKbe