p5-First-Person-Camera
Add a first person camera to a WEBGL sketch to navigate the 3D scene with WASD/ArrowKeys and Mouse
View Demo
·
Report Bug
·
Request Feature
Table of Contents
About The Project
Built With
Getting Started
Prerequisites
Just p5js!
Installation
- Add this CDN to a script tag in your index.html file: https://cdn.jsdelivr.net/npm/p5-first-person-camera@1.0.1/FirstPersonCamera.js
- In Setup change canvas to WEBGL
createCanvas(700, 500, WEBGL)
- Create a camera variable in Setup
cam1 = createCamera()
- Call the firstPerson function in Draw passing the camera as an argument
firstPerson(cam1)
Usage
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Ryan Gilmour - @morejpeg - ryanjamesgilmour@gmail.com