There are some limitations when using a WebGL/Regl canvas that needed to be worked around for this:
It's not possible to use multiple textures for the main squares function rendering (see here), and combining different types of textures (simple arrays, images, 2D canvas) into a single indexable texture isn't feasible (though doing so would probably be the most efficient option).
The WebGL code runs async and in parallel on the GPU, so running multiple pipelines which affect the same canvas areas in a single frame render doesn't work. We need to ensure the currently textured squares aren't passed to the main squares function.
We need to be judicious about how many textures we create, so caching the textures aggressively and only creating them once is important.
I've moved the emoji rendering to use a canvas texture with a text fill. This simplified the implementation of emojis, but they can only be added by pasting the characters directly, not by name.
I think this is in decent shape now and seems to be performing well.
Refs #251 and based on #260
There are some limitations when using a WebGL/Regl canvas that needed to be worked around for this:
squares
function rendering (see here), and combining different types of textures (simple arrays, images, 2D canvas) into a single indexable texture isn't feasible (though doing so would probably be the most efficient option).squares
function.I've moved the emoji rendering to use a canvas texture with a text fill. This simplified the implementation of emojis, but they can only be added by pasting the characters directly, not by name.
I think this is in decent shape now and seems to be performing well.