UNPKG

@drincs/pixi-vn

Version:

Pixi'VN is a npm package that provides various features for creating visual novels.

34 lines (31 loc) 1.31 kB
import { UPDATE_PRIORITY, Ticker } from 'pixi.js'; import { RotateTickerProps } from '../../types/ticker/RotateTickerProps.js'; import TickerBase from './TickerBase.js'; import '../../interface/TickerProgrationType.js'; import '../../types/TickerIdType.js'; import '../../interface/TickerArgs.js'; import '../../interface/Ticker.js'; /** * A ticker that rotates the canvas element of the canvas. For centre rotation, set the anchor of the canvas element to 0.5. * This ticker can be used on all canvas elements that extend the {@link PixiContainer} class. * @example * ```typescript * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png') * alien.anchor.set(0.5); * canvas.add("alien", alien); * const ticker = new RotateTicker({ * speed: 0.1, * clockwise: true, * }), * canvas.addTicker("alien", ticker) * ``` */ declare class RotateTicker extends TickerBase<RotateTickerProps> { constructor(args?: RotateTickerProps, duration?: number, priority?: UPDATE_PRIORITY); fn(ticker: Ticker, args: RotateTickerProps, aliases: string[], tickerId: string): void; onEndOfTicker(alias: string | string[], tickerId: string, args: RotateTickerProps, options?: { editRotation?: boolean; }): void; private speedConvert; } export { RotateTicker as default };