Comments (5)
If you chain animations it will do so automatically. Or if you start a new animation while another is running. In all other cases you have to store it yourself if you want to continue from where it ended.
Reading from CSS is difficult since the transform is stored as a 4x4 matrix.
Sorry if the documentation is unclear about this.
from snabbt.js.
Thanks for your answer!
Documentation is a bit un clear, I thought from_position: [0, 0, 0] or previous end state
meant you could specify something like 'end' so that snabbt automatically starts from previous end state.
The problem is if you don't chain your calls but want to move from previous state later on, there doesn't seem to be a way to do that other than poking into the matrix yourself.
from snabbt.js.
I've been thinking about this, it would be really nice if the library could keep the end state of previous finished animations. That would make for a much more pleasant user(as in library user) experience.
The problem is in scenarios when DOM elements are added/removed dynamically. I need to figure out a way to listen for DOM detach events so that when elements are removed, their saved end state is removed as well. Otherwise the list of finished end states will just keep growing.
Maybe I can iterate through all finished animation when new ones are started.
I'll test out some different solutions and see if it can be accomplished.
from snabbt.js.
Good thing you're working on it!
from snabbt.js.
If you try the latest build from master it should work the way you want.
from_position will have precendence over previous end state, I think it makes most sense.
It will be out with the next release which should be really soon. I just want to get the memory optimization out at the same time.
If you find more issues with the from_-properties, please post here and I'll reopen it again.
from snabbt.js.
Related Issues (20)
- Allow adding extra transforms to output HOT 3
- Nice work. HOT 1
- Add sane examples HOT 4
- Moving to ES6
- allDone and complete is not fired with duration: 0 HOT 5
- simple error report HOT 2
- Snabbt and Hammer.js HOT 1
- npm does not install all required dependecies HOT 3
- Stop callback HOT 2
- cubic-bezier easing HOT 1
- Manual mode code snippet
- Opacity with delay
- Don't work on iphone4 safari and some Android browsers. HOT 2
- Issue with animations seemlingly affecting one another
- Duration is broken for manual mode?
- Error: Cannot find module './utils.js from snabbt.js'
- safari 8
- Change naming scheme? HOT 1
- Remove animation from element
- Attention animations not fire complete and allDone event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snabbt.js.