UNPKG

phaser4-rex-plugins

Version:
94 lines (72 loc) 2.42 kB
import BaseShapes from '../shapes/BaseShapes'; // import * as Phaser from 'phaser'; export default CircularProgress; declare namespace CircularProgress { type ValueChangeCallbackType = ( newValue: number, oldValue: number, circularProgress: CircularProgress ) => void; interface IConfig { x?: number, y?: number, radius?: number, barColor?: string | number, barAlpha?: number, trackColor?: string | number, trackAlpha?: number, centerColor?: string | number, centerAlpha?: number, thickness?: number, startAngle?: number, anticlockwise?: boolean, iterations?: number, value?: number, easeValue?: { duration?: number, ease?: string }, valuechangeCallback: ValueChangeCallbackType, } namespace Events { type ValueChangeCallbackType = ( newValue: number, oldValue: number, circularProgress: CircularProgress ) => void; } } declare class CircularProgress extends BaseShapes { constructor( scene: Phaser.Scene, config?: CircularProgress.IConfig ); constructor( scene: Phaser.Scene, x?: number, y?: number, radius?: number, barColor?: string | number, value?: number, config?: CircularProgress.IConfig ); value: number; getValue(min?: number, max?: number): number; setValue(value?: number, min?: number, max?: number): this; addValue(inc?: number, min?: number, max?: number): this; easeValueTo(value?: number, min?: number, max?: number): this; stopEaseValue(): this; setEaseValueDuration(duration: number): this; setEaseValueFunction(ease: string): this; radius: number; setRadius(radius: number): this; trackColor: string; setTrackColor(trackColor?: string | number): this; setThickness(thickness: number): this; barColor: string; setBarColor(barColor?: string | number): this; startAngle: number; setStartAngle(startAngle: number): this; anticlockwise: boolean; setAnticlockwise(anticlockwise: boolean): this; centerColor: string; setCenterColor(centerColor?: string | number): this; }