code wiki / _hdl_build / nx_meshview_page.nx
nx_meshview_page.nx
buildroot/runtime/_hdl_build/nx_meshview_page.nx
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
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
structs
| none |
consts
| 12 | const CWAT_ELF: *u8 = "/tmp/nx_compile_wat.sov.elf" |
| 13 | const WATC_ELF: *u8 = "/tmp/nx_wat_compiler.sov.elf" |
| 14 | const SRC_NX: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_meshview_wasm.nx" |
| 15 | const WAT_TMP: *u8 = "/tmp/mv.wat" |
| 16 | const WASM_OUT: *u8 = "web_assets/mv.wasm" |
| 17 | const HTML_OUT: *u8 = "web_assets/meshview.html" |
| 18 | const CAP: i64 = 262144 |
functions
| 20 | func run_elf(elf: *u8, a1: *u8, a2: *u8) -> i64 |
| 39 | func 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 |
| 40 | func main() -> i64 |