Skip to content

Conversation

@wouterlucas
Copy link
Contributor

@wouterlucas wouterlucas commented Jul 24, 2024

  • Expose Canvas and WebGL Core Renderers under @lightningjs/renderer/webgl and @lightningjs/renderer/canvas respectively
  • Allow RendererMain config to accept a renderEngine parameter where the core renderers can be provided
  • Expose SDF Text Renderer and CanvasTextRenderer under canvas/webgl exports.
  • Allow RendererMain config to accept an array of fontEngines where you can provide 1 or 2 Font Engines.
  • Fallback with Canvas still works IF Canvas Text Renderer is provided
  • Drop memize dependency to reduce overall bundle size, apply simple caching instead

Todo:

  • Check tests, see if text renderer override still works
  • Run through some of the resolve code again to make sure we're not introducing new bottlenecks

In my tests the simple benchmark app went down by 20 kb by just using 1 font engine to 40 kb when only using canvas and canvas rendering.

Note: This is a breaking init change, handle with care.

This was linked to issues Jul 24, 2024
@wouterlucas wouterlucas marked this pull request as ready for review July 25, 2024 19:18
@wouterlucas wouterlucas added this pull request to the merge queue Aug 12, 2024
Merged via the queue into main with commit 2bdb8b7 Aug 12, 2024
@wouterlucas wouterlucas deleted the feat/treeshaking branch August 12, 2024 14:28
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.

Feature: better tree shaking Tree Shaking

6 participants