diff --git a/Cargo.lock b/Cargo.lock index 86dd659..51cc692 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -85,6 +85,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + [[package]] name = "bit-set" version = "0.5.2" @@ -805,6 +811,43 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gltf" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff38b75359a0096dd0a8599b6e4f37a6ee41d5df300cc7669e62aafa697f7a2" +dependencies = [ + "base64", + "byteorder", + "gltf-json", + "image", + "lazy_static", +] + +[[package]] +name = "gltf-derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f2a9333e0f9c7bca94dfc20bcf44fa12a61eeec662d6e007563ff748aa59c70" +dependencies = [ + "inflections", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "gltf-json" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1414d3a98cbaabdb2f134328b1f6036d14b282febc1df51952a435d2ca17fb6" +dependencies = [ + "gltf-derive", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "gpu-alloc" version = "0.4.7" @@ -903,6 +946,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "inflections" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" + [[package]] name = "inplace_it" version = "0.3.3" @@ -921,6 +970,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + [[package]] name = "jni-sys" version = "0.3.0" @@ -1529,6 +1584,7 @@ dependencies = [ "cgmath", "env_logger", "futures", + "gltf", "image", "log", "noise", @@ -1537,6 +1593,12 @@ dependencies = [ "winit", ] +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -1555,6 +1617,28 @@ version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" +[[package]] +name = "serde_derive" +version = "1.0.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +dependencies = [ + "itoa", + "ryu", + "serde", +] + [[package]] name = "slab" version = "0.4.3" diff --git a/Cargo.toml b/Cargo.toml index 99d01ff..92bba24 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +gltf = "0.16" ahash = "0.7.4" anyhow = "1.0.40" bytemuck = { version = "1.5.1", features = ["derive"] } diff --git a/assets/models/minecrab.glb b/assets/models/minecrab.glb new file mode 100644 index 0000000..9f2051b --- /dev/null +++ b/assets/models/minecrab.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4521de51494995a990f0cdad33005d72d38a32bc6bcb83d18c591ce755128a20 +size 43368 diff --git a/src/npc.rs b/src/npc.rs new file mode 100644 index 0000000..7a476b5 --- /dev/null +++ b/src/npc.rs @@ -0,0 +1,5 @@ +pub struct Npc { + Vector3 position; + Vector3 scale; + Vector3 rotation; +};