Simple comparison of a compute task using two serial methods and a parallel webworker method. The Webworker version spawns 2 workers and should be faster in most browsers.
ComputeTest.js -base task
SerialTest.js -serial task
TimeoutTest.js -serial task using timeouts
WebworkerTest.js -parallel webworker task
Worker.js -actual worker code
Common.js -common helper code
Build a random colormap for coloring nominal values in the Paraview visualization tool. Creates colormap values in HSV, converts to RGB, then generates the XML. Also creates a preview of the colormap in browser.
Paint an apartment
This is a way to view a series of images. As the user moves through the list of images, they fade in and out, as if looking through a stack of pictures. This could be combined with the effect below to create a flip-book of pictures.This doesn't work quite right in Safari, but it still looks good.
fademages.js (requires DOM animation)
This simulates the perspective of a picture turning like a book page. This effect is accomplished by using CSS borders to create white triangles which mask the image. This doesn't work in IE (6- no transparent borders) or Safari (2.0.4- no box-model).
perspective.js (requires DOM animation)
Simple DOM animation
A simple framework for animating DOM objects. Given a CSS property, a start and end value, and a duration, it provides an animation. Also comes with some code to track objects across intervals and timeouts.
animator.js - animation script
interval_state.js - interval/timeout object tracer
This script adds a drop shadow to images. It finds all images that are marked to be shadowed. It then builds a DOM structure to represent the shadows and places it 'behind' each image.
Drag an HTML element
This uses CSS attributes to let you move website objects around. It should work pretty good for smaller objects, but larger things may skip around a little. This code is known to work in Mozilla (any version), Opera 7+, and IE 5+.
Drawing with divs
This lets you draw with your mouse kinda. It uses some of the code from the dragging script. The drawing code is incredibly inefficient and horrible to look at. Sorry. This requires a browser that can do stylesheets and some DOM stuff.
Still waiting for the CSS text-shadow property? This script creates a fake text shadow on
span elements by cloning them and changing their colors. Cheap, but gets the job done (mostly).
Mouse over images
Changes an image when the mouse goes over it. This also shows how to change images when they are clicked on.