Skip to content

Flag to disable overlayCanvas/overlayContext? #29

Discussion options

You must be logged in to vote

Thanks for writing this up, sorry i hadn't seen it until now... so it is hard to predict how different environments may handle graphics rendering, and what the bottlenecks would be. I have it tuned pretty nicely for modern pcs and smart phones but low end devices may have different limitations.

My first suggestion is to just keep your hack, if that fixes it then you should be fine. There is no need to modify the engine code, in you're game init you can just do...

    document.body.removeChild(overlayCanvas);
    overlayCanvas = mainCanvas;
    overlayContext = mainContext;

Don't think of it as a hack, think of it as telling LittleJS that you don't want the overlay canvas it provided and …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KilledByAPixel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants