window size and color
This commit is contained in:
@@ -12,7 +12,6 @@ use crate::{kneeboardplugin::KneeboardPlugin, vrcontrollerplugin::VrControllersP
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.insert_resource(ClearColor(Color::linear_rgb(1.0, 0.0, 1.0)))
|
||||
.add_plugins(VrPlugin)
|
||||
.add_plugins(VrControllersPlugin)
|
||||
.add_plugins(KneeboardPlugin)
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
use bevy::prelude::*;
|
||||
use bevy::{
|
||||
prelude::*,
|
||||
window::{PresentMode, WindowResolution},
|
||||
};
|
||||
use bevy_mod_openxr::prelude::*;
|
||||
use bevy_mod_xr::session::XrSessionCreated;
|
||||
|
||||
@@ -14,7 +17,17 @@ pub struct VrPlugin;
|
||||
impl Plugin for VrPlugin {
|
||||
fn build(&self, app: &mut bevy::app::App) {
|
||||
app.add_plugins(
|
||||
add_xr_plugins(DefaultPlugins)
|
||||
add_xr_plugins(DefaultPlugins.set(WindowPlugin {
|
||||
primary_window: Some(Window {
|
||||
title: "Kneeboard".into(),
|
||||
resolution: WindowResolution::new(550, 720).with_scale_factor_override(1.0),
|
||||
present_mode: PresentMode::AutoNoVsync,
|
||||
fit_canvas_to_parent: true,
|
||||
prevent_default_event_handling: false,
|
||||
..default()
|
||||
}),
|
||||
..default()
|
||||
}))
|
||||
.disable::<HandTrackingPlugin>()
|
||||
.build()
|
||||
.set(OxrInitPlugin {
|
||||
@@ -51,7 +64,7 @@ pub fn create_view_space(session: Res<OxrSession>, mut commands: Commands) {
|
||||
commands.spawn((Headset, space.0));
|
||||
commands.spawn((
|
||||
Camera {
|
||||
clear_color: ClearColorConfig::Custom(Color::linear_rgb(1.0, 0.0, 1.0)),
|
||||
clear_color: ClearColorConfig::Custom(Color::linear_rgb(0.3, 0.3, 0.3)),
|
||||
..default()
|
||||
},
|
||||
MainCamera,
|
||||
|
||||
Reference in New Issue
Block a user