somewhere to talk about random ideas and projects like everyone else

stuff

WebWorkers + Canvas + Glif + GIFEncoder = Client Side Animated Gif Generation 18 August 2009

With my super awesome PHP->JS compiler that I made for Freemovie/JS, I ported GIFEncoder (the second of 2 parts of the Ajax Animator which requires a server). So with this I’m really going to be “building on the shoulder’s of giants”, since all these individual components were made by other people, I’m just mixing them up in a somewhat creative manner.

Though since Glif only supports monochrome, and I’m not aware of any browser supporting canvas.toDataURL(“image/gif”).

So after this awesome experimentation and my system for merging multiple GIF images into a single animated gif which is yet to be tested for reasons I will detail later.

So I made it and it was cool, and then I added webworkers support, but then I realized the issue isn’t that you need webworkers, but that there was an infinite loop. Fixed it and then it works fine except for the fact that it doesn’t.

So if you want to rip it’s insides apart and try salvaging the disaster, go to http://antimatter15.com/misc/canvasfail/giftest.htm


Freemovie/JS Pure Javascript SWF Generator 17 August 2009

I’m making a crude python script that translates PHP to JS rather hideously. It probably will not work on any other codebase. It was a script quickly hacked together to one purpose.

Freemovie is

FreeMovie is an SWF generator library written in PHP and ported to Ruby. FreeMovie can be used to develop Web and desktop aplications. Speaking of the Ruby port, I can’t find it. So if anyone finds it, I think it might be useful somewhere. Found it in the CVS, it’s really incomplete compared to the PHP version.

The machine translated code (Not entirely autogenerated, I wrote a line or two of it) is not too hideous, the tabbing is slightly off, but it’s at least mostly readable. It was a lot worse 2 hours ago (half of the lines had indentation, other without any, debugging comments everywhere saying useless and distracting things).

The translator is only 107 lines of (hideous code, though the language is beautiful, I guess if you loved JS enough, you could try running the program though skulpt) python (+ 20 or so in another file to change chr() to String.fromCharCode, etc). After that, it uses 6 PHP compatibility functions and 5 from the PHP.js project to cover the features that I’m too lazy to put in the compiler or are just not features in JS.

http://antimatter15.com/misc/freemovie/js/demo/fm-demo-0.htm

The above demo generates a flash image entirely client-side, though the resulting base64 encoded data is sent to be decoded on the server since you can’t load a SWF from a data-url. If someone finds out how, it would be cool to tell me.

A big issue though, is that for some odd reason half the shapes don’t work. The ones in the demo work, but all filled shapes, and the circles/arcs do not work.


Wave2 A higher level Wave Gadget State API 17 August 2009

I was working on a new little Wave State API update. It supports lists in the form of subkeys, and something very much like hierarchy and events on specific sub-nodes. This way you don’t have everything update (someone’s edits on frame 36 doesn’t matter if you’re on frame 42).

Everything is namespaced under a singleton global, wave2. It includes functions like

  • listen (execute a callback when something beginning with the prefix is changed)
  • ignore (un-listen),
  • keys (shortcut for wave.getState().getKeys()),
  • subkeys (get keys which begin with a certain prefix, important to the pseudo hierarchy),
  • set (submitdelta with first arg as name and second as value),
  • get (shortcut for wave.getState().get()
  • reset_gadget (a simple way to empty all the data in the store) And since it’s quite short, I’m putting it under public domain at http://antimatter15.com/misc/wave/wave2.js

Ajax Animator Status 17 August 2009

It’s certainly hit a milestone with the current set of modifications, IMO, it’s now, finally, after 3 years of development (Actually, nothing happened the past year), what I had envisioned. The first parts of my April 7th, 2007 post on Liveswiffers.org.

I am working on a project to make an open-source browser based Flash Authoring system.

….. The idea is to make an animation on the site, save to the site’s server, and continue working on it later. Later being able to publish it and be sort of a YouTube for Flash Animations/Applications. Another aim of this project is to be next-gen software, sure there are about 10 open source multiplatform C++ based flash IDEs out there, but none of them truely [sic] represend [sic] the future of software, or true platform independence. Another interesting fact is that I didn’t know what YouTube was until Google bought it. But with the idea for a “YouTube for animations”, is totally possible with the new infrastructure provided by Google Wave. People can mark their waves containing the gadget as with:public, and people could search, comment, and improve animations (Though I was thinking initially on a more opensource software-like fork system, than a wiki type system which Wave is, and I’m not certain how this will work out with in the evils called the “real world” since now, Wave is still just a theory).

What has it done which makes me think it’s reached this milestone? Well, finally, I can make stick figures and animate them as they were meant to be animated. Having multiple layers with visibility now works, and now it supports most of the beloved and mostly efficient workflow of the Flash IDE - or at least to a beginner like I was, and still am.


Visible/Invisible Frames 15 August 2009

New feature, only available at this random fork of the codebase as of yet.

Visible/Not Visible

Since Silk doesn’t have an icon for eye_closed.png, everyone has to suffer by seeing my artwork! muah ha ha ha….