@rive-app/canvas
Advanced tools
Comparing version 2.20.2 to 2.21.0
{ | ||
"name": "@rive-app/canvas", | ||
"version": "2.20.2", | ||
"version": "2.21.0", | ||
"description": "Rive's canvas based web api.", | ||
@@ -5,0 +5,0 @@ "main": "rive.js", |
@@ -459,2 +459,8 @@ interface RiveOptions { | ||
inputByPath(name: string, path: string): SMIInput; | ||
/** | ||
* Returns a reference for a TextValueRun object to get/set a text value for | ||
* @param name - Name of the Text Run to grab a reference to | ||
* @param path - Path of where the text exists at an artboard level | ||
*/ | ||
textByPath(name: string, path: string): TextValueRun; | ||
} | ||
@@ -461,0 +467,0 @@ |
@@ -519,2 +519,40 @@ import * as rc from "./rive_advanced.mjs"; | ||
fireStateAtPath(inputName: string, path: string): void; | ||
private retrieveTextAtPath; | ||
/** | ||
* Retrieves the text value for a specified text run at a given path | ||
* @param textName The name of the text run | ||
* @param path The path to the text run within the artboard | ||
* @returns The text value of the text run, or undefined if not found | ||
* | ||
* @example | ||
* // Get the text value for a text run named "title" at one nested artboard deep | ||
* const titleText = riveInstance.getTextRunValueAtPath("title", "artboard1"); | ||
* | ||
* @example | ||
* // Get the text value for a text run named "subtitle" within a nested group two artboards deep | ||
* const subtitleText = riveInstance.getTextRunValueAtPath("subtitle", "group/nestedGroup"); | ||
* | ||
* @remarks | ||
* If the text run cannot be found at the specified path, a warning will be logged to the console. | ||
*/ | ||
getTextRunValueAtPath(textName: string, path: string): string | undefined; | ||
/** | ||
* Sets the text value for a specified text run at a given path | ||
* @param textName The name of the text run | ||
* @param value The new text value to set | ||
* @param path The path to the text run within the artboard | ||
* @returns void | ||
* | ||
* @example | ||
* // Set the text value for a text run named "title" at one nested artboard deep | ||
* riveInstance.setTextRunValueAtPath("title", "New Title", "artboard1"); | ||
* | ||
* @example | ||
* // Set the text value for a text run named "subtitle" within a nested group two artboards deep | ||
* riveInstance.setTextRunValueAtPath("subtitle", "New Subtitle", "group/nestedGroup"); | ||
* | ||
* @remarks | ||
* If the text run cannot be found at the specified path, a warning will be logged to the console. | ||
*/ | ||
setTextRunValueAtPath(textName: string, value: string, path: string): void; | ||
get playingStateMachineNames(): string[]; | ||
@@ -521,0 +559,0 @@ get playingAnimationNames(): string[]; |
Sorry, the diff of this file is not supported yet
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
2936235
7890