提交 a21fd992 编写于 作者: B Ben Houston

add a ground plane to make it obvious there is a spot light on the object.

上级 6c6f566c
......@@ -124,6 +124,22 @@
torusMesh1.position.x = 0.0;
scene.add( torusMesh1 );
objects.push( torusMesh1 );
var floorMaterial = new THREE.MeshStandardMaterial( {
map: null,
roughnessMap: null,
color: 0xffffff,
metalness: 0.0,
roughness: 0.0,
envMap: pmremCubeUVPacker.CubeUVRenderTarget,
shading: THREE.SmoothShading
});
var planeGeometry = new THREE.PlaneBufferGeometry( 200, 200 );
var planeMesh1 = new THREE.Mesh( planeGeometry, floorMaterial );
planeMesh1.position.y = -50;
planeMesh1.rotation.x = -Math.PI * 0.5;
scene.add( planeMesh1 );
} );
// Lights
......@@ -133,6 +149,7 @@
var spotLight = new THREE.SpotLight( 0xffffff );
spotLight.position.set( 10, 100, 10 );
spotLight.angle = Math.PI/10;
spotLight.penumbra = 0.2
scene.add( spotLight );
renderer = new THREE.WebGLRenderer( { alpha:true, antialias: false } );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册