131 lines
5.2 KiB
Rust
131 lines
5.2 KiB
Rust
// compat/bsn-smoke shim: expose crate-root support types (demo custom components).
|
|
// The generated code below this line is unchanged.
|
|
#![allow(unused_imports)] // the crate::* glob also provides the Bevy prelude names
|
|
use crate::*;
|
|
use bevy::prelude::*;
|
|
use bevy::scene::bsn_list;
|
|
|
|
pub fn scene(
|
|
meshes: &mut Assets<Mesh>,
|
|
materials: &mut Assets<StandardMaterial>,
|
|
) -> impl SceneList {
|
|
bsn_list! {
|
|
Name("Camera")
|
|
Transform {
|
|
translation: Vec3::new(7.5, 5.0, 12.0),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, -16.0f32.to_radians(), 30.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 1.0, 1.0),
|
|
}
|
|
Camera3d::default()
|
|
--
|
|
Name("Sun")
|
|
Transform {
|
|
translation: Vec3::new(0.0, 0.0, 0.0),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, -55.0f32.to_radians(), -25.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 1.0, 1.0),
|
|
}
|
|
DirectionalLight { color: Color::srgba(1.0, 0.95, 0.85, 1.0), illuminance: 11000.0, shadow_maps_enabled: true }
|
|
--
|
|
Name("Ground")
|
|
Transform {
|
|
translation: Vec3::new(0.0, 0.0, 0.0),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, 0.0f32.to_radians(), 0.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 1.0, 1.0),
|
|
}
|
|
Mesh3d({ meshes.add(Plane3d::new(Vec3::Y, Vec2::new(13.0, 13.0))) })
|
|
MeshMaterial3d::<StandardMaterial>({ materials.add(StandardMaterial {
|
|
base_color: Color::srgba(0.31, 0.48, 0.23, 1.0),
|
|
metallic: 0.0,
|
|
perceptual_roughness: 0.92,
|
|
unlit: false,
|
|
..default()
|
|
}) })
|
|
--
|
|
Name("Shrub")
|
|
Transform {
|
|
translation: Vec3::new(-3.4, 1.0, 1.8),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, 0.0f32.to_radians(), 0.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.25, 0.9, 1.25),
|
|
}
|
|
Mesh3d({ meshes.add(Sphere::new(1.0)) })
|
|
MeshMaterial3d::<StandardMaterial>({ materials.add(StandardMaterial {
|
|
base_color: Color::srgba(0.24, 0.45, 0.22, 1.0),
|
|
metallic: 0.0,
|
|
perceptual_roughness: 0.85,
|
|
unlit: false,
|
|
..default()
|
|
}) })
|
|
--
|
|
Name("Flower Stem")
|
|
Transform {
|
|
translation: Vec3::new(2.6, 0.75, 1.4),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, 0.0f32.to_radians(), 0.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 1.0, 1.0),
|
|
}
|
|
Mesh3d({ meshes.add(Cylinder::new(0.09, 1.5)) })
|
|
MeshMaterial3d::<StandardMaterial>({ materials.add(StandardMaterial {
|
|
base_color: Color::srgba(0.35, 0.55, 0.27, 1.0),
|
|
metallic: 0.0,
|
|
perceptual_roughness: 0.8,
|
|
unlit: false,
|
|
..default()
|
|
}) })
|
|
Children [
|
|
Name("Flower Bloom")
|
|
Transform {
|
|
translation: Vec3::new(0.0, 1.0, 0.0),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, 0.0f32.to_radians(), 0.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 0.75, 1.0),
|
|
}
|
|
Mesh3d({ meshes.add(Sphere::new(0.42)) })
|
|
MeshMaterial3d::<StandardMaterial>({ materials.add(StandardMaterial {
|
|
base_color: Color::srgba(0.91, 0.42, 0.65, 1.0),
|
|
metallic: 0.0,
|
|
perceptual_roughness: 0.4,
|
|
unlit: false,
|
|
..default()
|
|
}) })
|
|
]
|
|
--
|
|
Name("Orbit Crystal")
|
|
Transform {
|
|
translation: Vec3::new(0.0, 2.0, 0.0),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, 0.0f32.to_radians(), 0.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 1.0, 1.0),
|
|
}
|
|
Mesh3d({ meshes.add(Sphere::new(0.8)) })
|
|
MeshMaterial3d::<StandardMaterial>({ materials.add(StandardMaterial {
|
|
base_color: Color::srgba(0.27, 0.76, 0.69, 1.0),
|
|
metallic: 0.15,
|
|
perceptual_roughness: 0.2,
|
|
unlit: false,
|
|
..default()
|
|
}) })
|
|
forge_demo::Orbit { radius: 2.4, speed: 0.45 }
|
|
--
|
|
Name("Lantern Post")
|
|
Transform {
|
|
translation: Vec3::new(3.8, 1.2, -1.2),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, 0.0f32.to_radians(), 0.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 1.0, 1.0),
|
|
}
|
|
Mesh3d({ meshes.add(Cylinder::new(0.12, 2.4)) })
|
|
MeshMaterial3d::<StandardMaterial>({ materials.add(StandardMaterial {
|
|
base_color: Color::srgba(0.18, 0.2, 0.25, 1.0),
|
|
metallic: 0.6,
|
|
perceptual_roughness: 0.35,
|
|
unlit: false,
|
|
..default()
|
|
}) })
|
|
Children [
|
|
Name("Lantern Glow")
|
|
Transform {
|
|
translation: Vec3::new(0.0, 1.25, 0.0),
|
|
rotation: Quat::from_euler(EulerRot::XYZ, 0.0f32.to_radians(), 0.0f32.to_radians(), 0.0f32.to_radians()),
|
|
scale: Vec3::new(1.0, 1.0, 1.0),
|
|
}
|
|
PointLight { color: Color::srgba(1.0, 0.82, 0.55, 1.0), intensity: 600.0, range: 12.0, shadow_maps_enabled: true }
|
|
]
|
|
}
|
|
}
|