From d793b6e986d79bc3695daae7ea083a4f717f082d Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sat, 29 Jan 2022 13:31:15 -0800 Subject: [PATCH] Minor color tweaks. --- src/action.rs | 2 +- src/geometry.rs | 10 +++++----- src/glamor.rs | 8 +++++--- src/lights.rs | 6 +++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/action.rs b/src/action.rs index a271a30..c38edca 100644 --- a/src/action.rs +++ b/src/action.rs @@ -146,7 +146,7 @@ fn collisions( if state.colliding { let down = -xform.translation.normalize(); let vel = state.velocity; - let dvel = down * vel.dot(down) * 1.0001; + let dvel = down * vel.dot(down); state.velocity -= dvel; } } diff --git a/src/geometry.rs b/src/geometry.rs index e90b408..f4b207f 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -3,7 +3,7 @@ use heron::prelude::{CollisionShape, RigidBody}; use crate::Label; -pub const PLANET_RADIUS: f32 = 360.0; +pub const PLANET_RADIUS: f32 = 860.0; pub(crate) const SPAWN_ALTITUDE: f32 = PLANET_RADIUS + 100.0; #[derive(Component, Debug)] @@ -21,12 +21,12 @@ fn spawn_giant_sphere( .spawn_bundle(PbrBundle { mesh: meshes.add(Mesh::from(shape::Icosphere { radius: PLANET_RADIUS, - subdivisions: 32, + subdivisions: 24, })), material: materials.add(StandardMaterial { - base_color: Color::GRAY, - metallic: 0.7, - perceptual_roughness: 0.5, + base_color: Color::DARK_GRAY, + metallic: 0.6, + perceptual_roughness: 0.4, ..Default::default() }), diff --git a/src/glamor.rs b/src/glamor.rs index 8d2f8f9..bb2b7cd 100644 --- a/src/glamor.rs +++ b/src/glamor.rs @@ -12,6 +12,8 @@ use rand::{thread_rng, Rng}; use crate::{geometry::CyberSphere, lights::AnimateCyberLightWireframe}; +pub const BISEXY_COLOR: Color = Color::hsla(292.0, 0.9, 0.60, 1.1); + fn wireframe_planet( mut commands: Commands, meshes: Res>, @@ -40,9 +42,9 @@ fn wireframe_planet( commands.spawn_bundle(PolylineBundle { polyline: polylines.add(Polyline { vertices: pts }), material: polymats.add(PolylineMaterial { - width: 6.0, - color: Color::hsla(292.0, 1.0, 0.60, 1.0), - perspective: false, + width: 101.0, + color: BISEXY_COLOR, + perspective: true, }), ..Default::default() }); diff --git a/src/lights.rs b/src/lights.rs index 252c5f1..6493aae 100644 --- a/src/lights.rs +++ b/src/lights.rs @@ -5,7 +5,7 @@ use rand::prelude::*; use crate::geometry::PLANET_RADIUS; -pub const LIGHT_RANGE: f32 = 50.0; +pub const LIGHT_RANGE: f32 = 90.0; #[derive(Component)] struct AnimatedCyberLight { @@ -40,7 +40,7 @@ fn spawn_moving_lights( let saturation = rng.gen_range(0.85..0.99); let lightness = rng.gen_range(0.3..0.7); let color = Color::hsl(hue, saturation, lightness); - let intensity = rng.gen_range(500.0..900.0); + let intensity = rng.gen_range(900.0..1300.0); let radius = rng.gen::() * 2.2; // why can't this infer the gen type? let point_light = PointLight { intensity, @@ -113,7 +113,7 @@ fn spawn_static_lights( commands.insert_resource(AmbientLight { color: Color::WHITE, - brightness: 0.32, + brightness: 0.1, }); // up light