@rive-app/canvas
Advanced tools
Comparing version 1.1.3 to 1.1.4
{ | ||
"name": "@rive-app/canvas", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Rive's canvas based web api.", | ||
@@ -5,0 +5,0 @@ "main": "rive.js", |
@@ -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 @@ /** |
@@ -185,2 +185,8 @@ import * as rc from "./rive_advanced.mjs"; | ||
useOffscreenRenderer?: boolean; | ||
/** | ||
* Turn off Rive Listeners. This means state machines that have Listeners | ||
* will not be invoked, and also, no event listeners pertaining to Listeners | ||
* will be attached to the <canvas> element | ||
*/ | ||
shouldDisableRiveListeners?: boolean; | ||
onLoad?: EventCallback; | ||
@@ -230,2 +236,3 @@ onLoadError?: EventCallback; | ||
useOffscreenRenderer?: boolean; | ||
shouldDisableRiveListeners?: boolean; | ||
} | ||
@@ -232,0 +239,0 @@ export interface RiveResetParameters { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
506944
3267