I know a tad bit of javascript, but honestly, I'm not exactly an elegant programmer. I know my limitations so I propose a request to anyone wanting to try the API out and has no idea what to try...I propose this awesomely useful 'Perspective Box' tool from Inkscape. It's different from 3D effect in Xara in that it's constructed of simple quadralaterals with movable vanishing points. There's no realtime shading or much in the way of options, but the nice thing is that you can draw a LOT of boxes with the same vanishing points and it's very useful to set up a scene or quickly sketch out the form of an object you are drawing.

http://en.flossmanuals.net/inkscape/ch011_3d-box-tool/

If there's something that works like this already, I'm not aware of it...but if not, I'd like to again suggest for coders with an itch to try the API and no ideas to try, I think this one would be pretty useful.