code wiki / (root) / nx_decl_simple_scene.nx

nx_decl_simple_scene.nx

buildroot/runtime/nx_decl_simple_scene.nx

6428 B163 linesdepth 4pulls 5 transitivereach 6 importersview sourcekind librarytopic decl
docsdependenciesstructsconstsfunctions

about

nx_decl_simple_scene.nx -- second declarative #tag-style primitive. license_tier: ORIGINAL One substrate call composes random_environment + camera + lighting into a fully-specified "simple scene" struct. Equivalent of the TypeScript `#simple_scene <modifier>` directive. Validates that the #tag pattern COMPOSES: nx_decl_simple_scene calls nx_decl_random_environment for the env half, then adds camera + light defaults per modifier. Per S-class roadmap §A3 -- second slice toward the user's vision: "define something like #random_environment real and it generates with other things like size or other stuff"

dependencies 5 imports · 6 importers

nx_syscalls.nx nx_types.nx nx_tier.nx nx_biome_classifier.nx nx_decl_random_environment.nx nx_decl_simple_scene.nx nx_decl_combat_arena.nx nx_decl_combat_arena_test.nx nx_decl_reflection_test.nx nx_decl_simple_scene_test.nx nx_decl_townscape.nx nx_decl_townscape_test.nx

imports: nx_syscalls.nxnx_types.nxnx_tier.nxnx_biome_classifier.nxnx_decl_random_environment.nx

imported by: nx_decl_combat_arena.nxnx_decl_combat_arena_test.nxnx_decl_reflection_test.nxnx_decl_simple_scene_test.nxnx_decl_townscape.nxnx_decl_townscape_test.nx

structs

28struct NxSimpleScene

consts

46const NX_SS_LIGHT_DAWN: nx_int = 0 // 2800K, warm low sun
47const NX_SS_LIGHT_NOON: nx_int = 1 // 5500K, neutral overhead
48const NX_SS_LIGHT_DUSK: nx_int = 2 // 3200K, warm low sun
49const NX_SS_LIGHT_NIGHT: nx_int = 3 // 4100K, moonlight blue
50const NX_SS_LIGHT_OVERCAST: nx_int = 4 // 6500K, flat diffuse
51const NX_SS_LIGHT_ALIEN: nx_int = 5 // 9000K, sci-fi cool
52const NX_SS_LIGHT_FANTASTICAL: nx_int = 6 // 7500K, magical
53const NX_SS_LIGHT_N: nx_int = 7

functions

55func nx_ss_light_is_valid(l: nx_int) -> nx_int
called by 2: mainmain
62func nx_ss_light_name(l: nx_int) -> *u8
called by 2: mainmain
74func _ss_default_light(modifier: nx_int, biome: nx_int, seed: nx_int) -> nx_int
called by 1: nx_decl_simple_scene calls 1: _re_hash_mod
88func _ss_light_kelvin(kind: nx_int) -> nx_int
100func _ss_light_intensity_q10(kind: nx_int) -> nx_int
112func _ss_default_cam_distance(modifier: nx_int, env_size: nx_int) -> nx_int
118func _ss_default_cam_fov(modifier: nx_int) -> nx_int
125func nx_decl_simple_scene(out: *NxSimpleScene, modifier: nx_int, seed: nx_int) -> nx_int
159func nx_ss_alloc() -> *NxSimpleScene