提交 cbfc1207 编写于 作者: W WestLangley

More-conventional lighting

上级 f54320f1
...@@ -65,11 +65,12 @@ ...@@ -65,11 +65,12 @@
// light // light
var dirLight = new THREE.DirectionalLight( 0xffffff ); var hemiLight = new THREE.HemisphereLight( 0xffffff, 0x000000 , 1 );
dirLight.position.set( 200, 200, 1000 ).normalize(); scene.add( hemiLight );
camera.add( dirLight ); var dirLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
camera.add( dirLight.target ); dirLight.position.set( 200, 200, 200 );
scene.add( dirLight );
var loader = new NRRDLoader(); var loader = new NRRDLoader();
loader.load( "models/nrrd/I.nrrd", function ( volume ) { loader.load( "models/nrrd/I.nrrd", function ( volume ) {
......
...@@ -46,11 +46,12 @@ ...@@ -46,11 +46,12 @@
// light // light
var dirLight = new THREE.DirectionalLight( 0xffffff ); var hemiLight = new THREE.HemisphereLight( 0xffffff, 0x000000, 1 );
dirLight.position.set( 200, 200, 1000 ); scene.add( hemiLight );
camera.add( dirLight ); var dirLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
camera.add( dirLight.target ); dirLight.position.set( 200, 200, 200 );
scene.add( dirLight );
var loader = new VRMLLoader(); var loader = new VRMLLoader();
loader.load( 'models/vrml/house.wrl', function ( object ) { loader.load( 'models/vrml/house.wrl', function ( object ) {
......
...@@ -41,11 +41,12 @@ ...@@ -41,11 +41,12 @@
// light // light
var dirLight = new THREE.DirectionalLight( 0xffffff ); var hemiLight = new THREE.HemisphereLight( 0xffffff, 0x000000, 1 );
dirLight.position.set( 2, 2, 10 ); scene.add( hemiLight );
camera.add( dirLight ); var dirLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
camera.add( dirLight.target ); dirLight.position.set( 2, 2, 2 );
scene.add( dirLight );
var loader = new VTKLoader(); var loader = new VTKLoader();
loader.load( "models/vtk/bunny.vtk", function ( geometry ) { loader.load( "models/vtk/bunny.vtk", function ( geometry ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册