Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprites Take 2 #264

Closed
wants to merge 110 commits into from
Closed

Sprites Take 2 #264

wants to merge 110 commits into from

Conversation

alecpm
Copy link
Contributor

@alecpm alecpm commented Aug 15, 2023

Refs #251 and based on #260

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.

alecpm and others added 30 commits July 18, 2023 22:51
jessesnyder and others added 28 commits August 3, 2023 13:32
…leanup miscellaneous JS issues and deprecations.
Implement client side transition visibility
@alecpm alecpm self-assigned this Aug 15, 2023
@alecpm alecpm closed this Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants