3dCAD, continued
This is a continuation of my thoughts regarding a browser-based 3D CAD app. For my first post, see this link.
In the comments of my last post, I was alerted to a FireFox plugin called Canvas:3D. I tried for several days to get it to work, but was not able to. Opera also has a canvas-3D implementation; however, it requires one to download the windows version, which alas I do not have.
Both of the above have advantages/disadvantages:
- Advantages: offers hardware acceleration; based on/wrap-around of OpenGL.
- Disadvantages: user needs to use specific browser and download specific plugin, in the case of FireFox; also, none of the plugins work on linux.
I came across a cool 3D molecule rendering app using JS and (sometimes) canvas. It’s based on the dojox.dfx, a cross-platform vector graphics API which provides a layer of abstraction for doing graphics. This is a paragraph from their description:
“GFX helps to isolate your application from the many native vector graphics implementation differences across all modern Browsers. It does this by detecting the best graphics engine implementation for the Browser that the application is running on, and providing api’s that are the same across the various implementations.”
One of the DFX authors, Eugene Lazutkin, wrote a great summary of 2D/3D JS graphics situation here.
So, perhaps a good idea is to make a cross-platform 3D api that would utilize the 3D plugins in FF and Opera, when one is using those browsers with the plugins installed, or fall back to plain old html canvas/SVG/VML/Silverlight depending on the browser/plugin available. Unfortunately, that is way beyond my abilities to write or even start such an app.
I think my next course of action is to play with the source of something like the molecule app mentioned above, and see if I can get a 3d environment that can be manipulated the same way. Actually, I like the following configuration:
- Left button: click to select an object, click and drag to select a group of objects
- Middle button: click and drag to rotate
- Middle button+shift: translate without rotation
- Middle Scroll: zoom in and out
So I’d want to make those changes in my first pass. Before I can do that, I need to learn JavaScript better. To that end, I can’t over-recommend the excellent Eloquent JavaScript, a free online interactive textbook (or hyper-textbook, as the author calls it).
Also, I’ve talked to a close dev friend about the idea; he seemed perplexed as to why this would be needed. I’ve explained a couple of applications, listed below:
- disrupt the current CAD market with a small, lightweight, inexpensive app that could be used for 90% of CAD drafting (only fire up the heavy-duty apps for the other 10%)
- custom manufacturing market
- collaborative product manufacturing
- current state of open-source 3D CAD
Stay tuned for more ideas. As always, comments and constructive criticism are welcome.