Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anvaka/three.fly
Three.js fly controls as common js module
https://github.com/anvaka/three.fly
Last synced: 24 days ago
JSON representation
Three.js fly controls as common js module
- Host: GitHub
- URL: https://github.com/anvaka/three.fly
- Owner: anvaka
- License: mit
- Created: 2014-05-14T06:57:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-13T08:14:37.000Z (almost 8 years ago)
- Last Synced: 2024-10-12T12:06:50.056Z (about 1 month ago)
- Language: JavaScript
- Size: 195 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# three.fly
This is adoptation of three.js [FlyControls](http://threejs.org/examples/#misc_controls_fly)
to common js module, with major rewrite of internal structure.# usage
``` js
// 1. Create fly controls:
// container is a DOM element where you want to receive input
// e.g.: document.body
// THREE is a main namespace of three.js
var fly = require('three.fly');
var controls = fly(camera, container, THREE);// 2. Inside your update scene loop (e.g. inside requestAnimationFrame()):
controls.update(1); // `1` is time delta.
```# install
With [npm](https://npmjs.org) do:
```
npm install three.fly
```# license
MIT