UNPKG

@drincs/pixi-vn

Version:

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

36 lines (33 loc) 1.32 kB
import { UPDATE_PRIORITY, Ticker } from 'pixi.js'; import { FadeAlphaTickerProps } from '../../types/ticker/FadeAlphaTickerProps.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 fades the alpha of the canvas element of the canvas. * This ticker can be used on all canvas elements that extend the {@link PixiContainer} class. * @example * ```typescript * let bunny = addImage("bunny1", "https://pixijs.com/assets/eggHead.png") * await bunny.load() * canvas.add("bunny", bunny); * // ... * const ticker = new FadeAlphaTicker({ * duration: 4, // 4 seconds * type: "hide", * }), * canvas.addTicker("bunny", ticker) * ``` */ declare class FadeAlphaTicker extends TickerBase<FadeAlphaTickerProps> { constructor(args?: FadeAlphaTickerProps, duration?: number, priority?: UPDATE_PRIORITY); fn(ticker: Ticker, args: FadeAlphaTickerProps, aliases: string[], tickerId: string): void; onEndOfTicker(alias: string | string[], tickerId: string, args: FadeAlphaTickerProps, options?: { editAlpha?: boolean; }): void; private getLimit; private speedConvert; } export { FadeAlphaTicker as default };