0
votes

I'm having an issue where I can't properly set the trigger event for an animation

  • I have a cursor
  • It should animate itself when it is pointed at a specific entity
  • The property-value pair of "startEvents: fusing" within the animation attribute doesn't work, as well as other variations like "fuse" and "fused"

My a-frame version is 0.9.2

<a-camera position="0 3 0"
          wasd-controls 
          look-controls>

    <!-- Cursor (NOTE: having issues with animation here)-->
     <a-cursor fuse="true"
               fuse-timeout="250"
               position="0 0 -1"
               geometry="primitive: ring; 
                         radiusInner: 0.02; 
                         radiusOuter: 0.03"
               material="color: white; 
                         shader: flat;
                         opacity: 0.5"
               raycaster="objects: .clickable"
               scale="1 1 1"
               animation="startEvents: fusing;
                          property: scale;
                          from: 1 1 1;
                          to: 0.5 0.5 0.5;
                          dur: 500"
                                  >
                <a-circle radius="0.01"
                          color="white"
                          opacity="0.5"
                          material="shader:flat"></a-circle>

        </a-cursor>
</a-camera>


<a-entity class="orb clickable"
    id="orb0"
    scale="1 1 1"
    position="0 3 -6">  </a-entity>
1

1 Answers

0
votes

The cursor needs to be a child object of a camera element, like this:

<a-camera>
  <a-cursor animation="startEvents: fusing;...."></a-cursor>
</a-camera>

fusing should be working, also mouseleave will be helpful to change the cursor when you move it away from the object. Check it out in this fiddle.