TFHB2WT7FVY3E3GYGXA5C26ZEDPZFA5YADZMXBWCOM4DRDQWIQMQC
ZCTXTUMYJESGYYX72GROZFMOU2AIYG4ENDX3OMB3TSHX2JJ5C5JQC
EDG4B7IL2WIPRIMXL6FPHIX7ILWLW5XVK3TCC4W7GZVCBYDGDCGQC
3MQ355XGKT5IYOMZLREAHLPVO5MFOXOJBEZ5UOPTQPMHIYBFGXGQC
RZSX4GSCSV7DCHIKOFVDKE3O422UHXAK6SC6NVHB4RVRGABXE3CQC
C5NQRZUVUGOUUYZ6MFISXRM5NBSF7YY6GY5W5T2Z7XWVND57ZNKQC
7IHSR5JCC3ZWXNWAJCIQC26475GODBBWVQLAZZVLC7BVAB5XUVHAC
EP4LNSRP2UVYRMNAHL7AFADZWHP7E5VPMHGPJXRYR3JTA45ZINIQC
IEIGPZX5EPC53HLOUWW4DIMH5ENIYM4Z6DJ4WGIYJZZQBWW6EIYAC
"bytemuck",
]
[[package]]
name = "bevy_core_pipeline"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b422dca94195c904964ab21bc4557fbd11f692c299d46e38364715ac931841e"
dependencies = [
"bevy_app",
"bevy_asset",
"bevy_core",
"bevy_ecs",
"bevy_render",
name = "bevy_wgpu"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e16919cc645aa9a7e988c8644836d0f91c5f1bd23e17bdd9b461a32bf7667b"
dependencies = [
"bevy_app",
"bevy_asset",
"bevy_core",
"bevy_diagnostic",
"bevy_ecs",
"bevy_render",
"bevy_utils",
"bevy_window",
"bevy_winit",
"crossbeam-channel",
"crossbeam-utils",
"futures-lite",
"parking_lot",
"wgpu",
]
[[package]]
"winapi 0.3.9",
]
[[package]]
name = "cmake"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089"
dependencies = [
"cc",
"winapi",
"darling_core",
"darling_macro",
"darling_core 0.10.2",
"darling_macro 0.10.2",
]
[[package]]
name = "darling"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0d720b8683f8dd83c65155f0530560cba68cd2bf395f6513a483caee57ff7f4"
dependencies = [
"darling_core 0.13.1",
"darling_macro 0.13.1",
"strsim",
"strsim 0.9.3",
"syn",
]
[[package]]
name = "darling_core"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a340f241d2ceed1deb47ae36c4144b2707ec7dd0b649f894cb39bb595986324"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim 0.10.0",
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
dependencies = [
"bitflags",
"fuchsia-zircon-sys",
]
[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]]
name = "gfx-backend-dx11"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f851d03c2e8f117e3702bf41201a4fafa447d5cb1276d5375870ae7573d069dd"
dependencies = [
"arrayvec 0.5.2",
"bitflags",
"gfx-auxil",
"gfx-hal",
"libloading 0.6.7",
"log",
"parking_lot",
"range-alloc",
"raw-window-handle 0.3.4",
"smallvec",
"spirv_cross",
"thunderdome",
"winapi 0.3.9",
"wio",
]
[[package]]
name = "gfx-backend-dx12"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5032d716a2a5f4dafb4675a794c5dc32081af8fbc7303c93ad93ff5413c6559f"
dependencies = [
"arrayvec 0.5.2",
"bit-set",
"bitflags",
"d3d12",
"gfx-auxil",
"gfx-hal",
"log",
"parking_lot",
"range-alloc",
"raw-window-handle 0.3.4",
"smallvec",
"spirv_cross",
"thunderdome",
"winapi 0.3.9",
]
[[package]]
name = "gfx-backend-empty"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f07ef26a65954cfdd7b4c587f485100d1bb3b0bd6a51b02d817d6c87cca7a91"
dependencies = [
"gfx-hal",
"log",
"raw-window-handle 0.3.4",
]
[[package]]
name = "gfx-backend-gl"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6717c50ab601efe4a669bfb44db615e3888695ac8263222aeaa702642b9fbc2"
dependencies = [
"arrayvec 0.5.2",
"bitflags",
"gfx-auxil",
"gfx-hal",
"glow",
"js-sys",
"khronos-egl",
"libloading 0.6.7",
"log",
"naga",
"parking_lot",
"raw-window-handle 0.3.4",
"spirv_cross",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "gfx-backend-metal"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8dc54b456ece69ef49f8893269ebf24ac70969ed34ba2719c3f3abcc8fbff14e"
dependencies = [
"arrayvec 0.5.2",
"bitflags",
"block",
"cocoa-foundation",
"copyless",
"foreign-types",
"gfx-auxil",
"gfx-hal",
"log",
"metal",
"naga",
"objc",
"parking_lot",
"range-alloc",
"raw-window-handle 0.3.4",
"spirv_cross",
"storage-map",
]
[[package]]
name = "gfx-backend-vulkan"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dabe88b1a5c91e0f969b441cc57e70364858066e4ba937deeb62065654ef9bd9"
dependencies = [
"arrayvec 0.5.2",
"ash",
"byteorder",
"core-graphics-types",
"gfx-hal",
"inplace_it",
"log",
"naga",
"objc",
"parking_lot",
"raw-window-handle 0.3.4",
"smallvec",
"winapi 0.3.9",
]
[[package]]
name = "gfx-hal"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1d9cc8d3b573dda62d0baca4f02e0209786e22c562caff001d77c389008781d"
dependencies = [
"bitflags",
"naga",
"raw-window-handle 0.3.4",
"thiserror",
]
[[package]]
name = "minimp3"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372"
dependencies = [
"minimp3-sys",
"slice-deque",
"thiserror",
]
[[package]]
name = "minimp3-sys"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90"
dependencies = [
"cc",
]
[[package]]
checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4"
dependencies = [
"cfg-if 0.1.10",
"fuchsia-zircon",
"fuchsia-zircon-sys",
"iovec",
"kernel32-sys",
"libc",
"log",
"miow 0.2.2",
"net2",
"slab",
"winapi 0.2.8",
]
checksum = "162e591484b4b8fe9e1ca16ebf07ab584fdc3334508d76a788cd54d89cfc20dc"
"mio 0.6.23",
"slab",
]
[[package]]
name = "miow"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d"
dependencies = [
"kernel32-sys",
"net2",
"winapi 0.2.8",
"ws2_32-sys",
"miow",
"ntapi",
"winapi",
name = "shaderc"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58da8aaf4ad3508598cdf098567114c98d5f455de7d69b1213232ac557bc67ea"
dependencies = [
"libc",
"shaderc-sys",
]
[[package]]
name = "shaderc-sys"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bd76ec0bd25f2017a65250373485e43cdc81b5cb8fd83c6115375c8d018cdf9"
dependencies = [
"cmake",
"libc",
]
[[package]]
]
[[package]]
name = "spirv-reflect"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cecc7af6a7d3ca6d15f4d6b5077df89c77ad1f4b314d0cabee221656d041dad7"
dependencies = [
"bitflags",
"cc",
"num-traits",
"serde",
"serde_derive",
"spirv_headers",
]
[[package]]
name = "spirv-std"
version = "0.4.0-alpha.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e2676f3e58345b7c742b266b5bec022445b43e6471b9a00895faec03a52723e"
dependencies = [
"bitflags",
"num-traits",
"spirv-std-macros",
"spirv-types",
]
[[package]]
name = "spirv-std-macros"
version = "0.4.0-alpha.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "207e8515dfbb48bff03f64bf5f8388d4e0f2f526ee769cc6556df98477098ca5"
dependencies = [
"heck",
"proc-macro2",
"quote",
"spirv-types",
"syn",
checksum = "71cc4b8f7ec707459fdeddb4f137109947045592f5b0c139f7bf1360058bac6b"
[[package]]
name = "spirv_cross"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60647fadbf83c4a72f0d7ea67a7ca3a81835cf442b8deae5c134c3e0055b2e14"
checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830"
name = "thunderdome"
version = "0.3.0"
name = "tinyvec"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
dependencies = [
"tinyvec_macros",
]
[[package]]
name = "tinyvec_macros"
version = "0.1.0"
"gfx-backend-dx11",
"gfx-backend-dx12",
"gfx-backend-empty",
"gfx-backend-gl",
"gfx-backend-metal",
"gfx-backend-vulkan",
"gfx-hal",
"log",
"naga",
"parking_lot",
"profiling",
"raw-window-handle",
"smallvec",
"thiserror",
"wgpu-hal",
"wgpu-types",
]
[[package]]
name = "wgpu-hal"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92e33cb9c380dd1166f316dfc511ad9646f72cf2deb47e90bd714db3617a6998"
dependencies = [
"arrayvec 0.7.2",
"ash",
"bit-set",
"bitflags",
"block",
"core-graphics-types",
"d3d12",
"foreign-types",
"fxhash",
"glow",
}
#[derive(Default)]
struct GamepadLobby {
gamepads: HashSet<Gamepad>,
}
fn connection_system(
mut lobby: ResMut<GamepadLobby>,
mut gamepad_event: EventReader<GamepadEvent>,
) {
for event in gamepad_event.iter() {
match &event {
GamepadEvent(gamepad, GamepadEventType::Connected) => {
lobby.gamepads.insert(*gamepad);
println!("{:?} Connected", gamepad);
}
GamepadEvent(gamepad, GamepadEventType::Disconnected) => {
lobby.gamepads.remove(gamepad);
println!("{:?} Disconnected", gamepad);
}
_ => (),
}
}
.add_startup_system(setup.system().label("main-setup"))
.add_startup_system(setup_physics.system().after("main-setup"))
.add_system(exit_on_esc_system.system())
.add_system(apply_forces.system())
.add_system(update_heat_color.system())
.add_startup_system(setup.label("main-setup"))
.add_startup_system(setup_physics.after("main-setup"))
.add_system(exit_on_esc_system)
.add_system(apply_forces)
.add_system(update_heat_color)
fn update_heat_color(mut colors: Query<(&Heat, &mut ShapeColors), (With<Player>, Changed<Heat>)>) {
for (heat, mut colors) in colors.iter_mut() {
// TODO: make it work
let percent = heat.amount;
colors.main = Color::RED * percent + Color::MIDNIGHT_BLUE * (1. - percent);
fn update_heat_color(mut colors: Query<(&Heat, &mut DrawMode), (With<Player>, Changed<Heat>)>) {
for (heat, draw_mode) in colors.iter_mut() {
if let DrawMode::Fill(mut fill_mode) = *draw_mode {
let percent = heat.amount;
fill_mode.color = Color::RED * percent + Color::MIDNIGHT_BLUE * (1. - percent);
}