Commit graph

865 commits

Author SHA1 Message Date
Jakob Hellermann
4796ea8d22
move texture_to_image and image_to_texture into new module (#1381)
The `Texture::convert` function previously was only compiled when
one of the image format features (`png`, `jpeg` etc.) were enabled.
The `bevy_sprite` crate needs this function though, which led
to compilation errors when using `cargo check --no-default-features
--features render`.

Now the `convert` function has no features and the `texture_to_image`
and `image_to_texture` utilites functions are in an unconditionally
compiled module.
2021-02-02 13:25:16 -08:00
dependabot[bot]
1ca8ce4a79
Update crossbeam-utils requirement from 0.7.2 to 0.8.1 (#959)
Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-0.7.2...crossbeam-utils-0.8.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2021-02-01 13:51:44 -08:00
dependabot[bot]
05b8b5c8c2
Update crossbeam-channel requirement from 0.4.4 to 0.5.0 (#668)
Updates the requirements on [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.4.4...crossbeam-channel-0.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-01 13:30:38 -08:00
dependabot[bot]
89df94e690
Update ahash requirement from 0.6.1 to 0.7.0 (#1370)
Updates the requirements on [ahash](https://github.com/tkaitchuck/ahash) to permit the latest version.
- [Release notes](https://github.com/tkaitchuck/ahash/releases)
- [Commits](https://github.com/tkaitchuck/ahash/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-01 13:29:54 -08:00
François
6b8f8a7ed0
Texture atlas format and conversion (#1365)
* can specify texture format for a texture atlas
* add automatic conversion
2021-02-01 11:30:11 -08:00
Zhixing Zhang
81809c71ce
Update to wgpu-rs 0.7 (#542)
Update to wgpu-rs 0.7
2021-01-31 20:06:42 -08:00
Will Crichton
e6e23fdfa9
Add support for gltf::Material::unlit (#1341)
* Add support for gltf::Material::unlit
2021-01-31 17:13:16 -08:00
davier
1d3dfd3938
Fix Interaction not resetting to None sometimes (#1315)
* Fix Interaction getting stuck when pressing and releasing mouse button in one frame

* Fix Interaction not resetting in some cases with FocusPolicy::Pass
2021-01-31 17:03:25 -08:00
Nathan Stocks
0867dc76a3
Use Cow<'static, str> in Name (#1308)
* Implement Name { name } as Cow<'static, str>
* Attempt impl Reflect for Cow<'static, str.>
2021-01-31 16:35:23 -08:00
Jasen Borisov
7d065eeb71
3D OrthographicProjection improvements + new example (#1361)
* use `length_squared` for visible entities

* ortho projection 2d/3d different depth calculation

* use ScalingMode::FixedVertical for 3d ortho

* new example: 3d orthographic
2021-01-31 16:22:06 -08:00
François
83e30a841a
bind the labeled asset type to the actual loaded asset (#1363)
bind the labeled asset type to the actual loaded asset
2021-01-31 13:54:15 -08:00
Zicklag
bff44f76ec
Fix Un-Renamed add_resource Compile Error (#1357) 2021-01-30 13:32:46 -08:00
Alice Cecile
6f5a4d9deb
Rename add_resource to insert_resource (#1356)
* Renamed add_resource to insert_resource

* Changed usage of add_resource to insert_resource

* Renamed add_thread_local_resource
2021-01-30 12:55:13 -08:00
Daniel McNab
b922a3ec60
Update init_resource to not overwrite (#1349)
Update init_resource to not overwrite
2021-01-30 12:48:11 -08:00
Renato Caldas
8e0e4223e5
Improve clarity of WindowTextureNode and WindowSwapchainNode error messages (#1355)
Improve clarity of WindowTextureNode and WindowSwapchainNode error messages
2021-01-30 12:47:27 -08:00
Telzhaak
61c9a40fde
[Bugfix] add_stage now checks Stage existence (#1346)
add_stage now checks stage existence
2021-01-30 12:10:14 -08:00
Jasen Borisov
57f9ac18d7
OrthographicProjection scaling mode + camera bundle refactoring (#400)
* add normalized orthographic projection

* custom scale for ScaledOrthographicProjection

* allow choosing base axis for ScaledOrthographicProjection

* cargo fmt

* add general (scaled) orthographic camera bundle

FIXME: does the same "far" trick from Camera2DBundle make any sense here?

* fixes

* camera bundles: rename and new ortho constructors

* unify orthographic projections

* give PerspectiveCameraBundle constructors like those of OrthographicCameraBundle

* update examples with new camera bundle syntax

* rename CameraUiBundle to UiCameraBundle

* update examples

* ScalingMode::None

* remove extra blank lines

* sane default bounds for orthographic projection

* fix alien_cake_addict example

* reorder ScalingMode enum variants

* ios example fix
2021-01-30 02:31:03 -08:00
Zicklag
af67231567
Fix Bug in Asset Server Error Message Formatter (#1340) 2021-01-29 13:26:21 -08:00
Zicklag
cc9ed52ea7
Update Scene Example to Use scn.ron File (#1339) 2021-01-28 14:14:50 -08:00
Jakob Hellermann
f3306e5490
implement Debug for Flags regardless of underlying type (#1323) 2021-01-26 11:58:46 -08:00
davier
528c2858e0
Expose more info in PositionedGlyph (#1319) 2021-01-26 11:53:55 -08:00
Zicklag
b6485ccf29
Process Asset File Extensions With Multiple Dots (#1277)
Process Asset File Extensions With Multiple Dots
Fixes #1276
2021-01-25 12:37:23 -08:00
davier
5edf2d2395
Prevent ImageBundles from causing constant layout recalculations (#1299)
Prevent ImageBundles from causing constant layout recalculations
2021-01-24 21:00:20 -08:00
Toniman20
32acbfb632
Added set_minimized and set_position to Window (#1292)
Added `set_minimized` and `set_position` to `Window`
2021-01-24 20:06:06 -08:00
RedlineTriad
7e368e0b78
Add more transform relative vectors (#1300)
* Add more transform relative vectors (#1298)

* Add inverse of relative directions (#1298)
2021-01-24 20:05:30 -08:00
tigregalis
40b5bbd028
Rich text (#1245)
Rich text support (different fonts / styles within the same text section)
2021-01-24 17:07:43 -08:00
Will Crichton
3d0c4e380c
Don't panic on error when loading assets (#1286)
* Don't panic on IO errors
* Better formatting for asset server errors
2021-01-23 13:23:16 -08:00
Tomasz Sterna
f2b73eaa8a
Fix documentation comment for State::overwrite_next (#1291) 2021-01-23 13:18:28 -08:00
Will Crichton
7166a28baf
Enable dynamic mutable access to component data (#1284)
* Enable dynamic mutable access to component data

* Add clippy allowance, more documentation
2021-01-22 15:15:08 -08:00
Will Crichton
ebcab3638a
Change Name to take Into<String> instead of String (#1283) 2021-01-22 14:13:26 -08:00
Daniel McNab
6bd5ec8404
Change to using add_run_criteria (#1282) 2021-01-22 14:09:14 -08:00
Renato Caldas
0a39c81be6
Add support for reading from mapped buffers (#1274)
* Add support for mapping buffers for reading.

* Add support for reading from a mapped buffer.
2021-01-21 17:53:43 -08:00
Aevyrie
18e4fa8cdf
world coords to screen space (#1258)
Add Camera::world_to_screen to convert world coordinates to screen space
2021-01-21 17:49:29 -08:00
TheRawMeatball
f15d62c0f1
More types (#1267) 2021-01-21 16:05:23 -08:00
bjorn3
7aefd727f6
Use valid keys to initialize AHasher in FixedState (#1268)
Using 0 as keys causes the hasher to get stuck
2021-01-20 14:24:57 -08:00
reidbhuntley
ac7d2de67c
Count number of times a repeating Timer wraps around in a tick (#1112)
Added just_finished_count() function
2021-01-19 14:41:37 -08:00
Alec Deason
1e8060a5a2
Add missing spawn_local method to Scope in the single threaded executor case (#1266) 2021-01-19 13:07:45 -08:00
TheRawMeatball
50ceaf3559
re-export integer vectors from glam (#1264) 2021-01-19 12:56:50 -08:00
TheRawMeatball
a880b54508
Make EventReader a SystemParam (#1244)
* Add generic support for `#[derive(SystemParam)]`
* Make EventReader a SystemParam
2021-01-18 22:23:30 -08:00
Alec Deason
71c6a19ed8
Minimal change to support instanced rendering (#1262) 2021-01-18 16:52:06 -08:00
Nathan Stocks
a0475e9ad5
Change 'components' to 'bundles' where it makes sense semantically (#1257)
change 'components' to 'bundles' where it makes sense semantically
2021-01-18 16:50:36 -08:00
Alec Deason
3c5f1f8a80
Support for !Send tasks (#1216)
Support for !Send tasks
2021-01-18 13:48:28 -08:00
Cameron Hart
e7dab0c359
Update glam to 0.12.0 (#1249) 2021-01-17 13:44:55 -08:00
Christopher Durham
4d5ba7918b
Update rand requirement from 0.7 to 0.8 (#1114)
* Update rand requirement from 0.7 to 0.8

* Update examples' usage of Rng::gen_range
2021-01-17 13:43:03 -08:00
Zhixing Zhang
cf0e9f9968
Adding copy_texture_to_buffer and copy_texture_to_texture (#1236)
* Adding copy_texture_to_buffer and copy_texture_to_texture

* Adding CopyTextureToTexture and CopyTextureToBuffer in CommandQueue
2021-01-14 11:01:07 -08:00
Yoh Deadfall
6a0116e994
Removed unreferenced trait (#1230) 2021-01-12 14:06:01 -08:00
João Capucho
478f947768
Don't panic if there's no index buffer and call draw (#1229) 2021-01-12 14:05:13 -08:00
bjorn3
fbf08ac545
Faster compilation of bevy_diagnostic (#1235)
* Remove AHashExt

There is little benefit of Hash*::new() over Hash*::default(), but it
does require more code that needs to be duplicated for every Hash* in
bevy_utils. It may also slightly increase compile times.

* Add StableHash* to bevy_utils

* Use StableHashMap instead of HashMap + BTreeSet for diagnostics

This is a significant reduction in the release mode compile times of
bevy_diagnostics

```
Benchmark #1: touch crates/bevy_diagnostic/src/lib.rs && cargo build --release -p bevy_diagnostic -j1
  Time (mean ± σ):      3.645 s ±  0.009 s    [User: 3.551 s, System: 0.094 s]
  Range (min … max):    3.632 s …  3.658 s    20 runs
```

```
Benchmark #1: touch crates/bevy_diagnostic/src/lib.rs && cargo build --release -p bevy_diagnostic -j1
  Time (mean ± σ):      2.938 s ±  0.012 s    [User: 2.850 s, System: 0.090 s]
  Range (min … max):    2.919 s …  2.969 s    20 runs
```
2021-01-12 13:21:45 -08:00
François
c434f57de1
use biggest RenderResources instead of first (#1208) 2021-01-11 14:28:32 -08:00
Adamaq01
4a0837048c
Made ReflectMut::Tuple enum variant use a mutable reference (#1226) 2021-01-08 18:29:03 -08:00