Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: Clean up redundant parameterization of WebGLRenderer #13438

Merged
merged 1 commit into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/js/renderers/WebGLDeferredRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {

function init( parameters ) {

_this.renderer = parameters.renderer !== undefined ? parameters.renderer : new THREE.WebGLRenderer( { antialias: false } );
_this.renderer = parameters.renderer !== undefined ? parameters.renderer : new THREE.WebGLRenderer();
_this.domElement = _this.renderer.domElement;

_gl = _this.renderer.context;
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_controls_trackball.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

// renderer

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_buffergeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_buffergeometry_lines.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_buffergeometry_lines_indexed.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@

scene.add( parent_node );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_buffergeometry_points.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_buffergeometry_points_interleaved.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_buffergeometry_uint.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_effects_anaglyph.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
container.appendChild( renderer.domElement );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_effects_parallaxbarrier.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
container.appendChild( renderer.domElement );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_interactive_buffergeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_lights_pointlights2.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

// RENDERER

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_lines_colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

scene = new THREE.Scene();

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.autoClear = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_loader_nrrd.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
} );
// renderer

renderer = new THREE.WebGLRenderer( { antialias: false, alpha: true } );
renderer = new THREE.WebGLRenderer( { alpha: true } );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_loader_vrml.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

// renderer

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_loader_vtk.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@

// renderer

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_materials_bumpmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
loader = new THREE.JSONLoader();
loader.load( "models/json/leeperrysmith/LeePerrySmith.json", function( geometry ) { createScene( geometry, 100, material ) } );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_materials_cubemap_dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@

// RENDERER

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_materials_envmaps_hdr.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
scene = new THREE.Scene();
scene.background = new THREE.Color( 0xffffff );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.toneMapping = THREE.LinearToneMapping;

standardMaterial = new THREE.MeshStandardMaterial( {
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_materials_normalmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
loader = new THREE.JSONLoader();
loader.load( "models/json/leeperrysmith/LeePerrySmith.json", function( geometry ) { createScene( geometry, 100, material ) } );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_materials_shaders_fresnel.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_materials_skin.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

// RENDERER

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.autoClear = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_materials_video.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
light.position.set( 0.5, 1, 1 ).normalize();
scene.add( light );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_multiple_renderers.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
renderer1.setSize( window.innerWidth, window.innerHeight / 2 );
document.body.appendChild( renderer1.domElement );

renderer2 = new THREE.WebGLRenderer( { antialias: false } );
renderer2 = new THREE.WebGLRenderer();
renderer2.setPixelRatio( window.devicePixelRatio );
renderer2.setSize( window.innerWidth, window.innerHeight / 2 );
document.body.appendChild( renderer2.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_performance_static.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

} );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
//renderer.sortObjects = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_points_dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
} );


renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth,window.innerHeight );
renderer.autoClear = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( width, height );
renderer.autoClear = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_backgrounds.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
var aspect = width / height;
var devicePixelRatio = window.devicePixelRatio || 1;

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( devicePixelRatio );
renderer.setSize( width, height );
document.body.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_dof.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

scene = new THREE.Scene();

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( width, height );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_dof2.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
scene = new THREE.Scene();
scene.add( camera );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, height );
//renderer.sortObjects = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_godrays.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

//

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_masking.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
torus = new THREE.Mesh( new THREE.TorusGeometry( 3, 1, 16, 32 ) );
scene2.add( torus );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setClearColor( 0xe0e0e0 );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_outline.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
var width = window.innerWidth;
var height = window.innerHeight;

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.shadowMap.enabled = true;
// todo - support pixelRatio in this demo
renderer.setSize( width, height );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_procedural.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

var container = document.getElementById( "container" );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_smaa.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

var container = document.getElementById( "container" );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_ssaa.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

var container = document.getElementById( "container" );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_ssaa_unbiased.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
var aspect = width / height;
var devicePixelRatio = window.devicePixelRatio || 1;

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( devicePixelRatio );
renderer.setSize( width, height );
document.body.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_ssao.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
container = document.createElement( 'div' );
document.body.appendChild( container );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_taa.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

var container = document.getElementById( "container" );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_unreal_bloom.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
scene = new THREE.Scene();
scene.background = new THREE.Color( 0x111111 );

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.toneMapping = THREE.LinearToneMapping;

standardMaterial = new THREE.MeshStandardMaterial( {
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_shadowmap_performance.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

// RENDERER

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
container.appendChild( renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_tiled_forward.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
var scene = new THREE.Scene();
scene.background = new THREE.Color( 0x111111 );

var renderer = new THREE.WebGLRenderer( { antialias: false } );
var renderer = new THREE.WebGLRenderer();
renderer.toneMapping = THREE.LinearToneMapping;
container.appendChild( renderer.domElement );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_tonemapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

scene = new THREE.Scene();

renderer = new THREE.WebGLRenderer( { antialias: false } );
renderer = new THREE.WebGLRenderer();

standardMaterial = new THREE.MeshStandardMaterial( {
bumpScale: - 0.05,
Expand Down