Port scene_viewer
This commit is contained in:
parent
94ec868b9e
commit
ee03e99670
@ -173,8 +173,10 @@ fn setup_scene_after_load(
|
|||||||
let mut camera = commands.spawn((
|
let mut camera = commands.spawn((
|
||||||
Camera3d::default(),
|
Camera3d::default(),
|
||||||
Projection::from(projection),
|
Projection::from(projection),
|
||||||
Transform::from_translation(Vec3::from(aabb.center) + size * Vec3::new(0.5, 0.25, 0.5))
|
Transform::from_translation(
|
||||||
.looking_at(Vec3::from(aabb.center), Vec3::Y),
|
Vec3::from(aabb.center) + size * Vec3::new(-0.5, 0.25, -0.5),
|
||||||
|
)
|
||||||
|
.looking_at(Vec3::from(aabb.center), Vec3::Y),
|
||||||
Camera {
|
Camera {
|
||||||
is_active: false,
|
is_active: false,
|
||||||
..default()
|
..default()
|
||||||
@ -214,7 +216,7 @@ fn setup_scene_after_load(
|
|||||||
info!("Spawning a directional light");
|
info!("Spawning a directional light");
|
||||||
let mut light = commands.spawn((
|
let mut light = commands.spawn((
|
||||||
DirectionalLight::default(),
|
DirectionalLight::default(),
|
||||||
Transform::from_xyz(1.0, 1.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y),
|
Transform::from_xyz(-1.0, 1.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y),
|
||||||
));
|
));
|
||||||
if args.occlusion_culling == Some(true) {
|
if args.occlusion_culling == Some(true) {
|
||||||
light.insert(OcclusionCulling);
|
light.insert(OcclusionCulling);
|
||||||
|
Loading…
Reference in New Issue
Block a user