mirror of
https://github.com/Theaninova/mhlib.git
synced 2025-12-12 12:36:17 +00:00
update dependencies
This commit is contained in:
@@ -92,7 +92,7 @@ void fragment() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void light() {
|
/*void light() {
|
||||||
DIFFUSE_LIGHT =project(
|
DIFFUSE_LIGHT =project(
|
||||||
tex_diffuse,
|
tex_diffuse,
|
||||||
tex_diffuse_projection,
|
tex_diffuse_projection,
|
||||||
@@ -102,4 +102,4 @@ void light() {
|
|||||||
tex_diffuse_projection_world_coords,
|
tex_diffuse_projection_world_coords,
|
||||||
UV
|
UV
|
||||||
);
|
);
|
||||||
}
|
}*/
|
||||||
|
|||||||
123
rust/Cargo.lock
generated
123
rust/Cargo.lock
generated
@@ -33,9 +33,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "binrw"
|
name = "binrw"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "272caaf6e0bfb7d508c0606e541e2c68f85c0d6352b62d0b299924eed59fe384"
|
checksum = "ab81d22cbd2d745852348b2138f3db2103afa8ce043117a374581926a523e267"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-init",
|
"array-init",
|
||||||
"binrw_derive",
|
"binrw_derive",
|
||||||
@@ -44,9 +44,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "binrw_derive"
|
name = "binrw_derive"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fb4b28c1e534d96213c8966bb9240095757aa0909128985f97d16afd2e7257a8"
|
checksum = "d6b019a3efebe7f453612083202887b6f1ace59e20d010672e336eea4ed5be97"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"either",
|
"either",
|
||||||
"owo-colors",
|
"owo-colors",
|
||||||
@@ -69,9 +69,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bumpalo"
|
name = "bumpalo"
|
||||||
version = "3.12.1"
|
version = "3.13.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8"
|
checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytemuck"
|
name = "bytemuck"
|
||||||
@@ -286,7 +286,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "godot"
|
name = "godot"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/godot-rust/gdext?branch=master#c0935ac122dd94983f0f790cd07d6c7629a7429e"
|
source = "git+https://github.com/godot-rust/gdext?branch=master#7dbd80f6f87e4aa4d1a257aa8395de2533ab6dbc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"godot-core",
|
"godot-core",
|
||||||
"godot-macros",
|
"godot-macros",
|
||||||
@@ -295,7 +295,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "godot-bindings"
|
name = "godot-bindings"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/godot-rust/gdext?branch=master#c0935ac122dd94983f0f790cd07d6c7629a7429e"
|
source = "git+https://github.com/godot-rust/gdext?branch=master#7dbd80f6f87e4aa4d1a257aa8395de2533ab6dbc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"godot4-prebuilt",
|
"godot4-prebuilt",
|
||||||
]
|
]
|
||||||
@@ -303,19 +303,20 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "godot-codegen"
|
name = "godot-codegen"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/godot-rust/gdext?branch=master#c0935ac122dd94983f0f790cd07d6c7629a7429e"
|
source = "git+https://github.com/godot-rust/gdext?branch=master#7dbd80f6f87e4aa4d1a257aa8395de2533ab6dbc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"godot-bindings",
|
"godot-bindings",
|
||||||
"heck",
|
"heck",
|
||||||
"nanoserde",
|
"nanoserde",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
"regex",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "godot-core"
|
name = "godot-core"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/godot-rust/gdext?branch=master#c0935ac122dd94983f0f790cd07d6c7629a7429e"
|
source = "git+https://github.com/godot-rust/gdext?branch=master#7dbd80f6f87e4aa4d1a257aa8395de2533ab6dbc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glam",
|
"glam",
|
||||||
"godot-codegen",
|
"godot-codegen",
|
||||||
@@ -325,7 +326,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "godot-ffi"
|
name = "godot-ffi"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/godot-rust/gdext?branch=master#c0935ac122dd94983f0f790cd07d6c7629a7429e"
|
source = "git+https://github.com/godot-rust/gdext?branch=master#7dbd80f6f87e4aa4d1a257aa8395de2533ab6dbc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"godot-bindings",
|
"godot-bindings",
|
||||||
"godot-codegen",
|
"godot-codegen",
|
||||||
@@ -335,7 +336,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "godot-macros"
|
name = "godot-macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/godot-rust/gdext?branch=master#c0935ac122dd94983f0f790cd07d6c7629a7429e"
|
source = "git+https://github.com/godot-rust/gdext?branch=master#7dbd80f6f87e4aa4d1a257aa8395de2533ab6dbc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -345,7 +346,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "godot4-prebuilt"
|
name = "godot4-prebuilt"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
source = "git+https://github.com/godot-rust/godot4-prebuilt?branch=4.0.1#f9e8cfec0ec565201801b02160ef836800746617"
|
source = "git+https://github.com/godot-rust/godot4-prebuilt?branch=4.0.3#fd48aa5a437e63416360ff44e533177036e7460f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "half"
|
name = "half"
|
||||||
@@ -410,9 +411,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js-sys"
|
name = "js-sys"
|
||||||
version = "0.3.61"
|
version = "0.3.63"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
|
checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
@@ -459,12 +460,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.17"
|
version = "0.4.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
@@ -591,9 +589,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "once_cell"
|
name = "once_cell"
|
||||||
version = "1.17.1"
|
version = "1.17.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
|
checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "owo-colors"
|
name = "owo-colors"
|
||||||
@@ -609,22 +607,22 @@ checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project"
|
name = "pin-project"
|
||||||
version = "1.0.12"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc"
|
checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pin-project-internal",
|
"pin-project-internal",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project-internal"
|
name = "pin-project-internal"
|
||||||
version = "1.0.12"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
|
checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 1.0.109",
|
"syn 2.0.18",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -656,9 +654,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.56"
|
version = "1.0.59"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
|
checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
@@ -674,9 +672,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.26"
|
version = "1.0.28"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
|
checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@@ -703,6 +701,21 @@ dependencies = [
|
|||||||
"num_cpus",
|
"num_cpus",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex"
|
||||||
|
version = "1.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390"
|
||||||
|
dependencies = [
|
||||||
|
"regex-syntax",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-syntax"
|
||||||
|
version = "0.7.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "renderwarelib"
|
name = "renderwarelib"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@@ -724,9 +737,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.162"
|
version = "1.0.163"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6"
|
checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
@@ -745,13 +758,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.162"
|
version = "1.0.163"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6"
|
checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.15",
|
"syn 2.0.18",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -807,9 +820,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.15"
|
version = "2.0.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
|
checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -833,7 +846,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.15",
|
"syn 2.0.18",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -849,9 +862,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.8"
|
version = "1.0.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
|
checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "venial"
|
name = "venial"
|
||||||
@@ -871,9 +884,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen"
|
name = "wasm-bindgen"
|
||||||
version = "0.2.84"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
|
checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"wasm-bindgen-macro",
|
"wasm-bindgen-macro",
|
||||||
@@ -881,24 +894,24 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-backend"
|
name = "wasm-bindgen-backend"
|
||||||
version = "0.2.84"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
|
checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bumpalo",
|
"bumpalo",
|
||||||
"log",
|
"log",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 1.0.109",
|
"syn 2.0.18",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro"
|
name = "wasm-bindgen-macro"
|
||||||
version = "0.2.84"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
|
checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"wasm-bindgen-macro-support",
|
"wasm-bindgen-macro-support",
|
||||||
@@ -906,22 +919,22 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro-support"
|
name = "wasm-bindgen-macro-support"
|
||||||
version = "0.2.84"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
|
checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 1.0.109",
|
"syn 2.0.18",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-shared"
|
name = "wasm-bindgen-shared"
|
||||||
version = "0.2.84"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
|
checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "weezl"
|
name = "weezl"
|
||||||
@@ -931,9 +944,9 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xml-rs"
|
name = "xml-rs"
|
||||||
version = "0.8.6"
|
version = "0.8.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "40e1a60e6e271dfb0db2db95987551348db75ebd6a78be07b9039b036f7dae2a"
|
checksum = "2d8f380ae16a37b30e6a2cf67040608071384b1450c189e61bea3ff57cde922d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zune-inflate"
|
name = "zune-inflate"
|
||||||
|
|||||||
@@ -1,21 +1,69 @@
|
|||||||
use godot::engine::{load, Image};
|
use godot::engine::{load, AnimatedTexture, Image, ImageTexture, Texture2D};
|
||||||
use godot::log::godot_error;
|
use godot::log::godot_error;
|
||||||
use godot::obj::Gd;
|
use godot::obj::Gd;
|
||||||
use lightwave_3d::lwo2::tags::image_clip::{ImageClip, ImageClipSubChunk};
|
use lightwave_3d::lwo2::tags::image_clip::{ImageClip, ImageClipSubChunk};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub fn collect_clip(target: &mut HashMap<u32, Gd<Image>>, clip: ImageClip) {
|
fn convert_path(path: &str) -> String {
|
||||||
for img in clip.attributes.iter() {
|
path.replace('\\', "/").replace(':', ":/")
|
||||||
match img {
|
}
|
||||||
ImageClipSubChunk::StillImage(still) => {
|
|
||||||
let path = format!("sar://{}", still.name.replace('\\', "/").replace(':', ":/"));
|
fn load_texture(path: &str, name: &str) -> Gd<ImageTexture> {
|
||||||
let mut image: Gd<Image> = load(path);
|
let mut image: Gd<Image> = load(path);
|
||||||
image.set_name(still.name.clone().into());
|
image.set_name(name.into());
|
||||||
target.insert(clip.index, image);
|
let mut texture = ImageTexture::new();
|
||||||
|
texture.set_name(name.into());
|
||||||
|
texture.set_image(image);
|
||||||
|
texture
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn collect_clip(target: &mut HashMap<u32, Gd<Texture2D>>, clip: ImageClip) {
|
||||||
|
let mut attributes = clip.attributes.iter();
|
||||||
|
|
||||||
|
match attributes.next().unwrap() {
|
||||||
|
ImageClipSubChunk::StillImage(still) => {
|
||||||
|
let path = format!("sar://{}", convert_path(&still.name));
|
||||||
|
for meta in attributes {
|
||||||
|
godot_error!("TODO: {:?}", meta)
|
||||||
}
|
}
|
||||||
x => {
|
target.insert(clip.index, load_texture(&path, &still.name).upcast());
|
||||||
godot_error!("TODO: Clip chunk {:?}", x)
|
}
|
||||||
|
ImageClipSubChunk::ImageSequence(sequence) => {
|
||||||
|
let mut texture = AnimatedTexture::new();
|
||||||
|
texture.set_frames(sequence.data.end as i64 - sequence.data.start as i64);
|
||||||
|
if sequence.data.flags & 0x1 != 1 {
|
||||||
|
godot_error!("Non-looping animated textures are not supported!")
|
||||||
}
|
}
|
||||||
|
let mut frame_duration = 15.0 / 60.0;
|
||||||
|
|
||||||
|
for meta in attributes {
|
||||||
|
match meta {
|
||||||
|
ImageClipSubChunk::Time(time) => {
|
||||||
|
frame_duration = time.frame_rate as f64 / 60.0;
|
||||||
|
}
|
||||||
|
x => godot_error!("TODO: {:?}", x),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in sequence.data.start..sequence.data.end {
|
||||||
|
let path = format!(
|
||||||
|
"sar://{}{:0width$}{}",
|
||||||
|
convert_path(&sequence.data.prefix),
|
||||||
|
i,
|
||||||
|
sequence.data.suffix,
|
||||||
|
width = sequence.data.num_digits as usize
|
||||||
|
);
|
||||||
|
let frame = i as i64 - sequence.data.start as i64;
|
||||||
|
|
||||||
|
texture.set_frame_texture(frame, load_texture(&path, &i.to_string()).upcast());
|
||||||
|
texture.set_frame_duration(frame, frame_duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
// texture.set_current_frame(sequence.data.offset as i64);
|
||||||
|
target.insert(clip.index, texture.upcast());
|
||||||
|
}
|
||||||
|
x => {
|
||||||
|
godot_error!("TODO: Clip chunk {:?}", x)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ use crate::lwo::surface_info::SurfaceInfo;
|
|||||||
use godot::builtin::{Array, Dictionary, Vector2, Vector3};
|
use godot::builtin::{Array, Dictionary, Vector2, Vector3};
|
||||||
use godot::engine::mesh::{ArrayFormat, PrimitiveType};
|
use godot::engine::mesh::{ArrayFormat, PrimitiveType};
|
||||||
use godot::engine::{ArrayMesh, SurfaceTool};
|
use godot::engine::{ArrayMesh, SurfaceTool};
|
||||||
|
use godot::log::godot_print;
|
||||||
use godot::obj::{Gd, Share};
|
use godot::obj::{Gd, Share};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use lightwave_3d::lwo2::tags::polygon_list::PolygonList;
|
use lightwave_3d::lwo2::tags::polygon_list::PolygonList;
|
||||||
@@ -24,16 +25,13 @@ pub struct IntermediateLayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl IntermediateLayer {
|
impl IntermediateLayer {
|
||||||
pub fn commit(mut self, materials: &HashMap<u16, MaterialUvInfo>) -> Gd<ArrayMesh> {
|
pub fn commit(self, materials: &HashMap<u16, MaterialUvInfo>) -> Gd<ArrayMesh> {
|
||||||
let mut mesh = ArrayMesh::new();
|
let mut mesh = ArrayMesh::new();
|
||||||
mesh.set_name(self.name.clone().into());
|
mesh.set_name(self.name.clone().into());
|
||||||
let mut surface_material_ids = Vec::<u16>::new();
|
let mut surface_material_ids = Vec::<u16>::new();
|
||||||
|
|
||||||
self.uv_mappings.sort_by(|a, b| a.0.cmp(&b.0));
|
|
||||||
|
|
||||||
for material_id in self.material_mappings.values().unique() {
|
for material_id in self.material_mappings.values().unique() {
|
||||||
let material = &materials[material_id];
|
let surface_info = SurfaceInfo::collect_from_layer(&self, &materials[material_id]);
|
||||||
let surface_info = SurfaceInfo::collect_from_layer(&self, material);
|
|
||||||
|
|
||||||
if !surface_info.is_empty() {
|
if !surface_info.is_empty() {
|
||||||
mesh.add_surface_from_arrays(
|
mesh.add_surface_from_arrays(
|
||||||
@@ -47,6 +45,16 @@ impl IntermediateLayer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
godot_print!(
|
||||||
|
"{}: {:?}",
|
||||||
|
&self.name,
|
||||||
|
surface_material_ids
|
||||||
|
.iter()
|
||||||
|
.unique()
|
||||||
|
.map(|id| { (*id, materials[id].material.get_name().to_string()) })
|
||||||
|
.collect_vec()
|
||||||
|
);
|
||||||
|
|
||||||
let mut final_mesh = post_process_mesh(
|
let mut final_mesh = post_process_mesh(
|
||||||
mesh,
|
mesh,
|
||||||
materials,
|
materials,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use godot::builtin::{Basis, Color, EulerOrder, ToVariant, Transform3D, Variant, Vector3};
|
use godot::builtin::{Basis, Color, EulerOrder, ToVariant, Transform3D, Variant, Vector3};
|
||||||
use godot::engine::{load, Image, ImageTexture, ShaderMaterial};
|
use godot::engine::{load, PlaceholderTexture2D, ShaderMaterial, Texture2D};
|
||||||
use godot::log::{godot_error, godot_print};
|
use godot::log::{godot_error, godot_print};
|
||||||
use godot::obj::{Gd, Share};
|
use godot::obj::{Gd, Share};
|
||||||
use lightwave_3d::lwo2::sub_tags::blocks::image_texture::{
|
use lightwave_3d::lwo2::sub_tags::blocks::image_texture::{
|
||||||
@@ -24,7 +24,11 @@ pub struct MaterialUvInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl MaterialUvInfo {
|
impl MaterialUvInfo {
|
||||||
pub fn collect(surface: SurfaceDefinition, images: &HashMap<u32, Gd<Image>>, id: u16) -> Self {
|
pub fn collect(
|
||||||
|
surface: SurfaceDefinition,
|
||||||
|
textures: &HashMap<u32, Gd<Texture2D>>,
|
||||||
|
id: u16,
|
||||||
|
) -> Self {
|
||||||
let mut m = MaterialUvInfo {
|
let mut m = MaterialUvInfo {
|
||||||
diffuse_channel: None,
|
diffuse_channel: None,
|
||||||
color_channel: None,
|
color_channel: None,
|
||||||
@@ -39,7 +43,7 @@ impl MaterialUvInfo {
|
|||||||
match attr {
|
match attr {
|
||||||
SurfaceParameterSubChunk::Blocks(blocks) => {
|
SurfaceParameterSubChunk::Blocks(blocks) => {
|
||||||
if let SurfaceBlocks::ImageMapTexture { header, attributes } = blocks.data {
|
if let SurfaceBlocks::ImageMapTexture { header, attributes } = blocks.data {
|
||||||
let mut texture = ImageTexture::new();
|
let mut texture: Gd<Texture2D> = PlaceholderTexture2D::new().upcast();
|
||||||
let mut chan = TextureChannel::Color;
|
let mut chan = TextureChannel::Color;
|
||||||
let mut uv_channel = None;
|
let mut uv_channel = None;
|
||||||
let mut major_axis = 0;
|
let mut major_axis = 0;
|
||||||
@@ -67,9 +71,12 @@ impl MaterialUvInfo {
|
|||||||
for attr in attributes {
|
for attr in attributes {
|
||||||
match attr {
|
match attr {
|
||||||
SurfaceBlockImageTextureSubChunk::ImageMap(r) => {
|
SurfaceBlockImageTextureSubChunk::ImageMap(r) => {
|
||||||
if let Some(i) = images.get(&r.texture_image) {
|
if let Some(tex) = textures.get(&r.texture_image) {
|
||||||
godot_print!("{}", i.get_name());
|
godot_print!("{}", tex.get_name());
|
||||||
texture.set_image(i.share());
|
debug_assert!(texture
|
||||||
|
.try_cast::<PlaceholderTexture2D>()
|
||||||
|
.is_some());
|
||||||
|
texture = tex.share()
|
||||||
} else {
|
} else {
|
||||||
godot_error!("Missing texture {:?}", r);
|
godot_error!("Missing texture {:?}", r);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use crate::lwo::mapping::{collect_discontinuous_mappings, collect_mappings};
|
|||||||
use crate::lwo::material::MaterialUvInfo;
|
use crate::lwo::material::MaterialUvInfo;
|
||||||
use godot::builtin::{Vector2, Vector3};
|
use godot::builtin::{Vector2, Vector3};
|
||||||
use godot::engine::node::InternalMode;
|
use godot::engine::node::InternalMode;
|
||||||
use godot::engine::{Image, MeshInstance3D, Node3D, PackedScene};
|
use godot::engine::{MeshInstance3D, Node3D, PackedScene, Texture2D};
|
||||||
use godot::log::{godot_error, godot_print, godot_warn};
|
use godot::log::{godot_error, godot_print, godot_warn};
|
||||||
use godot::obj::{Gd, Share};
|
use godot::obj::{Gd, Share};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
@@ -13,8 +13,8 @@ use lightwave_3d::LightWaveObject;
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub fn lightwave_to_gd(lightwave: LightWaveObject) -> Gd<PackedScene> {
|
pub fn lightwave_to_gd(lightwave: LightWaveObject) -> Gd<PackedScene> {
|
||||||
let mut surfaces = HashMap::<u16, MaterialUvInfo>::new();
|
let mut materials = HashMap::<u16, MaterialUvInfo>::new();
|
||||||
let mut images = HashMap::<u32, Gd<Image>>::new();
|
let mut textures = HashMap::<u32, Gd<Texture2D>>::new();
|
||||||
let mut layers = vec![];
|
let mut layers = vec![];
|
||||||
let mut tag_strings = vec![];
|
let mut tag_strings = vec![];
|
||||||
|
|
||||||
@@ -26,7 +26,11 @@ pub fn lightwave_to_gd(lightwave: LightWaveObject) -> Gd<PackedScene> {
|
|||||||
}
|
}
|
||||||
Tag::Layer(layer_tag) => {
|
Tag::Layer(layer_tag) => {
|
||||||
layers.push(IntermediateLayer {
|
layers.push(IntermediateLayer {
|
||||||
name: layer_tag.name.clone(),
|
name: if layer_tag.name.is_empty() {
|
||||||
|
format!("layer_{}", layer_tag.number)
|
||||||
|
} else {
|
||||||
|
layer_tag.name.clone()
|
||||||
|
},
|
||||||
parent: layer_tag.parent,
|
parent: layer_tag.parent,
|
||||||
id: layer_tag.number,
|
id: layer_tag.number,
|
||||||
pivot: Vector3 {
|
pivot: Vector3 {
|
||||||
@@ -132,7 +136,7 @@ pub fn lightwave_to_gd(lightwave: LightWaveObject) -> Gd<PackedScene> {
|
|||||||
}
|
}
|
||||||
x => godot_warn!("{}", String::from_utf8(x.to_vec()).unwrap()),
|
x => godot_warn!("{}", String::from_utf8(x.to_vec()).unwrap()),
|
||||||
},
|
},
|
||||||
Tag::ImageClip(clip) => collect_clip(&mut images, clip.data),
|
Tag::ImageClip(clip) => collect_clip(&mut textures, clip.data),
|
||||||
Tag::SurfaceDefinition(surf) => {
|
Tag::SurfaceDefinition(surf) => {
|
||||||
let surf_name = surf.name.clone();
|
let surf_name = surf.name.clone();
|
||||||
let (tag_index, _) = tag_strings
|
let (tag_index, _) = tag_strings
|
||||||
@@ -141,9 +145,9 @@ pub fn lightwave_to_gd(lightwave: LightWaveObject) -> Gd<PackedScene> {
|
|||||||
.expect("Invalid File");
|
.expect("Invalid File");
|
||||||
godot_print!("'{}': {}", surf_name, tag_index);
|
godot_print!("'{}': {}", surf_name, tag_index);
|
||||||
|
|
||||||
surfaces.insert(
|
materials.insert(
|
||||||
tag_index as u16,
|
tag_index as u16,
|
||||||
MaterialUvInfo::collect(surf.data, &images, tag_index as u16),
|
MaterialUvInfo::collect(surf.data, &textures, tag_index as u16),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Tag::BoundingBox(_) => (),
|
Tag::BoundingBox(_) => (),
|
||||||
@@ -171,7 +175,7 @@ pub fn lightwave_to_gd(lightwave: LightWaveObject) -> Gd<PackedScene> {
|
|||||||
for layer in layers {
|
for layer in layers {
|
||||||
let mut instance = MeshInstance3D::new_alloc();
|
let mut instance = MeshInstance3D::new_alloc();
|
||||||
instance.set_name(layer.name.clone().into());
|
instance.set_name(layer.name.clone().into());
|
||||||
instance.set_mesh(layer.commit(&surfaces).upcast());
|
instance.set_mesh(layer.commit(&materials).upcast());
|
||||||
|
|
||||||
root_node.add_child(
|
root_node.add_child(
|
||||||
instance.share().upcast(),
|
instance.share().upcast(),
|
||||||
|
|||||||
@@ -68,46 +68,42 @@ impl SurfaceInfo {
|
|||||||
);
|
);
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
for (i, inc) in self.material_incomplete.into_iter().enumerate() {
|
for inc in self.material_incomplete.into_iter().filter(|it| it != &0) {
|
||||||
if inc != 0 {
|
let percentage = (inc as f32 / self.vertices.len() as f32) * 100.0;
|
||||||
godot_error!(
|
godot_error!("{} ({}%) incomplete UVs", inc, percentage);
|
||||||
"{} ({}%) incomplete UVs",
|
|
||||||
inc,
|
|
||||||
(inc as f32 / self.vertices.len() as f32) * 100.0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
arrays
|
arrays
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn collect_from_layer(layer: &IntermediateLayer, material: &MaterialUvInfo) -> Self {
|
pub fn collect_from_layer(layer: &IntermediateLayer, material: &MaterialUvInfo) -> Self {
|
||||||
let material_uv_names = [
|
let uv_names = [
|
||||||
material.diffuse_channel.as_ref(),
|
material.diffuse_channel.as_ref(),
|
||||||
material.color_channel.as_ref(),
|
material.color_channel.as_ref(),
|
||||||
];
|
];
|
||||||
|
|
||||||
let materials_subset = material_uv_names
|
let uv_subset = uv_names
|
||||||
.iter()
|
.iter()
|
||||||
.map(|it| it.and_then(|it| layer.uv_mappings.iter().find(|(name, _)| name == it)))
|
.map(|it| it.and_then(|it| layer.uv_mappings.iter().find(|(name, _)| name == it)))
|
||||||
.collect_vec();
|
.collect_vec();
|
||||||
|
|
||||||
let mut surface_info = SurfaceInfo {
|
let mut surface_info = SurfaceInfo {
|
||||||
uv_sets: materials_subset
|
uv_sets: uv_subset
|
||||||
.iter()
|
.iter()
|
||||||
.map(|it| it.map(|_| PackedVector2Array::new()))
|
.map(|it| it.map(|_| PackedVector2Array::new()))
|
||||||
.collect(),
|
.collect(),
|
||||||
material_incomplete: material_uv_names.iter().map(|_| 0).collect_vec(),
|
material_incomplete: uv_names.iter().map(|_| 0).collect_vec(),
|
||||||
..SurfaceInfo::default()
|
..SurfaceInfo::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut surface_polygons = layer.polygons.iter().enumerate().filter(|(id, _)| {
|
let surface_polygons =
|
||||||
layer.material_mappings.get(&(*id as i32)).unwrap_or(&0) == &material.id
|
layer.polygons.iter().enumerate().filter(|(id, _)| {
|
||||||
});
|
layer.material_mappings.get(&(*id as i32)).unwrap() == &material.id
|
||||||
|
});
|
||||||
|
|
||||||
for (id, poly) in surface_polygons {
|
for (id, poly) in surface_polygons {
|
||||||
for index in triangulate(&poly.vert) {
|
for index in triangulate(&poly.vert) {
|
||||||
let uv = materials_subset
|
let uv = uv_subset
|
||||||
.iter()
|
.iter()
|
||||||
.map(|it| it.and_then(|(_, it)| find_mapping(it, id, index)))
|
.map(|it| it.and_then(|(_, it)| find_mapping(it, id, index)))
|
||||||
.collect_vec();
|
.collect_vec();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use binrw::{binread, parser, until_exclusive, BinResult, NullString};
|
|||||||
pub struct Container {
|
pub struct Container {
|
||||||
#[br(temp, args(string_size))]
|
#[br(temp, args(string_size))]
|
||||||
pub header: FileEntry,
|
pub header: FileEntry,
|
||||||
#[br(parse_with = until_end, args_raw(string_size))]
|
#[br(parse_with = until_end, args_raw((string_size,)))]
|
||||||
pub entries: Vec<FileEntry>,
|
pub entries: Vec<FileEntry>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user