init
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
/target
|
/target
|
||||||
|
**.blend1
|
||||||
|
|||||||
Generated
+874
-21
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -4,7 +4,9 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = "0.14.2"
|
bevy = { version = "0.14.2", features = ["jpeg"] }
|
||||||
|
bevy_editor_pls = "0.10.0"
|
||||||
|
blenvy = "0.1.0-alpha.1"
|
||||||
clap = { version = "4.5.20", features = ["derive"] }
|
clap = { version = "4.5.20", features = ["derive"] }
|
||||||
lazy_static = "1.5.0"
|
lazy_static = "1.5.0"
|
||||||
lightyear = "0.17.1"
|
lightyear = "0.17.1"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
(
|
||||||
|
assets:
|
||||||
|
[
|
||||||
|
]
|
||||||
|
)
|
||||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
(
|
||||||
|
assets:
|
||||||
|
[
|
||||||
|
]
|
||||||
|
)
|
||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
/home/mitchell/Documents/3D Models/hotel/hotel.glb
|
||||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
(
|
||||||
|
assets:
|
||||||
|
[
|
||||||
|
]
|
||||||
|
)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
({
|
||||||
|
})
|
||||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
|||||||
|
(
|
||||||
|
assets:
|
||||||
|
[
|
||||||
|
("Player", File ( path: "blueprints/Player.glb" )),
|
||||||
|
("glasses.001", File ( path: "materials/glasses.001.glb" )),
|
||||||
|
("body.001", File ( path: "materials/body.001.glb" )),
|
||||||
|
("head.001", File ( path: "materials/head.001.glb" )),
|
||||||
|
("Hotel", File ( path: "blueprints/Hotel.glb" )),
|
||||||
|
("floor", File ( path: "materials/floor.glb" )),
|
||||||
|
]
|
||||||
|
)
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16149
File diff suppressed because it is too large
Load Diff
+57
@@ -1,13 +1,20 @@
|
|||||||
use bevy::log::LogPlugin;
|
use bevy::log::LogPlugin;
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use bevy::state::app::StatesPlugin;
|
use bevy::state::app::StatesPlugin;
|
||||||
|
use bevy_editor_pls::prelude::*;
|
||||||
|
use blenvy::{BlenvyPlugin, BlueprintInfo, GameWorldTag, HideUntilReady, SpawnBlueprint};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use lightyear::prelude::client::ClientPlugins;
|
use lightyear::prelude::client::ClientPlugins;
|
||||||
use lightyear::prelude::server::ServerPlugins;
|
use lightyear::prelude::server::ServerPlugins;
|
||||||
|
use std::f32::consts::PI;
|
||||||
|
|
||||||
pub mod protocol;
|
pub mod protocol;
|
||||||
pub mod shared_net;
|
pub mod shared_net;
|
||||||
|
|
||||||
|
#[derive(Component, PartialEq, Eq, Default, Reflect)]
|
||||||
|
#[reflect(Component)]
|
||||||
|
pub struct Player;
|
||||||
|
|
||||||
lazy_static::lazy_static! {
|
lazy_static::lazy_static! {
|
||||||
pub static ref CONFIG: Cli = {
|
pub static ref CONFIG: Cli = {
|
||||||
Cli::parse()
|
Cli::parse()
|
||||||
@@ -40,7 +47,57 @@ pub struct Cli {
|
|||||||
}
|
}
|
||||||
fn main() {
|
fn main() {
|
||||||
App::new()
|
App::new()
|
||||||
|
.register_type::<Player>()
|
||||||
|
.insert_resource(Msaa::Sample4)
|
||||||
|
.insert_resource(AmbientLight {
|
||||||
|
brightness: 200.0,
|
||||||
|
..default()
|
||||||
|
})
|
||||||
.add_plugins(ClientOrServerPlugin)
|
.add_plugins(ClientOrServerPlugin)
|
||||||
.add_plugins(protocol::ProtocolPlugin)
|
.add_plugins(protocol::ProtocolPlugin)
|
||||||
|
.add_plugins(EditorPlugin::default())
|
||||||
|
.add_plugins(BlenvyPlugin::default())
|
||||||
|
.add_systems(Startup, setup)
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||||
|
// commands.spawn(PointLightBundle {
|
||||||
|
// transform: Transform::from_translation(Vec3::Y * 30.),
|
||||||
|
// point_light: PointLight {
|
||||||
|
// intensity: 20_000_000.0,
|
||||||
|
// shadows_enabled: true,
|
||||||
|
// range: 100.,
|
||||||
|
// ..default()
|
||||||
|
// },
|
||||||
|
// ..default()
|
||||||
|
// });
|
||||||
|
|
||||||
|
commands.spawn((
|
||||||
|
DirectionalLightBundle {
|
||||||
|
transform: Transform::from_translation(Vec3::Y * 10.).with_rotation(Quat::from_euler(
|
||||||
|
EulerRot::XYZ,
|
||||||
|
3. * PI / 2.,
|
||||||
|
0.,
|
||||||
|
0.,
|
||||||
|
)),
|
||||||
|
directional_light: DirectionalLight {
|
||||||
|
shadows_enabled: true,
|
||||||
|
..default()
|
||||||
|
},
|
||||||
|
..default()
|
||||||
|
},
|
||||||
|
Name::new("Sun"),
|
||||||
|
));
|
||||||
|
|
||||||
|
// commands.spawn(SceneBundle {
|
||||||
|
// scene: asset_server.load("hotel.glb#Scene0"),
|
||||||
|
// ..Default::default()
|
||||||
|
// });
|
||||||
|
commands.spawn((
|
||||||
|
BlueprintInfo::from_path("levels/World.glb"),
|
||||||
|
SpawnBlueprint,
|
||||||
|
HideUntilReady,
|
||||||
|
GameWorldTag,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user