Tag Archives: tween.js

tween.js r14

tween.js r14 is really more of a “cleaning house” revision than anything else. No new features have been added, but the library should be a little bit more usable now and lead by example by using better code examples that aim to be efficient JS and CSS wise:

  • Include license header on the minified files too (hyandell)
  • Make examples more efficient by using requestAnimationFrame‘s own timer instead of calling Date.now again (Robert Eisele)
  • Make it explicit that you can install tween.js with npm and bower (sole)

As usual, you can download it/clone from github or install with npm:

npm install tween.js

And as a “new thing”, although it was always here, installing via bower is also possible:

bower install tween.js

You can also read more instructions and code samples on getting the library.

Cheers to whoever told me you could install any package using git with bower. I believe it was the magnificent Edna Piranha! So thanks Edna!

tween.js r13

tween.js r13 is a much expected update (I hope) that brings three little pieces of joy:

  • New onStop callback added, by colinsullivan
  • Fix _reversed yoyo flag bug, by deanm
  • And last but not least, the initial version of docs/user guide, by sole

And also available via npm:

npm install tween.js

While writing the docs I found myself wanting to show how to use custom functions, so I also wrote another example that demonstrates this. And wrote a few custom functions plus some functions to generate functions. It’s all so meta and I love it.

In future releases I’d like to start clearing out the list of issues—some issues are there for years and I’m not even sure how applicable they are, and at least they should be reconsidered.

Most specially I want to make things more robust and cohesive build/user experience-wise. Things such as integrating with travis to make sure the tests are run when a PR is submitted, make examples accessible/visible easily and also enable access to the examples source code in an easier way–I had this notion of maybe preparing some interactive editor sort of demo so people can play with tween.js without even downloading the library or going to codepen or jsfiddle or similar. Maybe moving all examples to that style too. I still have to think about that, but suggestions are welcome. Working example suggestions are even more welcome.

Also–if you think you can improve the documentation, feel free to go ahead and send patches. SEND ALL THE PATCHES, AND THANK YOU.

What have I been working on? (2014/02)

Looking at my todo.txt file, February has pretty much been my speaking-to-everyone month. I spoke to a lot of people from many different teams in Mozilla, and to a lot of people outside of Mozilla for interviews and conferences. Thankfully I also managed to sneak some coding time in it, and even some documenting time!
Continue reading

tween.js r12

Tween.js-ers of the world and interpolation aficionados rejoice!

Here’s tween.js r12: a release that brings you two bug fixes for quite specific circumstances (well spotted, guys!), better assets management for the repo and a C/C++ version for your very binary projects!

Or, copying from the changelog:

  • Fix bug with cached tweens.length value inside update() loop (freestlr)
  • Move assets and all examples and stuff to use the gh-pages branch, so things are always properly updated (sole).
  • Fix bug where chained tweens were not stopped if the previous tween had been stopped, under certain circumstances, by cfddream
  • Use tweens in C/C++ with libtween by jsm174!

It’s also in npm as tween.js, so you can do

npm install tween.js

Astute readers might have noticed the absence of an r11 post on this blog. That’s because it was a bit of a messy release, as I was utterly busy, and I forgot to tag it, forgot to add the file size to the change log, etc, etc. Hopefully it’ll get better from now on as I try to simplify the deploy process.

to_the_beat // js

As promised, I submitted an entry to the DemoJS party, held past week-end in Paris. It’s to_the_beat // js

to_the_beat // js

… and just in case you hadn’t figured it out already, it’s a sort of JavaScript version of the “native” to_the_beat that I wrote back in 2008. This time I replaced OpenGL 1.x and SDL with WebGL + WebAudio, via sorollet.js, three.js, and tween.js. The Holy Trinity! :-P

Hint: since it is using sorollet and everything is generated on the fly, you can bring up the synth GUI by pressing D while the demo is playing, and start twisting knobs which can be pretty satisfactory and hypnotic, because the player is configured to loop the song.

It ended at 4th position, which doesn’t sound bad… unless there were only four participants in the Demo Compo, that is! In any case, it was funny to watch the compos via the stream the organisers set up: mine definitely needed A LOT MORE of bandwidth, as shown:

to_the_beat // js streamed

I would have added some microphone to record the crowd reaction, as otherwise the experience was a bit sterile, but I don’t know if shouting Alleeeez is still in vogue amongst French demosceners anymore…

I will write about the conversion process and give the demo a page in my demoscene projects list later, but for now, just enjoy the demo! :-)