Ugh. Surely thats what CSS transforms and transitions are for. Javascript animations should be a last resort...
Spin.js, a pure JS spinner
21–30 of 70 posts
Re: Spin.js, a pure JS spinner
#22Re: Spin.js, a pure JS spinner
#23Ugh. Surely thats what CSS transforms and transitions are for. Javascript animations should be a last resort...
The DOM for the spinner is created with Javascript, but the spinning is entirely CSS.
Re: Spin.js, a pure JS spinner
#24Re: Spin.js, a pure JS spinner
#25I think the possibility of dynamically changing the speed of the spinner is interesting. If your spinner was representing a file upload, for example, you could conceivably adjust the speed based on the current upload rate.
Re: Spin.js, a pure JS spinner
#26A spinner generated from http://www.ajaxload.info/ is 673 bytes. The minified javascript from this is ~3K. I suppose the trade off is features and flexibility, but I don't find myself needing much out of my ajax spinners.
http://www.w3schools.com/html5/html5_form_input_types.aspRe: Spin.js, a pure JS spinner
#27I hate to be that guy but this takes up 45% cpu under firefox for a simple spin animation.
Re: Spin.js, a pure JS spinner
#28It was spinning very slowly, but the Mango update supports CSS3 well it seems.
Re: Spin.js, a pure JS spinner
#29Earlier quoted context omitted.
It's not like animating a gif doesn't use up CPU cycles.
I accidentally upvoted you (trying to view your profile, I dont have downvote privileges). The CPU use of just about any GIF spinner is trivial compared to this, even in the browser this runs best in. Sure its a solid enough concept , but not something that'd you actually use in practice yet.
EDIT:
It also seems the actual spinning is done with CSS, not JS
Re: Spin.js, a pure JS spinner
#30I think the possibility of dynamically changing the speed of the spinner is interesting. If your spinner was representing a file upload, for example, you could conceivably adjust the speed based on the current upload rate.
Doesn't that defeat the purpose, though? Progress indicators are designed to make you think things are going faster than they are. If you want to display accurate information, why not just display it?
Says who? I think progress indicators are intended to communicate more-granular details about the true progress towards some goal ... hence their name.