Skip to content

demo3d/aframe-crawling-cursor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crawling Cursor

An A-Frame component to move cursor along object's surface.

DEMO PAGE (link)

DEMO

API

Property Description Default Value
target selector(#id) of a cursor null

Usage

1.add id on cursor object.

<a-cursor id="my-cursor"></a-cursor>

2.add raycaster component and crawling-cursor component with a target cursor selector on camera object.

<a-camera raycaster crawling-cursor="target: #my-cursor"></a-camera>

note: If you want some object to avoid intersection, add ignore-ray class to them.

<!-- cursor will not be along with this box -->
<a-box class="ignore-ray"></a-box>

Installation

browser

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.3.0/aframe.min.js"></script>
  <script src="https://cdn.rawgit.com/jujunjun110/aframe-crawling-cursor/master/dist/aframe-crawling-cursor.min.js"></script>
</head>

<body>
  <a-scene>
    <a-cursor id="my-cursor"></a-cursor>
    <a-camera raycaster crawling-cursor="target: #my-cursor"></a-camera>
  </a-scene>
</body>

npm

Install via npm:

$npm install aframe-crawling-cursor

Then register and use.

require('aframe');
require('aframe-crawling-cursor');

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.8%
  • HTML 0.2%