Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<meta charset="utf-8">
<meta name="description" content="Hello, World! • A-Frame">
<script src=""></script>
<a-sphere position="0 1.25 -1" radius="1.25" color="#EF2D5E"></a-sphere>
<a-box position="-1 0.5 1" rotation="0 45 0" width="1" height="1" depth="1" color="#4CC3D9"></a-box>
<a-cylinder position="1 0.75 1" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
<a-plane rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-sky color="#ECECEC"></a-sky>
<a-entity position="0 0 3.8">
<a-camera id="camera" ></a-camera>
const scene = document.querySelector('a-scene');
if (scene.hasLoaded) {
} else {
scene.addEventListener('loaded', run);
function run() {
const p = document.querySelector("#camera");
p.addEventListener('componentchanged', function (evt) {
if ( === 'rotation') {
console.log('Entity has rotated from', evt.detail.oldData, 'to', evt.detail.newData, '!');

This comment has been minimized.

Copy link
Owner Author

i3games commented Jan 27, 2017

default scene with static camera entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.