I've been messing around with putting interactive 3-dimensional graphics on the web and I think the current best technique, using open standards, is x3dom. It does require a fairly modern browser supporting HTML5.
I would like to be able to create a scene in object graphics and send this scene to the web. I've done similar things for sending scenes to POV-Ray for a ray-traced version of the scene or to create stereo anaglyphs of a scene. The same approach should work here.
Below is a static rendering of my example 3-dimensional object, the cow10.sav data set in the IDL distribution.
Below is my interactive w3dom version of the cow. (Use the left mouse button for rotation, the middle mouse button for translation, and the right mouse button for zooming.)
This is just a proof of concept right now; it only will work on simple graphics hierarchies containing only view, models, and polygons with basic properties, but I think this shows it can be done.
The code used to generate both renderings of the scene (not including the VISgrX3DOM destination class itself) is below.
view = obj_new('IDLgrView', name='view', color=[200, 200, 255])
model = obj_new('IDLgrModel', name='model')
view->add, model
cowFilename = filepath('cow10.sav', subdir=['examples', 'data'])
restore, cowFilename
cow = obj_new('IDLgrPolygon', x, y, z, polygons=polylist, $
color=[150, 100, 20])
model->add, cow
xmin = min(x, max=xmax)
xrange = xmax - xmin
ymin = min(y, max=ymax)
yrange = ymax - ymin
zmin = min(z, max=zmax)
zrange = zmax - zmin
light = obj_new('IDLgrLight', type=2, location=[-1., 1., 1.])
model->add, light
model->rotate, [0, 1, 0], -30
model->rotate, [1, 0, 0], 30
; render
dims = [640, 480]
win = obj_new('IDLgrWindow', dimensions=dims, title='Object graphics Cow')
win->setProperty, graphics_tree=view
win->draw
x3d = obj_new('VISgrX3DOM', filename='cow.x3d', dimensions=dims)
x3d->draw, view
obj_destroy, x3d