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

gl-flyCamera

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gl-flyCamera

✈️ controls

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gl-flyCamera

✈️ controls

Installation

$ npm install gl-flyCamera

Example

controls = new flyCamera({
	domElement: document, // default: document
	movementSpeed: 100, // default: 10
	rollSpeed: Math.PI, // default: Math.PI / 3
	dragToLook: true, // default: false
	autoForward: true, // default: false
	paused: true, //default: false
	position: [1, 2, 5] //default: [0, 0, 0]
});
controls.start();

var lastTimeStamp = 0;
function renderLoop(timeStamp){
	var delta = timeStamp - lastTimeStamp;
	lastTimeStamp = timeStamp;

	controls.update(delta);
	var currentPosition = controls.position; //current camera position
	var currentOrientation = controls.quaternion; //current camera orientation
	/*

		...doing the actual rendering

	*/
	window.requestAnimationFrame(renderLoop);
}
window.requestAnimationFrame(renderLoop);

Badges

Keywords

FAQs

Package last updated on 03 Dec 2016

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