nx_scene_demo.nx
buildroot/runtime/nx_scene_demo.nx
about
nx_scene_demo.nx -- SOVEREIGN VISUAL ENGINE: sprites + Image->browser-canvas.
Reuses nx_image (RGB container) for the framebuffer; adds color drawing
(px/fill_rect), pixel-art SPRITE blit (palette index grid, 0=transparent), a
small game scene, and the missing bridge: emit a rendered Image as a scaled,
pixel-perfect HTML canvas (base64 RGB -> ImageData). No external images, no
library -- pixels authored in .nx. license_tier: ORIGINAL.
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_image.nxnx_base64.nx
imported by: nx_scene_demo_test.nx
structs
| none |
consts
| 12 | const K_MAGIC_262144: i64 = 262144 |
functions
| 14 | func sc_px(img: *Image, x: i64, y: i64, r: i64, g: i64, b: i64) -> i64 |
| 20 | func sc_fill(img: *Image, x0: i64, y0: i64, w: i64, h: i64, r: i64, g: i64, b: i64) -> i64 |
| 26 | func sc_blit8(img: *Image, dx: i64, dy: i64, grid: *u8, r: i64, g: i64, b: i64) -> i64 |
| 37 | func sc_app(out: *u8, off: *i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[off[0]] = s[i]; off[0] = off[0] + 1; i = i + 1 } return 0 } called by 1: nx_img_canvas_page |
| 38 | func sc_app_n(out: *u8, off: *i64, v: i64) -> i64 |
| 47 | func nx_scene_build() -> *Image |
| 73 | func nx_img_canvas_page(img: *Image, scale: i64, out: *u8, cap: i64) -> i64 |
| 96 | func nx_scene_save(path: *u8, scale: i64) -> i64 |