Skip to content

Commit

Permalink
fix colors
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF committed Jul 8, 2024
1 parent 50de42c commit 69f96df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/2d_cloth.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bevy::color::css::{RED, WHITE};
use bevy::color::palettes::css::{RED, WHITE};
use bevy::prelude::*;
use bevy_verlet::prelude::*;

Expand Down Expand Up @@ -28,7 +28,7 @@ fn setup(mut commands: Commands) {
let mut cmd = commands.spawn((
SpriteBundle {
sprite: Sprite {
color: if j == 0 { RED } else { WHITE },
color: if j == 0 { RED.into() } else { WHITE.into() },
custom_size: Some(Vec2::splat(10.)),
..Default::default()
},
Expand Down
6 changes: 3 additions & 3 deletions examples/3d_cloth.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bevy::color::css::{RED, WHITE};
use bevy::color::palettes::css::{RED, WHITE};
use bevy::prelude::*;
use bevy_verlet::prelude::*;

Expand Down Expand Up @@ -30,8 +30,8 @@ fn setup(
transform: Transform::from_xyz(-50., 0., -50.).looking_at(Vec3::ZERO, Vec3::Y),
..Default::default()
});
let material = materials.add(WHITE);
let fixed_material = materials.add(RED);
let material = materials.add(Color::from(WHITE));
let fixed_material = materials.add(Color::from(RED));
let mesh = meshes.add(Cuboid::new(1., 1., 1.));
let stick_length: f32 = 2.;
let (origin_x, origin_y) = (-5., 10.);
Expand Down
6 changes: 3 additions & 3 deletions examples/3d_line.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bevy::color::css::{RED, WHITE};
use bevy::color::palettes::css::{RED, WHITE};
use bevy::prelude::*;
use bevy_verlet::prelude::*;

Expand Down Expand Up @@ -33,8 +33,8 @@ fn setup_free_line(
mut materials: ResMut<Assets<StandardMaterial>>,
mut meshes: ResMut<Assets<Mesh>>,
) {
let material = materials.add(WHITE);
let fixed_material = materials.add(RED);
let material = materials.add(Color::from(WHITE));
let fixed_material = materials.add(Color:::from(RED));
let mesh = meshes.add(Cuboid::new(1., 1., 1.));
let stick_length: f32 = 2.;
let points_count = 10;
Expand Down

0 comments on commit 69f96df

Please sign in to comment.