Minor color tweaks.

This commit is contained in:
Joe Ardent 2022-01-29 13:31:15 -08:00
parent 3a1c4ebff8
commit d793b6e986
4 changed files with 14 additions and 12 deletions

View File

@ -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;
}
}

View File

@ -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()
}),

View File

@ -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<Assets<Mesh>>,
@ -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()
});

View File

@ -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::<f32>() * 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