Skip to content

greengiant83/aframe-seek-position-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Allows elements to be smoothly animated to a target position

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published