code wiki / _hdl_build / nx_gltf_anim_gate.nx

nx_gltf_anim_gate.nx

buildroot/runtime/_hdl_build/nx_gltf_anim_gate.nx

8084 B139 linesdepth 6pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic gltf
docsdependenciesstructsconstsfunctions

about

nx_gltf_anim_gate.nx -- export the being as a SKINNED, WALKING .glb. Mesh the skin, bind each vertex to its nearest part's deepest FK bone, export with a walk-cycle animation, self-verify the container + names. Writes knowledge/nishi_being_walk.glb. D001 MIGRATION 2026-08-22: this gate rolled its own verdict (a hand `fails` counter + sys_exit) so /api/promote refused it and nothing outside could read its outcome -- nx_gate_green could not judge it and it wrote no harness.jrnl frame, so flake and erosion were invisible for it. Migrated BY HAND onto per-tooth gv_check, NOT via nx_gate_dry_apply (whose candidate collapses N teeth into ONE boolean: ctr[0]=green; ctr[1]=1 -- a one-state judge cannot see a dropped conjunct). T0..T3 keep their exact semantics. `return gv_verdict(...)` so the EXIT CODE carries the verdict -- /api/gate_run derives its verdict from the exit code. WHY THIS GATE WAS REBUILT AT ALL: a fresh build of the unchanged source measured 88,019 B against a served 139,953 B (375 permil, the same shrink as the matched-vintage control). nx_contentdiff named ONE lost run -- `"animations":[{"name":"walk","samplers":[` -- and this gate's own T3 proved on the STAGED binary's ARTIFACT that the walk animation is still declared, so the run was a refactored literal, not lost capability. That proof is what T3 exists for; the promote refusal was about the VERDICT SHAPE, not the content. license_tier: ORIGINAL expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_trimesh.nx nx_isosurf.nx nx_bodyatlas.nx nx_gltf_anim.nx nx_gltf_anim_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_trimesh.nxnx_isosurf.nxnx_bodyatlas.nxnx_gltf_anim.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ atlas_build ba_add sys_mmap ↻ ba_axis_x ba_ax_defaults ba_is_arm ba_is_leg ba_axis_y ba_ax_defaults ↻ ba_is_arm ↻ ba_knee_y ba_ax_defaults ↻ ba_max it_sin4096 it_cos4096 it_sin4096 ↻ ba_rig_setup sys_mmap ↻ ba_ax_defaults ↻ ba_nin

structs

none

consts

28const GX: i64 = 32
29const GY: i64 = 110
30const GZ: i64 = 20
31const GC: i64 = 18
32const OX: i64 = 0-288
33const OY: i64 = 0-990
34const OZ: i64 = 0-180
39const GA_LIMB_BOUND_MIN_VERTS: i64 = 20
41const GA_SKIN_R: i64 = 216
42const GA_SKIN_G: i64 = 172
43const GA_SKIN_B: i64 = 152
44const GA_BYTE_RADIX: i64 = 256
47const GA_OUT_CAP: i64 = 8388608
50const GLB_MAGIC_G: i64 = 103
51const GLB_TOTAL_LEN_OFF: i64 = 8
52const GLB_FIRST_CHUNK_LEN_OFF: i64 = 12
53const GLB_HDR_BYTES: i64 = 12
54const GLB_CHUNKHDR_BYTES: i64 = 8
55const GLB_CHUNK_TYPE_BIN: i64 = 66
56const GA_JOINTS: i64 = 9
57const GA_VEC3_WORDS: i64 = 3
58const GA_OUT_PATH: *u8 = "knowledge/nishi_being_walk.glb"

functions

24func ru32(buf: *u8, at: i64) -> i64 { return (buf[at] as i64) + ((buf[at+1] as i64)<<8) + ((buf[at+2] as i64)<<16) + ((buf[at+3] as i64)<<24) }
called by 1: main
25func hasstr(buf: *u8, n: i64, needle: *u8) -> i64 { var m: i64=0; while needle[m]!=(0 as u8){m=m+1} var i: i64=0; while i+m<=n { var k: i64=0; while k<m { if buf[i+k]!=needle[k] {k=m+9} else {k=k+1} } if k==m {return 1} i=i+1 } return 0 }
called by 1: main
60func main() -> i64