Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including three-trackballcontrols with all npm packages installed. Try it out:

require("three/package.json"); // three is a peer dependency. var threeTrackballcontrols = require("three-trackballcontrols")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

three-trackballcontrols v0.0.8

A module for using THREE.TrackballControls with nodejs



Dependency Badge

A module for using THREE.TrackballControls with nodejs

Setup and Installation


  • Three.js installed via npm (npm install three)


npm install three-trackballcontrols


Assuminng that you're using three-trackballcontrols in the same code as three, all you have to do is require it right after three.

var THREE = require('three');
var TrackballControls = require('three-trackballcontrols');

And when you're setting up your camera:

this.controls = new TrackballControls(, this.renderBox );

Then you're off to the races!


  • Testing
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free