I hate javascript did I ever tell you folks that?
Erstwhile, they also make monitors that support 3d directly IE you can look straight at the monitor and see 3d. The surface is patterned with a hologram in such a way that the viewing angle spatially separates the two viewing points of your eyes (IE it shows alternate images to each eye). This ONLY works on LCD's because of the precise layout of the pixels on the LCD. It also halves the vertical resolution for 3d images. Fortunately our eyes are more sensitive to horizontal than vertical resolution changes. The 2 images are displayed on alternate sets of lines for this to work. It's very simple the viewing angle is somewhat limited though. Normal images appear just that normal images. So having a window with a 3d image in it will work just fine (since both eyes get the same image with a normal image it won't appear 3d but flat).
The best method I can think of to perform that type of video rendering is to render to a buffer and update line for line to the main display. Oh well anyhow real 3d is doable without goofy glasses.
Cyb