r.viewModelNames returns "undefined"
I have a rive animation (Jungle) that uses data binding to control a parallax and checks the viewport width for certain logic checks in my state machine. This works fine in the editor, and also works great in a second Rive animation (Buddy); however, the Jungle has been nothing but trouble.
When I log viewModelNames for the Jungle, I get undefined.
When I use [ let vmi = rJungle.viewModelInstance; ] I get an error.
When I go into the editor, I have a View Model and an instance.
When I log viewModelNames for Buddy, I also get undefined.
But, when I [ let vmi = rBuddy.viewModelInstance; ] I do not get an error, and the animation works as intended.
I have spent the day scouring the Rive website, the Rive AI chatbot, and ChatGPT for answers to no avail.
Attached is my JavaScript file. I apologize in advance, as I am not a coder, so I’m doing what I can here.
I have also attached the Rive files I’m working with.
WORMS_jungle_v1.0.11.rivbuddyHeader_v2.5.9.rivscript-3.js