Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Bevy Web Codecs
This crate is a more efficient web replacement of Bevy's default image loaders by making use of the WebCodecs API to decode images and fallsback to the canvas API when its unavailable. This crate parallelizes image decoding and reduces the bundle size compared to bevy_image's default decoders.
This crate is only supported on wasm targets.
Usage
[]
= "0.2"
use *;
use WebCodecsPlugin;
It's recommended that you turn off bevy's default features so you can disable "png" support so that it doesn't clash with this plugin's png loader.
glTF Support
[]
= { = "0.17", = ["bevy_animation"] }
use *;
use WebCodecsPlugin;
use GltfPlugin;
You will have to disable bevy's bevy_gltf
feature and replace any imports:
// Before
use *;
use GltfExtras;
// After
use *;
use *;
use GltfExtras;
Supported types
WebCodecsPlugin
registers the following image types by default.
Extension | MIME Type |
---|---|
.jpg, jpeg | image/jpeg |
.png | image/png |
.gif | image/gif |
.webp | image/webp |
.bmp | image/bmp |
.avif | image/avif |
Registered file extensions and MIME types can be configured at startup but support will be limited depending on your browser.
Bevy version support
bevy | bevy_web_codecs | bevy_web_codecs_gltf |
---|---|---|
0.17 | 0.2 | 0.17.1 |
0.16 | 0.1 | 0.16.1 |
License
bevy_web_codecs
is dual-licensed under either
- MIT License (./LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.