This example is running in WebGL2 and should work in most browsers. You can check the WebGPU examples here.
//! Shows how to create a custom [`Decodable`] type by implementing a Sine wave. use AddAudioSource; use AudioPlugin; use Source; use *; use ; use Duration; // This struct usually contains the data for the audio being played. // This is where data read from an audio file would be stored, for example. // Implementing `TypeUuid` will automatically implement `Asset`. // This allows the type to be registered as an asset. // This decoder is responsible for playing the audio, // and so stores data about the audio being played. // The decoder must implement iterator so that it can implement `Decodable`. // `Source` is what allows the audio source to be played by bevy. // This trait provides information on the audio. // Finally `Decodable` can be implemented for our `SineAudio`.