code wiki / (root) / nx_scene.nx

nx_scene.nx

buildroot/runtime/nx_scene.nx

5099 B139 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind librarytopic scene
docsdependenciesstructsconstsfunctions

about

nx_scene.nx -- SCENE / POSITION as DATA (beat-HS2 rung 2: the Illusion-family "scene"/"position" concept, on OUR moddable-data law). A scene = a set of CHANNELS, each a keyframed timeline {time, value}; sampling at time t linearly interpolates (integer) the surrounding keys. Channels address anything drivable by id: IK-target axes, morph weights, region params, camera. Sampled channel values feed the character stack (skeleton IK targets / morph banks / region params) -- so a SCENE PACK (NXSC1) drives the whole rig, and scenes flow through the CID mod economy exactly like block/morph/anatomy packs. ALL INTEGER, deterministic. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_scene.nx nx_scene_gate.nx nx_wasm_charlab.nx

imports: nx_syscalls.nx

imported by: nx_scene_gate.nxnx_wasm_charlab.nx

structs

none

consts

9const SC_MAGIC_2147483648: i64 = 2147483648
10const SC_MAGIC_4294967296: i64 = 4294967296
15const SC_MAXC: i64 = 64
16const SC_MAXK: i64 = 4096

functions

18func sc_hdr(base: i64) -> *i64 { return base as *i64 }
19func sc_chan(base: i64, c: i64) -> *i64 { return (base + 64 + c * 32) as *i64 }
20func sc_key(base: i64, k: i64) -> *i64 { return (base + 64 + SC_MAXC * 32 + k * 16) as *i64 }
21func sc_bytes() -> i64 { return 64 + SC_MAXC * 32 + SC_MAXK * 16 + 64 }
called by 1: main
23func sc_init(base: i64) -> i64
called by 3: sc_loadbuildscene_build calls 1: sc_hdr
30func sc_channel(base: i64, target_id: i64) -> i64
41func sc_key_add(base: i64, chan: i64, time: i64, value: i64) -> i64
53func sc_target(base: i64, chan: i64) -> i64 { let c: *i64 = sc_chan(base, chan); return c[0] }
called by 1: main calls 1: sc_chan
54func sc_duration(base: i64) -> i64 { let h: *i64 = sc_hdr(base); return h[2] }
called by 2: maintick_at calls 1: sc_hdr
57func sc_sample(base: i64, chan: i64, t: i64) -> i64
called by 2: maintick_at calls 2: sc_chansc_key
81func sc_w32(buf: *u8, off: i64, v: i64) -> i64
called by 1: sc_save
88func sc_r32(buf: *u8, off: i64) -> i64
called by 1: sc_load
93func sc_save(base: i64, buf: *u8) -> i64
called by 1: main calls 4: sc_hdrsc_w32sc_chansc_key
113func sc_load(base: i64, buf: *u8, len: i64) -> i64