Commit graph

1404 commits

Author SHA1 Message Date
Carter Anderson
6acf932cc9 Release 0.6.1 2022-02-16 12:25:43 -08:00
François
31af9d4ee1 fix timer test to be less reliant on float precision (#3789)
# Objective

- Test is failing on nightly after the merge of https://github.com/rust-lang/rust/pull/90247
- It was relying on the precision of the duration of `1.0 / 3.0`

## Solution

- Fix the test to be less reliant on float precision to have the same result
2022-02-12 21:05:53 -08:00
Robert Swain
ef5c8e83ad bevy_render: Support overriding wgpu features and limits (#3912)
# Objective

- Support overriding wgpu features and limits that were calculated from default values or queried from the adapter/backend.
- Fixes #3686

## Solution

- Add `disabled_features: Option<wgpu::Features>` to `WgpuOptions`
- Add `constrained_limits: Option<wgpu::Limits>` to `WgpuOptions`
- After maybe obtaining updated features and limits from the adapter/backend in the case of `WgpuOptionsPriority::Functionality`, enable the `WgpuOptions` `features`, disable the `disabled_features`, and constrain the `limits` by `constrained_limits`.
  - Note that constraining the limits means for `wgpu::Limits` members named `max_.*` we take the minimum of that which was configured/queried for the backend/adapter and the specified constrained limit value. This means the configured/queried value is used if the constrained limit is larger as that is as much as the device/API supports, or the constrained limit value is used if it is smaller as we are imposing an artificial constraint. For members named `min_.*` we take the maximum instead. For example, a minimum stride might be 256 but we set constrained limit value of 1024, then 1024 is the more conservative value. If the constrained limit value were 16, then 256 would be the more conservative.
2022-02-12 20:40:23 -08:00
Carter Anderson
3ae96dd307 Fix ui interactions when cursor disappears suddenly (#3926)
On platforms like wasm (on mobile) the cursor can disappear suddenly (ex: the user releases their finger from the screen). This causes the undesirable behavior in #3752. These changes make the UI handler properly handle this case.

Fixes #3752
Alternative to #3599
2022-02-12 20:36:43 -08:00
François
523e7af739 fix unreachable macro calls for rust 2021 (#3889)
# Objective

- It was decided in Rust 2021 to make macro like `panic` require a string literal to format instead of directly an object
- `unreachable` was missed during the first pass but it was decided to go for it anyway now: https://github.com/rust-lang/rust/issues/92137#issuecomment-1019519285
- this is making Bevy CI fail now: https://github.com/bevyengine/bevy/runs/5102586734?check_suite_focus=true

## Solution

- Fix calls to `unreachable`
2022-02-12 20:36:29 -08:00
TheRawMeatball
98cf6268dc Backport soundness fix (#3685)
#3001 discovered a soundness bug in World::resource_scope, this PR backports the fix with a smaller PR to patch out the bug sooner.

Fixes #3147
2022-02-12 20:36:18 -08:00
Robert Swain
ec88fcacca bevy_render: Only auto-disable mappable primary buffers for discrete GPUs (#3803)
# Objective

- While it is not safe to enable mappable primary buffers for all GPUs, it should be preferred for integrated GPUs where an integrated GPU is one that is sharing system memory.

## Solution

- Auto-disable mappable primary buffers only for discrete GPUs. If the GPU is integrated and mappable primary buffers are supported, use them.
2022-02-12 20:36:03 -08:00
Robert Swain
d11409028a bevy_pbr: Do not panic when more than 256 point lights are added the scene (#3697)
# Objective

- Do not panic when mroe than 256 point lights are added the scene
- Fixes https://github.com/bevyengine/bevy/issues/3682

## Solution

- Only iterate the first `MAX_POINT_LIGHTS` lights instead of as many as there are

## Open questions

- Should we warn that there are more than the maximum allowed number of point lights in the scene?
2022-02-12 20:35:53 -08:00
Robert Swain
df3d100315 bevy_render: Do not automatically enable MAPPABLE_PRIMARY_BUFFERS (#3698)
# Objective

- When using `WgpuOptionsPriority::Functionality`, which is the default, wgpu::Features::MAPPABLE_PRIMARY_BUFFERS would be automatically enabled. This feature can and does have a significant negative impact on performance for discrete GPUs where resizable bar is not supported, which is a common case. As such, this feature should not be automatically enabled.
- Fixes the performance regression part of https://github.com/bevyengine/bevy/issues/3686 and at least some, if not all cases of https://github.com/bevyengine/bevy/issues/3687

## Solution

- When using `WgpuOptionsPriority::Functionality`, use the adapter-supported features, enable `TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES` and disable `MAPPABLE_PRIMARY_BUFFERS`
2022-02-12 20:35:35 -08:00
François
398b15db5c do not set cursor grab on window creation if not asked for (#3617)
# Objective

- On Safari mobile, calling `winit_window.set_cursor_grab(true)` fails as the API is not implemented (as there is no cursor on Safari mobile, the api doesn't make sense there). I don't know about other mobile browsers
```
[Error] Unhandled Promise Rejection: TypeError: getObject(arg0).exitPointerLock is not a function. (In 'getObject(arg0).exitPointerLock()', 'getObject(arg0).exitPointerLock' is undefined)
    (anonymous function) (rect.js:1089)
    wasm-stub
    <?>.wasm-function[web_sys::features::gen_Document::Document::exit_pointer_lock::h20ffc49be163fc45]
    <?>.wasm-function[winit::platform_impl::platform::backend::canvas::Canvas::set_cursor_grab::h6a9472cf55263e98]
    <?>.wasm-function[bevy_winit::winit_windows::WinitWindows::create_window::h9db5b3cbb24347c5]
    <?>.wasm-function[<bevy_winit::WinitPlugin as bevy_app::plugin::Plugin>::build::ha4a7c046b80c4280]
    <?>.wasm-function[bevy_app::plugin_group::PluginGroupBuilder::finish::h0e5bc78f71c37b2f]
    <?>.wasm-function[rect::main::h899852fd17f2d489]
    <?>.wasm-function[std::sys_common::backtrace::__rust_begin_short_backtrace::hfe38f282e8dda96b]
    <?>.wasm-function[std::rt::lang_start::{{closure}}::hc2f3b555ffc58618]
    <?>.wasm-function[std::rt::lang_start_internal::ha901ae30d88554f2]
    <?>.wasm-function[main]
    <?>.wasm-function[]
    wasm-stub
    21261
    (anonymous function) (rect.js:1664)
    asyncFunctionResume
    (anonymous function)
    promiseReactionJobWithoutPromise
    promiseReactionJob
```

## Solution

- Do not call the api to release cursor grab on window creation, as the cursor is not grabbed anyway at this point
2022-02-12 20:35:19 -08:00
Robert Swain
b9337debb9 bevy_crevice: Fix incorrect iterator usage in WriteStd430 impl for [T] (#3591)
# Objective

- Fix incorrect iterator usage in WriteStd430 impl for [T]
  - The first item was being written twice. This is correct in the WriteStd140 impl for [T].

## Solution

- See the code.
2022-02-12 20:34:44 -08:00
François
470f94d19e support all line endings in shader preprocessor (#3603)
# Objective

- Advance uses of shaders seems to often fail for Windows users
- Bevy split lines on `'\n'` which messes with windows line endings

## Solution

- Uses Rust built in https://doc.rust-lang.org/std/primitive.str.html#method.lines
2022-02-12 20:34:01 -08:00
Hennadii Chernyshchyk
458cb7a9e9 Add headless mode (#3439)
# Objective

In this PR I added the ability to opt-out graphical backends. Closes #3155.

## Solution

I turned backends into `Option` ~~and removed panicking sub app API to force users handle the error (was suggested by `@cart`)~~.
2022-01-08 10:39:43 +00:00
Carter Anderson
2ee38cb9e0 Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
davier
c2da7800e3 Add 2d meshes and materials (#3460)
# Objective

The current 2d rendering is specialized to render sprites, we need a generic way to render 2d items, using meshes and materials like we have for 3d.

## Solution

I cloned a good part of `bevy_pbr` into `bevy_sprite/src/mesh2d`, removed lighting and pbr itself, adapted it to 2d rendering, added a `ColorMaterial`, and modified the sprite rendering to break batches around 2d meshes.

~~The PR is a bit crude; I tried to change as little as I could in both the parts copied from 3d and the current sprite rendering to make reviewing easier. In the future, I expect we could make the sprite rendering a normal 2d material, cleanly integrated with the rest.~~ _edit: see <https://github.com/bevyengine/bevy/pull/3460#issuecomment-1003605194>_

## Remaining work

- ~~don't require mesh normals~~ _out of scope_
- ~~add an example~~ _done_
- support 2d meshes & materials in the UI?
- bikeshed names (I didn't think hard about naming, please check if it's fine)

## Remaining questions

- ~~should we add a depth buffer to 2d now that there are 2d meshes?~~ _let's revisit that when we have an opaque render phase_
- ~~should we add MSAA support to the sprites, or remove it from the 2d meshes?~~ _I added MSAA to sprites since it's really needed for 2d meshes_
- ~~how to customize vertex attributes?~~ _#3120_



Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-01-08 01:29:08 +00:00
Troels Jessen
32f7997c56 Partially document bevy_ui (#3526)
# Objective

Updated the docs for bevy_ui as requested by #3492 

## Solution

I have documented the parts I understand. anchors.rs is not in use and should be removed, thus I haven't documented that, and some of the more renderer-heavy code is beyond me and needs input from either cart or someone familiar with bevy rendering

Co-authored-by: Troels Jessen <kairyuka@gmail.com>
2022-01-07 22:20:34 +00:00
Robert Swain
d34ecd7584 bevy_pbr: Use a special first depth slice for clustered forward (#3545)
# Objective

- Using plain exponential depth slicing for perspective projection cameras results in unnecessarily many slices very close together close to the camera. If the camera is then moved close to a collection of point lights, they will likely exhaust the available uniform buffer space for the lists of which lights affect which clusters.

## Solution

- A simple solution to this is to use a different near plane value for the depth slicing and set it to where the first slice's far plane should be. The default value is 5 and works well. This results in the configured number of depth slices, maintains the exponential slicing beyond the initial slice, and no slices are too small such that they cause problems that are sensitive to the view position.
2022-01-07 21:25:59 +00:00
Dusty DeWeese
f781bfe7d8 Fix shadows for non-TriangleLists (#3581)
Fixes shadows of non TriangleList meshes:

# Without

<img width="1033" alt="Screen Shot 2022-01-07 at 13 03 02" src="https://user-images.githubusercontent.com/1069462/148607402-9bc47978-0b5b-45cd-a6e6-f488825cdf14.png">

# With

<img width="987" alt="Screen Shot 2022-01-07 at 13 04 06" src="https://user-images.githubusercontent.com/1069462/148607437-7d7c1d74-627f-4a7c-bf7b-205405586c17.png">
2022-01-07 21:10:18 +00:00
Niklas Eicker
fbab01a40d Add missing closing ticks for inline examples and some cleanup (#3573)
# Objective

- clean up documentation and inline examples

## Solution

- add missing closing "```"
- remove stray "```"
- remove whitespace in inline examples
- unify inline examples (remove some `rust` labels)
2022-01-07 09:25:12 +00:00
François
015da72250 gltf loader: do not use the taskpool for only one task (#3577)
# Objective

- Fix the case mentioned in https://github.com/bevyengine/bevy/pull/2725#issuecomment-1007014024.
- On a machine with 4 cores, so 1 thread for assets, loading a gltf with only one textures hangs all asset loading

## Solution

- Do not use the task pool when there is only one texture to load


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2022-01-07 07:19:22 +00:00
yetanothercheer
fda0b2c911 Fix typo (#3578) 2022-01-07 06:25:38 +00:00
Daniel Bearden
b673c51e20 Bevy app docs (#3539)
# Objective

Achieve 100% documentation coverage for bevy_app crate.
See #3492 

## Solution

- Add #![warn(missing_docs)] to crate root
- Add doc comments to public items
- Add doc comment to bevy_utils::define_label macro trait
2022-01-06 23:16:47 +00:00
Michael Dorst
507441d96f Fix doc_markdown lints in bevy_ecs (#3473)
#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_ecs` crate.
2022-01-06 00:43:37 +00:00
Niklas Eicker
f9b51ca602 Complete inline documentation for bevy_audio (#3510)
# Objective
Part of #3492 

- Complete inline documentation of `bevy_audio`

## Solution

- Added inline documentation to all public parts of `bevy_audio`
- Added a few inline examples at important places
- Some renaming for clarity (e.g. `AudioLoader` and generics)
- added `#![warn(missing_docs)]` and `#![forbid(unsafe_code)]` to `bevy_audio`

I also tried adding support for the other vorbis file endings `.oga` and `.spx` to the `AudioLoader` (see `file endings` at https://tools.ietf.org/html/rfc5334#section-10.3), but the `rodio` decoder does not seem to support those.
2022-01-05 22:30:15 +00:00
Michael Dorst
251514017f Fix doc_markdown lints in bevy_ui (#3484)
#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_ui` crate.
2022-01-05 22:30:14 +00:00
Michael Dorst
0b3a1c18e9 Fix doc_markdown lints in bevy_text (#3482)
#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_text` crate.
2022-01-05 22:30:12 +00:00
Alice Cecile
073f381c9e Removal detection cleanup (#3010)
# Objective

- Fixes #1920.
- Users often want to know how to get the values of removed components (#1655).
- Stand-alone `bevy_ecs` behavior is very unintuitive, as `World::clear_trackers()` must be manually called.
- Fixes #2999 by extending the existing test (thanks @hymm for pointing me to it) to be clearer and check for component removal as well.

## Solution

- Better docs!
- Better tests!
2022-01-05 22:06:38 +00:00
TheRawMeatball
f3fba09615 Add MapMode to wgpu reexports (#3558)
This type can be needed by API s on other reexported types, so it should be included too
2022-01-05 19:19:22 +00:00
François
a1e3c5c100 load names of lights from gltf (#3553)
# Objective

- Load names of lights from gltf

## Solution

- Load names of lights from gltf


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2022-01-05 03:27:17 +00:00
Alice Cecile
0bae5bb8f4 Remove dead anchor.rs code (#3551)
# Objective

- As noticed by @sheepyhead in #3526, `anchor.rs` is completely unused.

## Solution

- Anchors away!
2022-01-05 00:49:20 +00:00
MrGVSV
36390a80ec Documented Handles and Assets (#3348)
# Objective

Add documentation to [Handle](7356f1586d/crates/bevy_asset/src/handle.rs (L63)) and [Assets](7356f1586d/crates/bevy_asset/src/assets.rs (L48)).

## Tasks
- [x] Document `Handle`
- [x] Document `Assets`

---

Fixes #3347


Co-authored-by: MrGVSV <49806985+MrGVSV@users.noreply.github.com>
2022-01-04 23:38:39 +00:00
Rob Parrett
24b21ea35e Fix torus normals (#3549)
# Objective

Fixes #3547 

## Solution

Normal calc adapted from https://web.cs.ucdavis.edu/~amenta/s12/findnorm.pdf

## Before
<img width="1392" alt="before" src="https://user-images.githubusercontent.com/200550/148125212-fb1c083e-3c57-4330-a656-df34513c36ab.png">

## After
<img width="1392" alt="after" src="https://user-images.githubusercontent.com/200550/148125223-174dc956-37df-4ac2-8983-b18e1e2a9a7d.png">

I'm assuming that the greyness and the self-shadowing artifacts are... normal for the new renderer.
2022-01-04 21:30:46 +00:00
Robert Swain
b9c623e4f3 Configurable wgpu features/limits priority (#3452)
# Objective

- Allow the user to specify the priority when configuring wgpu features/limits and by default use the maximum capabilities of the chosen adapter.

## Solution

- Add a `WgpuOptionsPriority` enum with `Compatibility`, `Functionality` and `WebGL2` options.
- Add a `priority: WgpuOptionsPriority` member to `WgpuOptions`.
- When initialising the renderer, if `WgpuOptions::priority == WgpuOptionsPriority::Functionality`, query the adapter for the available features and limits, use them when creating a device, and update `WgpuOptions` with those values. If `Compatibility` use the behaviour as before this PR. If `WebGL2` then use the WebGL2 downlevel limits as used when when building for wasm, for convenience of testing WebGL2 limits without having to build for wasm.
- Add an environment variable `WGPU_OPTIONS_PRIO` that takes `compatibility`, `functionality`, `webgl2`.
- Default to `WgpuOptionsPriority::Functionality`.
- Insert updated `WgpuOptions` into render app world as well. This is useful for applying the limits when rendering, such as limiting the directional light shadow map texture to 2048x2048 when using WebGL2 downlevel limits but not on wasm.
- Reduced `draw_state` logs from `debug` to `trace` and added `debug` level logs for the wgpu features and limits. Use `RUST_LOG=bevy_render=debug` to see the output.
2022-01-04 20:08:12 +00:00
Michael Nett
1a2646ecc4 Use fully-qualified type names in proc macro. (#3544)
Modifies the code emitted by `derive_label` to use fully-qualified type
names (e.g. `std::boxed::Box` instead of `Box`).

# Objective

- Using unqualified types here causes errors when the proc macro is used in contexts that locally define types with conflicting names (e.g. a local definition of `Box`).

## Solution

- Fully qualify standard types emitted by the proc macro code.
2022-01-04 19:49:37 +00:00
yetanothercheer
1bae879bf3 Fix typo (#3538) 2022-01-03 08:51:44 +00:00
dependabot[bot]
97012950f9 Update nalgebra requirement from 0.29.0 to 0.30.0 (#3540)
Updates the requirements on [nalgebra](https://github.com/dimforge/nalgebra) to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dimforge/nalgebra/blob/dev/CHANGELOG.md">nalgebra's changelog</a>.</em></p>
<blockquote>
<h2>[0.30.0] (02 Jan. 2022)</h2>
<h3>Breaking changes</h3>
<ul>
<li>The <code>Dim</code> trait is now marked as unsafe.</li>
<li>The <code>Matrix::pow</code> and <code>Matrix::pow_mut</code> methods only allow positive integer exponents now. To compute negative
exponents, the user is free to invert the matrix before calling <code>pow</code> with the exponent’s absolute value.</li>
</ul>
<h3>Modified</h3>
<ul>
<li>Use more concise debug impls for matrices and geometric transformation types.</li>
<li>The singular values computed by the SVD are now sorted in increasing order by default. Use <code>SVD::new_unordered</code>
instead to reproduce the older behavior without the sorting overhead.</li>
<li>The <code>UnitDualQuaternion::sclerp</code> method will no longer panic when given two equal rotations.</li>
<li>The <code>Matrix::select_rows</code> and <code>Matrix::select_columns</code> methods no longer require the matrix components to implement
the trait <code>Zero</code>.</li>
<li>The <code>Matrix::pow</code> and <code>Matrix::pow_mut</code> methods will now also work with integer matrices.</li>
</ul>
<h3>Added</h3>
<ul>
<li>Added the conversion trait <code>From&lt;Vec&lt;T&gt;&gt;</code> and method <code>from_vec_storage</code> for <code>RowDVector</code>.</li>
<li>Added implementation of <code>From</code> and <code>Into</code> for converting between <code>nalgebra</code> types and types from
<code>glam 0.18</code>. These can be enabled by enabling the <code>convert-glam018</code> cargo features.</li>
<li>Added the methods <code>Matrix::product</code>, <code>::row_product</code>, <code>::row_product_tr</code>, and <code>::column_product</code> to compute the
product of the components, rows, or columns, of a single matrix or vector.</li>
<li>The <code>Default</code> trait is now implemented for most geometric types: <code>Point</code>, <code>Isometry</code>, <code>Rotation</code>, <code>Similarity</code>,
<code>Transform</code>, <code>UnitComplex</code>, and <code>UnitQuaternion</code>.</li>
<li>Added the <code>Scale</code> geometric type for representing non-uniform scaling.</li>
<li>Added <code>Cholesky::new_with_substitute</code> that will replace diagonal elements by a given constant whenever <code>Cholesky</code>
meets a non-definite-positiveness.</li>
<li>Re-added the conversion from a vector/matrix slice to a static array.</li>
<li>Added the <code>cuda</code> feature that enables the support of <a href="https://github.com/Rust-GPU/Rust-CUDA">rust-cuda</a> for using
<code>nalgebra</code> features with CUDA kernels written in Rust.</li>
<li>Added special-cases implementations for the 2x2 and 3x3 SVDs for better accuracy and performances.</li>
<li>Added the methods <code>Matrix::polar</code>, <code>Matrix::try_polar</code>, and <code>SVD::to_polar</code> to compute the polar decomposition of
a matrix, based on its SVD.</li>
<li><code>nalgebra-sparse</code>: provide constructors for unsorted but otherwise valid data using the CSR format.</li>
<li><code>nalgebra-sparse</code>: added reading MatrixMarked data files to a sparse <code>CooMatrix</code>.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fixed a potential unsoundness with <code>matrix.get(i)</code> and <code>matrix.get_mut(i)</code> where <code>i</code>  is an <code>usize</code>, and <code>matrix</code>
is a matrix slice with non-default strides.</li>
<li>Fixed potential unsoundness with <code>vector.perp</code> where <code>vector</code> isn’t actually a 2D vector as expected.</li>
<li>Fixed linkage issue with <code>nalgebra-lapack</code>: the user of <code>nalgebra-lapack</code> no longer have to add
<code>extern crate lapack-src</code> to their <code>main.rs</code>.</li>
<li>Fixed the <code>no-std</code> build of <code>nalgebra-glm</code>.</li>
<li>Fix the <code>pow</code> and <code>pow_mut</code> functions (the result was incorrect for some exponent values).</li>
</ul>
<h2>[0.29.0]</h2>
<h3>Breaking changes</h3>
<ul>
<li>We updated to the version 0.6 of <code>simba</code>. This means that the trait bounds <code>T: na::RealField</code>, <code>na::ComplexField</code>,
<code>na::SimdRealField</code>, <code>na:SimdComplexField</code> no imply that <code>T: Copy</code> (they only imply that <code>T: Clone</code>). This may affect</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e8b9c40123"><code>e8b9c40</code></a> Release v0.30.0</li>
<li><a href="c0f8530d5e"><code>c0f8530</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dimforge/nalgebra/issues/1055">#1055</a> from dimforge/fix-pow</li>
<li><a href="99ac8c4032"><code>99ac8c4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dimforge/nalgebra/issues/1050">#1050</a> from metric-space/polar-decomposition-take-2</li>
<li><a href="498d7e3d4c"><code>498d7e3</code></a> Semi-unitary test checks for if rows or cols are orthonomal</li>
<li><a href="ae6fda7dc7"><code>ae6fda7</code></a> Change svd to svd_unordered for the method output to be equal</li>
<li><a href="d806669cc7"><code>d806669</code></a> Fix Matrix::pow and make it work only with positive exponents</li>
<li><a href="fdaf8c0fbe"><code>fdaf8c0</code></a> Add tests for Matrix::pow</li>
<li><a href="67a82c2c88"><code>67a82c2</code></a> Test: minor style fix</li>
<li><a href="8e0ca439c2"><code>8e0ca43</code></a> Use proptest for testing the polar decomposition</li>
<li><a href="cc10b67dd1"><code>cc10b67</code></a> Add Matrix::try_polar that returns Option and make Matrix::polar not return O...</li>
<li>Additional commits viewable in <a href="https://github.com/dimforge/nalgebra/compare/v0.29.0...v0.30.0">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
2022-01-03 08:33:15 +00:00
Robert Swain
85b7589388 bevy_gltf: Add support for loading lights (#3506)
# Objective

- Add support for loading lights from glTF 2.0 files

## Solution

- This adds support for the KHR_punctual_lights extension which supports point, directional, and spot lights, though we don't yet support spot lights.
- Inserting light bundles when creating scenes required registering some more light bundle component types.
2022-01-03 07:59:25 +00:00
Yilin Wei
d44c3cd150 Fix error message for the Component macro's component storage attribute. (#3534)
# Objective

Fixes the error message for the `component` attribute when users use the wrong literals.
2022-01-02 23:28:18 +00:00
James Liu
dc8fefe27f Remove Bytes, FromBytes, Labels, EntityLabels. Document rest of bevy_core and enable warning on missing docs. (#3521)
This PR is part of the issue #3492.

# Objective

 - Clean up dead code in `bevy_core`.
 - Add and update the `bevy_core` documentation to achieve a 100% documentation coverage.
 - Add the #![warn(missing_docs)] lint to keep the documentation coverage for the future.

# Solution

 - Remove unused `Bytes`, `FromBytes`, `Labels`, and `EntityLabels` types and associated systems.
 - Made several types private that really only have use as internal types, mostly pertaining to fixed timestep execution.
 - Add and update the bevy_core documentation.
 - Add the #![warn(missing_docs)] lint.

# Open Questions

Should more of the internal states of `FixedTimestep` be public? Seems mostly to be an implementation detail unless someone really needs that fixed timestep state.
2022-01-02 20:36:40 +00:00
François
363bdf78dc Re-enable nightly checks and add new dependency duplicate (#3525)
# Objective

- Nightly checks where disabled because of a bug in Rust
- Dependency checks are failing because of a new duplicate

## Solution

- Now that https://github.com/rust-lang/rust/pull/92175 has been merged, re-enable nightly checks
- Add the new duplicate dependency to the known list
- Removed `Inflector` dependency as it's not used anymore


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2022-01-02 20:18:53 +00:00
Jerome Humbert
e43e36696d Minor docs edit/add in bevy_render (#3447)
# Objective

Docs updates.

## Solution

- Detail what `OrthographicCameraBundle::new_2d()` creates.
- Fix a few renamed parameters in comments of `TrackedRenderPass`.
- Add missing comments for viewport and debug markers.

Co-authored-by: Jerome Humbert <djeedai@gmail.com>
2022-01-02 17:40:03 +00:00
KDecay
50b3f27a76 Updated bevy_dylib documentation and added missing_doc warning. (#3515)
This PR is part of the issue #3492.

# Objective
- Add and update the bevy_dylib documentation to achieve a 100% documentation coverage.
- Add the #![warn(missing_docs)] lint to keep the documentation coverage for the future.

# Solution
- Add and update the bevy_dylib documentation.
- Add the #![warn(missing_docs)] lint.
2022-01-02 10:51:08 +00:00
Troels Jessen
5c590b0011 Added missing docs to bevy_internal and added warn on missing docs (#3514)
# Objective
This contributes documentation that should cover the entirety of bevy_internal as requested in #3492 

## Solution
warn(missing_docs) has been activated and documentation has been added to missing parts so that no warnings appear from this setting
2022-01-01 21:22:04 +00:00
François
3ba711050f do not add plugin ExtractComponentPlugin twice for StandardMaterial (#3502)
# Objective

- After updating #2988, all the examples started crashing with
```
thread 'main' panicked at 'Plugin "bevy_render::render_component::ExtractComponentPlugin<bevy_asset::handle::Handle<bevy_pbr::pbr_material::StandardMaterial>>" was already added', crates/bevy_app/src/app.rs:831:33
```

## Solution

Plugin was added twice:
directly:
1d0d8a3397/crates/bevy_pbr/src/lib.rs (L73)
and through `MaterialPlugin`:
1d0d8a3397/crates/bevy_pbr/src/lib.rs (L72)
1d0d8a3397/crates/bevy_pbr/src/material.rs (L183)

I removed the extra plugin

Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2022-01-01 19:22:22 +00:00
David Sugar
c641a905dc StorageType parameter removed from ComponentDescriptor::new_resource (#3495)
# Objective

Remove the `StorageType` parameter from `ComponentDescriptor::new_resource` as discussed in #3361.

- fixes #3361

## Solution

- Parameter removed.
- Basic docs added.

## Note

Left a [comment](https://github.com/bevyengine/bevy/issues/3361#issuecomment-996433346) about `SparseStorage` being the more reasonable choice.



Co-authored-by: r4gus <david@thesugar.de>
2021-12-30 20:08:40 +00:00
Minghao Liu
3ac55f0bcf load spirv using correct API (#3466)
# Objective

currently spirv source loading parse then desterilize it to make wgpu happy.

## Solution

Use the right API to get spirv
2021-12-30 19:55:01 +00:00
Michael Dorst
b532cc9ef6 Fix doc_markdown lints in bevy_utils (#3485)
#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_utils` crate.
2021-12-30 09:23:18 +00:00
Michael Dorst
593f64cfcb Fix doc_markdown lints in bevy_transform (#3483)
#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_transform` crate.
2021-12-30 09:23:17 +00:00
Michael Dorst
accfb33ab9 Fix doc_markdown lints in bevy_app (#3467)
#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_app` crate.
2021-12-30 09:08:19 +00:00
François
d8d3fdf2cf remove dead code: ShaderDefs derive (#3490)
# Objective

- remove some dead code and see if someone isn't happy about it


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2021-12-29 21:04:29 +00:00