Skip to content

Commit 546c91c

Browse files
committed
Clean up.
1 parent f0d9801 commit 546c91c

File tree

7 files changed

+101
-81
lines changed

7 files changed

+101
-81
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">

docs/scenes/bones-browser.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
@@ -57,7 +57,7 @@
5757
camera.position.y = 30;
5858

5959
renderer = new THREE.WebGLRenderer( { antialias: true } );
60-
renderer.setPixelRatio( window.devicePixelRatio );
60+
renderer.setPixelRatio( window.devicePixelRatio );
6161
renderer.setSize( window.innerWidth, window.innerHeight );
6262
document.body.appendChild( renderer.domElement );
6363

@@ -74,7 +74,7 @@
7474

7575
lights[ 0 ].position.set( 0, 200, 0 );
7676
lights[ 1 ].position.set( 100, 200, 100 );
77-
lights[ 2 ].position.set( -100, -200, -100 );
77+
lights[ 2 ].position.set( - 100, - 200, - 100 );
7878

7979
scene.add( lights[ 0 ] );
8080
scene.add( lights[ 1 ] );
@@ -128,7 +128,7 @@
128128

129129
var prevBone = new THREE.Bone();
130130
bones.push( prevBone );
131-
prevBone.position.y = -sizing.halfHeight;
131+
prevBone.position.y = - sizing.halfHeight;
132132

133133
for ( var i = 0; i < sizing.segmentCount; i ++ ) {
134134

@@ -187,13 +187,13 @@
187187

188188
folder = gui.addFolder( "Bone " + i );
189189

190-
folder.add( bone.position, 'x', -10 + bone.position.x, 10 + bone.position.x );
191-
folder.add( bone.position, 'y', -10 + bone.position.y, 10 + bone.position.y );
192-
folder.add( bone.position, 'z', -10 + bone.position.z, 10 + bone.position.z );
190+
folder.add( bone.position, 'x', - 10 + bone.position.x, 10 + bone.position.x );
191+
folder.add( bone.position, 'y', - 10 + bone.position.y, 10 + bone.position.y );
192+
folder.add( bone.position, 'z', - 10 + bone.position.z, 10 + bone.position.z );
193193

194-
folder.add( bone.rotation, 'x', -Math.PI * 0.5, Math.PI * 0.5 );
195-
folder.add( bone.rotation, 'y', -Math.PI * 0.5, Math.PI * 0.5 );
196-
folder.add( bone.rotation, 'z', -Math.PI * 0.5, Math.PI * 0.5 );
194+
folder.add( bone.rotation, 'x', - Math.PI * 0.5, Math.PI * 0.5 );
195+
folder.add( bone.rotation, 'y', - Math.PI * 0.5, Math.PI * 0.5 );
196+
folder.add( bone.rotation, 'z', - Math.PI * 0.5, Math.PI * 0.5 );
197197

198198
folder.add( bone.scale, 'x', 0, 2 );
199199
folder.add( bone.scale, 'y', 0, 2 );

docs/scenes/geometry-browser.html

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
@@ -42,11 +42,11 @@
4242

4343
<script>
4444

45-
document.getElementById('newWindow').href += window.location.hash;
45+
document.getElementById( 'newWindow' ).href += window.location.hash;
4646

4747
var gui = new dat.GUI();
4848
var scene = new THREE.Scene();
49-
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 50 );
49+
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 50 );
5050
camera.position.z = 30;
5151

5252
var renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -61,44 +61,44 @@
6161
scene.add( ambientLight );
6262

6363
var lights = [];
64-
lights[0] = new THREE.PointLight( 0xffffff, 1, 0 );
65-
lights[1] = new THREE.PointLight( 0xffffff, 1, 0 );
66-
lights[2] = new THREE.PointLight( 0xffffff, 1, 0 );
64+
lights[ 0 ] = new THREE.PointLight( 0xffffff, 1, 0 );
65+
lights[ 1 ] = new THREE.PointLight( 0xffffff, 1, 0 );
66+
lights[ 2 ] = new THREE.PointLight( 0xffffff, 1, 0 );
6767

68-
lights[0].position.set( 0, 200, 0 );
69-
lights[1].position.set( 100, 200, 100 );
70-
lights[2].position.set( -100, -200, -100 );
68+
lights[ 0 ].position.set( 0, 200, 0 );
69+
lights[ 1 ].position.set( 100, 200, 100 );
70+
lights[ 2 ].position.set( - 100, - 200, - 100 );
7171

72-
scene.add( lights[0] );
73-
scene.add( lights[1] );
74-
scene.add( lights[2] );
72+
scene.add( lights[ 0 ] );
73+
scene.add( lights[ 1 ] );
74+
scene.add( lights[ 2 ] );
7575

7676
var mesh = new THREE.Object3D()
7777

7878
mesh.add( new THREE.LineSegments(
7979

8080
new THREE.Geometry(),
8181

82-
new THREE.LineBasicMaterial({
82+
new THREE.LineBasicMaterial( {
8383
color: 0xffffff,
8484
transparent: true,
8585
opacity: 0.5
86-
})
86+
} )
8787

88-
));
88+
) );
8989

9090
mesh.add( new THREE.Mesh(
9191

9292
new THREE.Geometry(),
9393

94-
new THREE.MeshPhongMaterial({
94+
new THREE.MeshPhongMaterial( {
9595
color: 0x156289,
9696
emissive: 0x072534,
9797
side: THREE.DoubleSide,
9898
shading: THREE.FlatShading
99-
})
99+
} )
100100

101-
));
101+
) );
102102

103103
var options = chooseFromHash( mesh );
104104

@@ -112,9 +112,11 @@
112112

113113
var time = Date.now() * 0.001;
114114

115-
if( !options.fixed ) {
115+
if ( ! options.fixed ) {
116+
116117
mesh.rotation.x += 0.005;
117118
mesh.rotation.y += 0.005;
119+
118120
}
119121

120122
renderer.render( scene, camera );

docs/scenes/material-browser.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
@@ -40,11 +40,11 @@
4040

4141
<script>
4242

43-
document.getElementById('newWindow').href += window.location.hash;
43+
document.getElementById( 'newWindow' ).href += window.location.hash;
4444

4545
var gui = new dat.GUI();
4646
var scene = new THREE.Scene();
47-
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 50 );
47+
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 50 );
4848
camera.position.z = 30;
4949

5050
var renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -56,17 +56,17 @@
5656
scene.add( ambientLight );
5757

5858
var lights = [];
59-
lights[0] = new THREE.PointLight( 0xffffff, 1, 0 );
60-
lights[1] = new THREE.PointLight( 0xffffff, 1, 0 );
61-
lights[2] = new THREE.PointLight( 0xffffff, 1, 0 );
59+
lights[ 0 ] = new THREE.PointLight( 0xffffff, 1, 0 );
60+
lights[ 1 ] = new THREE.PointLight( 0xffffff, 1, 0 );
61+
lights[ 2 ] = new THREE.PointLight( 0xffffff, 1, 0 );
6262

63-
lights[0].position.set( 0, 200, 0 );
64-
lights[1].position.set( 100, 200, 100 );
65-
lights[2].position.set( -100, -200, -100 );
63+
lights[ 0 ].position.set( 0, 200, 0 );
64+
lights[ 1 ].position.set( 100, 200, 100 );
65+
lights[ 2 ].position.set( - 100, - 200, - 100 );
6666

67-
scene.add( lights[0] );
68-
scene.add( lights[1] );
69-
scene.add( lights[2] );
67+
scene.add( lights[ 0 ] );
68+
scene.add( lights[ 1 ] );
69+
scene.add( lights[ 2 ] );
7070

7171
guiScene( gui, scene, camera );
7272

examples/webgl_loader_msgpack.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<!--
33
Requires msgpack-js.js
44
@@ -22,7 +22,7 @@
2222
background: #1b1c1e;
2323
background-image: linear-gradient(#7d8fa3, #1b1c1e);
2424
}
25-
25+
2626
#info {
2727
color: #fff;
2828
position: absolute;
@@ -43,13 +43,13 @@
4343
</head>
4444
<body>
4545
<div id='info'>
46-
<p>Robo Pigeon, from <a href='http://www.tearsofsteel.org' target='_blank'>Tears of Steel</a>, is licensed under
46+
<p>Robo Pigeon, from <a href='http://www.tearsofsteel.org' target='_blank'>Tears of Steel</a>, is licensed under
4747
<a href='http://creativecommons.org/licenses/by/3.0/' target='_blank'>Creative Commons Attribution 3.0</a>.
4848
</p>
4949
</div>
5050
<div id='viewport'></div>
5151
<script>
52-
52+
5353
if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
5454

5555
requirejs.config( { baseUrl: 'js/libs' } );

examples/webgl_materials_nodes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<title>WebGL NodeMaterial</title>

0 commit comments

Comments
 (0)