phaser3-rex-notes
phaser3-rex-notes copied to clipboard
Error in `DrawContent.js` when creating new ExpBar
When creating a circle progress bar via new ExpBar(...), the following error occurs in DrawContent.js:
Uncaught TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.
Note that is only occurring for me on production (website) and not in local testing.
Phaser version: 3.85.0-beta2
I tracked down the cause and a temporary solution.
The issue was when passing a bar.barColor2 in the config (for gradients) when the ExpBar value was set to 0.
Removing the barColor2 param fixes the error.
Can you provide a simplest runnable test case for reproducing the bug?