Refactor main loop, generalise render
Opened this issue · 0 comments
jmickle66666666 commented
https://github.com/jmickle66666666/jzbuilder/blob/master/src/main.ts
Rendering is kind of a mess currently! the current 2d and 3d modes are really hardcoded, and could be generalised much better to support different viewing modes (such as an isometric view, software renderer etc)
Need to make sure everything is decoupled in the BuilderCanvas, and create a simple base class for rendering/inputs.
Maybe each "mode" defines it's own set of tools and inputs, as well as it's own renderer, which means tools could potentially be shared if necessary (need to see if this is possible though. maybe each mode needs its own bespoke set of tools)