nx_scene.nx
buildroot/runtime/nx_scene.nx
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
imports: nx_syscalls.nx
imported by: nx_scene_gate.nxnx_wasm_charlab.nx
structs
| none |
consts
| 9 | const SC_MAGIC_2147483648: i64 = 2147483648 |
| 10 | const SC_MAGIC_4294967296: i64 = 4294967296 |
| 15 | const SC_MAXC: i64 = 64 |
| 16 | const SC_MAXK: i64 = 4096 |
functions
| 18 | func sc_hdr(base: i64) -> *i64 { return base as *i64 } |
| 19 | func sc_chan(base: i64, c: i64) -> *i64 { return (base + 64 + c * 32) as *i64 } |
| 20 | func sc_key(base: i64, k: i64) -> *i64 { return (base + 64 + SC_MAXC * 32 + k * 16) as *i64 } |
| 21 | func sc_bytes() -> i64 { return 64 + SC_MAXC * 32 + SC_MAXK * 16 + 64 } called by 1: main |
| 23 | func sc_init(base: i64) -> i64 |
| 30 | func sc_channel(base: i64, target_id: i64) -> i64 |
| 41 | func sc_key_add(base: i64, chan: i64, time: i64, value: i64) -> i64 |
| 53 | func sc_target(base: i64, chan: i64) -> i64 { let c: *i64 = sc_chan(base, chan); return c[0] } |
| 54 | func sc_duration(base: i64) -> i64 { let h: *i64 = sc_hdr(base); return h[2] } |
| 57 | func sc_sample(base: i64, chan: i64, t: i64) -> i64 |
| 81 | func sc_w32(buf: *u8, off: i64, v: i64) -> i64 called by 1: sc_save |
| 88 | func sc_r32(buf: *u8, off: i64) -> i64 called by 1: sc_load |
| 93 | func sc_save(base: i64, buf: *u8) -> i64 |
| 113 | func sc_load(base: i64, buf: *u8, len: i64) -> i64 |