提交 b50726ac 编写于 作者: M Mr.doob

Improved raymarching example.

上级 dd1f7977
......@@ -272,7 +272,7 @@
window.open( canvas.toDataURL() );
},
freeCamera: false,
orbitControls: false,
resolution: '512'
};
......@@ -311,14 +311,11 @@
// Controls
controls = new THREE.OrbitControls( camera, canvas );
//controls.dragToLook = false;
//controls.rollSpeed = Math.PI / 12;
//controls.movementSpeed = 1;
// GUI
var gui = new dat.GUI();
gui.add( config, 'saveImage' ).name( 'Save Image' );
gui.add( config, 'freeCamera' ).name( 'Free Camera' );
gui.add( config, 'orbitControls' ).name( 'Orbit Controls' );
gui.add( config, 'resolution', [ '256', '512', '800', 'full' ] ).name( 'Resolution' ).onChange( onWindowResize );
stats = new Stats();
......@@ -332,7 +329,7 @@
stats.begin();
if ( config.freeCamera ) {
if ( config.orbitControls ) {
controls.update( delta );
......@@ -343,9 +340,6 @@
}
if ( camera.position.y < 0 ) camera.position.y = 0;
renderer.render( scene, camera );
stats.end();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册