Aside from a smattering of jQuery, for this series we’re going to focus on three different graphics toolkits:
- Uses the HTML5 canvas for 2D graphics, in particular
- Uses the HTML5 canvas to show isometric views of 3D models
- Uses WebGL to display 3D graphics
At a later point I’ll probably look more deeply into the framework side of things: I know projects such as ShapeShifter have adopted AngularJS, for instance, but there are flavours of framework out there for everyone’s taste.
And of course the fact these tools are all open source gives you confidence that if they go in a direction that doesn’t sit well with you, it’s always possible to stay with what works or fork them in a direction you like better.
The series itself
To start with we’re going to look at something I’d hinted at a long time ago, when I’d integrated Paper.js with LeapJS: making use of Paper.js within AutoCAD to implement a user interface of some kind. The specific sample is interesting, albeit very simple: we’re going to write our own version of the REVCLOUD command that allows the user to draw revision clouds using Paper.js and then insert them as polylines in AutoCAD. The task itself isn’t especially interesting – it’s been done before in-product – but the technique for marshalling data as well as the simplicity of the implementation are likely to be of interest.
The other two samples I currently have in the pipeline go the other way: they take 3D geometry from inside the current drawing and extract it for display in a 2D isometric and a 3D view, respectively.
Should be a fun couple of weeks!