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

aframe-camera-events

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aframe-camera-events

A-Frame helper that emit events whenever the camera position / orientation changes.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

aframe-camera-events

A-Frame helper that emit events whenever the camera position / orientation changes.

Listens to changes in your camera's orientation and position and emits rotationChanged / positionChanged events respectively.

Installation

Add the following line to your html file, just after loading A-Frame:

<script src="https://rawgit.com/urish/aframe-camera-events/master/index.js"></script>

You can also get this component through npm:

npm install --save aframe-camera-events

Usage

Add the position-listener and / or rotation-listener components to your a-camera:

<a-camera id="my-camera" position-listener rotation-listener>
</a-camera>

You can then attach event listeners to your camera, e.g.:

document.getElementById('my-camera')
  .addEventListener('rotationChanged', e => {
    console.log('New rotation:', e.detail);
  });

License

MIT.

FAQs

Package last updated on 19 Apr 2018

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