Skip to content

Commit e26ff19

Browse files
authored
Examples: Add sky to scene. (mrdoob#33037)
1 parent 8356932 commit e26ff19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/webgl_animation_keyframes.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
// Sky
6969

7070
const sky = new Sky();
71+
sky.scale.setScalar( 10000 );
72+
scene.add( sky );
7173

7274
const uniforms = sky.material.uniforms;
7375
uniforms[ 'turbidity' ].value = 0;
@@ -78,7 +80,6 @@
7880

7981
const pmremGenerator = new THREE.PMREMGenerator( renderer );
8082
const environment = pmremGenerator.fromScene( sky ).texture;
81-
scene.background = environment;
8283
scene.environment = environment;
8384

8485
const camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 100 );

0 commit comments

Comments
 (0)