Skip to main content
M
1m ago

Ability to see all Exported Properties [Low Level WASM]

Problem Statement: The only way to access exported properties is to know the exact name, resulting in communication errors and time wasted.

//Text:
const textRun = artboard.textRun("ExactName") //https://help.rive.app/runtimes/text

//Bone:
const bone = artboard.bone("ExactName")

//Transform:
const transform = artboard.transformComponent("ExactName") //https://unpkg.com/browse/@rive-app/canvas-advanced@2.19.8/rive_advanced.mjs.d.ts


This is even worse for nested artboards, where you have to know the full path:

//Text
const textRun = artboard.textByPath("Nested/Body/Shirt/ShirtText")

//Input
const input = artboard.inputByPath("Nested/Body/Arm/Hand/Squeeze")

While this might be fine for a simple web implementation of a component, the usage of magic strings is problematic when you try to make anything slightly more complex.

It's error prone for the animator to have to communicate the exact Name or Path to the engineers.

My request:

//Either a generic function returning some data structure telling me all of the properties:
artboard.GetExportedProperties()

//Or something per type:
artboard.GetExportedTextRuns()
artboard.GetExportedBones()
artboard.GetExportedTransformComponents()


IMHO the current state is counter to rive's mission of lessening the need for engineer-animator back and forth, and significantly hampers making complex rive scenes.

Join the discussion
Join Rive to reply J