ludic.ui, compiler: a component's model is filled in place into an object its instance keeps (value_set_*); colours, border-images and a class screen's stub made once; object-fit into a kept list - benchmark 20 -> 10 KB a frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
08ac2f1125
commit
429eeb7754
15 changed files with 44939 additions and 44681 deletions
|
|
@ -12,6 +12,8 @@ export property UiMemo {
|
|||
texts: []string = null # a text worked out from the key: tw, el_url
|
||||
vals: []Val = null # a Value made from it: cs_vars_in's
|
||||
vtpls: []UiVarTpl = null
|
||||
n1: []float = null # numbers worked out from the key: a colour and its alpha
|
||||
n2: []float = null
|
||||
}
|
||||
const MM_WORDS: int = -1 # el_words: spaces, a bracket's own kept
|
||||
const MM_GRAD: int = -2
|
||||
|
|
@ -20,6 +22,8 @@ const MM_TW: int = -4 # tpl_words
|
|||
const MM_URL: int = -5 # el_url
|
||||
const MM_VARS: int = -6 # cs_vars_in: keys[i] is the text with every var() put in
|
||||
const MM_VTPL: int = -7 # a value's var()s parsed (units_pieces.ludic)
|
||||
const MM_COLOR: int = -8 # ui_color: n1 the colour, n2 its alpha
|
||||
const MM_BIMG: int = -9 # border-image: texts the picture, lists what follows its url()
|
||||
function mm_new() -> UiMemo {
|
||||
let m = new UiMemo
|
||||
m.slots = words(MM_CAP)
|
||||
|
|
@ -30,6 +34,8 @@ function mm_new() -> UiMemo {
|
|||
m.texts = new []string
|
||||
m.vals = new []Val
|
||||
m.vtpls = new []UiVarTpl
|
||||
m.n1 = new []float
|
||||
m.n2 = new []float
|
||||
return m
|
||||
}
|
||||
function mm_of(ui_st: mut UiState) -> UiMemo {
|
||||
|
|
@ -64,6 +70,8 @@ function mm_add(m: UiMemo, tag: int, s: string) -> int {
|
|||
push(m.texts, null)
|
||||
push(m.vals, null)
|
||||
push(m.vtpls, null)
|
||||
push(m.n1, 0.0)
|
||||
push(m.n2, 0.0)
|
||||
m.slots[at] = len(m.keys)
|
||||
return len(m.keys) - 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue