up seafile

This commit is contained in:
2026-06-13 10:14:23 +02:00
parent 3cb2e466d8
commit ff53831be4
8 changed files with 230 additions and 24 deletions
+24
View File
@@ -85,6 +85,27 @@ type StyleParams struct {
Shadow *ShadowFx `json:"shadow,omitempty"`
BevelOffset *Bevel `json:"bevel_offset,omitempty"`
Color string `json:"color,omitempty"`
Fx *FxParams `json:"fx,omitempty"`
}
// FxParams tunes the canvas call renderer (glossy bubble / western 3D). All
// optional pointers — nil falls back to the renderer's per-preset default.
// Persisted in the template so per-call tweaks survive a round-trip; the values
// are consumed entirely by the frontend (textFx.ts).
type FxParams struct {
Plump *float64 `json:"plump,omitempty"`
Edge *float64 `json:"edge,omitempty"`
OuterW *float64 `json:"outerw,omitempty"`
Gloss *float64 `json:"gloss,omitempty"`
GlossH *float64 `json:"gloss_h,omitempty"`
GlossI *float64 `json:"gloss_i,omitempty"`
InnerB *float64 `json:"inner_b,omitempty"`
Depth *float64 `json:"depth,omitempty"`
Angle *float64 `json:"angle,omitempty"`
Slant *float64 `json:"slant,omitempty"`
Grunge *float64 `json:"grunge,omitempty"`
Bevel *float64 `json:"bevel,omitempty"`
Seed *float64 `json:"seed,omitempty"`
}
// setKeys lists the JSON names of the params that are actually set, for
@@ -118,6 +139,9 @@ func (p *StyleParams) setKeys() []string {
if p.Color != "" {
keys = append(keys, "color")
}
if p.Fx != nil {
keys = append(keys, "fx")
}
return keys
}