code wiki / _hdl_build / nx_skincube_anim_gate.nx
nx_skincube_anim_gate.nx
buildroot/runtime/_hdl_build/nx_skincube_anim_gate.nx
about
nx_skincube_anim_gate.nx -- CAP-SKELETAL-ANIM rung-3: the lit skinned cube ANIMATES over time. Sweeps the
skinned-normal-lit cube through a FULL oscillation cycle (frame 0..120 -> joint bend 0->+50->0->-50->0 via
the sin-driven joint in mv_render_skincube_lit) IN OUR wasm VM, and proves the animation PLAYS as a real
loop: motion at the extremes, RETURNS TO REST each half-cycle (oscillation, not a one-way ramp), continuous
frame-to-frame, deterministic. Builds mv.wasm via the SOVEREIGN chain (nx_compile_wat -> nx_wat_compiler,
no Emscripten) like nx_meshview_wasm_gate; no wasm-source change (mv_render_skincube_lit already takes frame).
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_wasm_vm.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const CWAT_ELF: *u8 = "/tmp/nx_compile_wat.sov.elf" |
| 12 | const WATC_ELF: *u8 = "/tmp/nx_wat_compiler.sov.elf" |
| 13 | const SRC_NX: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_meshview_wasm.nx" |
| 14 | const OUT_WAT: *u8 = "/tmp/mv.wat" |
| 15 | const OUT_WASM: *u8 = "/tmp/mv.wasm" |
| 16 | const O_FB: i64 = 0 |
| 17 | const MV_N: i64 = 4096 |
| 18 | const BG: i64 = 4280295456 |
functions
| 20 | func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 21 | func g_pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var x: i64=v; if x<0{b[0]=45 as u8;sys_write(1,b,1);x=0-x} if x==0{b[0]=48 as u8;sys_write(1,b,1);return 0} var d: i64=0; var y: i64=x; while y>0{d=d+1;y=y/10} var i: i64=d-1; y=x; while i>=0{b[i]=(48+(y%10)) as u8;y=y/10;i=i-1} sys_write(1,b,d); return 0 } |
| 22 | func ck(name: *u8, c: i64) -> i64 { if c==1 { g_puts(" PASS " as *u8) } else { g_puts(" FAIL " as *u8) } g_puts(name); g_puts("\n" as *u8); return c } |
| 23 | func run_elf(elf: *u8, a1: *u8, a2: *u8) -> i64 |
| 43 | func main() -> i64 |