Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

basic-camera

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-camera

A very basic camera for use in WebGL projects

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

basic-camera experimental

A very basic camera for use in WebGL projects. Borrows a lot from mikolalysenko's orbit-camera module.

basic-camera

Usage

camera = require('basic-camera')([pos])

Creates a new camera: optionally, you can pass in pos to set the initial position.

camera.position

A gl-matrix vec3 representing the position of the camera. It's array-like, so you can just set the [0], [1] and [2] indices to change the position.

camera.rotateX(radians)

Rotates the camera along the x-axis by radians.

camera.rotateY(radians)

Rotates the camera along the y-axis by radians.

camera.rotateZ(radians)

Rotates the camera along the z-axis by radians.

camera.view([output])

Returns a new gl-matrix mat4, which you can then safely pass onto something like gl-shader to handle the camera.

FAQs

Package last updated on 08 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc