p5-first-person-camera

1.0.4 • Public • Published

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgments

About The Project

A simple 3D scene

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

Just p5js!

Installation

  1. 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
  2. In Setup change canvas to WEBGL
    createCanvas(700, 500, WEBGL)
  3. Create a camera variable in Setup
    cam1 = createCamera()
  4. Call the firstPerson function in Draw passing the camera as an argument
    firstPerson(cam1)

(back to top)

Usage

Example Scene

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Ryan Gilmour - @morejpeg - ryanjamesgilmour@gmail.com

(back to top)

Acknowledgments

(back to top)

Readme

Keywords

Package Sidebar

Install

npm i p5-first-person-camera

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

6.64 kB

Total Files

3

Last publish

Collaborators

  • rjgmore