You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WordArt rich materials: per-face fills, textures, and edge-profile curves (#54)
* feat(fonts): WordArt face fills, outline stroke, and flat-layer shadow
* feat(fonts): axial face materials, edge profiles, and a grouped composeText API
* chore(website): bundle voxel block textures for /wordart
* feat(website): per-face fills, block textures, and an edge-curve editor in /wordart
|**`faces`**|`{ front?, sides?, back? }` · a single `Face` · `FaceStop[]`|
78
+
|**`outline`**|`{ color, width }` — a colored halo around the front face |
79
+
80
+
-**`profile` (shape)** and **`faces` (color)** are independent functions of the same depth axis `t ∈ [0,1]` (0 = front, 1 = back). `edge` bevels/rounds the edges (`raised` flips a round to a convex dome); `curve` is a custom edge from a CSS `cubic-bezier` easing.
81
+
-**`Face`** = `{ color?, texture?, tile? }`. `texture` is an already-rendered URL/data-URL UV-mapped across the whole word; `tile` repeats it every N units (blocks) vs stretching (gradients/photos).
82
+
-**`faces` resolves to material stops down the axis** — each polygon takes the nearest stop to its depth:
83
+
-`{ front, sides, back }` → 3 stops at `{0, .5, 1}` (omit `sides` → the front rounds straight into the back, **no side band**).
84
+
- a single `Face` → one material for the whole solid.
85
+
-`FaceStop[]` (`Face & { at }`) → **N** materials distributed down the axis.
86
+
-**Flat drop shadow** — `depth: 0` + `faces.back.offset: [x, y]` with a distinct `back.color`.
`composeText` is pure and takes already-rendered textures. The browser helpers turn a high-level fill into a `Face`:
91
+
92
+
```ts
93
+
resolveFace({ kind: "gradient", from: "#ffe14d", to: "#ff7a1a", angle: 270 })
94
+
// → { color?, texture: "data:image/png;…" }
95
+
```
96
+
97
+
`FaceFillSpec` (the `kind`): `"solid"` · `"gradient"` (`from`, `to`, `angle?`) · `"rainbow"` (`angle?`) · `"texture"` (`url`, `tile?`) · `"image"` (`src`). `makeFillTexture(FillSpec)` is the lower-level canvas painter if you want the data URL directly.
0 commit comments