This code works properly in A-frame 0.8.0. But I cannot get camera rotation from EventListner in A-frame 0.8.2. Does anybody have solution?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="https://aframe.io/releases/0.8.2/aframe.min.js"> </script>
</head>
<body>
<a-scene>
<a-box color="tomato" position="0 0 -5"depth="2" height="4" width="0.5"></a-box>
<a-camera id="camera" ></a-camera>
</a-scene>
<script type="text/javascript">
var target = document.querySelector('[camera]');
target.addEventListener('componentchanged', function(event) {
console.log(target.getAttribute('rotation'));
});
</script>
</body>
</html>