shut the linter up

This commit is contained in:
Joe Ardent 2023-01-25 15:35:28 -08:00
parent ff64bbeff3
commit 738dd6569a
1 changed files with 13 additions and 13 deletions

View File

@ -9,8 +9,8 @@ pub const LIGHT_RANGE: f32 = 90.0;
#[derive(Component)]
struct AnimatedCyberLight {
axis: Vec3,
rate: f32,
_axis: Vec3,
_rate: f32,
}
#[derive(Component, Default)]
@ -18,7 +18,7 @@ pub(crate) struct AnimateCyberLightWireframe {
pub wired: bool,
}
fn spawn_moving_lights(
fn _spawn_moving_lights(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
@ -27,13 +27,13 @@ fn spawn_moving_lights(
// spawn orbiting bisexual lights
for _ in 0..655 {
// mechanics
let axis = crate::random_unit_vec(rng);
let _axis = crate::random_unit_vec(rng);
let angle = rng.gen_range(0.0..TAU);
let rate: f32 = rng.gen_range(7.0..10.0);
let rate = rate.to_radians();
let rotation = Quat::from_axis_angle(axis, angle);
let _rate: f32 = rng.gen_range(7.0..10.0);
let _rate = _rate.to_radians();
let rotation = Quat::from_axis_angle(_axis, angle);
let altitude = PLANET_RADIUS + rng.gen_range(8.0..20.0);
let perp = axis.any_orthonormal_vector();
let perp = _axis.any_orthonormal_vector();
let translation = perp * altitude;
let transform = Transform::from_translation(translation);
@ -59,7 +59,7 @@ fn spawn_moving_lights(
};
commands
// first, spawn an entity with a transform we can rotate
.spawn((AnimatedCyberLight { axis, rate },))
.spawn((AnimatedCyberLight { _axis, _rate },))
.insert(sbundle)
.with_children(|parent| {
parent
@ -163,12 +163,12 @@ fn spawn_static_lights(
});
}
fn orbit_lights(time: Res<Time>, mut query: Query<(&mut Transform, &AnimatedCyberLight)>) {
fn _orbit_lights(time: Res<Time>, mut query: Query<(&mut Transform, &AnimatedCyberLight)>) {
let dt = time.delta_seconds();
for (mut transform, light) in query.iter_mut() {
let AnimatedCyberLight { axis, rate } = *light;
let theta = rate * dt;
transform.rotation *= Quat::from_axis_angle(axis, theta);
let AnimatedCyberLight { _axis, _rate } = *light;
let theta = _rate * dt;
transform.rotation *= Quat::from_axis_angle(_axis, theta);
}
}