/** @typedef {import("./tweenable").Tweenable} Tweenable */ export class Scene { /** * The {@link Scene} class provides a way to control groups of {@link * Tweenable}s. It is lightweight, minimalistic, and meant to provide * performant {@link 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](http://jeremyckahn.github.io/rekapi/doc/) (a timeline layer built * on top of Shifty). * * Please be aware that {@link Scene} does **not** perform any * automatic cleanup. If you want to remove a {@link Tweenable} from a * {@link Scene}, you must do so explicitly with either {@link * Scene#remove} or {@link Scene#empty}. * *

* See the Pen * Shifty Scene Demo by Jeremy Kahn (@jeremyckahn) * on CodePen. *

* * @param {...Tweenable} tweenables * @see https://codepen.io/jeremyckahn/pen/qvZKbe * @constructs Scene * @memberof shifty */ constructor(...tweenables: Tweenable[]); /** * A copy of the internal {@link Tweenable}s array. * @member Scene#tweenables * @type {Array.} */ get tweenables(): import("./tweenable").Tweenable[]; /** * A list of {@link Tweenable}s in the scene that have not yet ended (playing * or not). * @member Scene#playingTweenables * @type {Array.} */ get playingTweenables(): import("./tweenable").Tweenable[]; /** * The {@link external:Promise}s for all {@link Tweenable}s in this * {@link Scene} that have been configured with {@link * Tweenable#setConfig}. Note that each call of {@link * Scene#play} or {@link Scene#pause} creates new {@link * external:Promise}s: * * 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() * ); * * @member Scene#promises * @type {Array.>} */ get promises(): Promise[]; /** * Add a {@link Tweenable} to be controlled by this {@link * Scene}. * @method Scene#add * @param {Tweenable} tweenable * @return {Tweenable} The {@link Tweenable} that was added. */ add(tweenable: Tweenable): Tweenable; /** * Remove a {@link Tweenable} that is controlled by this {@link * Scene}. * @method Scene#remove * @param {Tweenable} tweenable * @return {Tweenable} The {@link Tweenable} that was removed. */ remove(tweenable: Tweenable): Tweenable; /** * [Remove]{@link Scene#remove} all {@link Tweenable}s in this {@link * Scene}. * @method Scene#empty * @return {Array.} The {@link Tweenable}s that were * removed. */ empty(): Array; /** * Is `true` if any {@link Tweenable} in this {@link Scene} is * playing. * @method Scene#isPlaying * @return {boolean} */ isPlaying(): boolean; /** * Play all {@link Tweenable}s from their beginning. * @method Scene#play * @return {Scene} */ play(): Scene; /** * {@link Tweenable#pause} all {@link Tweenable}s in this * {@link Scene}. * @method Scene#pause * @return {Scene} */ pause(): Scene; /** * {@link Tweenable#resume} all paused {@link Tweenable}s. * @method Scene#resume * @return {Scene} */ resume(): Scene; /** * {@link Tweenable#stop} all {@link Tweenable}s in this {@link * Scene}. * @method Scene#stop * @param {boolean} [gotoEnd] * @return {Scene} */ stop(gotoEnd?: boolean): Scene; #private; } export type Tweenable = import("./tweenable").Tweenable; //# sourceMappingURL=scene.d.ts.map