Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.64 KB

README.md

File metadata and controls

54 lines (39 loc) · 1.64 KB

aframe-seek-position-component

Version License

Animates elements to a target position. It uses linear interpolation to "ease" the element to its target position. It is smart enough to stop calculating animations once the element has reached its target. Target positions can be updated at any time and the element will start heading for its new destination. To use

For A-Frame.

Installation

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-seek-position-component/dist/aframe-seek-position-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity seek-position="0 1 34"></a-entity><!-- seek-position takes a vector3 world position as input -->
  </a-scene>
</body>

npm

Install via npm:

npm install aframe-seek-position-component

Then require and use.

require('aframe');
require('aframe-seek-position-component');