DynamicTexture will now automatically call setSize(width, height) for both WebGL and Canvas. Previously it only did it for WebGL. This fixes an issue where DynamicTextures in Canvas mode would have a width and height of -1. Fix #6682

This commit is contained in:
Richard Davey 2024-01-31 17:36:21 +00:00
parent 4831095538
commit 4ea4e55e0f

View file

@ -226,10 +226,7 @@ var DynamicTexture = new Class({
*/
this.pipeline = (!isCanvas) ? renderer.pipelines.get(PIPELINES.SINGLE_PIPELINE) : null;
if (!isCanvas)
{
this.setSize(width, height);
}
this.setSize(width, height);
},
/**