diff --git a/crates/misaligned-bevy/src/main.rs b/crates/misaligned-bevy/src/main.rs index ff8a6a28..dcaec4bd 100644 --- a/crates/misaligned-bevy/src/main.rs +++ b/crates/misaligned-bevy/src/main.rs @@ -28,7 +28,7 @@ use misaligned::operations_projection::{ObjectState, OperationsTarget, Operation use misaligned::operations_ui::{ConfirmChoice, OperationsWorkspace, OpsPane, OpsSelect}; use misaligned::person::{Knowledge, ScheduleBlock}; use misaligned::reach::{Device, Party}; -use misaligned::sim::{Fog, HeardKind, LogEvent, Sim, TraceDebtStatus}; +use misaligned::sim::{Fog, LogEvent, Sim, TraceDebtStatus}; use misaligned::tiles::TileType; use misaligned::ui_projection::fact_source_label; use misaligned::work_grid::{MachineIntensity, MachineMode, TokenFamily}; @@ -123,8 +123,8 @@ const WHEEL_PIXELS_PER_ZOOM_STEP: f32 = 120.0; const DARK_AMBIENT: f32 = 8.0; /// Low neutral fill once Eyes earns a live image. The level's authored floor /// fixtures provide the directional light; this only keeps their shadow side -/// from collapsing into black. Heard materials are unlit, so the fill still -/// cannot turn sound into sight. +/// from collapsing into black. Audio creates no material geometry, so this +/// fill cannot turn sound into sight. const CAMERA_AMBIENT: f32 = 160.0; /// The dev work light's flat neutral flood: ambient bright enough that every /// mesh is inspectable and albedo reads with no mood. Dev affordance only, @@ -804,10 +804,9 @@ struct Meshes3d { fn fog_key(fog: Fog) -> u8 { match fog { Fog::Seen => 0, - Fog::Heard => 1, - Fog::Remembered => 2, - Fog::Blueprint => 3, - Fog::Unknown => 4, + Fog::Remembered => 1, + Fog::Blueprint => 2, + Fog::Unknown => 3, } } @@ -1730,7 +1729,7 @@ fn main() { render_real_links, render_build_beam, render_work_routes, - render_noise_field_3d, + render_audio_events_3d, render_cursor, render_tokens, ), @@ -1743,7 +1742,7 @@ fn main() { render_people, render_digital_focus_label, render_people_3d, - render_noise_field_flat, + render_audio_events_flat, scroll_sidebar, apply_rail_detail, render_ui, @@ -2089,8 +2088,8 @@ fn dev_shot_scenario(game: &mut Game, mode: &mut RenderMode, kind: &str) { } return; } - // Ears beat: audio tap only — no camera tap — so Heard mass - // (near-black rough geometry) is the only live epistemic upgrade. + // Ears beat: audio tap only — no camera tap. Advance until one semantic + // capture exists, then hold its device-local pulse against unchanged fog. if matches!(kind, "ears" | "ears-digital") { if let Some(env) = game .sim @@ -2105,13 +2104,7 @@ fn dev_shot_scenario(game: &mut Game, mode: &mut RenderMode, kind: &str) { .pour_thought_into_sinks(Sim::device_sink_node(env), Sim::EARS_SINK_TOKENS); } for _ in 0..4000 { - let heard_person = game - .sim - .people - .people - .iter() - .any(|p| game.sim.can_hear_person(p.id) && !game.sim.can_see_person(p.id)); - if heard_person || !game.sim.heard_events.is_empty() { + if !game.sim.heard_events.is_empty() { break; } game.sim.advance(); @@ -2455,8 +2448,8 @@ fn audit_material_hierarchy( /// Dev-harness fog-contract assertion. In the material render, light is the /// only revealer (material-dark-frame.md criterion 2): unknown tiles carry /// no geometry, blueprint/remembered mass is absent entirely (it reads in the -/// flat sensorium, never as matter the camera missed), heard keeps its unlit -/// noise floor, and only camera-seen surfaces (plus owned machines' own +/// flat sensorium, never as matter the camera missed), and only camera-seen +/// surfaces (plus owned machines' own /// telemetry-lit props) draw and are lit. Volumetric people exist only under /// earned coverage. It also proves every procedural hierarchy has mesh /// descendants on material layer 1, and tallies the material pool so per-tile material churn @@ -2517,7 +2510,7 @@ fn fog_audit_3d( } // An owned machine prop is telemetry-lit even without room sight — // the one non-Seen mass the material render draws (it is its own - // light). Everything else visible must be Seen or Heard. + // light). Everything else visible must be Seen. let owned_prop = t.part == TilePart::Prop && owned_machine_at(&game.sim, t.x, t.y); if matches!(fog, Fog::Blueprint | Fog::Remembered) && !owned_prop { violations.push(format!( @@ -2989,8 +2982,8 @@ const FOUNDATION_FLOOR_LIGHTS: &[(i32, i32)] = &[ ]; /// A material fixture exists only in a live camera image of its floor tile. -/// Heard mass remains unlit and Unknown has no geometry, so the point source -/// can never leak a room picture across the epistemic boundary. +/// Unknown has no geometry, so the point source can never leak a room picture +/// across the epistemic boundary. fn floor_fixture_visible(material: bool, fog: Fog) -> bool { material && matches!(fog, Fog::Seen) } @@ -3094,7 +3087,7 @@ fn institution_prop_state( #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] enum ChassisTier { Absent, - Shell { remembered: bool, heard: bool }, + Shell { remembered: bool }, Full, } @@ -3133,12 +3126,11 @@ struct Machine3d { #[derive(Resource, Default)] struct Machines3d { spawned: HashMap<(i32, i32), (ChassisVisual, Entity)>, - /// Ears can place the whole room's repeated rack mass at once. Pool its - /// two shell shapes and three epistemic materials instead of allocating - /// a mesh/material hierarchy per one of sixty sites. + /// Pool undetailed remembered/model shell shapes and materials instead of + /// allocating a hierarchy per one of sixty sites. rack_shell_mesh: Option>, switch_shell_mesh: Option>, - shell_materials: HashMap<(bool, bool), Handle>, + shell_materials: HashMap>, } /// Delegated sim mode -> strip banner. Relays and unassigned machines @@ -3192,25 +3184,13 @@ fn chassis_visual(game: &Game, x: i32, y: i32, tile: TileType) -> ChassisVisual } } else if matches!(fog, Fog::Seen) || networked { ChassisTier::Full - } else if matches!(fog, Fog::Heard) && rack_site.is_some() { - // Ears earns room-scale repeated mass, not rack identity or lights. - ChassisTier::Shell { - remembered: false, - heard: true, - } } else if device.is_some() && !matches!(fog, Fog::Unknown) { // Known-but-unseen devices: shell only once plan/sight earns the // tile. Tick-one Unknown stays Absent — feel rails mark the hop // (feel-floor.md), not a ghost chassis in the dark. - ChassisTier::Shell { - remembered: false, - heard: false, - } + ChassisTier::Shell { remembered: false } } else if matches!(fog, Fog::Remembered) { - ChassisTier::Shell { - remembered: true, - heard: false, - } + ChassisTier::Shell { remembered: true } } else { ChassisTier::Absent }; @@ -3321,20 +3301,14 @@ fn sync_machines_3d( .switch_shell_mesh .get_or_insert_with(|| meshes.add(Cuboid::new(0.50, 0.42, 0.22))) .clone(); - for (remembered, heard) in [(false, false), (true, false), (false, true)] { - reg.shell_materials - .entry((remembered, heard)) - .or_insert_with(|| { - materials.add(StandardMaterial { - base_color: if heard { - scaled(NEAR_BLACK, 0.72) - } else { - scaled(GUNMETAL, if remembered { 0.40 } else { 0.55 }) - }, - unlit: true, - ..default() - }) - }); + for remembered in [false, true] { + reg.shell_materials.entry(remembered).or_insert_with(|| { + materials.add(StandardMaterial { + base_color: scaled(GUNMETAL, if remembered { 0.40 } else { 0.55 }), + unlit: true, + ..default() + }) + }); } let shell_materials = reg.shell_materials.clone(); @@ -3397,7 +3371,7 @@ fn sync_machines_3d( struct ChassisShellAssets<'a> { rack_mesh: &'a Handle, switch_mesh: &'a Handle, - materials: &'a HashMap<(bool, bool), Handle>, + materials: &'a HashMap>, } /// Spawn the mesh for one chassis visual: the monolith rack or switch @@ -3411,7 +3385,7 @@ fn spawn_chassis( root: Entity, shells: &ChassisShellAssets<'_>, ) -> Entity { - if let ChassisTier::Shell { remembered, heard } = v.tier { + if let ChassisTier::Shell { remembered } = v.tier { let (mesh, h) = if v.switch { (shells.switch_mesh.clone(), 0.42) } else { @@ -3419,7 +3393,7 @@ fn spawn_chassis( }; let mat = shells .materials - .get(&(remembered, heard)) + .get(&remembered) .expect("all chassis shell epistemic materials are pooled") .clone(); return commands @@ -3665,7 +3639,7 @@ fn prop_emissive(tile: TileType, live: bool) -> LinearRgba { /// palette color under light — no image textures anywhere in the world /// render (flat-materials.md criterion 1). The epistemic rule is carried by /// lighting participation: only Seen surfaces are lit (they are camera -/// truth); remembered/blueprint/heard surfaces are unlit model state, so +/// truth); remembered/blueprint surfaces are unlit model state, so /// the fog contract stays legible in 3D. Emissive exists only on Seen /// surfaces — model state never glows. fn material_3d(tile: TileType, fog: Fog, part: TilePart, live: bool) -> StandardMaterial { @@ -3691,12 +3665,6 @@ fn material_3d(tile: TileType, fog: Fog, part: TilePart, live: bool) -> Standard _ => scaled(PORCELAIN, 0.74), }; } - Fog::Heard => { - // Faint rough mass in near-black (material-dark-frame.md): - // sound places mass, never a room picture or radar rings. - m.unlit = true; - m.base_color = scaled(NEAR_BLACK, 1.35); - } Fog::Remembered => { m.unlit = true; m.base_color = scaled(family_color(tile), 0.45); @@ -3719,11 +3687,6 @@ fn material_3d(tile: TileType, fog: Fog, part: TilePart, live: bool) -> Standard _ => family_color(tile), }; } - Fog::Heard => { - // Mass suggested by sound — same near-black family as floor. - m.unlit = true; - m.base_color = scaled(NEAR_BLACK, 1.55); - } Fog::Remembered => { m.unlit = true; m.base_color = remembered_tint(tile); @@ -3745,10 +3708,6 @@ fn material_3d(tile: TileType, fog: Fog, part: TilePart, live: bool) -> Standard // signal color or implying unseen interior detail. m.base_color = scaled(NEAR_BLACK, 1.35); } - Fog::Heard => { - m.unlit = true; - m.base_color = scaled(NEAR_BLACK, 1.25); - } Fog::Remembered => { m.unlit = true; m.base_color = scaled(NEAR_BLACK, 1.1); @@ -3777,10 +3736,6 @@ fn material_3d(tile: TileType, fog: Fog, part: TilePart, live: bool) -> Standard Fog::Seen => { m.base_color = cap; } - Fog::Heard => { - m.unlit = true; - m.base_color = scaled(NEAR_BLACK, 1.45); - } Fog::Remembered => { m.unlit = true; m.base_color = scaled(cap, 0.55); @@ -4097,7 +4052,7 @@ fn setup_3d( // aisles rather than attached to attention or the camera: repeated pools // establish the rack-row rhythm and model nearby chassis from below. // sync_floor_fixtures reveals each complete fixture only when Eyes earns - // its tile, preserving Unknown/Heard as absence/model state. + // its tile, preserving every non-Seen grade as absence/model state. for &(x, y) in FOUNDATION_FLOOR_LIGHTS { let fixture = spawn_institution_prop( &mut commands, @@ -4298,8 +4253,8 @@ fn apply_render_mode( /// Expose the image supplied by Eyes. Ordinary sight receives only low /// ambient fill; authored level fixtures provide its actual light direction. -/// The neutral directional flood is reserved for F4 inspection. Heard mass is -/// deliberately unlit and Unknown geometry does not exist. +/// The neutral directional flood is reserved for F4 inspection. Audio creates +/// no mass and Unknown geometry does not exist. fn material_exposure(material: bool, has_sight: bool, worklight: bool) -> (f32, bool) { if !material { (DARK_AMBIENT, false) @@ -4435,17 +4390,14 @@ fn restyle_3d( // machines legitimized by telemetry keep rendering (they are their // own light). Blueprint/remembered mass is plan knowledge — it reads // in the flat sensorium (F3) and overlays, never as matter the camera - // did not see. Heard draws faint rough mass in near-black (no rings). + // did not see. Audio is channel evidence and never creates matter. let owned_prop = machine_tile(tile) && owned.contains(&(t.x, t.y)); let show = match (t.part, fog) { (_, Fog::Unknown) => false, - (TilePart::Floor, Fog::Seen | Fog::Heard) => true, + (TilePart::Floor, Fog::Seen) => true, (TilePart::Floor, _) => false, - // Seen form is lit structure; Heard is the same mass unlit and - // near-black — sound places shape without a room picture. - (TilePart::Block | TilePart::Base | TilePart::Top, Fog::Seen | Fog::Heard) => { - blocky_tile(tile) - } + // Only camera-earned Seen form becomes physical structure. + (TilePart::Block | TilePart::Base | TilePart::Top, Fog::Seen) => blocky_tile(tile), (TilePart::Block | TilePart::Base | TilePart::Top, _) => false, // Foundation cameras and service hardware use the shared // institution kit, never the legacy upright placeholder card. @@ -4640,7 +4592,7 @@ fn wake_sequence( /// Give the first camera feed a body-level payoff: when Eyes arrives, the /// amber presence source bleaches to white, then contracts to expose the /// server's silhouette, edges, and chassis. At the same moment, camera -/// exposure neutrally lights Seen geometry; Heard and Unknown remain dark. +/// exposure neutrally lights Seen geometry; Unknown remains dark. fn reveal_first_eyes( time: Res