Skip to content

namgo/aframe-camera-listener-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DON'T USE THIS!

as per @dmarcos's suggestion:

you can listen for the componentchanged event. cameraEl.addEventListener('componentchanged', function (evt) { var componentName = evt.detail.name; if (componentName === 'rotation' || componentName === 'position') { your code } });

aframe-camera-listener-component

Version License

Listen to changes made to the camera and execute a function when a change happens

For A-Frame.

API

Property Description Default Value

Installation

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-camera-listener-component/dist/aframe-camera-listener-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity camera-listener="foo: bar"></a-entity>
  </a-scene>
</body>

npm

Install via npm:

npm install aframe-camera-listener-component

Then require and use.

require('aframe');
require('aframe-camera-listener-component');

About

Aframe component to listen camera movement

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published