Skip to content

Instantly share code, notes, and snippets.

@michaltakac
Created September 17, 2016 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaltakac/474f60e549b83970a06e711c48497025 to your computer and use it in GitHub Desktop.
Save michaltakac/474f60e549b83970a06e711c48497025 to your computer and use it in GitHub Desktop.
Loading Cursor in A-Frame
<!-- CURSOR ENTITY -->
<a-entity position="0 1.8 5">
<a-entity
id="camera"
camera
look-controls
rotation="0 0 0"
wasd-controls
>
<!-- MAIN CURSOR -->
<a-entity
cursor="fuse: true; maxDistance: 500; timeout: 3000;"
id="cursor-main"
position="0 0 -2"
geometry="primitive: ring; radiusOuter: 0.06; radiusInner: 0.03; thetaLength: 360; thetaStart: 90;"
material="color: #439DC2;"
>
<a-animation begin="cursor-fusing" attribute="geometry.thetaLength" fill="forwards" from="360" to="0" easing="ease-in"></a-animation>
<a-animation begin="mouseleave" attribute="geometry.thetaLength" fill="backwards" from="0" to="360" dur="0"></a-animation>
</a-entity>
<a-entity
id="cursor-loader"
position="0 0 -2.0001"
geometry="primitive: ring; radiusOuter: 0.06; radiusInner: 0.03;"
material="color: #2ADD2A;"
>
</a-entity>
</a-entity>
</a-entity>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment