@rive-app/canvas-advanced
Advanced tools
Comparing version 1.1.3 to 1.1.4
{ | ||
"name": "@rive-app/canvas-advanced", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Rive's lightweight low-level canvas based web api.", | ||
@@ -5,0 +5,0 @@ "main": "canvas_advanced.mjs", |
@@ -100,2 +100,9 @@ interface RiveOptions { | ||
cleanup(): void; | ||
/** | ||
* Returns whether or not there are Rive Listeners configured on a given StateMachineInstance | ||
* @param stateMachine - StateMachineInstance to check for Listeners | ||
* @returns bool - Boolean of if there are Listners on the state machine | ||
*/ | ||
hasListeners(stateMachine: StateMachineInstance): boolean; | ||
} | ||
@@ -285,13 +292,21 @@ | ||
/** | ||
* Creates a LinearAnimationinstance for the animation with the given name | ||
* @param name - Name of the animation to create an instance for | ||
* @returns A new LinearAnimationInstance object | ||
* Creates a LinearAnimation for the animation with the given name | ||
* | ||
* Note: This does not create a LinearAnimationInstance to advance in the render loop. | ||
* That needs to be created separately. | ||
* | ||
* @param name - Name of the animation to create a LinearAnimation reference for | ||
* @returns A new LinearAnimation object | ||
*/ | ||
animationByName(name: string): LinearAnimationInstance; | ||
animationByName(name: string): LinearAnimation; | ||
/** | ||
* Creates a LinearAnimationinstance for the animation with the given index | ||
* @param index - Index of the animation to create an instance for | ||
* @returns A new LinearAnimationInstance object | ||
* Creates a LinearAnimation for the animation with the given index | ||
* | ||
* Note: This does not create a LinearAnimationInstance to advance in the render loop. | ||
* That needs to be created separately. | ||
* | ||
* @param index - Index of the animation to create a LinearAnimation reference for | ||
* @returns A new LinearAnimation object | ||
*/ | ||
animationByIndex(index: number): LinearAnimationInstance; | ||
animationByIndex(index: number): LinearAnimation; | ||
/** | ||
@@ -303,13 +318,21 @@ * Returns the number of animations in the artboard | ||
/** | ||
* Creates a StateMachineInstance for the state machine with the given name | ||
* @param name - Name of the state machine to create an instance for | ||
* @returns A new StateMachineInstance object | ||
* Creates a StateMachine for the state machine with the given name. | ||
* | ||
* Note: This does not create a StateMachineInstance to advance in the render loop. | ||
* That needs to be created separately. | ||
* | ||
* @param name - Name of the state machine to create a StateMachine reference for | ||
* @returns A new StateMachine object | ||
*/ | ||
stateMachineByName(name: string): StateMachineInstance; | ||
stateMachineByName(name: string): StateMachine; | ||
/** | ||
* Creates a StateMachineInstance for the state machine with the given index | ||
* @param index - Index of the state machine to create an instance for | ||
* @returns A new StateMachineInstance object | ||
* Creates a StateMachine for the state machine with the given index | ||
* | ||
* Note: This does not create a StateMachineInstance to advance in the render loop. | ||
* That needs to be created separately. | ||
* | ||
* @param index - Index of the state machine to create a StateMachine reference for | ||
* @returns A new StateMachine object | ||
*/ | ||
stateMachineByIndex(index: number): StateMachineInstance; | ||
stateMachineByIndex(index: number): StateMachine; | ||
/** | ||
@@ -399,7 +422,7 @@ * Returns the number of state machines in the artboard | ||
* Create a new LinearAnimationInstance reference | ||
* @param animation - A LinearAnimationInstance retrieved via the Artboard | ||
* @param animation - A LinearAnimation reference retrieved via the Artboard | ||
* (i.e `artboard.animationByName('foo')`) | ||
* @param artboard - The Artboard instance for this animation | ||
*/ | ||
constructor(animation: LinearAnimationInstance, artboard: Artboard); | ||
constructor(animation: LinearAnimation, artboard: Artboard); | ||
get name(): string; | ||
@@ -445,2 +468,20 @@ get duration(): number; | ||
export declare class LinearAnimation { | ||
/** | ||
* The animation's loop type | ||
*/ | ||
get loopValue(): number; | ||
/** | ||
* Name of the LinearAnimation | ||
*/ | ||
get name(): string; | ||
} | ||
export declare class StateMachine { | ||
/** | ||
* Name of the StateMachine | ||
*/ | ||
get name(): string; | ||
} | ||
/** | ||
@@ -459,7 +500,7 @@ * Rive class representing a StateMachine instance. Use this class to advance and control a | ||
* Create a new StateMachineInstance reference | ||
* @param stateMachine - A StateMachineInstance retrieved via the Artboard | ||
* @param stateMachine - A StateMachine retrieved via the Artboard | ||
* (i.e `artboard.stateMachineByName('foo')`) | ||
* @param artboard - The Artboard instance for this state machine | ||
*/ | ||
constructor(stateMachine: StateMachineInstance, artboard: Artboard); | ||
constructor(stateMachine: StateMachine, artboard: Artboard); | ||
get name(): string; | ||
@@ -466,0 +507,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
251669
866