Skip to content

Commit aee12bb

Browse files
committed
Improved examples.
1 parent d2bbdef commit aee12bb

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

examples/webgl_lights_physical.html

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
var params = {
8787
shadows: true,
8888
exposure: 0.68,
89-
bulbPower: Object.keys( bulbLuminousPowers )[2],
89+
bulbPower: Object.keys( bulbLuminousPowers )[ 4 ],
9090
hemiIrradiance: Object.keys( hemiLuminousIrradiances )[0]
9191
};
9292

@@ -107,7 +107,7 @@
107107
camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.1, 100 );
108108
camera.position.x = -4;
109109
camera.position.z = 4;
110-
camera.position.y = 3;
110+
camera.position.y = 2;
111111

112112
scene = new THREE.Scene();
113113

@@ -183,24 +183,18 @@
183183
} );
184184

185185
ballMat = new THREE.MeshStandardMaterial( {
186-
roughness: 0,
187-
metalness: 0.0,
188-
color: 0xffffff
186+
color: 0xffffff,
187+
roughness: 0.5,
188+
metalness: 1.0
189189
});
190190
textureLoader.load( "../examples/textures/planets/earth_atmos_2048.jpg", function( map ) {
191-
map.wrapS = THREE.RepeatWrapping;
192-
map.wrapT = THREE.RepeatWrapping;
193191
map.anisotropy = 4;
194-
map.repeat.set( 1, 1 );
195192
ballMat.map = map;
196193
ballMat.needsUpdate = true;
197194
} );
198195
textureLoader.load( "../examples/textures/planets/earth_specular_2048.jpg", function( map ) {
199-
map.wrapS = THREE.RepeatWrapping;
200-
map.wrapT = THREE.RepeatWrapping;
201196
map.anisotropy = 4;
202-
map.repeat.set( 1, 1 );
203-
ballMat.roughnessMap = map;
197+
ballMat.metalnessMap = map;
204198
ballMat.needsUpdate = true;
205199
} );
206200

@@ -210,9 +204,10 @@
210204
floorMesh.rotation.x = -Math.PI / 2.0;
211205
scene.add( floorMesh );
212206

213-
var ballGeometry = new THREE.SphereGeometry( 0.1213, 32, 32 );
207+
var ballGeometry = new THREE.SphereGeometry( 0.5, 32, 32 );
214208
var ballMesh = new THREE.Mesh( ballGeometry, ballMat );
215-
ballMesh.position.set( 1, 0.1213, 1 );
209+
ballMesh.position.set( 1, 0.5, 1 );
210+
ballMesh.rotation.y = Math.PI;
216211
ballMesh.castShadow = true;
217212
scene.add( ballMesh );
218213

examples/webgl_tonemapping.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
77
<style>
88
body {
9-
color: #000;
9+
color: #fff;
1010
font-family:Monospace;
1111
font-size:13px;
1212
text-align:center;
@@ -17,7 +17,7 @@
1717
overflow: hidden;
1818
}
1919

20-
a { color: #222 }
20+
a { color: #ff2 }
2121

2222
#info {
2323
position: absolute;

0 commit comments

Comments
 (0)