euv-core 0.56.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Mesh identifier for procedural skyscraper blocks in `World3D::create_dense_open_world_city`.
pub const DENSE_TOWER_MESH_NAME: &str = "dense_tower";
/// Center X coordinate in meters of the closed-loop coastal city stadium circuit.
pub const CITY_LOOP_CENTER_X: f32 = 64.0;
/// Half-length along Z in meters of the parallel West and East straights of the closed-loop circuit.
pub const CITY_LOOP_STRAIGHT_HALF_Z: f32 = 140.0;
/// Semicircular turn centerline radius in meters of the closed-loop coastal city circuit.
pub const CITY_LOOP_RADIUS: f32 = 64.0;
/// Half-width in meters of the 4-lane asphalt roadway around the closed-loop centerline (`|road_u| <= 10.2`).
pub const CITY_LOOP_ROAD_HALF_WIDTH: f32 = 10.2;
/// Outer edge distance in meters of the curb and tiled sidewalk band around the centerline (`|road_u| <= 13.8`).
pub const CITY_LOOP_SIDEWALK_HALF_WIDTH: f32 = 13.8;
/// Total continuous centerline circumference in meters of the closed-loop circuit (`4 * 140 + 2 * PI * 64`).
pub const CITY_LOOP_TOTAL_LENGTH: f32 = 560.0 + 2.0 * PI * 64.0;
/// Westernmost X extent in meters of the extended closed-loop city ground plane.
pub const CITY_GROUND_X_MIN: f32 = -160.0;
/// Easternmost X extent in meters of the extended closed-loop city and coastal bay ground plane.
pub const CITY_GROUND_X_MAX: f32 = 420.0;
/// Northernmost Z extent in meters of the extended closed-loop city ground plane.
pub const CITY_GROUND_Z_MIN: f32 = -320.0;
/// Southernmost Z extent in meters of the extended closed-loop city ground plane.
pub const CITY_GROUND_Z_MAX: f32 = 320.0;
/// Eastern shoreline X threshold beyond which the open sunlit coastal ocean bay begins.
pub const CITY_EAST_OCEAN_MIN_X: f32 = 144.0;

/// Default atmospheric preset hour for golden-hour Sunset (`0`).
pub(crate) const ATMOSPHERE_HOUR_SUNSET: f32 = 17.2;
/// Atmospheric preset hour for cyberpunk Rainy Night (`1`).
pub(crate) const ATMOSPHERE_HOUR_RAINY_NIGHT: f32 = 21.4;
/// Atmospheric preset hour for crisp daylight Noon (`2`).
pub(crate) const ATMOSPHERE_HOUR_NOON: f32 = 12.5;
/// Atmospheric preset hour for deep neon Midnight (`3`).
pub(crate) const ATMOSPHERE_HOUR_MIDNIGHT: f32 = 23.0;
/// Maximum simultaneous ambient Niagara rain streaks in Rainy Night mode.
pub(crate) const RAINY_NIGHT_MAX_PARTICLES: usize = 20;
/// Asset name for instanced Vice Boulevard coastal palm trees.
pub(crate) const CITY_PALM_MESH_NAME: &str = "vice_palm_tree";
/// Asset name for distant skyline silhouette towers framing the horizon.
pub(crate) const CITY_SKYLINE_MESH_NAME: &str = "skyline_silhouette";
/// Asset name for coastal seawall parapet segments enclosing the city island.
pub(crate) const CITY_SEAWALL_MESH_NAME: &str = "coastal_seawall";
/// Asset name for the surrounding animated liquid ocean boundary mesh.
pub(crate) const CITY_OCEAN_MESH_NAME: &str = "coastal_ocean_water";
/// Asset name for the closed-loop boulevard road ground mesh.
pub(crate) const CITY_GROUND_MESH_NAME: &str = "wet_asphalt_boulevard";
/// Scene object name for the primary ground surface.
pub(crate) const CITY_GROUND_OBJ_NAME: &str = "city_ground";
/// Asset name for retroreflective road lane studs.
pub(crate) const CITY_LANE_STUD_MESH_NAME: &str = "lane_stripe";
/// Asset name for generic structural unit box geometry.
pub(crate) const CITY_UNIT_BOX_MESH_NAME: &str = "city_skyscraper";
/// Asset name for glowing architectural accent trim boxes.
pub(crate) const CITY_NEON_SIGN_MESH_NAME: &str = "neon_sign";
/// Asset name for Archetype 1 Art-Deco stepped setback tower.
pub(crate) const CITY_MESH_ART_DECO: &str = "building_art_deco";
/// Asset name for Archetype 2 chamfered octagonal glass tower.
pub(crate) const CITY_MESH_CHAMFERED: &str = "building_chamfered_glass";
/// Asset name for Archetype 3 twisted tapering futuristic spire.
pub(crate) const CITY_MESH_TWISTED: &str = "building_twisted_spire";
/// Asset name for Archetype 4 cantilevered contemporary tech tower.
pub(crate) const CITY_MESH_CANTILEVER: &str = "building_cantilever_tech";
/// Asset name for Archetype 5 cylindrical landmark glass tower.
pub(crate) const CITY_MESH_CYLINDER: &str = "building_cylindrical_landmark";
/// Asset name for Archetype 6 boutique neo-classical boulevard podium block.
pub(crate) const CITY_MESH_BOUTIQUE: &str = "building_boutique_podium";
/// Asset name for the Lamborghini Aventador SVJ hero supercar mesh.
pub(crate) const CITY_MESH_AVENTADOR: &str = "hero_aventador_svj";
/// Asset name for the Ford Mustang Shelby GT500 Cobra hero supercar mesh.
pub(crate) const CITY_MESH_SHELBY: &str = "hero_shelby_cobra";
/// Scene object name for the drivable player hero vehicle.
pub(crate) const CITY_OBJ_PLAYER_CAR: &str = "player_gt_car";
/// Half-width in meters of the solid coastal Vice Boulevard city island along X (`[-52, +52]`).
pub(crate) const CITY_ISLAND_HALF_X: f32 = 52.0;
/// Northernmost Z bound in meters of the solid coastal Vice Boulevard city island.
pub(crate) const CITY_ISLAND_Z_MIN: f32 = -110.0;
/// Southernmost Z bound in meters of the solid coastal Vice Boulevard city island.
pub(crate) const CITY_ISLAND_Z_MAX: f32 = 82.0;
/// Vertical world elevation in meters of the surrounding liquid ocean water surface below the island deck.
pub(crate) const CITY_OCEAN_SURFACE_Y: f32 = -0.34;
/// Horizontal span in meters of the surrounding liquid ocean surface extending to the horizon on all sides.
pub(crate) const CITY_OCEAN_SPAN_M: f32 = 1_400.0;
/// Live-Link JSON delta discriminator for node transform updates.
pub(crate) const LIVE_DELTA_KIND_TRANSFORM: &str = "node_transform";
/// Live-Link JSON delta discriminator for Principled BSDF material updates.
pub(crate) const LIVE_DELTA_KIND_MATERIAL: &str = "material_params";
/// Live-Link JSON delta discriminator for shape-key morph weight updates.
pub(crate) const LIVE_DELTA_KIND_MORPH: &str = "morph_weights";
/// Live-Link JSON delta discriminator for punctual or area light updates.
pub(crate) const LIVE_DELTA_KIND_LIGHT: &str = "light_update";
/// Live-Link JSON delta discriminator for camera pose updates.
pub(crate) const LIVE_DELTA_KIND_CAMERA: &str = "camera_update";
/// Live-Link JSON delta discriminator for Blender Collection visibility toggles.
pub(crate) const LIVE_DELTA_KIND_COLLECTION: &str = "collection_visibility";
/// Live-Link JSON delta discriminator for IBL environment updates.
pub(crate) const LIVE_DELTA_KIND_ENVIRONMENT: &str = "environment_update";
/// JSON field key for delta discriminator.
pub(crate) const LIVE_KEY_KIND: &str = "kind";
/// JSON field key for target node name.
pub(crate) const LIVE_KEY_NODE_NAME: &str = "node_name";
/// JSON field key for translation array.
pub(crate) const LIVE_KEY_TRANSLATION: &str = "translation";
/// JSON field key for rotation quaternion array.
pub(crate) const LIVE_KEY_ROTATION: &str = "rotation";
/// JSON field key for scale array.
pub(crate) const LIVE_KEY_SCALE: &str = "scale";
/// JSON field key indicating Blender Z-up coordinate space.
pub(crate) const LIVE_KEY_BLENDER_Z_UP: &str = "blender_z_up";
/// JSON field key for target material name.
pub(crate) const LIVE_KEY_MATERIAL_NAME: &str = "material_name";
/// JSON field key for base color RGBA factor.
pub(crate) const LIVE_KEY_BASE_COLOR: &str = "base_color_factor";
/// JSON field key for metallic scalar.
pub(crate) const LIVE_KEY_METALLIC: &str = "metallic_factor";
/// JSON field key for roughness scalar.
pub(crate) const LIVE_KEY_ROUGHNESS: &str = "roughness_factor";
/// JSON field key for clearcoat factor.
pub(crate) const LIVE_KEY_CLEARCOAT: &str = "clearcoat_factor";
/// JSON field key for clearcoat roughness scalar.
pub(crate) const LIVE_KEY_CLEARCOAT_ROUGHNESS: &str = "clearcoat_roughness_factor";
/// JSON field key for sheen RGB tint.
pub(crate) const LIVE_KEY_SHEEN_COLOR: &str = "sheen_color_factor";
/// JSON field key for sheen roughness scalar.
pub(crate) const LIVE_KEY_SHEEN_ROUGHNESS: &str = "sheen_roughness_factor";
/// JSON field key for emissive RGB color.
pub(crate) const LIVE_KEY_EMISSIVE: &str = "emissive_factor";
/// JSON field key for HDR emissive strength.
pub(crate) const LIVE_KEY_EMISSIVE_STRENGTH: &str = "emissive_strength";
/// JSON field key for transmission factor.
pub(crate) const LIVE_KEY_TRANSMISSION: &str = "transmission_factor";
/// JSON field key for morph target weights array.
pub(crate) const LIVE_KEY_WEIGHTS: &str = "weights";
/// JSON field key for light index.
pub(crate) const LIVE_KEY_LIGHT_INDEX: &str = "light_index";
/// JSON field key for light color RGB.
pub(crate) const LIVE_KEY_COLOR: &str = "color";
/// JSON field key for light or environment intensity.
pub(crate) const LIVE_KEY_INTENSITY: &str = "intensity";
/// JSON field key for light or camera position.
pub(crate) const LIVE_KEY_POSITION: &str = "position";
/// JSON field key for light direction.
pub(crate) const LIVE_KEY_DIRECTION: &str = "direction";
/// JSON field key for camera pitch.
pub(crate) const LIVE_KEY_PITCH: &str = "pitch";
/// JSON field key for camera vertical FOV degrees.
pub(crate) const LIVE_KEY_FOV_DEG: &str = "fov_deg";
/// JSON field key for collection name.
pub(crate) const LIVE_KEY_COLLECTION_NAME: &str = "collection_name";
/// JSON field key for visibility toggle.
pub(crate) const LIVE_KEY_VISIBLE: &str = "visible";
/// JSON field key for environment Y rotation in radians.
pub(crate) const LIVE_KEY_ROTATION_Y_RAD: &str = "rotation_y_rad";
/// Error message returned when Live-Link delta JSON lacks a valid discriminator.
pub(crate) const ERR_LIVE_DELTA_UNKNOWN_KIND: &str = "unknown or missing live delta kind";
/// Default Blender imported mesh prefix for unnamed primitives.
pub(crate) const BLENDER_IMPORTED_NODE_FALLBACK: &str = "blender_node";
/// Default octahedral resolution for auto-baked procedural sky IBL.
pub(crate) const WORLD_DEFAULT_IBL_OCT_SIZE: u32 = 32;
/// Default BRDF LUT resolution for auto-baked procedural sky IBL.
pub(crate) const WORLD_DEFAULT_IBL_LUT_SIZE: u32 = 32;
/// Maximum linear displacement per continuous collision detection substep in meters (smaller than thinnest lamp pole).
pub(crate) const COLLISION_CCD_MAX_STEP_M: f32 = 0.12;
/// Maximum continuous collision detection linear substeps per simulation tick preventing tunneling at arbitrary speeds.
pub(crate) const COLLISION_CCD_MAX_SUBSTEPS: usize = 512;
/// Maximum yaw rotation step per continuous collision detection substep in radians.
pub(crate) const COLLISION_ROT_MAX_STEP_RAD: f32 = 0.06;
/// Maximum continuous collision detection rotation substeps per simulation tick.
pub(crate) const COLLISION_ROT_MAX_SUBSTEPS: usize = 32;
/// Maximum iterative horizontal minimum-translation-vector depenetration passes per vehicle tick.
pub(crate) const COLLISION_MTV_MAX_ITERS: usize = 6;
/// Safety separation bias in meters added to horizontal minimum-translation-vector push-out to clear floating-point contact ties.
pub(crate) const COLLISION_MTV_PUSH_EPS: f32 = 0.015;
/// Maximum single-step horizontal push-out permitted when resolving steering contact against a wall.
pub(crate) const COLLISION_ROT_MAX_PUSH_M: f32 = 0.35;
/// Player supercar base acceleration in meters per second squared.
pub(crate) const VEHICLE_NORMAL_ACCEL_MPS2: f32 = 26.5;
/// Additional low-speed launch torque in meters per second squared tapering off with speed.
pub(crate) const VEHICLE_LAUNCH_BONUS_MPS2: f32 = 30.0;
/// Velocity decay scale in meters per second for first-gear launch torque taper.
pub(crate) const VEHICLE_LAUNCH_TAPER_MPS: f32 = 10.0;
/// Player supercar maximum forward speed without boost in meters per second.
pub(crate) const VEHICLE_NORMAL_TOP_SPEED_MPS: f32 = 32.0;
/// Player supercar maximum reverse speed in meters per second.
pub(crate) const VEHICLE_REVERSE_TOP_SPEED_MPS: f32 = 16.0;
/// Service braking deceleration in meters per second squared.
pub(crate) const VEHICLE_BRAKE_DECEL_MPS2: f32 = 42.0;
/// Nitro boost thrust multiplier applied to forward engine acceleration.
pub(crate) const VEHICLE_BOOST_THRUST_MULT: f32 = 1.75;
/// Player supercar maximum forward speed while Shift boost is active in meters per second.
pub(crate) const VEHICLE_BOOST_TOP_SPEED_MPS: f32 = 50.0;
/// Nitro boost charge consumption rate per second while actively boosting.
pub(crate) const VEHICLE_BOOST_DRAIN_PER_SEC: f32 = 0.16;
/// Passive nitro boost charge regeneration rate per second during normal driving.
pub(crate) const VEHICLE_BOOST_REGEN_PER_SEC: f32 = 0.24;
/// Accelerated nitro boost charge regeneration rate per second while powersliding.
pub(crate) const VEHICLE_BOOST_DRIFT_REGEN_PER_SEC: f32 = 0.60;
/// Minimum nitro boost charge required to re-ignite boost after depletion.
pub(crate) const VEHICLE_BOOST_MIN_REIGNITE: f32 = 0.08;
/// Normal lateral tire friction damping rate per second for sharp cornering.
pub(crate) const VEHICLE_NORMAL_LAT_GRIP: f32 = 9.5;
/// Reduced rear-axle lateral tire friction rate per second while Space handbrake drift is active.
pub(crate) const VEHICLE_DRIFT_LAT_GRIP: f32 = 1.55;
/// Minimum total speed in meters per second required to initiate Space handbrake drift.
pub(crate) const VEHICLE_DRIFT_MIN_SPEED_MPS: f32 = 5.0;
/// Minimum forward velocity component in meters per second required to sustain forward drift.
pub(crate) const VEHICLE_DRIFT_MIN_FWD_MPS: f32 = 2.0;
/// Base steering yaw rate authority in radians per second during normal grip driving.
pub(crate) const VEHICLE_NORMAL_YAW_GAIN: f32 = 2.05;
/// Amplified steering yaw rate authority in radians per second during Space handbrake drift.
pub(crate) const VEHICLE_DRIFT_YAW_GAIN: f32 = 2.85;
/// Minimum sustained drift duration in seconds required to earn an exit-drift speed kick.
pub(crate) const VEHICLE_DRIFT_EXIT_MIN_SECS: f32 = 0.35;
/// Minimum peak slip angle in radians required to earn an exit-drift speed kick.
pub(crate) const VEHICLE_DRIFT_EXIT_MIN_SLIP_RAD: f32 = 0.20;
/// Forward speed surge in meters per second delivered on releasing a sustained powerslide.
pub(crate) const VEHICLE_DRIFT_EXIT_KICK_MPS: f32 = 5.5;
/// Linear rolling resistance drag coefficient per second.
pub(crate) const VEHICLE_ROLLING_DRAG: f32 = 0.95;
/// Quadratic aerodynamic drag coefficient per meter.
pub(crate) const VEHICLE_AERO_DRAG: f32 = 0.018;
/// Simulated chassis mass in kilograms for the player supercar.
pub(crate) const VEHICLE_PLAYER_MASS_KG: f32 = 1_500.0;
/// Simulated chassis yaw moment of inertia in kilogram-square-meters for the player supercar.
pub(crate) const VEHICLE_PLAYER_INERTIA_YAW: f32 = 3_200.0;
/// Simulated chassis mass in kilograms for dynamic NPC rigid-body vehicles.
pub(crate) const VEHICLE_NPC_MASS_KG: f32 = 1_350.0;
/// Simulated chassis yaw moment of inertia in kilogram-square-meters for dynamic NPC vehicles.
pub(crate) const VEHICLE_NPC_INERTIA_YAW: f32 = 2_800.0;
/// Coefficient of restitution for car-vs-building rigid-body collisions.
pub(crate) const COLLISION_WALL_RESTITUTION: f32 = 0.28;
/// Coulomb wall-scrape tangential friction coefficient for car-vs-building collisions.
pub(crate) const COLLISION_WALL_FRICTION: f32 = 0.35;
/// Coefficient of restitution for dynamic car-vs-car rigid-body OBB impacts.
pub(crate) const COLLISION_CAR_RESTITUTION: f32 = 0.42;
/// Coulomb tangential friction coefficient for dynamic car-vs-car OBB impacts.
pub(crate) const COLLISION_CAR_FRICTION: f32 = 0.30;
/// Maximum angular spin speed in radians per second clamped after rigid-body impulses.
pub(crate) const VEHICLE_MAX_YAW_RATE_RAD_S: f32 = 6.5;
/// Maximum dynamic chase camera FOV widen in degrees during nitro boost.
pub(crate) const CAMERA_BOOST_FOV_MAX_DEG: f32 = 11.0;
/// Base chase camera field of view in degrees.
pub(crate) const CAMERA_BASE_FOV_DEG: f32 = 60.0;
/// Open inner landmark island courtyard plaza loop waypoints `(x, z)` entirely off the asphalt road (`|road_u| > 10.2`).
pub(crate) const NPC_INNER_PLAZA_WAYPOINTS: [(f32, f32); 6] = [
    (38.0, -137.0),
    (91.0, -137.0),
    (91.0, -12.0),
    (91.0, 128.0),
    (38.0, 128.0),
    (38.0, -12.0),
];
/// Open west outer urban plaza waypoints `(x, z)` entirely outside the asphalt loop (`|road_u| > 10.2`).
pub(crate) const NPC_OUTER_PLAZA_WAYPOINTS: [(f32, f32); 4] = [
    (-72.0, -118.0),
    (-72.0, 118.0),
    (-112.0, 118.0),
    (-112.0, -118.0),
];
/// Open cross-courtyard waypoints `(x, z)` weaving through inner landmark island plazas (`|road_u| > 10.2`).
pub(crate) const NPC_COURTYARD_CROSS_WAYPOINTS: [(f32, f32); 6] = [
    (38.0, 78.0),
    (91.0, 78.0),
    (91.0, -55.0),
    (38.0, -55.0),
    (38.0, -96.0),
    (91.0, -96.0),
];