three-trackballcontrols
A module for using THREE.TrackballControls with nodejs
Setup and Installation
Installation
npm install three-trackballcontrols
or yarn add three-trackballcontrols
Usage
Using as module
Example was using three.js
+ three-trackballcontrols
inside of a very simple React app.
;; // Assumes there is a `camera` and `renderer` initialized.const controls = camera rendererdomElement; // Any manual camera changes should be done first, then update the controls.camerapositionz = 5;controls; const animate = { ; // Required for updating during animations. controls; renderer;};
Using with CDN / static hosted three.js
Example uses JSDelivr version, look up the latest URL for using with static hosting.
To-Dos
- Testing