maquette
maquette copied to clipboard
Created an option to avoid automatically scheduling render on every event
I use Maquette within a game engine that automatically renders on every frame, so I don't want Maquette scheduling its own renders on events. I considered creating a whole new Projector but that seemed like overkill for such a small change.
I added an option scheduleRenderAfterEvents
to the projector that simply skips the call to scheduleRender()
when false. The option defaults to true so that it shouldn't mess up existing code.
I'm not sure about how you want to name things, so please let me know...
PS: Thanks for this library, it's wonderful!
We created https://github.com/AFASSoftware/maquette-advanced-projector for advanced use cases for the projector, so we can keep the core library simple. Could you try using or extending that? Please let me know if this fits your use case.
Thanks @johan-gorter. I hadn't seen that project. Indeed that would probably work. I'll try it out.
Hi @johan-gorter - I was able to get that to work with maquette-advanced-projector, thanks.
However, there is an issue with that package, which doesn't work off the bat. I had to add commands to build the CJS and UMD packages. If you have access to it, perhaps you would review my pull request there?
https://github.com/AFASSoftware/maquette-advanced-projector/pull/14
Thanks a lot