@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
33 lines (30 loc) • 1.47 kB
text/typescript
import { Ticker, Container, UPDATE_PRIORITY, ContainerChild } from 'pixi.js';
import { T as TickerBase } from '../../TickerBase-DKYzbzro.mjs';
import { ZoomTickerProps } from '../../types/ticker/ZoomTickerProps.mjs';
import '../../types/StorageElementType.mjs';
import '../../types/TickerIdType.mjs';
import '../../interface/TickerProgrationType.mjs';
/**
* A ticker that zooms the canvas element of the canvas.
* This ticker can be used on all canvas elements that extend the {@link Container} class.
* @example
* ```typescript
* let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
* alien.anchor.set(0.5);
* GameWindowManager.addCanvasElement("alien", alien);
* const ticker = new ZoomTicker({
* speed: 0.1,
* }),
* GameWindowManager.addTicker("alien", ticker)
* ```
*/
declare class ZoomTicker extends TickerBase<ZoomTickerProps> {
fn(ticker: Ticker, args: ZoomTickerProps, tags: string[], tickerId: string): void;
private speedConvert;
onEndOfTicker<T extends Container = Container>(tag: string, tickerId: string, _element: T, tagToRemoveAfter: string[] | string): void;
}
declare class ZoomInOutTicker extends ZoomTicker {
constructor(props: ZoomTickerProps, duration?: number, priority?: UPDATE_PRIORITY);
onEndOfTicker<T extends Container = Container<ContainerChild>>(tag: string, tickerId: string, element: T, tagToRemoveAfter: string[] | string): void;
}
export { ZoomInOutTicker, ZoomTicker as default };