1.0.0 • Published 6 years ago

aframe-physics-spring v1.0.0

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

aframe-physics-spring

Cannon.js spring class encapsulated in a AFRAME.component

Requirements

aframe physics system aframe

Usage

<script src="https://cdn.rawgit.com/gftruj/aframe-physics-spring/master/dist/aframe-spring.min.js"></script>
....
<a-box id="one" static-body></a-box>
<a-box spring="target: #one"></box>

Attributes

spring="target: #entity; restLength: 1; damping: 100; stiffness: 1"

target - the other end of the spring restLength - spring length when no forces applied damping - how much can it stretch stiffness - how much will it suppress the force

Example

glitch example