WordArt: cap-merge + adaptive segments, atomic atlas swaps, live scale#56
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two themes, both improving the WordArt composer (
/wordart) and the renderers it sits on:1 · Fonts geometry perf (lossless, same silhouette)
composeText/textPolygonsnow merge the earcut cap triangles into maximal convex polygons at build time. Fewer DOM leaves (e.g. WordArt flat 644→414, "Hi" 132→58) and about half the front/back internal seams gone. Identical outline + holes; many triangle-pairs collapse to the cheapest<b>rect. The old genericmergeoption is removed (superseded by this always-on pass).2 · Flicker-free editing (atlas pipeline, react + vue)
Image.decode()) until the new one is ready instead of blanking to shells on every edit, so geometry edits don't flash the textured face.atomicAtlasonPolyMesh— holds the whole previous frame (geometry + texture together) until the new atlas is decoded, then swaps atomically, cancelling any superseded build. Used by/wordartso a slider release never shows geometry before its texture. Adds anonFrameReadycallback for preview hand-off. Mirrored in react + vue.3 · WordArt workbench UX
scaleZwhile dragging and bakes on release (clean swap viaatomicAtlas).fitZoom) compensates to stay framed.caseclause.Test plan
pnpm test— core 949, fonts 45, polycss 584, react 414, vue 415, all green.pnpm build— all packages + website clean./wordartslider on textured/gradient fills — no blank flash, no destructive swap; Depth + Scale X/Y feel live.Follow-ups (not in this PR)
PolyMeshatomicAtlas/onFrameReadyprops in the website docs.