Closed DaVince closed 2 years ago
@DaVince Thanks for the issue!
Definitely a bug! Feels like I've fixed this one before, you should be able to re-use the fonts as you expect.
Doh, definitely a regression I should have a fix up soon (with a better test to prevent this from happening again)
Related #2152
Excellent, thanks so much!
When creating more than 1 Label or Text that use the same Font, Excalibur gets confused and overwrites the contents of previous Labels. It also offsets the x positions of the Labels randomly.
Steps to Reproduce
Code example:
My code:
Expected Result
Two labels with their own relative text and positions should appear.
Actual Result
The two labels appear, but they both have the text from the last label created.
Environment
Current workaround
Creating a clone of the Font object with the
.clone()
method for each Label and Text object.Additional information
Attached is the full output of one of the WebGL warnings that appears in the console: BindTexturesError.txt
This error also happens in Firefox, though the console message is worded differently: