diff --git a/Cargo.lock b/Cargo.lock index f26df36..94805a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,25 +123,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "arboard" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc120354d1b5ec6d7aaf4876b602def75595937b5e15d356eb554ab5177e08bb" -dependencies = [ - "clipboard-win", - "core-graphics 0.22.3", - "image 0.23.14", - "log", - "objc", - "objc-foundation", - "objc_id", - "parking_lot 0.12.1", - "thiserror", - "winapi", - "x11rb", -] - [[package]] name = "arrayvec" version = "0.7.2" @@ -188,12 +169,6 @@ version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" -[[package]] -name = "atomic_refcell" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" - [[package]] name = "autocfg" version = "1.1.0" @@ -215,48 +190,6 @@ dependencies = [ "bevy_internal", ] -[[package]] -name = "bevy-inspector-egui" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c53ed1cad011e33ea145d2c1f649a966e7457453f3768ddff39bc5064bd525" -dependencies = [ - "bevy", - "bevy-inspector-egui-derive", - "bevy_egui", - "image 0.23.14", - "pretty-type-name", -] - -[[package]] -name = "bevy-inspector-egui-derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ef6260a46924d40781bcb9da157c110d5166bbd573795e4a16f2505913d0d0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "bevy_animation" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4365465fca7bd78295eb81d0a04afc049399852793d562eb017849bb5d6c55e" -dependencies = [ - "bevy_app", - "bevy_asset", - "bevy_core", - "bevy_ecs", - "bevy_hierarchy", - "bevy_math", - "bevy_reflect", - "bevy_time", - "bevy_transform", - "bevy_utils", -] - [[package]] name = "bevy_app" version = "0.8.1" @@ -291,7 +224,6 @@ dependencies = [ "fastrand", "js-sys", "ndk-glue 0.5.2", - "notify", "parking_lot 0.12.1", "serde", "thiserror", @@ -416,19 +348,6 @@ dependencies = [ "syn", ] -[[package]] -name = "bevy_egui" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf44ff770566dca66b805a6829df783f64700bd01d35aec1034dff31b531a4" -dependencies = [ - "arboard", - "bevy", - "egui", - "thread_local", - "webbrowser", -] - [[package]] name = "bevy_encase_derive" version = "0.8.1" @@ -460,7 +379,6 @@ checksum = "79db7d7e71b47a69953fbe8407ded5c6308eaeecf9a05efd5dfb42992f400a16" dependencies = [ "anyhow", "base64", - "bevy_animation", "bevy_app", "bevy_asset", "bevy_core", @@ -512,7 +430,6 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee63ad1e3f95a26ff2c227fadb1534a7bfe3a098e0e45c347f2f2575a573d9bc" dependencies = [ - "bevy_animation", "bevy_app", "bevy_asset", "bevy_audio", @@ -588,6 +505,25 @@ dependencies = [ "glam", ] +[[package]] +name = "bevy_mod_picking" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db42ac84b1409452bbfa696d9071b9a7a2505c73620c939b758b5bf23573976a" +dependencies = [ + "bevy", + "bevy_mod_raycast", +] + +[[package]] +name = "bevy_mod_raycast" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aead49a20f5e694f4fb59c7312f9a1813b65a2a0ac2c385d53d40f25cae896f" +dependencies = [ + "bevy", +] + [[package]] name = "bevy_pbr" version = "0.8.1" @@ -691,7 +627,7 @@ dependencies = [ "futures-lite", "hex", "hexasphere", - "image 0.24.3", + "image", "naga", "once_cell", "parking_lot 0.12.1", @@ -880,7 +816,7 @@ dependencies = [ "bevy_input", "bevy_math", "bevy_utils", - "raw-window-handle 0.4.3", + "raw-window-handle", "web-sys", ] @@ -898,30 +834,12 @@ dependencies = [ "bevy_utils", "bevy_window", "crossbeam-channel", - "raw-window-handle 0.4.3", + "raw-window-handle", "wasm-bindgen", "web-sys", "winit", ] -[[package]] -name = "bevyjam" -version = "0.1.0" -dependencies = [ - "bevy", - "bevy-inspector-egui", - "bevy_common_assets", - "bevy_rapier2d", - "cpal 0.14.0", - "crossbeam-channel", - "hexodsp", - "rand", - "rand_distr", - "rapier2d", - "serde", - "ticktock", -] - [[package]] name = "bindgen" version = "0.59.2" @@ -1065,17 +983,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clipboard-win" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219" -dependencies = [ - "error-code", - "str-buf", - "winapi", -] - [[package]] name = "cocoa" version = "0.24.0" @@ -1291,31 +1198,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "cpal" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d466b47cf0ea4100186a7c12d7d0166813dda7cf648553554c9c39c6324841b" -dependencies = [ - "alsa", - "core-foundation-sys 0.8.3", - "coreaudio-rs", - "jni", - "js-sys", - "libc", - "mach", - "ndk 0.7.0", - "ndk-context", - "nix 0.23.1", - "oboe", - "once_cell", - "parking_lot 0.12.1", - "stdweb", - "thiserror", - "web-sys", - "windows", -] - [[package]] name = "crc32fast" version = "1.3.2" @@ -1446,16 +1328,6 @@ dependencies = [ "syn", ] -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - [[package]] name = "deflate" version = "1.0.0" @@ -1477,32 +1349,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" -[[package]] -name = "egui" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb095a8b9feb9b7ff8f00b6776dffcef059538a3f4a91238e03c900e9c9ad9a2" -dependencies = [ - "ahash", - "epaint", - "nohash-hasher", -] - [[package]] name = "either" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" -[[package]] -name = "emath" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c223f58c7e38abe1770f367b969f1b3fbd4704b67666bcb65dbb1adb0980ba72" -dependencies = [ - "bytemuck", -] - [[package]] name = "encase" version = "0.3.0" @@ -1545,40 +1397,15 @@ dependencies = [ "regex", ] -[[package]] -name = "epaint" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c29567088888e8ac3e8f61bbb2ddc820207ebb8d69eefde5bcefa06d65e4e89" -dependencies = [ - "ab_glyph", - "ahash", - "atomic_refcell", - "bytemuck", - "emath", - "nohash-hasher", - "parking_lot 0.12.1", -] - [[package]] name = "erased-serde" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003000e712ad0f95857bd4d2ef8d1890069e06554101697d12050668b2f6f020" +checksum = "54558e0ba96fbe24280072642eceb9d7d442e32c7ec0ea9e7ecd7b4ea2cf4e11" dependencies = [ "serde", ] -[[package]] -name = "error-code" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" -dependencies = [ - "libc", - "str-buf", -] - [[package]] name = "euclid" version = "0.22.7" @@ -1603,18 +1430,6 @@ dependencies = [ "instant", ] -[[package]] -name = "filetime" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "windows-sys", -] - [[package]] name = "fixedbitset" version = "0.4.2" @@ -1642,25 +1457,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - [[package]] name = "futures-core" version = "0.3.23" @@ -1697,16 +1493,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "gethostname" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "getrandom" version = "0.2.7" @@ -1938,59 +1724,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "hexodsp" -version = "0.2.0" -source = "git+https://github.com/WeirdConstructor/HexoDSP#be4e9232cc05b96588b156d1c9f995f7eda41ec0" -dependencies = [ - "hound", - "lazy_static", - "ringbuf", - "serde", - "serde_json", - "synfx-dsp", - "triple_buffer", -] - -[[package]] -name = "hound" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" - [[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "image" -version = "0.23.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-iter", - "num-rational 0.3.2", - "num-traits", - "png 0.16.8", - "tiff", -] - [[package]] name = "image" version = "0.24.3" @@ -2000,10 +1739,9 @@ dependencies = [ "bytemuck", "byteorder", "color_quant", - "num-rational 0.4.1", + "num-rational", "num-traits", - "png 0.17.5", - "scoped_threadpool", + "png", ] [[package]] @@ -2022,26 +1760,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" -[[package]] -name = "inotify" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" -dependencies = [ - "bitflags", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", -] - [[package]] name = "inplace_it" version = "0.3.4" @@ -2105,12 +1823,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" - [[package]] name = "js-sys" version = "0.3.59" @@ -2131,26 +1843,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "kqueue" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6112e8f37b59803ac47a42d14f1f3a59bbf72fc6857ffc5be455e28a691f8e" -dependencies = [ - "kqueue-sys", - "libc", -] - -[[package]] -name = "kqueue-sys" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" -dependencies = [ - "bitflags", - "libc", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -2208,9 +1900,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" dependencies = [ "autocfg", "scopeguard", @@ -2225,6 +1917,21 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "lux-synthese" +version = "0.1.0" +dependencies = [ + "bevy", + "bevy_common_assets", + "bevy_mod_picking", + "bevy_rapier2d", + "rand", + "rand_distr", + "rapier2d", + "serde", + "serde_json", +] + [[package]] name = "mach" version = "0.3.2" @@ -2252,12 +1959,6 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "matrixmultiply" version = "0.3.2" @@ -2302,25 +2003,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - [[package]] name = "miniz_oxide" version = "0.5.3" @@ -2375,7 +2057,7 @@ dependencies = [ "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational 0.4.1", + "num-rational", "num-traits", "simba", "typenum", @@ -2418,20 +2100,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ndk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys 0.4.0", - "num_enum", - "raw-window-handle 0.5.0", - "thiserror", -] - [[package]] name = "ndk-context" version = "0.1.1" @@ -2497,28 +2165,6 @@ dependencies = [ "jni-sys", ] -[[package]] -name = "ndk-sys" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "nix" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" -dependencies = [ - "bitflags", - "cc", - "cfg-if 1.0.0", - "libc", - "memoffset", -] - [[package]] name = "nix" version = "0.23.1" @@ -2543,12 +2189,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nom" version = "7.1.1" @@ -2559,24 +2199,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "notify" -version = "5.0.0-pre.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553f9844ad0b0824605c20fb55a661679782680410abfb1a8144c2e7e437e7a7" -dependencies = [ - "bitflags", - "crossbeam-channel", - "filetime", - "fsevent-sys", - "inotify", - "kqueue", - "libc", - "mio", - "walkdir", - "winapi", -] - [[package]] name = "num-complex" version = "0.4.2" @@ -2607,28 +2229,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -2691,17 +2291,6 @@ dependencies = [ "objc_exception", ] -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - [[package]] name = "objc_exception" version = "0.1.2" @@ -2711,15 +2300,6 @@ dependencies = [ "cc", ] -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - [[package]] name = "oboe" version = "0.4.6" @@ -2888,18 +2468,6 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" -[[package]] -name = "png" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" -dependencies = [ - "bitflags", - "crc32fast", - "deflate 0.8.6", - "miniz_oxide 0.3.7", -] - [[package]] name = "png" version = "0.17.5" @@ -2908,8 +2476,8 @@ checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba" dependencies = [ "bitflags", "crc32fast", - "deflate 1.0.0", - "miniz_oxide 0.5.3", + "deflate", + "miniz_oxide", ] [[package]] @@ -2927,12 +2495,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" -[[package]] -name = "pretty-type-name" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8815d101cfb4cb491154896bdab292a395a7ac9ab185a9941a2f5be0135900d" - [[package]] name = "proc-macro-crate" version = "1.2.1" @@ -3049,15 +2611,6 @@ dependencies = [ "cty", ] -[[package]] -name = "raw-window-handle" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] - [[package]] name = "rawpointer" version = "0.2.1" @@ -3111,15 +2664,6 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" -[[package]] -name = "ringbuf" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f65af18d50f789e74aaf23bbb3f65dcd22a3cb6e029b5bced149f6bd57c5c2a2" -dependencies = [ - "cache-padded", -] - [[package]] name = "robust" version = "0.2.3" @@ -3132,7 +2676,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0939e9f626e6c6f1989adb6226a039c855ca483053f0ee7c98b90e41cf731e" dependencies = [ - "cpal 0.13.5", + "cpal", "lewton", ] @@ -3188,12 +2732,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - [[package]] name = "scopeguard" version = "1.1.0" @@ -3314,12 +2852,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" -[[package]] -name = "str-buf" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" - [[package]] name = "strsim" version = "0.10.0" @@ -3343,14 +2875,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synfx-dsp" -version = "0.5.3" -source = "git+https://github.com/WeirdConstructor/synfx-dsp#3334a91ee48c009707c0147434a3fc14a929c079" -dependencies = [ - "num-traits", -] - [[package]] name = "taffy" version = "0.1.0" @@ -3402,23 +2926,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "ticktock" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d226b8341a5d130e3446024468efab6d150ba656e086b793ac37a3d17669e626" - -[[package]] -name = "tiff" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" -dependencies = [ - "jpeg-decoder", - "miniz_oxide 0.4.4", - "weezl", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -3516,15 +3023,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "triple_buffer" -version = "5.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803966e5a8397a70d3d8111afa1597ba8381346d7de4720e9f539471d371a1a3" -dependencies = [ - "cache-padded", -] - [[package]] name = "ttf-parser" version = "0.15.2" @@ -3537,27 +3035,12 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -[[package]] -name = "unicode-bidi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" - [[package]] name = "unicode-ident" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" -[[package]] -name = "unicode-normalization" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-width" version = "0.1.9" @@ -3570,18 +3053,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" -[[package]] -name = "url" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - [[package]] name = "uuid" version = "1.1.2" @@ -3709,38 +3180,17 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webbrowser" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a3cffdb686fbb24d9fb8f03a213803277ed2300f11026a3afe1f108dc021b" -dependencies = [ - "jni", - "ndk-glue 0.6.2", - "url", - "web-sys", - "widestring", - "winapi", -] - -[[package]] -name = "weezl" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" - [[package]] name = "wgpu" version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277e967bf8b7820a76852645a6bce8bbd31c32fda2042e82d8e3ea75fda8892d" +source = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" dependencies = [ "arrayvec", "js-sys", "log", "naga", "parking_lot 0.12.1", - "raw-window-handle 0.4.3", + "raw-window-handle", "smallvec", "wasm-bindgen", "wasm-bindgen-futures", @@ -3753,8 +3203,7 @@ dependencies = [ [[package]] name = "wgpu-core" version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b92788dec9d0c1bed849a1b83f01b2ee12819bf04a79c90f68e4173f7b5ba2" +source = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" dependencies = [ "arrayvec", "bit-vec", @@ -3767,7 +3216,7 @@ dependencies = [ "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle 0.4.3", + "raw-window-handle", "smallvec", "thiserror", "web-sys", @@ -3778,8 +3227,7 @@ dependencies = [ [[package]] name = "wgpu-hal" version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cbdfc3d0637dba3d5536b93adef3d26023a0b96f0e1ee5ee9560a401d9f646" +source = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" dependencies = [ "android_system_properties", "arrayvec", @@ -3805,7 +3253,7 @@ dependencies = [ "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle 0.4.3", + "raw-window-handle", "renderdoc-sys", "thiserror", "wasm-bindgen", @@ -3817,8 +3265,7 @@ dependencies = [ [[package]] name = "wgpu-types" version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f762cbc08e1a51389859cf9c199c7aef544789cf3510889aab12c607f701604" +source = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" dependencies = [ "bitflags", ] @@ -3833,12 +3280,6 @@ dependencies = [ "safe_arch", ] -[[package]] -name = "widestring" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" - [[package]] name = "winapi" version = "0.3.9" @@ -3864,45 +3305,23 @@ dependencies = [ "winapi", ] -[[package]] -name = "winapi-wsapoll" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" -dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", -] - [[package]] name = "windows-sys" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", ] [[package]] @@ -3911,60 +3330,30 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" -[[package]] -name = "windows_aarch64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" - [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" -[[package]] -name = "windows_i686_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" - [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" -[[package]] -name = "windows_i686_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" - [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" -[[package]] -name = "windows_x86_64_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" - [[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" -[[package]] -name = "windows_x86_64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" - [[package]] name = "winit" version = "0.26.1" @@ -3988,7 +3377,7 @@ dependencies = [ "objc", "parking_lot 0.11.2", "percent-encoding", - "raw-window-handle 0.4.3", + "raw-window-handle", "wasm-bindgen", "web-sys", "winapi", @@ -4006,18 +3395,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" -dependencies = [ - "gethostname", - "nix 0.22.3", - "winapi", - "winapi-wsapoll", -] - [[package]] name = "xi-unicode" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index df12e56..6e67839 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,27 +1,33 @@ [package] -name = "bevyjam" +name = "lux-synthese" version = "0.1.0" authors = ["tuxmain "] license = "AGPL-3.0-only" edition = "2021" [dependencies] -bevy = "0.8.1" +bevy = { version = "0.8.1", default-features = false, features = ["bevy_asset", "bevy_audio", "bevy_gilrs", "bevy_winit", "render", "png", "vorbis", "x11"] } bevy_common_assets = { version = "0.3.0", features = ["json"] } -bevy-inspector-egui = "0.12.1" bevy_rapier2d = "0.16.2" -crossbeam-channel = "0.5.6" +#crossbeam-channel = "0.5.6" rand = "0.8.5" rand_distr = "0.4.3" rapier2d = "0.14.0" serde = { version = "1.0.144", features = ["derive"] } [target."cfg(not(target_arch = \"wasm32\"))".dependencies] -cpal = "0.14.0" -hexodsp = { git = "https://github.com/WeirdConstructor/HexoDSP", default-features = false } -ticktock = "0.8.0" +#bevy-inspector-egui = "0.12.1" +bevy_mod_picking = "0.9.0" +# cpal = "0.14.0" +# hexodsp = { git = "https://github.com/WeirdConstructor/HexoDSP", default-features = false } +serde_json = "1.0.85" +#ticktock = "0.8.0" [target."cfg(target_arch = \"wasm32\")".dependencies] +#cpal = { version = "0.14.0", features = ["wasm-bindgen"] } [profile.dev.package."*"] opt-level = 3 + +[patch.crates-io] +wgpu = { git = "https://github.com/mockersf/wgpu/", branch = "unconditional-clear-workaround" } diff --git a/README.md b/README.md index 17112e6..b644fab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ -# Bevyjam +# Lux synthesĕ + +Combine colored lights to synthesize white light! + +[Play in browser](https://txmn.tk/projects/lux-synthese/) + +Download: [Linux x86_64](https://txmn.tk/projects/lux-synthese/linux-x86_64.zip), [Windows x86_64](https://txmn.tk/projects/lux-synthese/windows-x86_64.zip) + +In latin, _lux synthesĕ_ means "light by the means of synthesis". + +This game was developped for the [Bevy Jam #2](https://itch.io/jam/bevy-jam-2). ## Controls @@ -6,18 +16,17 @@ * **Switch character**: Tab * **Level up**: Enter (when character is white) * **Reset**: R +* **Fullscreen**: F11 +* **Exit**: Escape ## TODO -* name * more filters -* despawn black characters -* despawn character when too far -* level design +* more levels * (?) multiplayer * more audio -* "jumpable" component to avoid jumping on sensors -* bug: in level2, move the blue character to win, then reset. The characters are lighter than expected. +* bug: when reset after win, character colors are wrong +* redshift warning ## Build @@ -27,8 +36,6 @@ cargo build --release ### WASM -**Audio does not work in WASM!** - ```bash rustup target add wasm32-unknown-unknown cargo install wasm-bindgen-cli @@ -41,14 +48,33 @@ python3 -m http.server ## Audio -This game uses [HexoDSP](https://github.com/WeirdConstructor/HexoDSP) for audio synthesis. +This game used [HexoDSP](https://github.com/WeirdConstructor/HexoDSP) for audio synthesis. The synthetizer matrix can be edited using [HexoSynth](https://github.com/WeirdConstructor/HexoSynth) visual editor. +However we could not get this working in WASM, hence we used simple playback audio instead for the jam. The concept of procedural audio is not abandonned but it will be for another time. + +## Develop + +Skip to level `N: u32` with the command `bevyjam `. + +Edit the level `N: u32` with the command `bevyjam e`. + +Editor is not available in the WASM build. + +### Editor controls + +* **Select**: left click to select, click in void to deselect, CTRL+click to select many, CTRL+A to select all +* **Move selection**: arrows to move one step, Shift+arrows to move continuously +* **Delete selection**: delete +* **Add objects**: P=platform, C=character, A=absorbing filter, R=rotating filter, M=melty platform +* **Move camera**: CTRL+arrows +* **Save**: CTRL+S + ## License GNU AGPL v3, CopyLeft 2022 Pascal Engélibert, Nixon Cheng -This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License. -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. -You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/. +_Lux synthesĕ_ is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License. +_Lux synthesĕ_ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. +You should have received a copy of the GNU Affero General Public License along with _Lux synthesĕ_. If not, see https://www.gnu.org/licenses/. diff --git a/assets/UacariLegacy-Bold.ttf b/assets/UacariLegacy-Bold.ttf new file mode 100644 index 0000000..7309e66 Binary files /dev/null and b/assets/UacariLegacy-Bold.ttf differ diff --git a/assets/UacariLegacy-Regular.ttf b/assets/UacariLegacy-Regular.ttf new file mode 100644 index 0000000..7eb6474 Binary files /dev/null and b/assets/UacariLegacy-Regular.ttf differ diff --git a/assets/game.levels.json b/assets/game.levels.json index 549c17b..9751f71 100644 --- a/assets/game.levels.json +++ b/assets/game.levels.json @@ -1,119 +1,1088 @@ { - "levels": [ - { - "comment": "Movement tutorial", - "platforms": [ - {"pos": [0, -256], "size": [800, 16]} - ], - "characters": [ - {"pos": [0, -192], "color": [1,0,0,1]}, - {"pos": [-128, -192], "color": [0,1,0,1]}, - {"pos": [128, -192], "color": [0,0,1,1]} - ], - "absorbing_filters": [], - "rotating_filters": [], - "texts": [ - { - "pos": [0, 0], - "font_size": 32, - "text": "Combine the colors to synthetize a white light.\nUse arrows to move." - } - ] - }, - { - "comment": "Switch tutorial", - "platforms": [ - {"pos": [0, -256], "size": [800, 16]}, - {"pos": [128, 256], "size": [96, 16]} - ], - "characters": [ - {"pos": [0, -192], "color": [0,1,0,1]}, - {"pos": [-128, -192], "color": [1,0,0,1]}, - {"pos": [128, 320], "color": [0,0,1,1]} - ], - "absorbing_filters": [], - "rotating_filters": [], - "texts": [ - { - "pos": [0, 0], - "font_size": 32, - "text": "Press Tab to switch." - } - ] - }, - { - "comment": "Absorbing filter tutorial", - "platforms": [ - {"pos": [0, -256], "size": [800, 16]}, - {"pos": [0, -128], "size": [800, 16]} - ], - "characters": [ - {"pos": [-128, -192], "color": [1,0.64,0,1]}, - {"pos": [128, -192], "color": [0,0.37,1,1]} - ], - "absorbing_filters": [ - { - "pos": [0, -192], - "size": [16, 112], - "color": [1,0,0,1] - } - ], - "rotating_filters": [], - "texts": [ - { - "pos": [0, 0], - "font_size": 32, - "text": "Press R to reset." - } - ] - }, - { - "comment": "Rotating filter tutorial", - "platforms": [ - {"pos": [0, -256], "size": [800, 16]} - ], - "characters": [ - {"pos": [0, -192], "color": [1,0,0,1]}, - {"pos": [-128, -192], "color": [1,0,0,1]}, - {"pos": [128, -192], "color": [1,0,0,1]} - ], - "absorbing_filters": [], - "rotating_filters": [ - { - "pos": [0, -64], - "angle": 45 - } - ], - "texts": [ - { - "pos": [0, 0], - "font_size": 32, - "text": "Let's rotate the hue!" - } - ] - }, - { - "comment": "Game over", - "platforms": [ - {"pos": [0, -256], "size": [800, 16]} - ], - "characters": [ - {"pos": [0, -64], "color": [1,0,0,1]} - ], - "absorbing_filters": [], - "rotating_filters": [], - "texts": [ - { - "pos": [0, 128], - "font_size": 48, - "text": "Thank you for playing!" - }, - { - "pos": [0, 0], - "font_size": 32, - "text": "There is no more light to combine." - } - ] - } - ] + "levels": [ + { + "comment": "Movement tutorial", + "characters": [ + { + "pos": [ + 0.0, + -192.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -128.0, + -192.0 + ], + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 128.0, + -192.0 + ], + "color": [ + 0.0, + 0.0, + 1.0, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + 0.0, + -256.0 + ], + "size": [ + 800.0, + 16.0 + ] + } + ], + "absorbing_filters": [], + "rotating_filters": [], + "melty_platforms": [], + "texts": [ + { + "pos": [ + 0.0, + 64.0 + ], + "font_size": 32.0, + "text": "Combine the colors\nto synthetize a white light.\nUse arrows to move." + } + ] + }, + { + "comment": "Switch tutorial", + "characters": [ + { + "pos": [ + 0.0, + -192.0 + ], + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -128.0, + -192.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 128.0, + 320.0 + ], + "color": [ + 0.0, + 0.0, + 1.0, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + 0.0, + -256.0 + ], + "size": [ + 800.0, + 16.0 + ] + }, + { + "pos": [ + 128.0, + 256.0 + ], + "size": [ + 96.0, + 16.0 + ] + } + ], + "absorbing_filters": [], + "rotating_filters": [], + "melty_platforms": [], + "texts": [ + { + "pos": [ + 0.0, + 0.0 + ], + "font_size": 32.0, + "text": "Press Tab to switch." + } + ] + }, + { + "comment": "Absorbing filter tutorial", + "characters": [ + { + "pos": [ + -160.0, + -192.0 + ], + "color": [ + 1.0, + 0.64, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 160.0, + -192.0 + ], + "color": [ + 0.0, + 0.37, + 1.0, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + 0.0, + -256.0 + ], + "size": [ + 800.0, + 16.0 + ] + }, + { + "pos": [ + 0.0, + -128.0 + ], + "size": [ + 800.0, + 16.0 + ] + } + ], + "absorbing_filters": [ + { + "pos": [ + 0.0, + -192.0 + ], + "size": [ + 16.0, + 112.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + } + ], + "rotating_filters": [], + "melty_platforms": [], + "texts": [ + { + "pos": [ + 0.0, + 0.0 + ], + "font_size": 32.0, + "text": "This filter absorbs light." + }, + { + "pos": [ + 0.0, + -64.0 + ], + "font_size": 32.0, + "text": "Press R to reset." + } + ] + }, + { + "comment": "Rotating filter tutorial", + "characters": [ + { + "pos": [ + 0.0, + -192.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -128.0, + -192.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 128.0, + -192.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + 0.0, + -256.0 + ], + "size": [ + 800.0, + 16.0 + ] + } + ], + "absorbing_filters": [], + "rotating_filters": [ + { + "pos": [ + 0.0, + -64.0 + ], + "angle": 120.0 + } + ], + "melty_platforms": [], + "texts": [ + { + "pos": [ + 0.0, + 0.0 + ], + "font_size": 32.0, + "text": "Let's rotate the hue!\nPress Space to jump." + } + ] + }, + { + "comment": "Melty platform tutorial", + "characters": [ + { + "pos": [ + -304.0, + -208.0 + ], + "color": [ + 0.7, + 0.7, + 0.7, + 1.0 + ] + }, + { + "pos": [ + 304.0, + -208.0 + ], + "color": [ + 0.3, + 0.3, + 0.3, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + -304.0, + -256.0 + ], + "size": [ + 192.0, + 16.0 + ] + }, + { + "pos": [ + 304.0, + -256.0 + ], + "size": [ + 192.0, + 16.0 + ] + } + ], + "absorbing_filters": [], + "rotating_filters": [], + "melty_platforms": [ + { + "pos": [ + 0.0, + -256.0 + ], + "color": [ + 0.5, + 0.5, + 0.5, + 1.0 + ] + } + ], + "texts": [ + { + "pos": [ + -304.0, + -64.0 + ], + "font_size": 32.0, + "text": "Too much light\ncauses some platforms to melt." + } + ] + }, + { + "comment": "First puzzle", + "characters": [ + { + "pos": [ + -96.0, + 472.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -264.0, + 472.0 + ], + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 648.0, + 600.0 + ], + "color": [ + 1.0, + 0.0, + 0.7, + 1.0 + ] + }, + { + "pos": [ + 648.0, + -8.0 + ], + "color": [ + 0.0, + 1.0, + 0.3, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + -168.0, + 424.0 + ], + "size": [ + 464.0, + 16.0 + ] + }, + { + "pos": [ + 432.0, + 424.0 + ], + "size": [ + 352.0, + 16.0 + ] + }, + { + "pos": [ + 156.0, + 152.0 + ], + "size": [ + 312.0, + 16.0 + ] + }, + { + "pos": [ + 352.0, + -208.0 + ], + "size": [ + 176.0, + 16.0 + ] + }, + { + "pos": [ + 484.0, + -56.0 + ], + "size": [ + 104.0, + 16.0 + ] + }, + { + "pos": [ + 360.0, + 64.0 + ], + "size": [ + 96.0, + 16.0 + ] + }, + { + "pos": [ + 64.0, + -272.0 + ], + "size": [ + 320.0, + 16.0 + ] + }, + { + "pos": [ + 600.0, + 716.0 + ], + "size": [ + 16.0, + 312.0 + ] + }, + { + "pos": [ + 696.0, + 412.0 + ], + "size": [ + 16.0, + 920.0 + ] + }, + { + "pos": [ + 600.0, + 232.0 + ], + "size": [ + 16.0, + 368.0 + ] + }, + { + "pos": [ + 600.0, + -8.0 + ], + "size": [ + 16.0, + 80.0 + ] + }, + { + "pos": [ + 576.0, + 56.0 + ], + "size": [ + 32.0, + 16.0 + ] + }, + { + "pos": [ + 564.0, + 40.0 + ], + "size": [ + 8.0, + 16.0 + ] + } + ], + "absorbing_filters": [ + { + "pos": [ + 56.0, + 492.0 + ], + "size": [ + 16.0, + 120.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 56.0, + 628.0 + ], + "size": [ + 16.0, + 152.0 + ], + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 264.0, + 492.0 + ], + "size": [ + 16.0, + 120.0 + ], + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 264.0, + 628.0 + ], + "size": [ + 16.0, + 152.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -48.0, + 152.0 + ], + "size": [ + 96.0, + 16.0 + ], + "color": [ + 0.0, + 0.0, + 1.0, + 1.0 + ] + }, + { + "pos": [ + 600.0, + 488.0 + ], + "size": [ + 16.0, + 112.0 + ], + "color": [ + 0.0, + 1.0, + 1.0, + 1.0 + ] + }, + { + "pos": [ + 524.0, + 556.0 + ], + "size": [ + 56.0, + 8.0 + ], + "color": [ + 0.0, + 1.0, + 1.0, + 1.0 + ] + } + ], + "rotating_filters": [ + { + "pos": [ + -48.0, + 40.0 + ], + "angle": -120.0 + } + ], + "melty_platforms": [ + { + "pos": [ + 112.0, + 424.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 208.0, + 424.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 208.0, + 288.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 600.0, + 552.0 + ], + "color": [ + 0.0, + 1.0, + 1.0, + 1.0 + ] + }, + { + "pos": [ + 616.0, + 40.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 584.0, + -56.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + } + ], + "texts": [] + }, + { + "comment": "Second puzzle", + "characters": [ + { + "pos": [ + 184.0, + 168.0 + ], + "color": [ + 0.85, + 0.5, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -184.0, + 168.0 + ], + "color": [ + 0.0, + 0.5, + 0.1, + 1.0 + ] + }, + { + "pos": [ + -1376.0, + -184.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -1512.0, + -184.0 + ], + "color": [ + 0.0, + 0.0, + 0.9, + 1.0 + ] + }, + { + "pos": [ + 0.0, + 368.0 + ], + "color": [ + 0.15, + 0.0, + 0.5, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + -12.0, + -264.0 + ], + "size": [ + 456.0, + 16.0 + ] + }, + { + "pos": [ + -148.0, + 120.0 + ], + "size": [ + 200.0, + 16.0 + ] + }, + { + "pos": [ + 148.0, + 120.0 + ], + "size": [ + 200.0, + 16.0 + ] + }, + { + "pos": [ + -1336.0, + -256.0 + ], + "size": [ + 576.0, + 16.0 + ] + }, + { + "pos": [ + -240.0, + 292.0 + ], + "size": [ + 16.0, + 328.0 + ] + }, + { + "pos": [ + 240.0, + 292.0 + ], + "size": [ + 16.0, + 328.0 + ] + }, + { + "pos": [ + 0.0, + 20.0 + ], + "size": [ + 176.0, + 24.0 + ] + }, + { + "pos": [ + -200.0, + 60.0 + ], + "size": [ + 16.0, + 104.0 + ] + }, + { + "pos": [ + 200.0, + 60.0 + ], + "size": [ + 16.0, + 104.0 + ] + }, + { + "pos": [ + 0.0, + 320.0 + ], + "size": [ + 96.0, + 16.0 + ] + } + ], + "absorbing_filters": [ + { + "pos": [ + -1176.0, + -96.0 + ], + "size": [ + 16.0, + 304.0 + ], + "color": [ + 0.0, + 0.5, + 0.5, + 1.0 + ] + }, + { + "pos": [ + -140.0, + 16.0 + ], + "size": [ + 104.0, + 16.0 + ], + "color": [ + 0.6, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + 140.0, + 16.0 + ], + "size": [ + 104.0, + 16.0 + ], + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + } + ], + "rotating_filters": [], + "melty_platforms": [ + { + "pos": [ + 0.0, + 120.0 + ], + "color": [ + 0.7, + 0.7, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -616.0, + -256.0 + ], + "color": [ + 0.45, + 0.0, + 0.0, + 1.0 + ] + }, + { + "pos": [ + -856.0, + -256.0 + ], + "color": [ + 0.0, + 0.0, + 0.5, + 1.0 + ] + }, + { + "pos": [ + -400.0, + -256.0 + ], + "color": [ + 0.0, + 0.0, + 0.6, + 1.0 + ] + } + ], + "texts": [] + }, + { + "comment": "Game over", + "characters": [ + { + "pos": [ + 0.0, + -64.0 + ], + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + } + ], + "platforms": [ + { + "pos": [ + 0.0, + -256.0 + ], + "size": [ + 800.0, + 16.0 + ] + } + ], + "absorbing_filters": [], + "rotating_filters": [], + "melty_platforms": [], + "texts": [ + { + "pos": [ + 0.0, + 128.0 + ], + "font_size": 48.0, + "text": "Thank you for playing!" + }, + { + "pos": [ + 0.0, + 0.0 + ], + "font_size": 32.0, + "text": "There is no more light to combine." + } + ] + } + ] } \ No newline at end of file diff --git a/assets/melty.png b/assets/melty.png new file mode 100644 index 0000000..5d5716f Binary files /dev/null and b/assets/melty.png differ diff --git a/assets/silence.ogg b/assets/silence.ogg new file mode 100644 index 0000000..b4b7a24 Binary files /dev/null and b/assets/silence.ogg differ diff --git a/assets/sound/notes/a5.ogg b/assets/sound/notes/a5.ogg new file mode 100644 index 0000000..81bfcac Binary files /dev/null and b/assets/sound/notes/a5.ogg differ diff --git a/assets/sound/notes/cs6.ogg b/assets/sound/notes/cs6.ogg new file mode 100644 index 0000000..885b9b6 Binary files /dev/null and b/assets/sound/notes/cs6.ogg differ diff --git a/assets/sound/notes/e6.ogg b/assets/sound/notes/e6.ogg new file mode 100644 index 0000000..6bf4ce5 Binary files /dev/null and b/assets/sound/notes/e6.ogg differ diff --git a/assets/sound/reverb_notes/a5.ogg b/assets/sound/reverb_notes/a5.ogg new file mode 100644 index 0000000..ab2e6b5 Binary files /dev/null and b/assets/sound/reverb_notes/a5.ogg differ diff --git a/assets/sound/reverb_notes/cs6.ogg b/assets/sound/reverb_notes/cs6.ogg new file mode 100644 index 0000000..33428fd Binary files /dev/null and b/assets/sound/reverb_notes/cs6.ogg differ diff --git a/assets/sound/reverb_notes/e6.ogg b/assets/sound/reverb_notes/e6.ogg new file mode 100644 index 0000000..db15941 Binary files /dev/null and b/assets/sound/reverb_notes/e6.ogg differ diff --git a/assets/sound/warp_notes/a5.ogg b/assets/sound/warp_notes/a5.ogg new file mode 100644 index 0000000..8386719 Binary files /dev/null and b/assets/sound/warp_notes/a5.ogg differ diff --git a/assets/sound/warp_notes/cs6.ogg b/assets/sound/warp_notes/cs6.ogg new file mode 100644 index 0000000..74e0026 Binary files /dev/null and b/assets/sound/warp_notes/cs6.ogg differ diff --git a/assets/sound/warp_notes/e6.ogg b/assets/sound/warp_notes/e6.ogg new file mode 100644 index 0000000..63fcd02 Binary files /dev/null and b/assets/sound/warp_notes/e6.ogg differ diff --git a/build-itchio.sh b/build-itchio.sh new file mode 100644 index 0000000..acd27d5 --- /dev/null +++ b/build-itchio.sh @@ -0,0 +1,15 @@ +# WASM + +sh build-wasm.sh || exit 1 + +mkdir -p target/itchio/wasm/target +mkdir -p target/itchio/wasm/assets + +cp -r assets/* target/itchio/wasm/assets/ +cp index.html target/itchio/wasm/ +cp target/lux-synthese.js target/itchio/wasm/target/ +cp target/lux-synthese_bg.wasm target/itchio/wasm/target/ +jq -c < assets/game.levels.json > target/itchio/wasm/assets/game.levels.json + +cd target/itchio/wasm +zip -r ../wasm.zip . diff --git a/build-wasm.sh b/build-wasm.sh index b9643dc..793798d 100644 --- a/build-wasm.sh +++ b/build-wasm.sh @@ -1,2 +1,3 @@ -cargo build --release --target wasm32-unknown-unknown -wasm-bindgen --out-name bevyjam --out-dir target --target web target/wasm32-unknown-unknown/release/bevyjam.wasm +cargo build --release --target wasm32-unknown-unknown || exit 1 +echo "==> wasm-bindgen..." +wasm-bindgen --out-name lux-synthese --out-dir target --target web target/wasm32-unknown-unknown/release/lux-synthese.wasm || exit 1 diff --git a/index.html b/index.html index 3b956aa..1216b0b 100644 --- a/index.html +++ b/index.html @@ -2,12 +2,91 @@ - Bevyjam + Lux synthesĕ + + + +
+

Lux synthesĕ

+

+ If audio does not work, please allow media autoplay in browser, then refresh this page. +

+

Controls

+
    +
  • Move: Arrows
  • +
  • Switch: Tab
  • +
  • Level up: Enter
  • +
  • Reset: R
  • +
+

Download

+ Download an executable release: + +

Source

+

+ The source code of this free software is available in our Git repository. +

+

+ GNU AGPL v3: CopyLeft 2022 Pascal Engélibert, Nixon Cheng
+ Lux synthesĕ is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
+ Lux synthesĕ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+ You should have received a copy of the GNU Affero General Public License along with Lux synthesĕ. If not, see https://www.gnu.org/licenses/. +

+
diff --git a/res/cover.png b/res/cover.png new file mode 100644 index 0000000..282923f Binary files /dev/null and b/res/cover.png differ diff --git a/res/cover.xcf b/res/cover.xcf new file mode 100644 index 0000000..9a7f4b5 Binary files /dev/null and b/res/cover.xcf differ diff --git a/res/notes.flp b/res/notes.flp new file mode 100644 index 0000000..763ff4b Binary files /dev/null and b/res/notes.flp differ diff --git a/run-wasm.sh b/run-wasm.sh new file mode 100644 index 0000000..417b6b0 --- /dev/null +++ b/run-wasm.sh @@ -0,0 +1,2 @@ +source build-wasm.sh +python -m http.server \ No newline at end of file diff --git a/src/audio.rs b/src/audio.rs index 767b309..495151b 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -1,5 +1,6 @@ // https://github.com/WeirdConstructor/HexoDSP/blob/master/examples/cpal_demo_node_api.rs +// use bevy::{prelude::*, asset::HandleId}; use crate::game::AudioMsg; use cpal::traits::{DeviceTrait, HostTrait, StreamTrait}; @@ -163,4 +164,4 @@ fn start_backend(node_exec: NodeExecutor, frontend_loop: F) { cpal::SampleFormat::I16 => run::(&device, &config.into(), node_exec, frontend_loop), cpal::SampleFormat::U16 => run::(&device, &config.into(), node_exec, frontend_loop), }; -} +} \ No newline at end of file diff --git a/src/audio_system.rs b/src/audio_system.rs new file mode 100644 index 0000000..5669707 --- /dev/null +++ b/src/audio_system.rs @@ -0,0 +1,48 @@ +use bevy::prelude::*; + +pub struct AudioSystemPlugin; + +impl Plugin for AudioSystemPlugin { + fn build(&self, app: &mut App) { + app.init_resource::() + .add_startup_system(load_audio); + } +} + +#[derive(Default)] +pub struct AudioAssets { + pub notes: [Handle; 3], + pub reverb_notes: [Handle; 3], + pub warp_notes: [Handle; 3], +} + +pub fn play_audio( + audio_set: &[Handle; 3], + audio: &Res