Commit graph

2382 commits

Author SHA1 Message Date
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
Daniel McNab
44f370a26c Make the iter_combinators examples more pretty (#3075)
# Objective

- More colours

## Solution

- Various changes
- Would have a video here, but don't have an easy way to record one before I go to sleep
- I intend to additionally change the distribution of the satellites, to be more uniform in space.
2022-01-06 19:13:52 +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
SarthakSingh31
2d301ea0ea Add instruction to enable ALSA api routing on Arch / Manjaro systems (#3455)
# Objective

Every few months a person using Arch asks for help with the following error on discord:
```
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
```
This error is caused by their sound server not being configured for ALSA. The fix is to install `pipewire-alsa` or `pulseaudio-alsa` depending on the sound server they use.

Examples:
- https://discord.com/channels/691052431525675048/749690364792668301/924380204237987861
- https://discord.com/channels/691052431525675048/742884593551802431/907392651689619486
- https://discord.com/channels/691052431525675048/742884593551802431/838062316360433664

## Solution

Add the instruction to install either `pipewire-alsa` or `pulseaudio-alsa` to [linux_dependencies.md](https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md#arch--manjaro)

## Extra Info

A lot of people don't run into this issue because `pipewire-alsa` / `pulseaudio-alsa` is a dependency for gnome and cinnamon.

@alice-i-cecile Sorry, had to recreate the pr. It doesn't let me reopen and change the branch of the original pr.
2022-01-05 23:28:30 +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
Jakob Hellermann
b1476015d9 add some more pipelined-rendering shader examples (#3041)
based on #3031 

Adds some examples showing of how to use the new pipelined rendering for custom shaders.

- a minimal shader example which doesn't use render assets
- the same but using glsl
- an example showing how to render instanced data
- a shader which uses the seconds since startup to animate some textures


Instancing shader:
![grafik](https://user-images.githubusercontent.com/22177966/139299294-e176b62a-53d1-4287-9a66-02fb55affc02.png)
Animated shader:
![animate_shader](https://user-images.githubusercontent.com/22177966/139299718-2940c0f3-8480-4ee0-98d7-b6ba40dc1472.gif)
(the gif makes it look a bit ugly)

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-01-05 19:43:11 +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
François
37f9e418d2 Feature for bevy UI (#3546)
# Objective

- For a plugin, I would like to enable `bevy_ui` without adding the complete `render` feature

## Solution

- Add a feature for `bevy_ui`


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2022-01-04 19:49:38 +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
Nathan Pinard
3bb50443d4 updated contributing.md with merges rights (#3542)
# Objective

- Update CONTRIBUTING.md with the arrival of a new member who has merge rights

## Solution

- Just add them to the CONTRIBUTING.md


Co-authored-by: Nathan Pinard <42417006+bytemuck@users.noreply.github.com>
2022-01-04 18:56:58 +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
François
a6d3cd92fe revert new dependency for fedora added in #3517 (#3530)
# Objective

- Revert #3517 as the dependency added (rust-libudev-devel) has a dependency on cargo which install the package manager version, which isn't compatible with rustup version and may break the setup of users


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2022-01-02 20:36:41 +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
Oscar
478bf7a2b6 Remove Lutris from NixOS dependency section (#2945)
# Objective

- Using the instructions given for NixOS results in an unnecessarily long time to evaluate the shell expression due to unnecessary dependencies pulled in by `lutris`.

## Solution

- Removed `lutris` dependency.

Lutris is a GUI tool for running games on wine, I'm assuming it was pulled in by accident as it's definitely not necessary for running bevy. A hello world example, at the least, works fine without it.
2022-01-01 22:55:19 +00:00
Joel Godfrey-Smith
6b239713bf Update linux_dependencies.md (#3517)
Thanks for making Bevy. Recommend adding rust-libudev-devel as an additional dependence for Fedora.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, say "Fixes #X".

## Solution

- Describe the solution used to achieve the objective above.
2022-01-01 22:28:44 +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
Alice Cecile
97c806585b README refresh (#3513)
# Objective

- The focus areas and roadmap are very stale.
- Some of the information about how to learn or contribute to Bevy are outdated

## Solution

- Remove links to focus areas and roadmap (roadmap still exists, and will be updated post-release).
- Link to Bevy Assets, CONTRIBUTING.md and official examples.
2022-01-01 19:41:20 +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
Carter Anderson
1d0d8a3397 Spherical area lights example (#3498)
I was putting together the Bevy 0.6 release blog post and wanted a simple area light radius example, so here we are :)

![image](https://user-images.githubusercontent.com/2694663/147786883-63454290-b5b1-4456-9762-0b0b47e16bb5.png)
2021-12-30 21:07:26 +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
François
db68704231 Enable Msaa for webgl by default (#3489)
# Objective

- `Msaa` was disabled in webgl due to a bug in wgpu
- Bug has been fixed (https://github.com/gfx-rs/wgpu/pull/2307) and backported (https://github.com/gfx-rs/wgpu/pull/2327), and updates for [`wgpu-core`](https://crates.io/crates/wgpu-core/0.12.1) and [`wgpu-hal`](https://crates.io/crates/wgpu-hal/0.12.1) have been released

## Solution

- Remove custom config for `Msaa` in webgl
- I also changed two options that were using the arch instead of the `webgl` feature. it shouldn't change much for webgl, but could help if someone wants to target wasm but not webgl2


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2021-12-29 21:04:28 +00:00
Jakob Hellermann
66b517ef81 fix shader compilation error reporting for non-wgsl shaders (#3441)
in #3289 I accidentally only logged errors for wgsl shaders, this PR expands the error reporting the the other supported shader types.
2021-12-29 21:04:27 +00:00
Jonathan Cornaz
d07c8a8fa7 Implement ReflectValue serialization for Duration (#3318)
# Objective

Resolves #3277 

Currenty if we try to serialize a scene that contains a `Duration` (which is very common, since `Timer` contains one), we get an error saying:

> Type 'core::time::Duration' does not support ReflectValue serialization


## Solution

Let `Duration` implement `SerializeValue`.



Co-authored-by: Jonathan Cornaz <jcornaz@users.noreply.github.com>
2021-12-29 21:04:26 +00:00
David Sugar
8a8293b266 Renamed Entity::new to Entity::from_raw (#3465)
# Objective

- Rename `Entity::new(id: u32)` to `Entity::from_raw(id: u32)`.
- Add further documentation.
- fixes #3108

## Solution

- Renamed `Entity::new(id: u32)` to `Entity::from_raw(id: u32)`.
- Docs extended.

I derived the examples from the discussion of issue #3108 .

The [first case](https://github.com/bevyengine/bevy/issues/3108#issuecomment-966669781) mentioned in the linked issue is quite obvious but the [second one](https://github.com/bevyengine/bevy/issues/3108#issuecomment-967093902) probably needs further explanation.


Co-authored-by: r4gus <david@thesugar.de>
2021-12-29 20:49:00 +00:00
Michael Dorst
fd743ec57f Fix doc_markdown lints in bevy_pbr (#3477)
#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_pbr` crate.
2021-12-29 19:04:18 +00:00
Michael Dorst
455ab65bce Fix doc_markdown lints in bevy_sprite (#3480)
#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_sprite` crate.
2021-12-29 18:49:43 +00:00
Michael Dorst
608e63a5bc Fix doc_markdown lints in bevy_audio (#3469)
#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_audio` crate.
2021-12-29 17:52:42 +00:00
Michael Dorst
32d88c7d23 Fix doc_markdown lints in bevy_asset (#3468)
#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_asset` crate.
2021-12-29 17:52:39 +00:00
Michael Dorst
b32770d303 Fix doc_markdown lints in bevy_tasks (#3481)
#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_tasks` crate.
2021-12-29 17:38:13 +00:00
Michael Dorst
b1e4984c55 Fix doc_markdown lints in bevy_reflect (#3478)
#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_reflect` crate.
2021-12-29 17:38:12 +00:00