https://github.com/iondrimba/threejs-controls
Threejs Controls as modules (from examples folder)
https://github.com/iondrimba/threejs-controls
amd commonjs controls first-person modules orbit-control orthographic pointerlock threejs trackball umd-modules vr
Last synced: 8 months ago
JSON representation
Threejs Controls as modules (from examples folder)
- Host: GitHub
- URL: https://github.com/iondrimba/threejs-controls
- Owner: iondrimba
- License: mit
- Created: 2017-11-05T17:24:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-02T16:04:18.000Z (about 8 years ago)
- Last Synced: 2025-03-14T20:48:50.452Z (11 months ago)
- Topics: amd, commonjs, controls, first-person, modules, orbit-control, orthographic, pointerlock, threejs, trackball, umd-modules, vr
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Threejs Controls as modules using UMD (Universal Module Definition)
This project aims to make it easier to work with controls as modules instead of having to manually copy the files from the examples/controls folder.
#### Install
```sh
npm i --save threejs-controls
```
or
```sh
yarn add threejs-controls
```
### Usage
#### AMD
```js
define(['threejs-controls/EditorControls'], function(EditorControls) {
var control = new EditorControls(parameters);
});
```
#### CommonJS
```js
var EditorControls = require('threejs-controls/EditorControls');
var control = new EditorControls(parameters);
```
#### ES6 imports
```js
import EditorControls from 'threejs-controls/EditorControls';
const control = new EditorControls(paramenters);
```
### Includes
* DeviceOrientationControls
* DragControls
* EditorControls
* FirstPersonControls
* FlyControls
* OrbitControls
* OrthographicTrackballControls
* PointerLockControls
* TrackballControls
* TransformControls
* VRControls
### Tested Controls
* EditorControls
* OrbitControls
* TrackballControls
* TransformControls
### TODO
* Test the remaining controls