- component Name (a: mut A, b: B) { ... }: every getter, default, function and event takes the
header's states before the instance; a member's call to another passes them on; the glue is
supplied them; the template never sees them; a read-only one is read-only in every member
- ludic migrate state: a component's members' needs go into its header (added to an existing one,
mut added where now changed); a field read or a member call inside a component is the compiler's,
so nothing is written inside a name and no ', )' is left; an entry point that declares states
already gets the rest after them
- a program's module named like a package gets <Name>AppState; a program's own file its own state;
a friend module's files go by directory; a package's settable var stays state
- it writes only under the programs and directories given (and runtime/ with --runtime), and
refuses the whole run naming any other file that would have to change
- a name a package already moved into its state is rewritten through it; a read of the runtime's
var through the runtime function that answers it (gl_w: gl_width())
- a state's instance supplied by the runtime is not a uses reference
- tests: state/component, rejected/state_component_ro, rendering/ui_render3d, migrate component
and foreign cases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
425 B
Text
13 lines
425 B
Text
# ui_render3d.ludic - ludic.ui drawn by render3d's overlay: importing its backend is enough to
|
|
# draw templates (the suite builds it, so the backend always compiles against the renderer)
|
|
program UiRender3d {
|
|
numbers float
|
|
import "ludic.render3d/r3d.ludic"
|
|
import "ludic.ui"
|
|
import "ludic.ui/render3d.ludic"
|
|
entry (ui_st: mut UiState) {
|
|
ui_render3d(ui_st)
|
|
ui_render3d_scale(ui_st, 1.5)
|
|
print("ok")
|
|
}
|
|
}
|