code wiki / _hdl_build / nx_meshview_page.nx

nx_meshview_page.nx

buildroot/runtime/_hdl_build/nx_meshview_page.nx

8751 B103 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic meshview
docsdependenciesstructsconstsfunctions

about

nx_meshview_page.nx -- R3b: emit a self-contained, openable web page that renders our mesh IN THE BROWSER via OUR sovereign WASM software rasterizer -- NO WebGL, NO NVIDIA, NO Emscripten, NO 3rd-party JS lib. Fork-compiles nx_meshview_wasm.nx -> wasm (sovereign nx_compile_wat -> nx_wat_compiler), base64-embeds it (sovereign nx_base64), and authors web_assets/meshview.html: a <canvas> that instantiates the wasm, calls mv_render(angle), reads the i64 framebuffer straight from linear memory, and blits it (the browser's ONLY job is putImageData + the call; ALL transform/projection/z-buffer rasterization is sovereign Nishi). Orbits on drag + auto-rotates. The scene is the z-test pair (RED nearer stays in front of BLUE as you orbit = the z-buffer, live). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_g_puts_lib.nx nx_base64.nx nx_meshview_page.nx

imports: nx_syscalls.nxnx_g_puts_lib.nxnx_base64.nx

imported by: nobody (leaf or entry point)

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

main run_elf sys_fork sys_mmap sys_execve sys_exit sys_wait4 g_puts sys_write sys_exit ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close b64_encode b64_enc_char cat sys_openat_wr sys_write ↻ sys_close ↻

structs

none

consts

12const CWAT_ELF: *u8 = "/tmp/nx_compile_wat.sov.elf"
13const WATC_ELF: *u8 = "/tmp/nx_wat_compiler.sov.elf"
14const SRC_NX: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_meshview_wasm.nx"
15const WAT_TMP: *u8 = "/tmp/mv.wat"
16const WASM_OUT: *u8 = "web_assets/mv.wasm"
17const HTML_OUT: *u8 = "web_assets/meshview.html"
18const CAP: i64 = 262144

functions

20func run_elf(elf: *u8, a1: *u8, a2: *u8) -> i64
39func cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=0 as u8 { dst[o]=s[i]; o=o+1; i=i+1 } return o }
called by 1: main
40func main() -> i64