🪛 In Progress: Embed animation only partially works
I'm integrating a .riv animation into a WordPress webpage. The animation plays correctly overall — the character moves and responds to mouse movement as expected. However, one specific part of the animation doesn’t behave the same way as it does in the Rive editor. The poster the character is holding should change when responding to the mouse movement (switching between ‘dashboard’ and ‘badge’). This works properly on the Rive app and preview, but not when I embed it. Here’s the file as well as the javascript I have so far:
const riveInstance = new rive.Rive({
src: '<path>/tg_request_form_animation.riv',
canvas: canvas,
stateMachines: ['State Machine 1'],
autoplay: true,
fit: rive.Fit.Cover,
alignment: rive.Alignment.Center
});
Note: I am not a designer and did not create this animation. I just want to get it working on the webpage.