Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Popwers/jSpring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

jSpring

A lightweight and simple engine for incorporating spring physics into your JavaScript projects.

Table of Contents

How to use

Installation

You can install jSpring Engine using npm or yarn:

npm install jspring

or

yarn add jspring

Usage

import Spring from 'jspring';

const spring = new Spring({
    stiffness: 100,
    damping: 10,
    mass: 1,
    velocity: 0,
    position: 0,
    toValue: 100,
    onUpdate: (value) => {
      console.log(value);
    },
    onComplete: () => {
      console.log('Spring animation completed');
    },
});

API Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published