Skip to content

Commit

Permalink
Examples: Removed context creation from WebGL2 examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 11, 2020
1 parent 041ca38 commit e6b297c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 18 deletions.
4 changes: 1 addition & 3 deletions examples/webgl2_buffergeometry_attributes_integer.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@

// renderer

var canvas = document.createElement( 'canvas' );
var context = canvas.getContext( 'webgl2', { alpha: false } );
renderer = new THREE.WebGLRenderer( { canvas: canvas, context: context } );
renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );

Expand Down
5 changes: 1 addition & 4 deletions examples/webgl2_materials_texture2darray.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@

// 2D Texture array is available on WebGL 2.0

var canvas = document.createElement( 'canvas' );
var context = canvas.getContext( 'webgl2', { alpha: false, antialias: false } );

renderer = new THREE.WebGLRenderer( { canvas: canvas, context: context } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
Expand Down
4 changes: 1 addition & 3 deletions examples/webgl2_materials_texture3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@
scene = new THREE.Scene();

// Create renderer
var canvas = document.createElement( 'canvas' );
var context = canvas.getContext( 'webgl2', { alpha: false, antialias: false } );
renderer = new THREE.WebGLRenderer( { canvas: canvas, context: context } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Expand Down
5 changes: 1 addition & 4 deletions examples/webgl2_multisampled_renderbuffers.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,7 @@

//

var canvas = document.createElement( 'canvas' );
var context = canvas.getContext( 'webgl2', { alpha: false, antialias: false } );

renderer = new THREE.WebGLRenderer( { canvas: canvas, context: context } );
renderer = new THREE.WebGLRenderer();
renderer.autoClear = false;
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( container.offsetWidth, container.offsetHeight );
Expand Down
5 changes: 1 addition & 4 deletions examples/webgl2_sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@

}

var canvas = document.createElement( 'canvas' );
var context = canvas.getContext( 'webgl2', { alpha: false, antialias: true } );

renderer = new THREE.WebGLRenderer( { canvas: canvas, context: context } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Expand Down

0 comments on commit e6b297c

Please sign in to comment.