<script src="https://eminet666.github.io/ensaama/components/debug/debug.js"></script>
<a-entity id="debug-cursor"
raycaster="objects: .collidable"
cursor="rayOrigin: mouse"
debug-cursor="detect: #boite-click-test, #boule-mouseenter-test2; log: false">
</a-entity>
<a-scene debug-keyboard="key: r, t; event: test, hello2; target: #boite, #boule">
<a-box id="boite" tourne="angle: 30"></a-box>
AFRAME.registerComponent('tourne', {
init: function () {
el = this.el;
document.addEventListener('test', evt => {
el.setAttribute('rotation', '0 45 0');
});
}
});
<!-- définition du fuse -->
<a-entity raycaster="objects: .collidable" cursor="fuse: true; fuseTimeout: 500" position="0 0 -1"
geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03"
material="color: black; shader: flat; opacity: 0.5">
</a-entity>
<a-box id="boite" class="collidable" position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"
debug-fuse="event: test" random-color></a-box>
<a-entity id="left" raycaster="objects: .collidable; far:100;"
oculus-touch-controls="hand: left"
debug-hands="trace: true;
action: xbuttondown, xbuttonup;
event: Xdown, Xup;
target: #boite, #boite;"></a-entity>