Skip to content

Commit

Permalink
fix: audio for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlcibiades committed Dec 27, 2024
1 parent c09d082 commit c375217
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 136 deletions.
99 changes: 87 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 35 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,40 @@ edition = "2021"
authors = ["0xAlcibiades <[email protected]>"]

[dependencies]
bevy = { version = "0.15.0", features = ["mp3", "webgpu"] }
bevy = { version = "0.15.0", features = ["animation",
"bevy_asset",
"bevy_color",
"bevy_core_pipeline",
"bevy_gilrs",
"bevy_gizmos",
"bevy_gltf",
"bevy_mesh_picking_backend",
"bevy_pbr",
"bevy_picking",
"bevy_render",
"bevy_scene",
"bevy_sprite",
"bevy_sprite_picking_backend",
"bevy_state",
"bevy_text",
"bevy_ui",
"bevy_ui_picking_backend",
"bevy_window",
"bevy_winit",
"custom_cursor",
"default_font",
"hdr",
"multi_threaded",
"png",
"smaa_luts",
"sysinfo_plugin",
"tonemapping_luts",
"vorbis",
"webgl2",
"x11",
"webgpu"], default-features = false }
# Kira audio works in WASM, supports FLAC, and works in local runs
bevy_kira_audio = { version = "0.21.0", features = ["flac"], default-features = false }
bevy_rapier2d = "0.28.0"
rand = "0.8.5"

Expand All @@ -22,4 +55,4 @@ overflow-checks = false # Disable integer overflow checks
opt-level = 3

[profile.dev]
opt-level = 1 # Minimum optimization for primary package
opt-level = 1 # Minimum optimization for primary package
Binary file added assets/pong.flac
Binary file not shown.
Binary file removed assets/pong.mp3
Binary file not shown.
Loading

0 comments on commit c375217

Please sign in to comment.