提交 a1285b36 编写于 作者: W WestLangley

Limit zooming

上级 b3444502
......@@ -164,7 +164,10 @@
function onDocumentMouseWheel( event ) {
camera.fov += event.deltaY * 0.05;
var fov = camera.fov + event.deltaY * 0.05;
camera.fov = THREE.Math.clamp( fov, 10, 75 );
camera.updateProjectionMatrix();
}
......
......@@ -172,7 +172,10 @@
function onDocumentMouseWheel( event ) {
camera.fov += event.deltaY * 0.05;
var fov = camera.fov + event.deltaY * 0.05;
camera.fov = THREE.Math.clamp( fov, 10, 75 );
camera.updateProjectionMatrix();
}
......
......@@ -156,7 +156,10 @@
function onDocumentMouseWheel( event ) {
camera.fov += event.deltaY * 0.05;
var fov = camera.fov + event.deltaY * 0.05;
camera.fov = THREE.Math.clamp( fov, 10, 75 );
camera.updateProjectionMatrix();
}
......
......@@ -142,7 +142,10 @@
function onDocumentMouseWheel( event ) {
camera.fov += ( event.deltaY * 0.05 );
var fov = camera.fov + event.deltaY * 0.05;
camera.fov = THREE.Math.clamp( fov, 10, 75 );
camera.updateProjectionMatrix();
}
......
......@@ -98,7 +98,7 @@
var texture = new THREE.TextureLoader().load( 'textures/ricoh_theta_s.jpg' );
texture.format = THREE.RGBFormat;
var material = new THREE.MeshBasicMaterial( { map: texture } );
var material = new THREE.MeshBasicMaterial( { map: texture } );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
......@@ -163,6 +163,8 @@
distance += event.deltaY * 0.05;
distance = THREE.Math.clamp( distance, 400, 1000 );
}
function animate() {
......
......@@ -169,7 +169,10 @@
function onDocumentMouseWheel( event ) {
camera.fov += event.deltaY * 0.05;
var fov = camera.fov + event.deltaY * 0.05;
camera.fov = THREE.Math.clamp( fov, 10, 75 );
camera.updateProjectionMatrix();
}
......
......@@ -146,6 +146,8 @@
distance += event.deltaY * 0.05;
distance = THREE.Math.clamp( distance, 400, 500 );
}
function animate() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册