code wiki / _hdl_build / nx_wasm_physlab_gate.nx

nx_wasm_physlab_gate.nx

buildroot/runtime/_hdl_build/nx_wasm_physlab_gate.nx

6249 B141 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic wasm
docsdependenciesstructsconstsfunctions

about

nx_wasm_physlab_gate.nx -- gate for PHYSLAB (the visible consumer of phys3d+softjiggle; reuse-census W2). T1 the crate stack settles and SLEEPS in the composed world; spheres come to rest T2 the chain follows a moving mouse anchor with jiggle lag (never rigid-locked to it) T3 the chain dragged across the pillar NEVER penetrates the capsule T4 determinism: two labs, same scripted mouse -> byte-identical physics + jiggle state T5 render: frame draws (nonblack majority) + PNG knowledge/nx_physlab.png (the eyeball) T6 click-spawn adds a crate; it lands and eventually sleeps license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_png.nx nx_wasm_physlab.nx nx_wasm_physlab_gate.nx

imports: nx_syscalls.nxnx_png.nxnx_wasm_physlab.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap mem_bytes start_at world_init ph_init ph_hdr ph_acc ph_warm ph_tgt sj_init sj_hdr ph_add ph_hdr ↻ ph_body sj_add_capsule sj_hdr ↻ sj_capsule sj_add sj_hdr ↻ sj_node sj_chain sj_node ↻ st_ptr tick_at st_ptr ↻ world_init ↻ sj_anchor sj_node ↻ ph_add ↻ ph_step ph_hdr ↻ ph_body ↻ ph_pair ph_body ↻ ph_isqrt ph_contact ph_body ↻ ph_acc ↻ ph_warm ↻

structs

none

consts

none

functions

13func hw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
14func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
26func gabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
27func isq(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x + 1) / 2; while y < x { x = y; y = (x + v / x) / 2 } return x }
called by 1: main
29func main() -> i64