You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is an example of the issue I get with bad width and height values on canvasTexture after a resize.
In my code, I set manually canvas_texture.width and canvas_texture.height to the new value and it solves the problem. Here (resize source code) you can see that this.width and this.height are never changed (and it's not done in refresh). I post an issue instead of a pull request because I'm not confident enough about any side effect that can happend but I guess the solution would be add this.width = width and this.height = height before the refresh call.
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
When you call setSize() on a CanvasTexture, the canvas is resized but the width and height attributes of the CanvasTexture are not updated.
Example Test Code
Here is an example on jsbin: https://jsbin.com/jusasaroce/
Additional Information
Here is an example of the issue I get with bad width and height values on canvasTexture after a resize.
In my code, I set manually canvas_texture.width and canvas_texture.height to the new value and it solves the problem. Here (resize source code) you can see that this.width and this.height are never changed (and it's not done in refresh). I post an issue instead of a pull request because I'm not confident enough about any side effect that can happend but I guess the solution would be add this.width = width and this.height = height before the refresh call.
The text was updated successfully, but these errors were encountered: