diff --git a/Cargo.lock b/Cargo.lock index 94805a4..50b366a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,6 +123,25 @@ 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" @@ -169,6 +188,12 @@ 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" @@ -190,6 +215,48 @@ 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" @@ -224,6 +291,7 @@ dependencies = [ "fastrand", "js-sys", "ndk-glue 0.5.2", + "notify", "parking_lot 0.12.1", "serde", "thiserror", @@ -348,6 +416,19 @@ 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" @@ -379,6 +460,7 @@ checksum = "79db7d7e71b47a69953fbe8407ded5c6308eaeecf9a05efd5dfb42992f400a16" dependencies = [ "anyhow", "base64", + "bevy_animation", "bevy_app", "bevy_asset", "bevy_core", @@ -430,6 +512,7 @@ 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", @@ -505,25 +588,6 @@ 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" @@ -627,7 +691,7 @@ dependencies = [ "futures-lite", "hex", "hexasphere", - "image", + "image 0.24.3", "naga", "once_cell", "parking_lot 0.12.1", @@ -816,7 +880,7 @@ dependencies = [ "bevy_input", "bevy_math", "bevy_utils", - "raw-window-handle", + "raw-window-handle 0.4.3", "web-sys", ] @@ -834,12 +898,32 @@ dependencies = [ "bevy_utils", "bevy_window", "crossbeam-channel", - "raw-window-handle", + "raw-window-handle 0.4.3", "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", + "wasm-bindgen", + "wasm_thread", +] + [[package]] name = "bindgen" version = "0.59.2" @@ -983,6 +1067,17 @@ 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" @@ -1198,6 +1293,32 @@ 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", + "wasm-bindgen", + "web-sys", + "windows", +] + [[package]] name = "crc32fast" version = "1.3.2" @@ -1328,6 +1449,16 @@ 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" @@ -1349,12 +1480,32 @@ 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" @@ -1398,14 +1549,39 @@ dependencies = [ ] [[package]] -name = "erased-serde" -version = "0.3.23" +name = "epaint" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54558e0ba96fbe24280072642eceb9d7d442e32c7ec0ea9e7ecd7b4ea2cf4e11" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003000e712ad0f95857bd4d2ef8d1890069e06554101697d12050668b2f6f020" 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" @@ -1430,6 +1606,18 @@ 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" @@ -1457,12 +1645,67 @@ 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" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" +dependencies = [ + "futures-core", + "futures-sink", +] + [[package]] name = "futures-core" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" +[[package]] +name = "futures-executor" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + [[package]] name = "futures-io" version = "0.3.23" @@ -1484,6 +1727,47 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-macro" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" + +[[package]] +name = "futures-task" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" + +[[package]] +name = "futures-util" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "fxhash" version = "0.2.1" @@ -1493,6 +1777,16 @@ 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" @@ -1724,12 +2018,59 @@ 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://git.txmn.tk/tuxmain/HexoDSP#0ab8cf18354925a6a26ea0e885dfcd6d9f5e9d15" +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" @@ -1739,9 +2080,10 @@ dependencies = [ "bytemuck", "byteorder", "color_quant", - "num-rational", + "num-rational 0.4.1", "num-traits", - "png", + "png 0.17.5", + "scoped_threadpool", ] [[package]] @@ -1760,6 +2102,26 @@ 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" @@ -1823,6 +2185,12 @@ 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" @@ -1843,6 +2211,26 @@ 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" @@ -1900,9 +2288,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ "autocfg", "scopeguard", @@ -1917,21 +2305,6 @@ 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" @@ -1959,6 +2332,12 @@ 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" @@ -2003,6 +2382,25 @@ 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" @@ -2057,7 +2455,7 @@ dependencies = [ "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational", + "num-rational 0.4.1", "num-traits", "simba", "typenum", @@ -2100,6 +2498,20 @@ 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" @@ -2165,6 +2577,28 @@ 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" @@ -2189,6 +2623,12 @@ 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" @@ -2199,6 +2639,24 @@ 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" @@ -2229,6 +2687,28 @@ 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" @@ -2291,6 +2771,17 @@ 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" @@ -2300,6 +2791,15 @@ 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" @@ -2462,12 +2962,30 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkg-config" 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" @@ -2476,8 +2994,8 @@ checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba" dependencies = [ "bitflags", "crc32fast", - "deflate", - "miniz_oxide", + "deflate 1.0.0", + "miniz_oxide 0.5.3", ] [[package]] @@ -2495,6 +3013,12 @@ 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" @@ -2611,6 +3135,15 @@ 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" @@ -2664,6 +3197,15 @@ 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" @@ -2676,7 +3218,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0939e9f626e6c6f1989adb6226a039c855ca483053f0ee7c98b90e41cf731e" dependencies = [ - "cpal", + "cpal 0.13.5", "lewton", ] @@ -2732,6 +3274,12 @@ 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" @@ -2852,6 +3400,12 @@ 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" @@ -2875,6 +3429,14 @@ 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" @@ -2926,6 +3488,23 @@ 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" @@ -3023,6 +3602,15 @@ 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" @@ -3035,12 +3623,27 @@ 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" @@ -3053,6 +3656,18 @@ 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" @@ -3170,6 +3785,18 @@ version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +[[package]] +name = "wasm_thread" +version = "0.2.0" +source = "git+https://github.com/chemicstry/wasm_thread#19842287886ad1b03ed74bac37ca43167067d270" +dependencies = [ + "async-channel", + "futures", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.59" @@ -3180,17 +3807,38 @@ 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 = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "277e967bf8b7820a76852645a6bce8bbd31c32fda2042e82d8e3ea75fda8892d" dependencies = [ "arrayvec", "js-sys", "log", "naga", "parking_lot 0.12.1", - "raw-window-handle", + "raw-window-handle 0.4.3", "smallvec", "wasm-bindgen", "wasm-bindgen-futures", @@ -3203,7 +3851,8 @@ dependencies = [ [[package]] name = "wgpu-core" version = "0.13.2" -source = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b92788dec9d0c1bed849a1b83f01b2ee12819bf04a79c90f68e4173f7b5ba2" dependencies = [ "arrayvec", "bit-vec", @@ -3216,7 +3865,7 @@ dependencies = [ "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle", + "raw-window-handle 0.4.3", "smallvec", "thiserror", "web-sys", @@ -3227,7 +3876,8 @@ dependencies = [ [[package]] name = "wgpu-hal" version = "0.13.2" -source = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cbdfc3d0637dba3d5536b93adef3d26023a0b96f0e1ee5ee9560a401d9f646" dependencies = [ "android_system_properties", "arrayvec", @@ -3253,7 +3903,7 @@ dependencies = [ "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.4.3", "renderdoc-sys", "thiserror", "wasm-bindgen", @@ -3265,7 +3915,8 @@ dependencies = [ [[package]] name = "wgpu-types" version = "0.13.2" -source = "git+https://github.com/mockersf/wgpu/?branch=unconditional-clear-workaround#a703a78644bc277f8b93870297bb3734e25f2be9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f762cbc08e1a51389859cf9c199c7aef544789cf3510889aab12c607f701604" dependencies = [ "bitflags", ] @@ -3280,6 +3931,12 @@ 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" @@ -3305,23 +3962,45 @@ 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", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "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", ] [[package]] @@ -3330,30 +4009,60 @@ 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" @@ -3377,7 +4086,7 @@ dependencies = [ "objc", "parking_lot 0.11.2", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.4.3", "wasm-bindgen", "web-sys", "winapi", @@ -3395,6 +4104,18 @@ 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 6e67839..d327310 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,33 +1,30 @@ [package] -name = "lux-synthese" +name = "bevyjam" version = "0.1.0" authors = ["tuxmain "] license = "AGPL-3.0-only" edition = "2021" [dependencies] -bevy = { version = "0.8.1", default-features = false, features = ["bevy_asset", "bevy_audio", "bevy_gilrs", "bevy_winit", "render", "png", "vorbis", "x11"] } +bevy = "0.8.1" 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"] } +ticktock = "0.8.0" +wasm-bindgen = "0.2" [target."cfg(not(target_arch = \"wasm32\"))".dependencies] -#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" +hexodsp = { git = "https://git.txmn.tk/tuxmain/HexoDSP", default-features = false } +cpal = "0.14.0" [target."cfg(target_arch = \"wasm32\")".dependencies] -#cpal = { version = "0.14.0", features = ["wasm-bindgen"] } +cpal = { version = "0.14.0", features = ["wasm-bindgen"] } +wasm_thread = { git = "https://github.com/chemicstry/wasm_thread" } [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 b644fab..17112e6 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,4 @@ -# 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). +# Bevyjam ## Controls @@ -16,17 +6,18 @@ This game was developped for the [Bevy Jam #2](https://itch.io/jam/bevy-jam-2). * **Switch character**: Tab * **Level up**: Enter (when character is white) * **Reset**: R -* **Fullscreen**: F11 -* **Exit**: Escape ## TODO +* name * more filters -* more levels +* despawn black characters +* despawn character when too far +* level design * (?) multiplayer * more audio -* bug: when reset after win, character colors are wrong -* redshift warning +* "jumpable" component to avoid jumping on sensors +* bug: in level2, move the blue character to win, then reset. The characters are lighter than expected. ## Build @@ -36,6 +27,8 @@ cargo build --release ### WASM +**Audio does not work in WASM!** + ```bash rustup target add wasm32-unknown-unknown cargo install wasm-bindgen-cli @@ -48,33 +41,14 @@ python3 -m http.server ## Audio -This game used [HexoDSP](https://github.com/WeirdConstructor/HexoDSP) for audio synthesis. +This game uses [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 -_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/. +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/. diff --git a/assets/UacariLegacy-Bold.ttf b/assets/UacariLegacy-Bold.ttf deleted file mode 100644 index 7309e66..0000000 Binary files a/assets/UacariLegacy-Bold.ttf and /dev/null differ diff --git a/assets/UacariLegacy-Regular.ttf b/assets/UacariLegacy-Regular.ttf deleted file mode 100644 index 7eb6474..0000000 Binary files a/assets/UacariLegacy-Regular.ttf and /dev/null differ diff --git a/assets/game.levels.json b/assets/game.levels.json index 9751f71..549c17b 100644 --- a/assets/game.levels.json +++ b/assets/game.levels.json @@ -1,1088 +1,119 @@ { - "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." - } - ] - } - ] + "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." + } + ] + } + ] } \ No newline at end of file diff --git a/assets/melty.png b/assets/melty.png deleted file mode 100644 index 5d5716f..0000000 Binary files a/assets/melty.png and /dev/null differ diff --git a/assets/silence.ogg b/assets/silence.ogg deleted file mode 100644 index b4b7a24..0000000 Binary files a/assets/silence.ogg and /dev/null differ diff --git a/assets/sound/notes/a5.ogg b/assets/sound/notes/a5.ogg deleted file mode 100644 index 81bfcac..0000000 Binary files a/assets/sound/notes/a5.ogg and /dev/null differ diff --git a/assets/sound/notes/cs6.ogg b/assets/sound/notes/cs6.ogg deleted file mode 100644 index 885b9b6..0000000 Binary files a/assets/sound/notes/cs6.ogg and /dev/null differ diff --git a/assets/sound/notes/e6.ogg b/assets/sound/notes/e6.ogg deleted file mode 100644 index 6bf4ce5..0000000 Binary files a/assets/sound/notes/e6.ogg and /dev/null differ diff --git a/assets/sound/reverb_notes/a5.ogg b/assets/sound/reverb_notes/a5.ogg deleted file mode 100644 index ab2e6b5..0000000 Binary files a/assets/sound/reverb_notes/a5.ogg and /dev/null differ diff --git a/assets/sound/reverb_notes/cs6.ogg b/assets/sound/reverb_notes/cs6.ogg deleted file mode 100644 index 33428fd..0000000 Binary files a/assets/sound/reverb_notes/cs6.ogg and /dev/null differ diff --git a/assets/sound/reverb_notes/e6.ogg b/assets/sound/reverb_notes/e6.ogg deleted file mode 100644 index db15941..0000000 Binary files a/assets/sound/reverb_notes/e6.ogg and /dev/null differ diff --git a/assets/sound/warp_notes/a5.ogg b/assets/sound/warp_notes/a5.ogg deleted file mode 100644 index 8386719..0000000 Binary files a/assets/sound/warp_notes/a5.ogg and /dev/null differ diff --git a/assets/sound/warp_notes/cs6.ogg b/assets/sound/warp_notes/cs6.ogg deleted file mode 100644 index 74e0026..0000000 Binary files a/assets/sound/warp_notes/cs6.ogg and /dev/null differ diff --git a/assets/sound/warp_notes/e6.ogg b/assets/sound/warp_notes/e6.ogg deleted file mode 100644 index 63fcd02..0000000 Binary files a/assets/sound/warp_notes/e6.ogg and /dev/null differ diff --git a/build-itchio.sh b/build-itchio.sh deleted file mode 100644 index acd27d5..0000000 --- a/build-itchio.sh +++ /dev/null @@ -1,15 +0,0 @@ -# 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 793798d..51b1bb8 100644 --- a/build-wasm.sh +++ b/build-wasm.sh @@ -1,3 +1,6 @@ -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 +cargo build --release --target wasm32-unknown-unknown +# wasm-bindgen --out-name bevyjam --out-dir target --target web target/wasm32-unknown-unknown/release/bevyjam.wasm +wasm-bindgen target/wasm32-unknown-unknown/release/bevyjam.wasm \ + --out-name bevyjam \ + --out-dir target \ + --target no-modules diff --git a/index.html b/index.html index 1216b0b..e9478f5 100644 --- a/index.html +++ b/index.html @@ -2,91 +2,16 @@ - Lux synthesĕ - + Bevyjam - + - - -
-

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 deleted file mode 100644 index 282923f..0000000 Binary files a/res/cover.png and /dev/null differ diff --git a/res/cover.xcf b/res/cover.xcf deleted file mode 100644 index 9a7f4b5..0000000 Binary files a/res/cover.xcf and /dev/null differ diff --git a/res/notes.flp b/res/notes.flp deleted file mode 100644 index 763ff4b..0000000 Binary files a/res/notes.flp and /dev/null differ diff --git a/src/audio.rs b/src/audio.rs index 495151b..767b309 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -1,6 +1,5 @@ // 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}; @@ -164,4 +163,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 deleted file mode 100644 index 5669707..0000000 --- a/src/audio_system.rs +++ /dev/null @@ -1,48 +0,0 @@ -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