mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-06-14 03:27:39 +00:00
26 lines
610 B
Rust
26 lines
610 B
Rust
|
use bevy::prelude::*;
|
||
|
|
||
|
use crate::cleanup;
|
||
|
|
||
|
const NORMALSPUR: f32 = 1.435;
|
||
|
|
||
|
pub fn setup(
|
||
|
mut c: Commands,
|
||
|
mut meshes: ResMut<Assets<Mesh>>,
|
||
|
mut materials: ResMut<Assets<StandardMaterial>>,
|
||
|
) {
|
||
|
// spawn in floor plane
|
||
|
c.spawn((
|
||
|
Mesh3d(meshes.add(Plane3d::default().mesh().size(128., 128.))),
|
||
|
MeshMaterial3d(materials.add(Color::srgb(0.3, 0.8, 0.4))),
|
||
|
cleanup::Scene,
|
||
|
));
|
||
|
|
||
|
// track (temporary)
|
||
|
c.spawn((
|
||
|
Mesh3d(meshes.add(Cuboid::new(NORMALSPUR, 0.25, 96.))),
|
||
|
MeshMaterial3d(materials.add(Color::BLACK)),
|
||
|
cleanup::Scene,
|
||
|
));
|
||
|
}
|