@nativescript/rive
Version:
Rive for NativeScript
46 lines (45 loc) • 2.21 kB
TypeScript
import { RiveViewBase, TypeRiveDirection, TypeRiveLoop } from './common';
export { TypeRiveAlignment, TypeRiveDirection, TypeRiveFit, TypeRiveLoop } from './common';
declare class Listener extends java.lang.Object implements app.rive.runtime.kotlin.controllers.RiveFileController.Listener {
owner: WeakRef<RiveView>;
constructor(owner: WeakRef<RiveView>);
notifyAdvance(param0: number): void;
notifyPlay(animation: app.rive.runtime.kotlin.core.PlayableInstance): void;
notifyStop(animation: app.rive.runtime.kotlin.core.PlayableInstance): void;
notifyPause(animation: app.rive.runtime.kotlin.core.PlayableInstance): void;
notifyLoop(animation: app.rive.runtime.kotlin.core.PlayableInstance): void;
notifyStateChanged(stateMachine: string, stateName: string): void;
}
export declare class RiveView extends RiveViewBase {
bytes: any;
nativeViewProtected: app.rive.runtime.kotlin.RiveAnimationView;
listener: Listener;
constructor();
createNativeView(): app.rive.runtime.kotlin.RiveAnimationView;
initNativeView(): void;
disposeNativeView(): void;
triggerInput(name: string): void;
triggerInputValue(name: string, value: string | boolean | number | null): void;
setInputValue(value: string | boolean | number | null): void;
private _setInputValue;
private _init;
isPlaying(): boolean;
play(loop?: TypeRiveLoop, direction?: TypeRiveDirection, settleInitialState?: boolean): void;
playWithAnimations(animationNames?: string | string[], loop?: TypeRiveLoop, direction?: TypeRiveDirection, areStateMachines?: boolean, settleInitialState?: boolean): void;
stop(): void;
stopWithAnimations(animations?: string[], areStateMachines?: boolean): void;
pause(): void;
pauseWithAnimations(animations?: string | string[], areStateMachines?: boolean): void;
reset(): void;
fireState(stateMachineName: string, inputName: string): void;
getStateMachines(): void;
getPlayingStateMachines(): void;
getAnimations(): void;
getPlayingAnimations(): void;
private addListener;
private buildList;
private getLoop;
private getDirection;
private getFit;
private getAlignment;
}