aframe-seek-position-component

1.0.0 • Public • Published

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');

Package Sidebar

Install

npm i aframe-seek-position-component

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • greengiant83