Closed JaredSartin closed 3 years ago
There's not a clean abstraction - you'll most likely need to make changes to the following spots:
Thanks for the information. I will look into those areas. If I can cleanly extract rendering and allow for renderer choice, would this be a direction you would like quintus to go?
On Monday, February 3, 2014, Pascal Rettig notifications@github.com wrote:
There's not a clean abstraction - you'll most likely need to make changes to the following spots:
- Q.setup - https://github.com/cykod/Quintus/blob/master/lib/quintus.js#L1305 - setting up the rendering context
- Override Stage.render - https://github.com/cykod/Quintus/blob/master/lib/quintus_scenes.js#L745 - any pre-rendering changes
- Sprite.render - https://github.com/cykod/Quintus/blob/master/lib/quintus_sprites.js#L544- setting up the transform for rendering
- Sprite.draw - https://github.com/cykod/Quintus/blob/master/lib/quintus_sprites.js#L605- doing the rendering
— Reply to this email directly or view it on GitHubhttps://github.com/cykod/Quintus/issues/84#issuecomment-34023715 .
Jared Sartin 269.364.1735 | jared.sart.in | @JaredSartin http://twitter.com/JaredSartin
Definitely - have been meaning to do a WebGL rendering engine in any case...
Ok, I will do some investigation on this front.
I think I have these things pulled out into a render system. There is a lot more to move around and factor out. Once I think I have it cleaned out I can then try to make a pixi render system.
After splitting the rendering out into it's own system, I realized what I had done was not pretty. I had just pulled out all the rendering and lumped it all into one system. Now, this isn't too much of a problem, since it defines the methods that sprite, stage, and Q.setup call into in a global area.
My progress is https://github.com/JaredSartin/Quintus/tree/pixi - I am have not started on the pixi implementation, just trying to make sure I have gotten all of the canvas-specific rendering logic shuffled off properly.
Forgive me for not knowing the code well enough, but is there a clear place in the code where a renderer is defined?
I am looking to use Pixi for rendering, but am really wary about the major framework (Phaser) that uses it. Quintus is more than enough, aside from having Pixi/webgl support.
For that matter, if there is a clean spot to add/change/remove renderers, I am sure work could be done to get threejs in here too!