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

three-trackballcontrols

NPM

Dependency Badge

A module for using THREE.TrackballControls with nodejs

Setup and Installation

Pre-requisites

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

Installation

npm install three-trackballcontrols

Usage

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.camera, this.renderBox );

Then you're off to the races!

To-Dos

  • 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