Skip to content

Commit 28f6aae

Browse files
committed
enable slow rotation
1 parent 9e90c92 commit 28f6aae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

globe/globe.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,12 +562,11 @@ DAT.Globe = function(container, opts) {
562562

563563

564564
function onWindowResize( event ) {
565-
// this method fights with pinch zooming, needs to be disabled if pinch zooming
566-
if (pinchZoomEnabled) {
565+
// if (pinchZoomEnabled) {
567566
camera.aspect = container.offsetWidth / container.offsetHeight;
568567
camera.updateProjectionMatrix();
569568
renderer.setSize( container.offsetWidth, container.offsetHeight );
570-
}
569+
// }
571570
}
572571

573572
function zoom(delta) {
@@ -584,6 +583,9 @@ DAT.Globe = function(container, opts) {
584583
function render() {
585584
zoom(curZoomSpeed);
586585

586+
// Rotation
587+
target.x -= 0.001;
588+
587589
rotation.x += (target.x - rotation.x) * 0.1;
588590
rotation.y += (target.y - rotation.y) * 0.1;
589591
distance += (distanceTarget - distance) * 0.3;

0 commit comments

Comments
 (0)