I am attempting to develop a method of procedurally generating images for a game that I am making with Ga. The actual generation is not relevant here; my question is how do I turn an image on an HTML5 canvas into a Ga sprite?
By default, Ga sprites accept a link to the source name, which is normally loaded in by ga.assets.load(), either at the start of the game or when called. However, I see no easy way to instead pass, say, a dataURL or other format easily obtainable from a (hidden) canvas.
Or, alternatively, how can I develop an alternative to ga.sprite that acts exactly the same except for using my created images from a canvas instead of loading a source from disk?
Link to Ga: https://github.com/kittykatattack/ga