Skip to content


Bye Bye Tween Cache

the tween cache is gone. it’s not necessary, it’s fast enough not to notice. The cache did nothing really.

Posted in Ajax Animator.


Auto-Canvas-Fixer/Fixes

I’ve created a sort of auto-rescue system. In case something weird happens, and the drawing editor fails to work, there is a quick fix. Just go to the tools toolbar and press ‘Reload Canvas’, it’ll save the state of the current frame, delete all instances of the canvas, reinitialize the editor, and load up the saved state.

Also, i’ve completely removed the “preload icons” stuff because it’s completely useless, and doesn’t work.

In other news, i’ve discovered a flaw in the whole tweening engine, and have no idea how to fix it (if i solve this, i may in turn solve the problem with converting a tween to keyframe). When you try creating a tween, all is well and smooth, until you try tweening a second time, then all things weird start happening.  Items are misplaced, shapes grow uncontrollably, weird things happen. I’m not at my main computer now, so i can’t investigate now.

I also have no idea to get values for tweening. Right now, the engine is flexible enough  to easily be modified to support features like rotation/transform tweening and color tweening.

Another big bug (annoying, not depriving of any features) is related with the tween cache. It caches generated tweens, so things speed up as everything’s loaded from a cache. Sadly, it doesn’t know when to reload the cache. and since the tweening engine is sooo much faster (it’s noticably faster), the effect of the cache is probably negligable and may be removed overall.

Also, looking at the YSlow scores (a good F, with a score of ~55 for the  build, and somewhere around 30 for the development version). I may have to do a bit better with the optimization. Knowing i rarely ever test outside localhost (have you ever noticed how fast that is?), its prone to lots of problems (that safari bug… for the longest time). Now, this is more rare, with everything generated by a more elegant compilier and better code. I guess I need to really consider CSS sprites more especially because of the kazillion new tools in the toolbox (i decided not to do this in the beginning because OnlyPaths was expanding so quickly when the toolbox was being built, I felt that there would be lots of new tools before the app got released… i was sorta right)

Posted in Ajax Animator.


Tweening Improvements + Beginnings of save format

oh yeah!
Sadly, one big problem is with editing tweens. It doesn’t work at all. I don’t know why. Ideally, when you edit a tween, it instantly becomes a keyframe (as expeted) and magic happens. Somehow, it’s not so.

The beginnings of the save format, horrendously codenamed “ALEON” is starting. Its remarkably simple actually. The implementation was, i don’t know, 10 lines (including whitespace), i’ll just post it here.

Ax.export_animation = function(){
var layers = {};
for(var layer in Ax.layers){
layers[layer] = {
keyframes: Ax.layers[layer].keyframes,
src: Ax.canvas_storage[layer]
}
}
return {
/*insert metadata here*/
layers: layers
}

it’s actually quite complete. Most things should work fine. I just gotta build a loader for it, which I expect to be similarly minimalistic.
}
oh, whoops! i left that curly brace all by its own :P

Posted in Ajax Animator.


Tweening!

Tweening works now!!!!

Posted in Ajax Animator.


Updates

I’ve reworked a large part of the tweening system. Now, tweens aren’t stored in the same object as keyframes, they actually aren’t ‘stored’ really at all. They are generated dynamically and placed into a tween cache. Along with this, the tween-cache can be cleared through a new toolbar option (acessible under tools)

Posted in Ajax Animator.


Back to the start.

I’ve decided to rework the tweening system. The entire animation system.

I designed it so any frame is editable. When you edit it, it becomes a keyframe automatically, and then everything magically tweens itself. Now it gets complex. What happens whne you edit a tween? How does that work?

Well, first of all, this is how the diff-system works. It gets two frames and compares every element, attribute by attribute for any differences. Any differences means its not the same thing, and it becomes a keyframe. Then during the tweening process, all those inbetween frames (tweens) are flagged a tween. When flagged a tween, the diff system just ignores them and jumps to the keyframe before them. So what if you edit a tween? Once the tween is recalculated, your changes are lost *forever*. So how do I fix this? I don’t know. I may have to make it so the frame is masked and blocks user-interaction, put a little warning up saying “omg! this is a tween!” or something.

Posted in Ajax Animator.


Subversion working!

great news! subversion works now! again! cool right?

Again, you can access the code repositry at http://ajaxanimator.googlecode.com/svn/trunk/ajaxanimator

if you haven’t noticed, i’ve changed the directory structure yet again! from Animator2 to ajaxanimator. so when I upload it to my server, there’ll be a nice human-readable url: ajaxanimator/build. not too complex, not too long, consise and informative. telling you that the app is the ajax animator, and you’re using the compiled version. Unlike the old one which was /Animator/html/ajaxanimator-compressed.htm where you have no idea what to call it…. is it simply “Animator” or “ajaxanimator”, okay, so its compressed. now what? There is random unnecessary repeatition of data, animator is in it twice, and htm==html…

I’ve also decided to change how I version things. Don’t worry, it’ll still be 0.2. But i’m not going to make the version subversion commit # / 100 anymore. I noticed that when I commit/build things, its not something I do very often. When i commit the most frequently, its when I’m doing nothing important, small fixes and such. So it throws it off. since it should ideally be valued by the amount of features added/improved and such… not by whether i remember to compile. So, now i’ll set the version numbers in my head, i’ll be 0.21 when I feel like it.

Posted in Ajax Animator.


Animation Playback/Pause Bookmarklet

in the new “beta” system, you can’t play animations you’ve created. Its supposed to be that when you press the Play button from the animation menu, you get flipepd over to the preview tab where yoru animation starts off. The player tab isn’t done yet, so there’s no way. Here is a bookmarklet hack that will let you automatically flip through the the first 10 frames at 10fps.

javascript:%28function%28%29%7BAx.controls.play%3Dfunction%28%29%7BAx.player%3DsetInterval%28function%28%29%7Bif%28Ax.tcurrent.frame%3C10%29%7BAx.controls.next%28%29%7Delse%7BAx.selectFrame%281%2CAx.tcurrent.layer%29%7D%7D%2C100%29%7D%3BAx.controls.stop%3Dfunction%28%29%7BclearInterval%28Ax.player%29%7D%7D%29%28%29

Just run the bookmarklet, and the Animation->Play/Pause buttons will magically start working.

In actual link form: Ax2 Enable Play/Pause

Posted in Ajax Animator.


More actually-working buttons!

the Animation menu-button-thingy-on-the-top-toolbar-i-dont-know-why-there-are-so-many-dashes-here-blah—-ahh—-aahhh————-meh now works mostly. So does the bottom toolbar/statusbar thing. you can do everything except jumping to frames, and going to the last.

Posted in Ajax Animator.


Updated Wrapper.js + Basic Animation

I was working on multi-frame support for the Ajax Animator but it didn’t work, so I looked at OnlyPaths again, and it turns out the loading mechanism has changed (no hacks!). Well, yeah… it’s great.

Of course, the most important thing is the support for basic (i mean really basic) animation…. So much that it’s almost impossible to consider it “animation”.

As in basic, there is no keyframe support, and the canvas behaves awkwardly. I guess it’d seem more normal if the canvas emptied itself every time a new frame was not loaded (he he…).

So… yeah. it’s pretty interesting…. The animation is stored in a variable named Ax.canvas_storage. it is a javascript object organized by Layer names and then by frames.

so an example of JSON export would be: {“Layer 1″:{“1″:[{.....},{.....}],”2″:[{.....}]}}
The Metadata component to the ALEON (or whatevery you want to call it) is not finalized yet. The ALEON format actually comprises of a blending between the Ax.layers object and the Ax.canvas_storage part.

 

Posted in Ajax Animator, OnlyPaths.