luster-io/impulse
luster-io/impulse has 1,579 GitHub stars and 64 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-07 04:18 UTC. Last push 2015-06-12.
Dynamic Physics Interactions for the Mobile Web
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original#Impulse 
Create animations that flow naturally from the user's movements.
Rather than animating properties for a set amount of time, impulse takes a start position, end position, and velocity.
##example
var ball = Impulse(document.querySelector('.ball'))
.style({
translate: function(x, y) { return x + 'px, ' + y + 'px' },
})
//set a starting position
ball.position(50, 50)
ball.spring({ tension: 100, damping: 10 })
.to(100, 100).start()
More examples can be found here
##Installation
####Browserify
npm install impulse
####Bower
bower install impulse
Exposes a global called Physics
####Component
component install luster-io/impulse
####Manually
Get build/impulse.js or build/impulse.min.js from github.
<script src="/scripts/impulse.js"></script>
Exposes a global called impulse
##High Level Explanation
Calling Impulse on an element or set of elements returns an Impulse object.
A physics object maintains it's own position and velocity. You can interact
with a Impulse object (drag, pan, etc), and animate it. Animations take
the current position and velocity of the PhysicsObject as a starting point, and
animate to a user defined position.
This makes the animations flow naturally from the user's actions. For example a user can drag an element around. Once they're done dragging, the next animation will start from the position and velocity that they left off.
Documentation can be found here
#Contributing
Bug reports are extremely useful, if you think something's wrong, create an issue.
If there's an interaction you'd like to see, but you don't know if it's possible, please create an issue. Maybe we can find a way to build it!
#Discussion
There's also a place to ask questions, or get help here:
https://gitter.im/luster-io/impulse
##LICENSE MIT -- Read LICENSE
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,715 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,252 starsreact/react
The library for web and native user interfaces.
252,362 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,631 stars