I'm having issues using the Context2D API, mainly that you cannot change the fill between multiple calls. Usually the way you interact with the Context2D api is by defining color styles and then calling draw operations.
But it appears that the way the API works through the RiveRenderer, is to queue draw calls, but this means that the mutating of the fillStyle in a draw cycle, happens before the actual draw call is executed. This has the effect of all the draw calls using a single fillStyle.
In this case, both rectangles will be red, as opposed to one being blue and the other being red which is what is expected from using the native CanvasRenderingContext2D API
Screenshots
N/A
Browser & Versions (please complete the following information)
Browser: Chrome Version 126.0.6478.62 (Official Build) (arm64)
Description
I'm having issues using the Context2D API, mainly that you cannot change the fill between multiple calls. Usually the way you interact with the Context2D api is by defining color styles and then calling draw operations.
But it appears that the way the API works through the RiveRenderer, is to queue draw calls, but this means that the mutating of the fillStyle in a draw cycle, happens before the actual draw call is executed. This has the effect of all the draw calls using a single fillStyle.
Provide a Repro
Source
.riv
/.rev
fileN/A -->
Expected behavior
In this case, both rectangles will be red, as opposed to one being blue and the other being red which is what is expected from using the native CanvasRenderingContext2D API
Screenshots
N/A
Browser & Versions (please complete the following information)