indigo
indigo copied to clipboard
Allow use of a Canvas as a texture source.
Why? Well passing large amounts of data to a shader is expensive - but not if that data is disguised as a texture.
TextBox
is using a canvas in the background and is reloaded constantly, so the performance is there. We need:
- A process in the renderer for using a canvas as a data / texture source
- A nice way to perform the side effect of drawing to a canvas element. Couple of ways to do that:
- Side effects are currently specific, and are run based on a specific
GlobalEvent
, such as making http calls. So we could have a Canvas event, the complication here is elegantly representing a canvas program to be executed. Would probably need Tagless Final / Free Monad style interpretation. - Tyrian allows for arbitrary
Task
execution, this solves some problems are creates others, but it would allow people to just use Scala.js to do the work. Feels like a sledgehammer solution though.
- Side effects are currently specific, and are run based on a specific