<!DOCTYPE html>
<html>
  <head>
    <title>Event Set - 01</title>
    <script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
    <script src="https://unpkg.com/aframe-environment-component/dist/aframe-environment-component.min.js"></script>
    <script src="https://unpkg.com/aframe-event-set-component@4.2.1/dist/aframe-event-set-component.min.js"></script>
    <script src="../js/livecode.js"></script>
  </head>
  <body>
    <a-scene cursor="rayOrigin: mouse" environment="preset: tron; playArea: 10">
      <a-box id="box1" position="-1.5 1.6 -3" color="yellow"></a-box>
      <a-box id="box2" position="0 1.6 -3" color="yellow"></a-box>
      <a-box id="box3" position="1.5 1.6 -3" color="yellow"></a-box>

      <a-box
        color="red"
        position="-0.5 1.6 -1"
        width="0.1"
        height="0.1"
        depth="0.1"
        event-set__click1="_event: click; _target: #box1; color: red;"
        event-set__click2="_event: click; _target: #box2; color: red;"
        event-set__click3="_event: click; _target: #box3; color: red; height: 2"
      ></a-box>
      <a-box
        color="blue"
        position="0.5 1.6 -1"
        width="0.1"
        height="0.1"
        depth="0.1"
        event-set__click1="_event: click; _target: #box1; color: blue;"
        event-set__click2="_event: click; _target: #box2; color: blue;"
        event-set__click3="_event: click; _target: #box3; color: blue; height: 1"
      ></a-box>
    </a-scene>
  </body>
</html>