Foldinator 2 Build 3

Development of Foldinator2 continues. You can see the third prototype here:

http://zingman.com/foldinator2/foldinator2.html

Earlier prototypes is archived here:

http://zingman.com/foldinator2/old_versions/foldinator2_build02/
foldinator2.html

http://zingman.com/foldinator2/old_versions/foldinator2_build01/
foldinator2.html

The main feature for this time around is that I am now generating the paper procedurally using the drawing API. This is core to the whole application, and everything going forward will be built on more sophisticated instructions to the drawing algorithm. The paper is initialized only after the user loads a model. The paper gets its initial state (white or colored side up) from the OrigamiXML for the model. I’ve defined a set of constants for the various lines weights and colors that the rendering will need. For the next build I am going to set the paper’s initial rotation as well.

I’ve also begun putting in controls to toggle the enabled states of the various buttons and to allow the user to switch between View and Edit modes. This will be more fully fleshed out in the next build.

Since it is still fairly early in the development cycle, even simple features require a fair amount of new behind-the-scenes structure to be built. For this build I extended the event framework to handle callback events. I use this in the app initialization sequence when loading the list of OrigamiXML files, and when a file is loaded to trigger the Paper initialization. I also created a class to hold application constants outside of the drawing API styles. These include definitions for steps, actions, folds and their properties and parameters. This will come into play as the folding code develops.