If I’m understanding it right, scene.createRenderable()
adds new drawing code to the current scene, and the supplied function is called on every screen update. It’s up to you what you draw there. I don’t know offhand if there’s a function to remove a renderable, but you could simply add a if (!thisFilterActive) return
at the top of the drawing function to just do nothing unless you want the filter or effect to be active.
Alternatively, I think you could use game.pushScene()
and game.popScene()
to switch out the scene entirely, and any renderables would be restricted to the currently active scene. More here: How set a button to Pause the game? - #4 by richard