Here are three of my entries for the 1K javascript contest. The goal is to make the most interesting demo in under 1024 bytes of javascript.
3D Model
The 3D Model was created in 3D Studio Max 9 then exported to wavefront OBJ format. Quads were used in favor of triangles to reduce the number of vertices. The 3D model was then tweaked to occupy as many whole numbers as possible then manually compressed using ASCII reference table. I left out the mouse for savings. Download the 3D Model here
SVG Alternative
I originally planned the 3D model to be a dataURI base64 encoded compressed SVG(z). The GZIP compression got it down to 690 bytes, unfortunately attempts to integrate it into the JS1k template failed:
- I tried base64 encoding the GZIPed SVG, but dataURI does not support content-encoding so thats a bust. (only works in Opera)
- I tried putting the SVG inside a getURL via flash actionscript (for it’s flash compression), but security permissions do not allow getURL to dataURI from another dataURI, unless I dynamically embed it with allowAccess attributes, but there goes my bytes.
Here is early an prototype of a 700 byte SWF file containing SVG version/projects/1k/3d/computer.swf