Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.

UNLOCK LESSON

Premium Features

Download Video

Click and Drag Functionality

It's no doubt, a bit hard to hover over and view our country data while the globe (and everything attached to it) is spinning merrily along. A good solution to this: stop the automatic spinning, and implement a click and drag functionality.

Here we'll cover the theory behind creating a click and drag function, then implement it using a few new event listeners, something called delta, and a GSAP animation function.

Comments

Want to participate?

Create a free Chris Courses account to begin

Login
t
threejsHippie posted 4 years ago

we could apply OrbitControls and it would work just fine.

npm install three-orbitcontrols

import OrbitControls from "three-orbitcontrols";

const controls = new OrbitControls(camera, renderer.domElement);
controls.enableDamping = true;
controls.dampingFactor = 0.05;
controls.enableZoom = true;
0
E
Elenktik posted 4 years ago

Everthing worked so for, but this "duration" setting had no effect. And btw, you can also do gsap.set(group.rotation, group.rotation.offset)

0

Providing the lift to launch your development career

© 2026 Chris Courses. All rights reserved.