@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
36 lines (33 loc) • 1.33 kB
text/typescript
import { UPDATE_PRIORITY, Ticker } from 'pixi.js';
import { FadeAlphaTickerProps } from '../../types/ticker/FadeAlphaTickerProps.cjs';
import TickerBase from './TickerBase.cjs';
import '../../interface/TickerProgrationType.cjs';
import '../../types/TickerIdType.cjs';
import '../../interface/TickerArgs.cjs';
import '../../interface/Ticker.cjs';
/**
* 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 };