Skip to content

Commit 02842f7

Browse files
committed
Update 'webgl_mirror' to use ColorManagement.enabled = true
1 parent 2faa611 commit 02842f7

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

examples/webgl_mirror.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

4949
let groundMirror, verticalMirror;
5050

51+
THREE.ColorManagement.enabled = true;
52+
5153
init();
5254
animate();
5355

@@ -87,7 +89,7 @@
8789
clipBias: 0.003,
8890
textureWidth: window.innerWidth * window.devicePixelRatio,
8991
textureHeight: window.innerHeight * window.devicePixelRatio,
90-
color: 0x777777
92+
color: 0xb5b5b5
9193
} );
9294
groundMirror.position.y = 0.5;
9395
groundMirror.rotateX( - Math.PI / 2 );
@@ -98,7 +100,7 @@
98100
clipBias: 0.003,
99101
textureWidth: window.innerWidth * window.devicePixelRatio,
100102
textureHeight: window.innerHeight * window.devicePixelRatio,
101-
color: 0x889999
103+
color: 0xc1cbcb
102104
} );
103105
verticalMirror.position.y = 50;
104106
verticalMirror.position.z = - 50;
@@ -109,7 +111,7 @@
109111
scene.add( sphereGroup );
110112

111113
geometry = new THREE.CylinderGeometry( 0.1, 15 * Math.cos( Math.PI / 180 * 30 ), 0.1, 24, 1 );
112-
material = new THREE.MeshPhongMaterial( { color: 0xffffff, emissive: 0x444444 } );
114+
material = new THREE.MeshPhongMaterial( { color: 0xffffff, emissive: 0x8d8d8d } );
113115
const sphereCap = new THREE.Mesh( geometry, material );
114116
sphereCap.position.y = - 15 * Math.sin( Math.PI / 180 * 30 ) - 0.05;
115117
sphereCap.rotateX( - Math.PI );
@@ -124,7 +126,7 @@
124126
sphereGroup.add( halfSphere );
125127

126128
geometry = new THREE.IcosahedronGeometry( 5, 0 );
127-
material = new THREE.MeshPhongMaterial( { color: 0xffffff, emissive: 0x333333, flatShading: true } );
129+
material = new THREE.MeshPhongMaterial( { color: 0xffffff, emissive: 0x7b7b7b, flatShading: true } );
128130
smallSphere = new THREE.Mesh( geometry, material );
129131
scene.add( smallSphere );
130132

@@ -138,7 +140,7 @@
138140
planeBottom.rotateX( - Math.PI / 2 );
139141
scene.add( planeBottom );
140142

141-
const planeFront = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: 0x7f7fff } ) );
143+
const planeFront = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: 0xbbbbfe } ) );
142144
planeFront.position.z = 50;
143145
planeFront.position.y = 50;
144146
planeFront.rotateY( Math.PI );
@@ -157,7 +159,7 @@
157159
scene.add( planeLeft );
158160

159161
// lights
160-
const mainLight = new THREE.PointLight( 0xcccccc, 1.5, 250 );
162+
const mainLight = new THREE.PointLight( 0xe7e7e7, 1.5, 250 );
161163
mainLight.position.y = 60;
162164
scene.add( mainLight );
163165

@@ -169,7 +171,7 @@
169171
redLight.position.set( - 550, 50, 0 );
170172
scene.add( redLight );
171173

172-
const blueLight = new THREE.PointLight( 0x7f7fff, 0.25, 1000 );
174+
const blueLight = new THREE.PointLight( 0xbbbbfe, 0.25, 1000 );
173175
blueLight.position.set( 0, 50, 550 );
174176
scene.add( blueLight );
175177

0 commit comments

Comments
 (0)