Nested artboard state,
I have rive and there are nested inputs and I can trigger nested like that
riveInstance?.fireStateAtPath("Clicked_BS", "Bottom_Slice");and I need to get which pizza slices have been clicked. You can check my rive preview(https://rive.app/community/files/18572-37442-pizzaaa/) and my code.
const rive = new Rive({
src: `/animations/exercises/single-choice/pizza_5.riv?v=${Date.now()}`,
canvas: canvasRef.current,
autoplay: false,
stateMachines: "State Machine 1",
shouldDisableRiveListeners: false,
onLoad: () => {
riveInstanceRef.current = rive;
rive?.play();
const enums = rive.enums();
console.log('ENUMS',enums);
const loadedArtboards = rive.contents.artboards;
if (loadedArtboards && Array.isArray(loadedArtboards)) {
const artboardNames = loadedArtboards.map((ab) => ab.name);
console.log('rive', rive);
console.log('CONTENTS', rive.contents);
const inputs = rive.stateMachineInputs(stateMachines);
console.log("INPUTS:", inputs);
....
const inputs = riveInstance.stateMachineInputs(stateMachines);
console.log('CONTENTS', rive.contents);
Thanks in advance.
Idris