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:
Orkun ÇAKILKAYA 2026-09-28 00:17:47 +03:00
parent 08ac2f1125
commit 429eeb7754
15 changed files with 44939 additions and 44681 deletions

View file

@ -56,7 +56,7 @@ function fr_image(ui_st: mut UiState, n: UiNode) -> void {
nat_w = ui_st.ui_be.image_w(n.src)
nat_h = ui_st.ui_be.image_h(n.src)
}
let r = ui_object_fit(n, nat_w, nat_h)
let r = ui_object_fit_into(ui_st.fit_out, n, nat_w, nat_h)
let clipped = ui_st.ui_be.clip != null and (r[2] > n.cw - ly_hin(n) or r[3] > n.ch - ly_vin(n))
if clipped { fr_clip_push(ui_st, n.x + n.pl + n.bl, n.y + n.pt + n.bt, n.cw - ly_hin(n), n.ch - ly_vin(n)) }
ui_st.ui_be.image(n.src, r[0], r[1], r[2], r[3], c, a)