Skip to content

Commit

Permalink
WebGPURenderer: Set style.display to block in constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Nov 10, 2020
1 parent 84b7a63 commit edc6076
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/jsm/renderers/webgpu/WebGPURenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class WebGPURenderer {

// public

this.domElement = ( parameters.canvas !== undefined ) ? parameters.canvas : document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
this.domElement = ( parameters.canvas !== undefined ) ? parameters.canvas : this._createCanvasElement();

this.autoClear = true;
this.autoClearColor = true;
Expand Down Expand Up @@ -873,6 +873,14 @@ class WebGPURenderer {

}

_createCanvasElement() {

const canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
canvas.style.display = 'block';
return canvas;

}

}

export default WebGPURenderer;

0 comments on commit edc6076

Please sign in to comment.