Commit graph

25 commits

Author SHA1 Message Date
François
231894a3a6 Lighter no default features (#5447)
# Objective

- Even though it's marked as optional, it is no longer possible to not depend on `bevy_render` as it's a dependency of `bevy_scene`

## Solution

- Make `bevy_scene` optional
- For the minimalist among us, also make `bevy_asset` optional
2022-07-25 15:48:14 +00:00
Yutao Yuan
08eaa13c81 Add animation feature to cargo_features.md (#4450)
# Objective

The new feature `animation` is not documented in `cargo_features.md`.

## Solution

Add it there.
2022-04-11 04:20:25 +00:00
Robert Swain
0529f633f9 KTX2/DDS/.basis compressed texture support (#3884)
# Objective

- Support compressed textures including 'universal' formats (ETC1S, UASTC) and transcoding of them to 
- Support `.dds`, `.ktx2`, and `.basis` files

## Solution

- Fixes https://github.com/bevyengine/bevy/issues/3608 Look there for more details.
- Note that the functionality is all enabled through non-default features. If it is desirable to enable some by default, I can do that.
- The `basis-universal` crate, used for `.basis` file support and for transcoding, is built on bindings against a C++ library. It's not feasible to rewrite in Rust in a short amount of time. There are no Rust alternatives of which I am aware and it's specialised code. In its current state it doesn't support the wasm target, but I don't know for sure. However, it is possible to build the upstream C++ library with emscripten, so there is perhaps a way to add support for web too with some shenanigans.
- There's no support for transcoding from BasisLZ/ETC1S in KTX2 files as it was quite non-trivial to implement and didn't feel important given people could use `.basis` files for ETC1S.
2022-03-15 22:26:46 +00:00
Carter Anderson
98938a8555 Internal Asset Hot Reloading (#3966)
Adds "hot reloading" of internal assets, which is normally not possible because they are loaded using `include_str` / direct Asset collection access.

This is accomplished via the following:
* Add a new `debug_asset_server` feature flag
* When that feature flag is enabled, create a second App with a second AssetServer that points to a configured location (by default the `crates` folder). Plugins that want to add hot reloading support for their assets can call the new `app.add_debug_asset::<T>()` and `app.init_debug_asset_loader::<T>()` functions.
* Load "internal" assets using the new `load_internal_asset` macro. By default this is identical to the current "include_str + register in asset collection" approach. But if the `debug_asset_server` feature flag is enabled, it will also load the asset dynamically in the debug asset server using the file path. It will then set up a correlation between the "debug asset" and the "actual asset" by listening for asset change events.

This is an alternative to #3673. The goal was to keep the boilerplate and features flags to a minimum for bevy plugin authors, and allow them to home their shaders near relevant code. 

This is a draft because I haven't done _any_ quality control on this yet. I'll probably rename things and remove a bunch of unwraps. I just got it working and wanted to use it to start a conversation.

Fixes #3660
2022-02-18 22:56:57 +00:00
François
aeba9faf04 use ogg by default instead of mp3 (#3421)
# Objective

- mp3 feature of rodio has dependencies that are not maintained with security issues
- mp3 feature of rodio doesn't build in wasm
- mp3 feature of rodio uses internal memory allocation that cause rejection from Apple appstore

## Solution

- Use vorbis instead of mp3 by default


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2021-12-23 19:19:15 +00:00
François
3974e02fd1 Enable trace feature for subfeatures using it (#3337)
# Objective

- It isn't very useful to be able to enable feature `trace_chrome` on its own

## Solution

- Enable `trace` feature when enabling `trace_chrome` or `trace_tracy`


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2021-12-18 00:09:22 +00:00
Carter Anderson
ffecb05a0a Replace old renderer with new renderer (#3312)
This makes the [New Bevy Renderer](#2535) the default (and only) renderer. The new renderer isn't _quite_ ready for the final release yet, but I want as many people as possible to start testing it so we can identify bugs and address feedback prior to release.

The examples are all ported over and operational with a few exceptions:

* I removed a good portion of the examples in the `shader` folder. We still have some work to do in order to make these examples possible / ergonomic / worthwhile: #3120 and "high level shader material plugins" are the big ones. This is a temporary measure.
* Temporarily removed the multiple_windows example: doing this properly in the new renderer will require the upcoming "render targets" changes. Same goes for the render_to_texture example.
* Removed z_sort_debug: entity visibility sort info is no longer available in app logic. we could do this on the "render app" side, but i dont consider it a priority.
2021-12-14 03:58:23 +00:00
François
ac06ea3d17 default features from bevy_asset and bevy_ecs can actually be disabled (#3097)
# Objective

- `bevy_ecs` exposes as an optional feature `bevy_reflect`. Disabling it doesn't compile.
- `bevy_asset` exposes as an optional feature `filesystem_watcher`. Disabling it doesn't compile. It is also not possible to disable this feature from Bevy

## Solution

- Fix compilation errors when disabling the default features. Make it possible to disable the feature `filesystem_watcher` from Bevy
2021-11-13 21:15:22 +00:00
Ixentus
36394adb2f Remove wasm audio feature flag for 2021 (#3000)
- Requires #2997 
- Removes `wasm_audio` feature as discussed in #2397
- Closes only task in #2479 

Open questions:
Should we enable wasm audio by default or only when building for wasm using `cfg`?
Maybe there should be a global wasm feature for bevy?
2021-11-11 01:17:38 +00:00
Robert Swain
064af63400 Add trace_tracy feature for Tracy profiling (#2832)
# Objective

[Tracy](https://github.com/wolfpld/tracy) is:
> A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.

With the `trace_tracy` feature enabled, you run your bevy app and either a headless server (`capture`) or a live, interactive profiler UI (`Tracy`), and connect that to your bevy application to then stream the metric data and events, and save it or inspect it live/offline.

Previously when I implemented the spans across systems and stages and I was trying out different profiling tools, Tracy was too unstable on macOS to use. But now, quite some months later, it is working stably with Tracy 0.7.8. You can see timelines, aggregate statistics of mean system/stage execution times, and much more. It's very useful!

![Screenshot_2021-09-15_at_18 07 19](https://user-images.githubusercontent.com/302146/133554920-350d3d45-fbb8-479f-91f7-7a7a4f9f5873.png)

## Solution

- Use the `tracing-tracy` crate which supports our tracing spans
- Expose via the non-default feature `trace_tracy` for consistency with other `trace*` features
2021-09-16 23:39:22 +00:00
Daniel McNab
43d99bb583 Remove bevy_dynamic_plugin as a default (#2578)
It doesn't compile on wasm, and it's full of footguns

# Objective

- If bevy is used with default features on wasm, there's more of a chance it will compile
- Note that I haven't done a full audit - it's possible that there are other problematic crates

## Solution

- `bevy_dynamic_plugin` is no longer a default plugin
- I've also done an accidental drive by reformatting of the root `Cargo.toml`, as I have [Even Better Toml](https://github.com/tamasfe/taplo) installed.
- (Please, rustfmt do this for us)
2021-08-01 19:14:47 +00:00
Ixentus
d80303d138 Add feature flag to enable wasm for bevy_audio (#2397)
Exposes Rodio feature flag to enable WASM support.

Note that mp3 doesn't currently work on wasm.
2021-07-14 03:20:21 +00:00
Klim Tsoutsman
bc3f80fb85 Fix name in list of features (#2438)
# Objective

- Fix the name of the `bevy_dynamic_plugin` feature in the list of features

## Solution

- Remove the letter "s" 😶
2021-07-06 21:15:50 +00:00
MinerSebas
4c86b99d2f Update cargo_features.md (#1939)
This adds missing features to the cargo_features.md file.

closes #1391
2021-04-16 18:57:08 +00:00
follower
50df6b61f2 Typo fix: "wit" -> "with". (#1876) 2021-04-13 20:02:20 +00:00
dinococo
3adcba9461
Grammar fixes (#1390)
* Minor grammar fixes

* Minor grammar fixes

Fixed punctuation and wording.

* Minor grammar fixes

FIxed spelling, wording and formatting.
2021-02-03 19:15:25 -08:00
François
cf5f3b5008
Plugin guidelines (#1250)
* add plugin guidelines
* refactor features list
2021-01-31 20:19:10 -08:00
Spencer Burris
06dbfffe2e
Update default features in docs/cargo_features.md (#1287) 2021-01-31 17:03:54 -08:00
Nathan Jeffords
60be99859a
Subpixel text positioning (#1196)
* cleanup unnecessary changes from PR #1171

* add feature to correctly render glyphs with sub-pixel positioning
2021-01-03 12:39:11 -08:00
Carter Anderson
e03f17ba7f
Log Plugin (#836)
add bevy_log plugin
2020-11-12 17:23:57 -08:00
MGlolenstine
ec7ad4254c
Fixed grammar and wording (#840)
Changed grammar and wording on two entries to make them easier to understand and fit better into the context (make MP3 format fit better alongside the audio formats).
2020-11-11 12:09:02 -08:00
Rob
06f95e9982
Fixed several typos. (#806)
* Fixed common typo in several struct names.

* Fixed minor doc typos.
2020-11-06 17:11:12 -08:00
CGMossa
58eb7e7e05
Documenting small things here and there.. (#706)
Documenting small things here and there..
2020-10-21 15:57:03 -07:00
memoryruins
f5146c1896
Update headless example / add feature docs (#502)
* Update headless example

* Add missing docs for features
2020-09-16 13:02:53 -07:00
VitalyR
c78187e6df
add an option about display server protocol, and create document docs/cargo_features.md (#249)
add an option about display server protocol, and create document `docs/cargo_features.md`
2020-08-24 17:06:08 -07:00