WordArt rich materials: per-face fills, textures, and edge-profile curves#54
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.
Builds the WordArt composer (
/wordart) and the@layoutit/polycss-fontsAPI into a full material + cross-section system. The composer drives it; the renderer needed no changes (the fonts package returns plainPolygon[]).@layoutit/polycss-fonts— grouped API + axial enginecomposeText's options were regrouped from a ~30-field flat bag into five concerns, and the material engine generalized:profile(shape) — one union:"flat"·{ edge: "bevel"|"round", raised? }·{ curve: CubicBezier }. Round comes in concave / convex;curveis a custom edge defined by a CSScubic-beziereasing (cssCubicBezier).faces(color) — axial material stops down the depth axist ∈ [0,1]: each polygon takes the nearest stop. Accepts{ front?, sides?, back? }(sugar — active faces split the axis evenly; a face set tofalseis covered by its neighbour, no hole), a singleFace, orFaceStop[]for N bands.Face = { color?, texture?, tile? }(texture UV-maps across the whole word;tilerepeats vs stretches).outline,scale: [x,y], flat drop shadow viadepth: 0+faces.back.offset.resolveFace/makeFillTextureturn a high-level fill (solid / gradient / rainbow / texture / image) into a pureFace, keepingcomposeTextbrowser-free./wordartcomposerValidation
polycss-fontstests (the geometry/API engine —extrude.ts98.9%,composeText.ts95.6% line coverage): profile union, axial stops + even split, no-side/covered, custom cubic-bezier, per-face textures + tiling, outline, flat shadow,resolveFacemapping./wordart: every fill mode, per-face textures, no-side, custom curve, and shadow render with no console errors. (The canvas fill painter and the React component are covered by these manual runs, not unit tests.)