Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GLText to support padding, rounded corners, and unicode strings (
cruise-automation#687) * Bump regl-worldview version to 0.18.0 * Fix hot-reloading by fixing addParameters is not a function error * Update GLText to support padding, rounded corners, and unicode strings This updates the GLText component in exciting ways: * Arbitrary padding for text backgrounds * % based per-line rounded corners * Unicode character support (great for icon rendering) Previously we relied on the natural placement of characters during rendering to place characters in the atlas. This required every character to use the full line-height in the atlas, taking up unnecessary space (even for small characters like '.'). In order to support better packing of SDF texture atlases, this PR adds two new per-character properties, `heights` and `yOffsets`. These properties will allow us to pack characters tighter in the atlas without worrying about overlapping characters at runtime. Since this changes the way worldview consumes existing atlases, we should probably cut a new major version. - Updates to the latest version of TinySDF - Adds an SDFGenerator component allowing users to easily create their own precomputed textAtlases Test plan: Updated and added new screenshot tests * Fix memoization of atlasConfigs * Minor * Remove char mask to see if it improves anti-aliasing Co-authored-by: Chris Hasson <[email protected]>
- Loading branch information