提交 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();
}
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册