better box
This commit is contained in:
BIN
models/box.bin
BIN
models/box.bin
Binary file not shown.
117
models/box.gltf
117
models/box.gltf
@@ -1,117 +0,0 @@
|
|||||||
{
|
|
||||||
"asset" : {
|
|
||||||
"generator" : "Khronos glTF Blender I/O v0.9.36",
|
|
||||||
"version" : "2.0"
|
|
||||||
},
|
|
||||||
"scene" : 0,
|
|
||||||
"scenes" : [
|
|
||||||
{
|
|
||||||
"name" : "Scene",
|
|
||||||
"nodes" : [
|
|
||||||
0
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"nodes" : [
|
|
||||||
{
|
|
||||||
"mesh" : 0,
|
|
||||||
"name" : "Cube"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"materials" : [
|
|
||||||
{
|
|
||||||
"doubleSided" : true,
|
|
||||||
"name" : "Material",
|
|
||||||
"pbrMetallicRoughness" : {
|
|
||||||
"baseColorFactor" : [
|
|
||||||
0.800000011920929,
|
|
||||||
0.800000011920929,
|
|
||||||
0.800000011920929,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"metallicFactor" : 0,
|
|
||||||
"roughnessFactor" : 0.4000000059604645
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"meshes" : [
|
|
||||||
{
|
|
||||||
"name" : "Cube",
|
|
||||||
"primitives" : [
|
|
||||||
{
|
|
||||||
"attributes" : {
|
|
||||||
"POSITION" : 0,
|
|
||||||
"NORMAL" : 1,
|
|
||||||
"TEXCOORD_0" : 2
|
|
||||||
},
|
|
||||||
"indices" : 3,
|
|
||||||
"material" : 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"accessors" : [
|
|
||||||
{
|
|
||||||
"bufferView" : 0,
|
|
||||||
"componentType" : 5126,
|
|
||||||
"count" : 24,
|
|
||||||
"max" : [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"min" : [
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
-1
|
|
||||||
],
|
|
||||||
"type" : "VEC3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bufferView" : 1,
|
|
||||||
"componentType" : 5126,
|
|
||||||
"count" : 24,
|
|
||||||
"type" : "VEC3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bufferView" : 2,
|
|
||||||
"componentType" : 5126,
|
|
||||||
"count" : 24,
|
|
||||||
"type" : "VEC2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bufferView" : 3,
|
|
||||||
"componentType" : 5123,
|
|
||||||
"count" : 36,
|
|
||||||
"type" : "SCALAR"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"bufferViews" : [
|
|
||||||
{
|
|
||||||
"buffer" : 0,
|
|
||||||
"byteLength" : 288,
|
|
||||||
"byteOffset" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"buffer" : 0,
|
|
||||||
"byteLength" : 288,
|
|
||||||
"byteOffset" : 288
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"buffer" : 0,
|
|
||||||
"byteLength" : 192,
|
|
||||||
"byteOffset" : 576
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"buffer" : 0,
|
|
||||||
"byteLength" : 72,
|
|
||||||
"byteOffset" : 768
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"buffers" : [
|
|
||||||
{
|
|
||||||
"byteLength" : 840,
|
|
||||||
"uri" : "box.bin"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
BIN
models/box.gltf.glb
Normal file
BIN
models/box.gltf.glb
Normal file
Binary file not shown.
@@ -83,7 +83,7 @@ impl Game for TestGame {
|
|||||||
|
|
||||||
impl TestGame {
|
impl TestGame {
|
||||||
fn game_start(self: &mut Self, renderer: &mut VulkanRenderer) {
|
fn game_start(self: &mut Self, renderer: &mut VulkanRenderer) {
|
||||||
let (meshes, textures) = mesh::load_mesh("models/box.gltf", self.log_config.mesh_load_info).unwrap();
|
let (meshes, textures) = mesh::load_mesh("models/box.gltf.glb", self.log_config.mesh_load_info).unwrap();
|
||||||
self.test_meshes = meshes.into_iter().map(|m| {
|
self.test_meshes = meshes.into_iter().map(|m| {
|
||||||
let id = match m.texture_index {
|
let id = match m.texture_index {
|
||||||
Some(tex_id) => tex_id + 1,
|
Some(tex_id) => tex_id + 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user