Skip to content

Commit 3cccfd0

Browse files
committed
Use new as_linear_rgba_u32 method
1 parent e49413b commit 3cccfd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/2d/mesh2d_manual.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ fn star(
7070
// Set the position attribute
7171
star.insert_attribute(Mesh::ATTRIBUTE_POSITION, v_pos);
7272
// And a RGB color attribute as well
73-
let mut v_color: Vec<u32> = vec![bytemuck::cast([0_u8, 0_u8, 0_u8, 255_u8])];
74-
v_color.extend_from_slice(&[bytemuck::cast([255_u8, 255_u8, 0_u8, 255_u8]); 10]);
73+
let mut v_color: Vec<u32> = vec![Color::BLACK.as_linear_rgba_u32()];
74+
v_color.extend_from_slice(&[Color::YELLOW.as_linear_rgba_u32(); 10]);
7575
star.insert_attribute(Mesh::ATTRIBUTE_COLOR, v_color);
7676

7777
// Now, we specify the indices of the vertex that are going to compose the

0 commit comments

Comments
 (0)