Script Receives Incorrect Values for Large Numbers
Hello Rive Team,
I believe there may be an issue in the scripting runtime when reading large numeric values.
To reproduce the problem, I created a small test with a View Model with two number properties:
testInputValue1 = 1780581594
testInputValue2 = 99999990
The script reads these values and prints them to the console. However, the values received by the script are different from the values configured in the View Model.
Configured values:
testInputValue1 = 1780581594
testInputValue2 = 99999990The values printed by the script are 1,780,581,632 and 99,999,992, and the result of the subtraction is:
1780581632 - 99999992 = 1680581640As shown above:
1780581594 becomes 1780581632
99999990 becomes 99999992
The numbers appear to be modified before they reach the script, resulting in incorrect calculations.
Expected behavior
The script should receive and operate on the exact numeric values configured in the View Model.
Actual behavior
The values read by the script differ from the configured values, causing calculations to produce incorrect results.
I attached a minimal reproduction project. Running the script should immediately reproduce the issue and print the incorrect values to the console.
Could you please confirm whether this is a known limitation related to numeric precision in the scripting runtime or a bug in how numbers are passed to scripts?
Thank you.
large_numbers_issue.rev