@rive-app/webgl-single 2.20.2 → 2.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rive.d.ts +38 -0
- package/rive.js +82 -10
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +6 -0
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -516,6 +516,44 @@ export declare class Rive {
|
|
|
516
516
|
* @param path the path the input is located at an artboard level
|
|
517
517
|
*/
|
|
518
518
|
fireStateAtPath(inputName: string, path: string): void;
|
|
519
|
+
private retrieveTextAtPath;
|
|
520
|
+
/**
|
|
521
|
+
* Retrieves the text value for a specified text run at a given path
|
|
522
|
+
* @param textName The name of the text run
|
|
523
|
+
* @param path The path to the text run within the artboard
|
|
524
|
+
* @returns The text value of the text run, or undefined if not found
|
|
525
|
+
*
|
|
526
|
+
* @example
|
|
527
|
+
* // Get the text value for a text run named "title" at one nested artboard deep
|
|
528
|
+
* const titleText = riveInstance.getTextRunValueAtPath("title", "artboard1");
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* // Get the text value for a text run named "subtitle" within a nested group two artboards deep
|
|
532
|
+
* const subtitleText = riveInstance.getTextRunValueAtPath("subtitle", "group/nestedGroup");
|
|
533
|
+
*
|
|
534
|
+
* @remarks
|
|
535
|
+
* If the text run cannot be found at the specified path, a warning will be logged to the console.
|
|
536
|
+
*/
|
|
537
|
+
getTextRunValueAtPath(textName: string, path: string): string | undefined;
|
|
538
|
+
/**
|
|
539
|
+
* Sets the text value for a specified text run at a given path
|
|
540
|
+
* @param textName The name of the text run
|
|
541
|
+
* @param value The new text value to set
|
|
542
|
+
* @param path The path to the text run within the artboard
|
|
543
|
+
* @returns void
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* // Set the text value for a text run named "title" at one nested artboard deep
|
|
547
|
+
* riveInstance.setTextRunValueAtPath("title", "New Title", "artboard1");
|
|
548
|
+
*
|
|
549
|
+
* @example
|
|
550
|
+
* // Set the text value for a text run named "subtitle" within a nested group two artboards deep
|
|
551
|
+
* riveInstance.setTextRunValueAtPath("subtitle", "New Subtitle", "group/nestedGroup");
|
|
552
|
+
*
|
|
553
|
+
* @remarks
|
|
554
|
+
* If the text run cannot be found at the specified path, a warning will be logged to the console.
|
|
555
|
+
*/
|
|
556
|
+
setTextRunValueAtPath(textName: string, value: string, path: string): void;
|
|
519
557
|
get playingStateMachineNames(): string[];
|
|
520
558
|
get playingAnimationNames(): string[];
|
|
521
559
|
get pausedAnimationNames(): string[];
|