-
Notifications
You must be signed in to change notification settings - Fork 1
Simulation Main Page
Simulation Core
The Simulation is stored and processed as an Experiment. Experiments hold all of the information, and process all of the systems for simulating Experiments.
The core of the code is split into two class types, the model, and the controller. The model is simply the name of the object, for example the class "Beaker" is the beaker model. The controller is the name of the model, along with Controller, for "BeakerController". Controllers also act on certain dimensions, meaning they are also marked with 2D, for the full name "BeakerController2D". For now, all controllers are 2D, and any new controllers should be labeled as such.
Rendering
All rendering is done via P5.js, a very intuitive and easy to use graphics library. Methods to draw in an Experiment should contain a parameter for a graphics object, and all rendering should take place on this graphics object. For example, a method call might look like this. ` function drawBeaker(graphics){
graphics.drawImage(x, y, beakerSprite);
} `