Mismatch between value passed in from React received as input value
I have a 1d blend with 2 timelines that blend based on a value (`parallax`) between 1 - 100. When I run it in Rive and change the value manually, everything works as expected - A value of 0 shows the parallaxLeft
timeline, a value of 100 shows the parallaxRight
timeline. Any value in between blends as expected.
When I pass the value in from React, a value of around 80+ is treated as the same as a value of 100 in Rive, meaning it only shows the parallaxRight
timeline.
Notice in the first video (in Rive) that when I update the value between 90 - 100, there's a change in the parallax.
Notice in the second video (in browser) that when the value is between 90 - 100, nothing moves. I'm also updated the text run with the same value to show that the value is correct.
Code: (edit, wrong link) https://github.com/lancesnider/lance-snider/pull/22/commits/dd1882183989922c56d89945bd853d5bfd10dfa7#diff-48b07bac157e9a359c0b6bb25605c0045b35d2a2bfd4e6b92336d95b8a8b2bac
What I've tried
I thought it might be an issue with the blend state so I've tried adding a reset layer and turning
capture base state on/off
.I've done a bunch of testing to see if I'm setting the value incorrectly, but I'm pretty sure I'm not.
I've tried turning it off and on again, re-exporting a few times.
I thought it might be related to the fact that I'm setting the
parallax
value in the main artboard, which blends 2 timelines that are settingparallax
values in nested artboards, which also have blend states. I still see the issue even if I export just the nested artboard and modify itsparallax
value directly.
Hey Lance! Just to clarify, the blends works as expected inside the Rive Editor, correct?
Yep, that's right. It's kinda hard to notice, but you can see the diff in the 2 vids I posted.
hey! I noticed that the project is loading a 5 months old version of rive (wasm version 2.10.1). I tried the project with the latest version (wasm v.2.19.4) and it seems to work correctly.
Can you try updating the library and see if the issue is fixed?
omg, I can't believe I didn't think of that. Thanks