0.1.0 • Published 7 years ago

aframe-physics-lerp-component v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

aframe-physics-lerp-component

A Physics Lerp component for A-Frame.

API

PropertyDescriptionDefault Value
targetPositionA THREE.Vector3 object representing the target position0, 0, 0
targetQuaternionA THREE.Quaternion object representing the target quaternion0, 0, 0, 0
targetVelocityA THREE.Vector3 object representing the target velocity0, 0, 0
targetAngularVelocityA THREE.Vector3 object representing the target angularVelocity0, 0, 0
timeTime to complete the interpolation in milliseconds100

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="//cdn.rawgit.com/donmccurdy/aframe-physics-system/v2.0.0/dist/aframe-physics-system.min.js"></script>
  <script src="https://rawgit.com/protyze/aframe-physics-lerp-component/master/dist/aframe-physics-lerp-component.min.js"></script>
</head>

<body>
   <a-scene physics="debug:true">
        <a-assets></a-assets>
        <a-box id="box1" dynamic-body material="color: #ff0000"></a-box>
        <a-box id="box2" dynamic-body material="color: #0000ff" physics-lerp="...Properties..."></a-box>
   </a-scene>
</body>

npm

Install via npm:

npm install aframe-physics-lerp-component

Then register and use.

require('aframe');
require('aframe-physics-lerp-component');