https://github.com/repcomm/three.lookcamera
A bare bones LookCamera and FreeCamera for three.js, comes with ts definitions
https://github.com/repcomm/three.lookcamera
Last synced: 8 months ago
JSON representation
A bare bones LookCamera and FreeCamera for three.js, comes with ts definitions
- Host: GitHub
- URL: https://github.com/repcomm/three.lookcamera
- Owner: RepComm
- Created: 2021-01-17T10:21:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-31T03:49:18.000Z (over 4 years ago)
- Last Synced: 2025-03-05T02:17:49.421Z (11 months ago)
- Language: TypeScript
- Size: 98.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# three.lookcamera
A look camera and freecamera for your three.js projects
Depends only on three.js
Comes with d.ts typescript definitions
Doesn't force you to use any weird input system
[Shameless plug if you need a procedural input lib](https://github.com/RepComm/gameinput-ts)
## Example
`npm install @repcomm/three.lookcamera`
```typescript
import { FreeCamera } from "@repcomm/three.lookcamera";
const freecam = new FreeCamera ();
scene.add( freecam );
// freecam.getCamera(); // for when you want to render with it
//game input loop
//move the camera, typically with WASD/arrow keys
freecam.addMovementInput( forwardDelta , sideDelta );
//rotate the camera, typically with the mouse
freecam.addRotationInput ( horizontalDelta, verticalDelta );
```