This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ee6246
commit 389602a
Showing
27 changed files
with
293 additions
and
84 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use despero::prelude::*; | ||
|
||
fn main() { | ||
Despero::init(WindowBuilder::default()) | ||
|
||
.default_systems() | ||
.add_setup_system(load_scene) | ||
.run(); | ||
} | ||
|
||
fn load_scene( | ||
mut cmd: Write<CommandBuffer>, | ||
mut asset_manager: Write<AssetManager>, | ||
) -> DesperoResult<()> { | ||
let scene = Scene::load_packaged("assets/packages/my_scene.tar.lz4")?; | ||
|
||
cmd.spawn_scene(scene, &mut asset_manager); | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
Scene( | ||
assets: AssetManager( | ||
audio: AudioManager( | ||
sounds: [], | ||
cast_count: 128, | ||
listener_count: 8, | ||
), | ||
textures: [ | ||
Texture( | ||
load_type: Path("assets/textures/uv.jpg"), | ||
filter: Linear, | ||
), | ||
], | ||
materials: [ | ||
{ | ||
"material": "DefaultMat", | ||
"color": (1.0, 1.0, 1.0), | ||
"albedo": 0, | ||
"metallic": 0.5, | ||
"metallic_map": 0, | ||
"roughness": 0.5, | ||
"roughness_map": 0, | ||
"normal": 1.0, | ||
"normal_map": 0, | ||
}, | ||
], | ||
), | ||
entities: [ | ||
Entity( | ||
components: [ | ||
{ | ||
"component": "Mesh", | ||
"vertexdata": [ | ||
Vertex( | ||
position: (-1.0, 1.0, 0.0), | ||
normal: (0.0, 0.0, -4.0), | ||
texcoord: (0.0, 1.0), | ||
), | ||
Vertex( | ||
position: (-1.0, -1.0, 0.0), | ||
normal: (0.0, 0.0, -4.0), | ||
texcoord: (0.0, 0.0), | ||
), | ||
Vertex( | ||
position: (1.0, 1.0, 0.0), | ||
normal: (0.0, 0.0, -4.0), | ||
texcoord: (1.0, 1.0), | ||
), | ||
Vertex( | ||
position: (1.0, -1.0, 0.0), | ||
normal: (0.0, 0.0, -4.0), | ||
texcoord: (1.0, 0.0), | ||
), | ||
], | ||
"indexdata": [ | ||
0, | ||
2, | ||
1, | ||
1, | ||
2, | ||
3, | ||
], | ||
}, | ||
{ | ||
"component": "AssetHandle", | ||
"value": 0, | ||
}, | ||
{ | ||
"component": "Transform", | ||
"translation": [ | ||
0.0, | ||
0.0, | ||
0.0, | ||
], | ||
"rotation": [ | ||
0.0, | ||
0.0, | ||
0.0, | ||
1.0, | ||
], | ||
"scale": 1.0, | ||
}, | ||
], | ||
), | ||
Entity( | ||
components: [ | ||
{ | ||
"component": "Camera", | ||
"camera_type": FirstPerson, | ||
"projectionmatrix": [ | ||
1.2990379, | ||
0.0, | ||
0.0, | ||
0.0, | ||
0.0, | ||
1.7320507, | ||
0.0, | ||
0.0, | ||
0.0, | ||
0.0, | ||
1.001001, | ||
1.0, | ||
0.0, | ||
0.0, | ||
-0.1001001, | ||
0.0, | ||
], | ||
"fovy": 1.0471976, | ||
"aspect": 1.3333334, | ||
"near": 0.1, | ||
"far": 100.0, | ||
"is_active": true, | ||
}, | ||
{ | ||
"component": "Transform", | ||
"translation": [ | ||
0.0, | ||
0.0, | ||
5.0, | ||
], | ||
"rotation": [ | ||
0.0, | ||
0.0, | ||
0.0, | ||
1.0, | ||
], | ||
"scale": 1.0, | ||
}, | ||
], | ||
), | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.