pixi-game-camera
Version:
A flexible and non-opinionated way to add camera effects to your PIXI application via containers.
25 lines (22 loc) • 700 B
text/typescript
import { Ticker } from '@pixi/ticker';
/**
* A reference to the options passed to camera-pixi on initialization.
*/
export class Options {
/**
* If you want to use an existing PIXI.Ticker instance then you can pass it
* here. If a ticker is not provided, `requestAnimationFrame` will be used
* in its stead.
*
* @property {Ticker}
*/
ticker?: Ticker;
/**
* @param {Object} [options] The options passed to Camera on initialization.
* @param {Ticker} [ticker] An instance of PIXI.Ticker to be used instead of the default `requestAnimationFrame`.
*/
constructor(options: Object = {}) {
Object.assign(this, options);
}
}