ludic.ui: splits, words, gradients and keys are made once per text (a bounded memo), sides without a list - benchmark 110 -> 63 KB a frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
978f128755
commit
1d40f6d95a
18 changed files with 172 additions and 41 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# for pictures and natives, zoom (zoom.ludic), and a list split at its top-level commas
|
||||
function el_fit_props(ui_st: mut UiState, n: UiNode, key: string, s: string) -> bool {
|
||||
if key == "aspect-ratio" {
|
||||
let parts = lss_split(s, 47)
|
||||
let parts = mm_split(ui_st, s, 47)
|
||||
var r = el_num(tpl_words(parts[0]))
|
||||
if len(parts) > 1 and el_num(tpl_words(parts[1])) > 0.0 { r = r / el_num(tpl_words(parts[1])) }
|
||||
if tpl_words(s) == "auto" { r = 0.0 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue