profile
viewpoint

memoryruins/amethyst 0

Data-oriented game engine written in Rust

memoryruins/atto 0

An insanely simple self-hosted functional programming language

memoryruins/awesome-embedded-rust 0

Curated list of resources for Embedded and Low-level development in the Rust programming languag

memoryruins/bevy 0

A refreshingly simple data-driven game engine built in Rust

memoryruins/bevy_input_map 0

Input Map aims to decouple game play code from device specific input api. This is achieved by providing apis that allows you to map game actions to device input events instead of directly handling device inputs.

memoryruins/bevy_mod_picking 0

Unofficial 3D mouse picking plugin for Bevy

memoryruins/bevy_rapier 0

Official Rapier plugin for the Bevy game engine.

memoryruins/book 0

The Rust Programming Language

PR closed bevyengine/bevy

Remove unsound cast in thread local resources ecs

Noticed in #671 that it acquires an unique reference from a shared reference, which is always unsound regardless of runtime tracking. miri confirms this concern:

<details>

error: Undefined Behavior: not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <682186> (call 245045)]
   --> crates\bevy_ecs\src\resource\resources.rs:56:37
    |
56  |                 ResourceRefMut::new(&mut *value, &stored.atomic_borrow)
    |                                     ^^^^^^^^^^^ not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <682186> (call 245045)]
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

    = note: inside closure at crates\bevy_ecs\src\resource\resources.rs:56:37
    = note: inside `std::option::Option::<&resource::resources::StoredResource<i64>>::map::<resource::resources::ResourceRefMut<i64>, [closure@crates\bevy_ecs\src\resource\resources.rs:52:36: 57:14]>` at C:\Users\Michael\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\option.rs:453:29
note: inside `resource::resources::VecResourceStorage::<i64>::get_mut` at crates\bevy_ecs\src\resource\resources.rs:52:9
   --> crates\bevy_ecs\src\resource\resources.rs:52:9
    |
52  | /         self.stored.get(index).map(|stored|
53  | |             // SAFE: ResourceRefMut ensures that this borrow is unique
54  | |             unsafe {
55  | |                 let value = &stored.value as *const T as *mut T;
56  | |                 ResourceRefMut::new(&mut *value, &stored.atomic_borrow)
57  | |             })
    | |______________^

</details>

This PR changes get_mut(&self) to get_mut(&mut self) and removes the problematic code.

gilrs_event_system needed to be tweaked slightly (making a temporary buffer for events). If desired, we can add a new resource that only this system can access by type to re-use a buffer. I have tested gamepad_input and gamepad_input_events examples with a xbox 360 controller and the behavior was the same before and after.

thread_local_resource_mut_ref_aliasing test is commented out for now since the issue it aimed to catch is now caught at compile time. Does this make ResourceRefMut no longer needed? To keep the diff small at first, I have left it there for now.

+30 -24

9 comments

2 changed files

memoryruins

pr closed time in 7 hours

pull request commentbevyengine/bevy

Remove unsound cast in thread local resources

I appreciate everyone's input and the motivations for the API. I'm currently unavailable to look into and test a proper fix that would also keep the current interface's ergonomics. If anyone would like to take up the torch, please do ^^

memoryruins

comment created time in 8 hours

push eventmemoryruins/bevy

memoryruins

commit sha dfc70e999068288c4bee8c2f6f6676cab74f4807

Fix another comment

view details

push time in 9 hours

Pull request review commentbevyengine/bevy

Improve `bevy` crate's docs

 //! The defaults provide a "full" engine experience, but you can easily enable / disable features //! in your project's `Cargo.toml` to meet your specific needs. See Bevy's `Cargo.toml` for a full list of features available. //!-//! If you prefer it, you can also consume the individual bevy crates directly.+//! If you prefer, you can also consume the individual bevy crates directly.+//! Each module in the root of this crate, except for the prelude, can be found on crates.io+//! with `bevy_` appended to the front, e.g. `app` -> [`bevy_app`](https://docs.rs/bevy_app/0.2.1/bevy_app/).  #![doc(     html_logo_url = "https://bevyengine.org/assets/icon.png",     html_favicon_url = "https://bevyengine.org/assets/icon.png" )] -mod default_plugins;+/// `use bevy::prelude::*;` to import common components, bundles, and plugins. pub mod prelude; -pub use bevy_app as app;-pub use bevy_asset as asset;-pub use bevy_core as core;-pub use bevy_diagnostic as diagnostic;-pub use bevy_ecs as ecs;-pub use bevy_input as input;-pub use bevy_math as math;-pub use bevy_property as property;-pub use bevy_scene as scene;-pub use bevy_tasks as tasks;-pub use bevy_transform as transform;-pub use bevy_type_registry as type_registry;-pub use bevy_utils as utils;-pub use bevy_window as window;+mod default_plugins; pub use default_plugins::*; +pub mod app {+    //! Build bevy apps, create plugins, and read events.+    pub use bevy_app::*;+}++pub mod asset {+    //! Load and store assets and resources for Apps+    pub use bevy_asset::*;+}++pub mod core {+    //! Contains core plugins and utilities for time.+    pub use bevy_core::*;+}++pub mod diagnostic {+    //! Useful diagnostic plugins and types for bevy apps.+    pub use bevy_diagnostic::*;+}++pub mod ecs {+    //! Bevy's entity-componenet-system.+    pub use bevy_ecs::*;+}++pub mod input {+    //! Resources and events for inputs, e.g. mouse/keyboard, touch, gamepads, etc.+    pub use bevy_input::*;+}++pub mod math {+    pub use bevy_math::*;+}++pub mod property {+    //! Dynamically interact with struct fields and names.+    pub use bevy_property::*;+}++pub mod scene {+    pub use bevy_scene::*;+}++pub mod tasks {+    pub use bevy_tasks::*;+}++pub mod transform {+    pub use bevy_transform::*;+}++pub mod type_registry {+    pub use bevy_type_registry::*;+}++pub mod utils {+    pub use bevy_utils::*;+}++pub mod window {+    pub use bevy_window::*;+}+ #[cfg(feature = "bevy_audio")]-pub use bevy_audio as audio;+pub mod audio {+    //! Provides types and plugins for audio playback.+    pub use bevy_audio::*;+}  #[cfg(feature = "bevy_gltf")]-pub use bevy_gltf as gltf;+pub mod gltf {+    //! Support for GLTF file loading.+    pub use bevy_gltf::*;+}  #[cfg(feature = "bevy_pbr")]-pub use bevy_pbr as pbr;+pub mod pbr {+    //! Physically based rendering

screenshot 8987

memoryruins

comment created time in 9 hours

PullRequestReviewEvent

push eventmemoryruins/bevy

memoryruins

commit sha 33688d1e5979661cb0a4bf9cae1e9abd9fa0b7f5

Fix nits

view details

push time in 9 hours

PullRequestReviewEvent

Pull request review commentbevyengine/bevy

Improve `bevy` crate's docs

 //! The defaults provide a "full" engine experience, but you can easily enable / disable features //! in your project's `Cargo.toml` to meet your specific needs. See Bevy's `Cargo.toml` for a full list of features available. //!-//! If you prefer it, you can also consume the individual bevy crates directly.+//! If you prefer, you can also consume the individual bevy crates directly.+//! Each module in the root of this crate, except for the prelude, can be found on crates.io+//! with `bevy_` appended to the front, e.g. `app` -> [`bevy_app`](https://docs.rs/bevy_app/0.2.1/bevy_app/).  #![doc(     html_logo_url = "https://bevyengine.org/assets/icon.png",     html_favicon_url = "https://bevyengine.org/assets/icon.png" )] -mod default_plugins;+/// `use bevy::prelude::*;` to import common components, bundles, and plugins. pub mod prelude; -pub use bevy_app as app;-pub use bevy_asset as asset;-pub use bevy_core as core;-pub use bevy_diagnostic as diagnostic;-pub use bevy_ecs as ecs;-pub use bevy_input as input;-pub use bevy_math as math;-pub use bevy_property as property;-pub use bevy_scene as scene;-pub use bevy_tasks as tasks;-pub use bevy_transform as transform;-pub use bevy_type_registry as type_registry;-pub use bevy_utils as utils;-pub use bevy_window as window;+mod default_plugins; pub use default_plugins::*; +pub mod app {+    //! Build bevy apps, create plugins, and read events.+    pub use bevy_app::*;+}++pub mod asset {+    //! Load and store assets and resources for Apps+    pub use bevy_asset::*;+}++pub mod core {+    //! Contains core plugins and utilities for time.+    pub use bevy_core::*;+}++pub mod diagnostic {+    //! Useful diagnostic plugins and types for bevy apps.+    pub use bevy_diagnostic::*;+}++pub mod ecs {+    //! Bevy's entity-componenet-system.

🤦

screenshot 8984

memoryruins

comment created time in 9 hours

push eventmemoryruins/bevy

memoryruins

commit sha 5791b46840375d23a0eba434c0296515f517096e

Additional doc comments

view details

push time in 9 hours

pull request commentbevyengine/bevy

Improve `bevy` crate's docs

I'd want to do a quick sanity check that ensures this works as expected with things like TypeId. Ex: will bevy_input::ElementState be the same as bevy::input::ElementState in this new approach?

Definitely worth checking! The following was tested with cargo run / cargo run --release

[package]
name = "sanity"
version = "0.1.0"
edition = "2018"

[dependencies.bevy]
git = "https://github.com/memoryruins/bevy"
branch = "modules-modules"

[dependencies.bevy_input]
git = "https://github.com/memoryruins/bevy"
branch = "modules-modules"
use std::any::{TypeId, type_name};
use bevy::input::keyboard::ElementState as ModuleType;
use bevy_input::keyboard::ElementState as CrateType;

fn main() {
    let module_id = TypeId::of::<ModuleType>();
    let module_name = type_name::<ModuleType>();
    println!("{:?}, {}", module_id, module_name);
   
    let crate_id = TypeId::of::<CrateType>();
    let crate_name = type_name::<CrateType>();
    println!("{:?}, {}", crate_id, crate_name);
    
    assert_eq!(module_name, crate_name);
    assert_eq!(module_id, crate_id);
}

The asserts pass and the prints outputs:

TypeId { t: 9088131817481810402 }, bevy_input::keyboard::ElementState
TypeId { t: 9088131817481810402 }, bevy_input::keyboard::ElementState

bevy's examples continue to run as expected as well ^^

memoryruins

comment created time in 10 hours

PR opened bevyengine/bevy

Improve `bevy` crate's docs

With this change, we now include each crate's items into a module of bevy instead of directly re-exporting.

<details>

<summary>screenshots</summary>

Current:

screenshot 8977

Proposed change:

screenshot 8976

</details>

The motivation is to make navigating and searching bevy's types from docs.rs easier for users.

For example, if a user sees AppExit or ScheduleRunnerPlugin in a bevy example, they might first search from bevy on docs.rs, but they will be met with no results The user must now know which crate to click from the re-exports list to find any types that were not exposed in the prelude.

<details>

<summary>screenshots</summary>

Current:

image image

Proposed change:

screenshot 8980 screenshot 8979

</details>

Currently, the only way to have a "global" search is to build docs locally, and this tends to mix other crates in the search results. With this change, the user will be able to find both while searching from the main bevy crate on docs.rs.

In addition, it allows for easily navigating the modules on the sidebar while in bevy's docs, and when the user wants to return bevy's crate root, they can now press the bevy icon.

<details>

<summary>screenshots</summary>

Current:

screenshot 8981

Proposed change:

screenshot 8973

</details>

Notes were added next to the modules that show up from the bevy crate root (but not to all yet)

image

+100 -26

0 comment

1 changed file

pr created time in 11 hours

push eventmemoryruins/bevy

memoryruins

commit sha e173eeb55aa69bdb472e491ae0b1f0d7c304d7bc

Add to doc comment about bevy's crates

view details

memoryruins

commit sha 443729c961f67d39e1977c01461e904a42a4897c

Begin to add notes about each bevy crate in `bevy`'s root

view details

push time in 11 hours

create barnchmemoryruins/bevy

branch : modules-modules

created branch time in 12 hours

pull request commentbevyengine/bevy

(WIP) Refactor bevy_input crate

Thanks for the PR! The following is general comments about module organization and is only my two-cents.

For some of the new modules, I wonder the current organization is too granular in splitting things into small files. For example, the new state module is written as

// crates/bevy_input/src/state/mod.rs 

pub mod element;
pub mod keyboard;
pub mod mouse_button;
pub mod touch_system;

pub use element::ElementState;
pub use keyboard::KeyboardInputState;
pub use mouse_button::MouseButtonInputState;
pub use touch_system::TouchSystemState;

and each of those types in its child modules have very short implementations, e.g. mouse_button.rs

use crate::events::MouseButtonEvent;
use bevy_app::EventReader;

/// State used by the mouse button input system
#[derive(Default)]
pub struct MouseButtonInputState {
    pub(crate) mouse_button_input_event_reader: EventReader<MouseButtonEvent>,
}

For when the implementation in the module is so short, we could consider placing those types directly into the state module instead.


Something that applies to most of the new mod.rss: we can avoid making their child modules public and leave them as an implementation detail. By exposing the child modules, it adds more levels of docs for the user to grok in docs, and in this case, redundant navigation since their items are already re-exported. rustdoc also adds a not so pretty re-export section.

Currently device_codes's docs in this PR looks like the following by locally running cargo doc -p bevy_input --no-deps --open from bevy's root.

<details>

<summary>screenshot</summary>

screenshot 8968

</details>

and clicking the child gamepad module's docs, we see

<details>

<summary>screenshot</summary>

image

</details>

To help make the docs less nested and avoiding a messy re-export section, can do the following:

//  crates/bevy_input/src/device_codes/mod.rs
- pub mod mouse;
- pub use mouse::{MouseButtonCode, MouseScrollUnitCode};
+ mod mouse;
+ pub use mouse::*;

and then rustdoc will render it as the following

<details>

<summary>screenshot</summary>

image

</details>

Another thing to consider for some of the mod.rss is the method mentioned in https://github.com/bevyengine/bevy/issues/633#issuecomment-704669930


Something that concerns me about the current reorganization is that its less obvious where to look for each category of input. Currently docs on master branch looks like the following, and if we click gamepad, we are met with most items essential to gamepad.

<details>

<summary>screenshots</summary>

image

image

</details>

To compare with the current state of the refactor, we see

<details>

<summary>screenshot</summary>

image

</details>

and while this does organize it more in the categories of bevy sorts (systems, events, etc), both dev and user must move between multiple modules to get an idea of all the items that relate to a certain sort of input.

Regardless, thanks for caring about this and making an effort to improve on the organization! I hope some of the above review can helps achieve the refactor's goals :)

Vaelint

comment created time in 13 hours

startedupx/upx

started time in a day

PullRequestReviewEvent

push eventmemoryruins/dvsynth

Jakub Hlusička

commit sha 36992663c8fd669b6e6b7f558507bd69277f2351

Add Margin Widget

view details

Jakub Hlusička

commit sha 0b11bf4cebc5710f2350fe34384eda99502fdcea

WIP: Add FloatingPanes widget

view details

Jakub Hlusička

commit sha 89897c1fe7dedef5fd1a9fd81d79888bf3bed4ca

Add a title to FloatingPane

view details

Jakub Hlusička

commit sha bf4e91b3c00f0bf3802cbced22b22621b87793b9

Add FloatingPane dragging

view details

Jakub Hlusička

commit sha cc1e873244ace2e6d03061ca8086b84d8ce15123

Fix event handling for floating panes

view details

Jakub Hlusička

commit sha d3be801791a447007c5e697da16f37330cfa74c4

Change cursor when dragging floating panes

view details

Jakub Hlusička

commit sha dd2dbea70d7f570a7c62b8d9325b1707aefd4d26

Add panning to FloatingPanes

view details

Jakub Hlusička

commit sha 7ae9498f4ed9632cb95bf63a535c5e99729ae38a

Add LICENSE and README.md

view details

Jakub Hlusička

commit sha 77fe2629bb248c795d66ce171de8674fe3d6db1f

Update README.md

view details

Jakub Hlusička

commit sha 779507f722f0bd1e17ad57199db8bb8f1da0d8b2

Use petgraph to represent the execution graph, add an initial implementation of node rendering

view details

Jakub Hlusička

commit sha 746761ff97e6be53ab6c26cf718b54a32fda5d75

Avoid specifying dependencies by `path`s to make it easy to compile and run the project

view details

Jakub Hlusička

commit sha f024b143e918321a6f7b3e1aa1bd38790a3dab2a

Fix typo

view details

Jakub Hlusička

commit sha c18040cfa0ffdbcede946c2153465912481bb2f0

Improve themes and draw channel connection points

view details

Jakub Hlusička

commit sha 1d885f968fb79c7aa860e403ea4a549643937050

Merge branch 'master' of github.com:Limeth/dvsynth * 'master' of github.com:Limeth/dvsynth: Fix typo

view details

Jakub Hlusička

commit sha 06669c6c56b1c1e786aa4a809f07053479d5b881

Render connections

view details

Jakub Hlusička

commit sha 133a0eda2dfd4cf75fee90d7757ab22092bf8de6

Draw connections as quadratic curves; Add basic connection controls

view details

Jakub Hlusička

commit sha 85a363827b8d33546afb33a50ce29ab87019f837

Make channel connections curvy~~~

view details

memoryruins

commit sha 0e6bcc6b7cd90a3c33e8d7e31f47457a52b1934b

Highlight active connection line

view details

memoryruins

commit sha 97f4ac656238f0d3119a2890e06f23a6306fee13

Remove an allocation in `ApplicationState::view`

view details

memoryruins

commit sha 2c66d69df44539370e508b3505429dd43918adda

Fix typo

view details

push time in 2 days

delete branch memoryruins/dvsynth

delete branch : peruse

delete time in 2 days

delete branch memoryruins/dvsynth

delete branch : highlight_connections

delete time in 2 days

issue commentrust-lang/rust-clippy

Lint default numeric type fallback

Ah right, restriction ^^; it would definitely fit there.

Nemo157

comment created time in 2 days

create barnchmemoryruins/dvsynth

branch : rustfmt

created branch time in 2 days

pull request commentbevyengine/bevy

Remove unsound cast in thread local resources

I think the problem there is might be ResourceRefMut::new, in that it should take a raw pointer rather than a reference.

There would still be the issue of acquiring a mut pointer from a shared reference to a type that doesn't have interior mutability. While I prefer having the issues caught at compile-time with get_mut(&mut self), I might be missing some key context for why that wasn't already the case here.

memoryruins

comment created time in 2 days

PR opened Limeth/dvsynth

Perusing the source
  • removes an allocation mentioned in a // TODO
  • fixes a typo Outtt -> Out
+14 -17

0 comment

1 changed file

pr created time in 2 days

create barnchmemoryruins/dvsynth

branch : peruse

created branch time in 2 days

PR opened bevyengine/bevy

Remove unsound cast in thread local resources

Noticed in #671 that it acquires an unique reference from a shared reference, which is always unsound regardless of runtime tracking. miri confirms this concern:

<details>

error: Undefined Behavior: not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <682186> (call 245045)]
   --> crates\bevy_ecs\src\resource\resources.rs:56:37
    |
56  |                 ResourceRefMut::new(&mut *value, &stored.atomic_borrow)
    |                                     ^^^^^^^^^^^ not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <682186> (call 245045)]
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

    = note: inside closure at crates\bevy_ecs\src\resource\resources.rs:56:37
    = note: inside `std::option::Option::<&resource::resources::StoredResource<i64>>::map::<resource::resources::ResourceRefMut<i64>, [closure@crates\bevy_ecs\src\resource\resources.rs:52:36: 57:14]>` at C:\Users\Michael\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\option.rs:453:29
note: inside `resource::resources::VecResourceStorage::<i64>::get_mut` at crates\bevy_ecs\src\resource\resources.rs:52:9
   --> crates\bevy_ecs\src\resource\resources.rs:52:9
    |
52  | /         self.stored.get(index).map(|stored|
53  | |             // SAFE: ResourceRefMut ensures that this borrow is unique
54  | |             unsafe {
55  | |                 let value = &stored.value as *const T as *mut T;
56  | |                 ResourceRefMut::new(&mut *value, &stored.atomic_borrow)
57  | |             })
    | |______________^

</details>

This PR changes get_mut(&self) to get_mut(&mut self) and removes the problematic code.

gilrs_event_system needed to be tweaked slightly (making a temporary buffer for events). If desired, we can add a new resource that only this system can access by type to re-use a buffer. I have tested gamepad_input and gamepad_input_events examples with a xbox 360 controller and the behavior was the same before and after.

thread_local_resource_mut_ref_aliasing test is commented out for now since the issue it aimed to catch is now caught at compile time. Does this make ResourceRefMut no longer needed? To keep the diff small at first, I have left it there for now.

+30 -24

0 comment

2 changed files

pr created time in 2 days

push eventmemoryruins/bevy

memoryruins

commit sha 567f4ebef4d4b35ae795a448d49986603b90e772

Fix thread local resources

view details

push time in 2 days

create barnchmemoryruins/bevy

branch : fix_local_resources

created branch time in 2 days

push eventmemoryruins/bevy

Carter Anderson

commit sha a6ac8faa8a06fc972ada26c884512cce854f9662

port upstream hecs performance improvements (#716)

view details

memoryruins

commit sha a7565e977449550c5292d43a1f9dad0a77688190

Update changelog (#718) Update changelog

view details

push time in 2 days

PR opened Limeth/dvsynth

Highlight active connection

2020-10-27_22-58-39

+3 -3

0 comment

1 changed file

pr created time in 2 days

create barnchmemoryruins/dvsynth

branch : highlight_connections

created branch time in 2 days

fork memoryruins/dvsynth

Digital Video Synthesizer

fork in 2 days

startedLimeth/dvsynth

started time in 2 days

startedEllenNyan/Ellecs

started time in 2 days

startedOrama-Interactive/Pixelorama

started time in 2 days

startedPLSysSec/haybale

started time in 3 days

Pull request review commentrust-lang/rust

Support custom allocators in `Box`

 impl<T: ?Sized> Box<T> {     )]     #[inline]     #[doc(hidden)]-    pub fn into_unique(b: Box<T>) -> Unique<T> {+    pub fn into_unique(b: Self) -> (Unique<T>, A) {         // Box is recognized as a "unique pointer" by Stacked Borrows, but internally it is a         // raw pointer for the type system. Turning it directly into a raw pointer would not be         // recognized as "releasing" the unique pointer to permit aliased raw accesses,-        // so all raw pointer methods go through `leak` which creates a (unique)-        // mutable reference. Turning *that* to a raw pointer behaves correctly.-        Box::leak(b).into()+        // so all raw pointer methods have to leak the box. Turning *that* to a raw pointer+        // behaves correctly.+        let b = mem::ManuallyDrop::new(b);++        // The box is unitiliazed later when moving out the allocator. The pointer is stored+        // beforehand.+        let ptr = b.0;+        let alloc = unsafe { ptr::read(&b.1) };+        (ptr, alloc)+    }++    /// Returns a reference to the underlying allocator.+    ///+    /// Note: this is an associated function, which means that you have+    /// to call it as `Box::alloc_ref(&b)` instead of `b.alloc_ref()`. This+    /// is so that there is no conflict with a method on the inner type.+    #[unstable(feature = "allocator_api", issue = "32838")]+    #[inline]+    pub fn alloc_ref(b: &Self) -> &A {

allocator was also suggested in https://github.com/rust-lang/rust/pull/77187#discussion_r509881386, which might be clearest.

TimDiekmann

comment created time in 7 days

PullRequestReviewEvent

create barnchmemoryruins/bevy

branch : changes-by-miles-davis

created branch time in 8 days

delete branch memoryruins/bevy

delete branch : changes-by-miles-davis

delete time in 8 days

push eventmemoryruins/bevy

memoryruins

commit sha 6cbb083a3d6c3e3bdd863f0b628c5b6f5d388c57

Fix typo in tag note

view details

push time in 8 days

push eventmemoryruins/bevy

memoryruins

commit sha 73e41176ce2b09ceba58382e4e95cfa42e23bcc0

Ordering

view details

push time in 8 days

PR opened bevyengine/bevy

Update changelog
+105 -12

0 comment

1 changed file

pr created time in 8 days

push eventmemoryruins/bevy

memoryruins

commit sha 5228c9315748a5ce36fc878ba9bb840db3940cf4

Fix broken link rendering

view details

push time in 8 days

create barnchmemoryruins/bevy

branch : changes-by-miles-davis

created branch time in 8 days

push eventmemoryruins/bevy

Julian Heinken

commit sha 32b122e1c5b7fb91ff2f51475ee633b01b3e895f

Update color.rs (#670) Co-authored-by: Julian Heinken <julian.heinken@gmail.com>

view details

Joshua J. Bouw

commit sha 036b3bc0e67f0afc898ef524219aafbc7592fa8d

add more methods to Assets for clearing and allocation reduction (#669)

view details

walterpie

commit sha 53d6d1050639e3b4448ef3f57aa63402d72511a6

Register `IndexFormat` as a property (#664)

view details

Carter Anderson

commit sha 930eba4ccdc4b500d9508299d226b4e9f353287f

add thread local resources (#671)

view details

Carter Anderson

commit sha 5e7c36d1c17fbbbd87ca8ec65d10da494747eda9

Fix example colors (#672)

view details

Carter Anderson

commit sha df64e1fc927e7ec5aad836d7a51c692021ab6817

upgrade rectangle pack (#673)

view details

Nathan Jeffords

commit sha 7e23e132ef6a859962055dce7e1c2bcb8bd9d072

add version of the ecs's `write_world` method that takes a pre-boxed world writer (#661) Co-authored-by: Nathan Jeffords <njeffords@comtechefdata.com>

view details

Catherine Gilbert

commit sha 1f7fe77f320da0389f7db1f6be57cc518cd5e2d3

added frame count to FrameTimeDiagnosticsPlugin (#678) added frame count to FrameTimeDiagnosticsPlugin

view details

M

commit sha 9c48e5cccbaebba18aad16c954c79ffc7f370d16

Add a way to specify padding/ margins between sprites in a TextureAtlas. (#460) Add a way to specify padding between sprites in a TextureAtlas

view details

François

commit sha 76cc25823dcb6ccb65223215f2a19120cb6301fd

can change window settings at runtime (#644) can change window settings at runtime

view details

Utkarsh

commit sha dd91f8e1163115a84699d80e8744eeaf4597b739

Add support to get gamepad button/trigger values using Axis<GamepadButton> (#683)

view details

Carter Anderson

commit sha b03d8da9bb8e3a28aba4aea892179914373ad16e

fix clippy (#686)

view details

Junfeng Liu

commit sha f66a72563efb39a3ef11528fd5975d1710ac452b

Expose a pointer of EventLoopProxy to process custom messages (#674)

view details

Mat Hostetter

commit sha 871790c6e0253c5404bc32c6090e042a672f7348

Adjust how `ArchetypeAccess` tracks mutable & immutable deps (#660) `ArchetypeAccess` was tracking `immutable` and `mutable` separately. This means that checking is_compatible requires three checks: m+m, m+i, i+m. Instead, continue tracking `mutable` accesses, but instead of `immutable` track `immutable | mutable` as another `accessed` bit mask. This drops the comparisons to two (m+a, a+m) and turns out to be what the rest of the code base wants too, unifying various duplicated checks and loops.

view details

Logan Magee

commit sha 90ea5b1e6bdad70a783fe39a0f38a430d6fa0b8f

Add issue and pull request templates (#551)

view details

Fuyang Liu

commit sha 9db8ae7a16d234414ea1f4ce127dbbdf111759c9

Fix breakout example bug - ball flying out when collide paddle and wall at the same time (#685) Fix breakout bug - ball flying out when collide paddle and wall

view details

Mariusz Kryński

commit sha fccfa12d3b7514e60e7f47e5aef941fe767e6d8b

do not depend on spirv on wasm target (#689) do not use spirv for wasm target

view details

David Ackerman

commit sha 7ba45849f3e8ab48a5fcf235891e36464943b95d

Add default for texture format (#675)

view details

Alex

commit sha d004bce0c9d4049549a2f2a6f47aa217ff39d931

Added basic mouse capture API (#679) Added basic cursor lock API

view details

Carter Anderson

commit sha 5df6804daf056f75872c92800d3312ce71056692

Delete pull_request_template.md

view details

push time in 8 days

startedEmbarkStudios/rust-gpu

started time in 8 days

Pull request review commentbevyengine/bevy

asset: WasmAssetIo

-pub use ahash::AHasher; use ahash::RandomState;+use futures_lite::Future;
use std::future::Future;
cart

comment created time in 11 days

PullRequestReviewEvent

startedtokio-rs/tokio

started time in 12 days

Pull request review commentrust-lang/rust

crate rhymes with u8, now compiles in 2018 edition

 fn u8(u8: u8) {              u8!(u8);             let &u8: &u8 = u8::u8(&8u8);-            ::u8(0u8);+            crate::u8(0u8);

To make the rhyming intentions clear:

use crate as cr8;

fn u8(u8: u8) -> u8 {
    /* ... */
    crate::cr8::u8(0u8);
    u8
}
s-e

comment created time in 12 days

PullRequestReviewEvent

issue commentrust-lang/rust

There's currently no way to specify bounds requiring constants in types to be well-formed

@oli-obk

Nice! Although the const eval diagnostic is quite uninformative. Maybe we should report generic parameters in const eval errors, then at least we'd get enough details to track down potential call sites.

It would definitely help to have a better idea of where the failed assert!s are coming from ^^

In the meantime, the following method yields some more informative information (though the error reads like the "expected" is flipped on the trait example).

#![feature(const_generics, const_evaluatable_checked)]

const fn eq_size<T, U>() -> bool {
    use core::mem::size_of;
    size_of::<T>() == size_of::<U>()
}

struct Assert<const EXPR: bool>;
trait True {}
impl True for Assert<true> {}

trait WordSized: Sized
where
    Assert<{ eq_size::<Self, *const ()>() }>: True, {}

impl WordSized for u32 {}
impl WordSized for u64 {}
error[E0308]: mismatched types
  --> src/lib.rs:17:6
   |
17 | impl WordSized for u32 {}
   |      ^^^^^^^^^ expected `false`, found `true`
   |
   = note: expected type `false`
              found type `true`

Trying something similar on @DrMeepster's example -- while not a great message at least it shows the call site.

unsafe fn transmute<T: Sized, U: Sized>(t: T) -> U
where
    Assert<{ eq_size::<T, U>() }>: True,
error[E0308]: mismatched types
  --> src/main.rs:37:31
   |
37 |     unsafe { println!("{:?}", transmute::<u8, u16>(255)) }
   |                               ^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
   |
   = note: expected type `false`
              found type `true`
varkor

comment created time in 14 days

issue commentrust-lang/rust

There's currently no way to specify bounds requiring constants in types to be well-formed

For an example where a reimplemented transmute helped, @Nemo157 and I used the feature for a proof of concept to restrict trait implementers to a word size in https://github.com/rust-lang/rust/pull/74304#issuecomment-705588898 ( playground ). Since core::mem::transmute wasn't aware of the checks and would error, nemo used const_transmute to get around the error.

varkor

comment created time in 14 days

pull request commentbevyengine/bevy

Documentation strings for commands.rs - spawn, despawn, with, with_bundle, insert, insert_one

The examples will need to be wrapped in some boilerplate since the code is still fully built with no_run and doc tests are treated as external to the current crate, e.g.

/// Despawns only the specified entity, ignoring any other consideration.
/// # Example
/// ```no_run
/// # use bevy_ecs::{Commands, Entity};
/// # struct EntitiyToDespawn;
/// # fn system(mut commands: Commands) {
/// # let entity_to_despawn = Entity::new(0);
/// commands.despawn(entity_to_despawn);
/// # }
/// ```
pub fn despawn(&mut self, entity: Entity) -> &mut Self {

Another option is to use ignore, but that has no protection from breakage and shows a warning on each example in the docs, so it's usually not preferable.

eXodiquas

comment created time in 14 days

startedfeather-rs/feather

started time in 15 days

startedJabRef/jabref

started time in 16 days

startedVeykril/tlborm

started time in 16 days

push eventmemoryruins/bevy

Carter Anderson

commit sha 1f27d8c727bf976b4ca2cb15577bdc7016fd57ec

fix new clippy error (#656)

view details

Nathan Stocks

commit sha f6fc76db1da0fa9c6dc67f7b3f0c288904f0eec9

Upgrade to gilrs 0.8.0 to gain dpad support on macos from https://gitlab.com/gilrs-project/gilrs/-/merge_requests/50 (#653)

view details

push time in 18 days

startedrhysd/wain

started time in 18 days

issue closedbevyengine/bevy

Disable "function is never used" lints when function is a system.

I get these annoying

warning: function is never used: `log_system`

messages whenever I only use the function as a system. It would be nice if this could be disabled (maybe have a seperate lint that fixes this issue and disable the original lint?)

closed time in 19 days

iMplode-nZ

issue commentbevyengine/bevy

Disable "function is never used" lints when function is a system.

Closing since this is either user error or a bug in rust tooling.

iMplode-nZ

comment created time in 19 days

push eventmemoryruins/bevy

Kenneth Dodrill

commit sha e89301ad2981b7a2a15b01955d0cc5a856d31e1a

Add Void Linux to linux dependencies file (#645) Figured I'd add it above NixOS since that one is way more verbose than the rest, but happy to move it below if desired :)

view details

Julian Heinken

commit sha a92790c0111cad38a5e7e76afad90cc76dcbb502

sRGB awareness for Color (#616) Color is now sRGB aware, added SrgbColorSpace trait for f32

view details

Grayson Burton

commit sha 354d71cc1f80d0a8e4b37a80dba87154b4b6242b

The Great Debuggening (#632) The Great Debuggening

view details

memoryruins

commit sha ebce1f9c4a9f3e3d3b93675a99c6fabd7facacc0

Remove outdated ecs docs (#646)

view details

Nathan Stocks

commit sha bf501b77ccf50eecafe80a2d9313590aba57ec9c

Don't panic when despawning entity multiple times (#649) Emit a debug log message instead of a panic when despawning an entity which has already been despawned.

view details

Nathan Stocks

commit sha 333fd3f0e0802d961b5905580aafe1e4ded244e5

Don't Panic (#651) Don't panic when despawning recursively

view details

push time in 20 days

PullRequestReviewEvent

pull request commentbevyengine/bevy

can change window settings at runtime

The simplest way to force everything onto the main thread would be changing the change_window system into a thread_local_system; this should also avoid the need for the extra event readers. I tried the following changes in and everything continued to work for me:

<details>

diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs
index 5b3d08fc..69d383f4 100644
--- a/crates/bevy_winit/src/lib.rs
+++ b/crates/bevy_winit/src/lib.rs
@@ -9,7 +9,7 @@ pub use winit_config::*;
 pub use winit_windows::*;
 
 use bevy_app::{prelude::*, AppExit};
-use bevy_ecs::{IntoQuerySystem, Res, ResMut, Resources};
+use bevy_ecs::{IntoThreadLocalSystem, Resources, World};
 use bevy_math::Vec2;
 use bevy_window::{
     CreateWindow, CursorMoved, Window, WindowCloseRequested, WindowCreated, WindowResized, Windows,
@@ -30,18 +30,13 @@ impl Plugin for WinitPlugin {
             // .add_event::<winit::event::WindowEvent>()
             .init_resource::<WinitWindows>()
             .set_runner(winit_runner)
-            .add_system(change_window.system());
-
-        #[cfg(target_os = "windows")]
-        app.add_event::<WindowRename>();
+            .add_system(change_window.thread_local_system());
     }
 }
 
-fn change_window(
-    winit_windows: Res<WinitWindows>,
-    mut windows: ResMut<Windows>,
-    #[cfg(target_os = "windows")] mut rename_events: ResMut<Events<WindowRename>>,
-) {
+fn change_window(_: &mut World, resources: &mut Resources) {
+    let winit_windows = resources.get::<WinitWindows>().unwrap();
+    let mut windows = resources.get_mut::<Windows>().unwrap();
     for bevy_window in windows.iter_mut() {
         let id = bevy_window.id();
         for command in bevy_window.drain_commands() {
@@ -69,13 +64,8 @@ fn change_window(
                     }
                 }
                 bevy_window::WindowCommand::SetTitle { title } => {
-                    #[cfg(not(target_os = "windows"))]
-                    {
-                        let window = winit_windows.get_window(id).unwrap();
-                        window.set_title(&title);
-                    }
-                    #[cfg(target_os = "windows")]
-                    rename_events.send(WindowRename { id, title });
+                    let window = winit_windows.get_window(id).unwrap();
+                    window.set_title(&title);
                 }
                 bevy_window::WindowCommand::SetResolution { width, height } => {
                     let window = winit_windows.get_window(id).unwrap();
@@ -95,12 +85,6 @@ fn change_window(
     }
 }
 
-#[cfg(target_os = "windows")]
-struct WindowRename {
-    id: bevy_window::WindowId,
-    title: String,
-}
-
 fn run<F>(event_loop: EventLoop<()>, event_handler: F) -> !
 where
     F: 'static + FnMut(Event<'_, ()>, &EventLoopWindowTarget<()>, &mut ControlFlow),
@@ -149,8 +133,6 @@ pub fn winit_runner(mut app: App) {
     let mut create_window_event_reader = EventReader::<CreateWindow>::default();
     let mut app_exit_event_reader = EventReader::<AppExit>::default();
 
-    #[cfg(target_os = "windows")]
-    let mut window_rename_event_reader = EventReader::<WindowRename>::default();
 
     handle_create_window_events(
         &mut app.resources,
@@ -180,15 +162,6 @@ pub fn winit_runner(mut app: App) {
             }
         }
 
-        #[cfg(target_os = "windows")]
-        if let Some(window_rename_events) = app.resources.get_mut::<Events<WindowRename>>() {
-            if let Some(event) = window_rename_event_reader.latest(&window_rename_events) {
-                let winit_windows = app.resources.get_mut::<WinitWindows>().unwrap();
-                let window = winit_windows.get_window(event.id).unwrap();
-                window.set_title(&event.title);
-            }
-        }
-
         match event {
             event::Event::WindowEvent {
                 event: WindowEvent::Resized(size),

</details>

mockersf

comment created time in 21 days

pull request commentbevyengine/bevy

can change window settings at runtime

seems like it's not possible on Windows to change the title of a window from another thread...

I wonder if it would be reasonable to forward all window change events, not only title changes, to be handled the main thread. Then we would remove the special casing too. I've heard MacOS has some requirements about the main thread too, though I'm unable to test this.

mockersf

comment created time in 21 days

pull request commentbevyengine/bevy

can change window settings at runtime

Changing resizable, decorations, title, resolution, and WindowModes all work like a charm for me; great work!

mockersf

comment created time in 21 days

issue commentbevyengine/bevy

Disable "function is never used" lints when function is a system.

For sure. I tried the nightly I had installed, rustc 1.49.0-nightly (3525087ad 2020-10-08), and was unable to reproduce the issue, and I'm not finding any recent regressions for the lint on rustc's repo. If you post the code that creates this warning, I would be happy to help minimize it, then we can narrow down where its coming from / where we should direct the report.

It's also possible that the warnings are stale in your editor. Be sure to try in cargo check and see if it emits the warnings at those times too. For example, if rust-analyzer hasn't re-run cargo check, it might be showing a stale/out-of-date warning.

iMplode-nZ

comment created time in 21 days

issue commentbevyengine/bevy

Disable "function is never used" lints when function is a system.

It's rustc that emits these lints, not bevy, so there isn't much that can be done about on bevy's end. Still, that is odd. When I use a function as a system, rustc considers it used. Could you post code that recreates this? What prints when you do rustc --version?

iMplode-nZ

comment created time in 21 days

pull request commentbevyengine/bevy

can change window settings at runtime

Thanks for looking into this! While trying the branch on Windows 10 with cargo run --example window_settings, it immediately hanged after the window opened. All other examples continued to run normally as before.

Is anyone else able to reproduce this behavior on Windows?

Looking at the logs (after adding pretty_env_logger to the example), once change_window is called the window stops responding and the trace begins to only emit gilrs' ticks.

 TRACE bevy_ecs::schedule::parallel_executor > run stage "update"
 TRACE bevy_ecs::schedule::parallel_executor > running systems 0..3
 TRACE bevy_ecs::schedule::parallel_executor > prepare 0 &bevy_window::system::exit_on_window_close_system with 0 dependents and 0 dependencies
 TRACE bevy_ecs::schedule::parallel_executor > prepare 1 &bevy_winit::change_window with 1 dependents and 0 dependencies
 TRACE bevy_ecs::schedule::parallel_executor > run &bevy_window::system::exit_on_window_close_system
 TRACE bevy_ecs::schedule::parallel_executor >   * system (1) triggers events: (2): 1
 TRACE bevy_ecs::schedule::parallel_executor > prepare 2 &window_settings::change_title with 0 dependents and 1 dependencies
 TRACE bevy_ecs::schedule::parallel_executor > run &bevy_winit::change_window
 TRACE gilrs::ff::server                     > (Ticks(17)) Setting ff state of Device { inner: FfDevice { inner: Device { id: 0 } }, position: [0.0, 0.0, 0.0], gain: 1.0 } to Magnitude { strong: 0, weak: 0 }
 TRACE gilrs::ff::server                     > (Ticks(18)) Setting ff state of Device { inner: FfDevice { inner: Device { id: 0 } }, position: [0.0, 0.0, 0.0], gain: 1.0 } to Magnitude { strong: 0, weak: 0 }
 TRACE gilrs::ff::server                     > (Ticks(19)) Setting ff state of Device { inner: FfDevice { inner: Device { id: 0 } }, position: [0.0, 0.0, 0.0], gain: 1.0 } to Magnitude { strong: 0, weak: 0 }
...

bevy_window

mockersf

comment created time in 21 days

PR opened bevyengine/bevy

Remove outdated ecs docs

Since it was moved back to generational entity ids in #504

+0 -1

0 comment

1 changed file

pr created time in 22 days

push eventmemoryruins/bevy

memoryruins

commit sha b7d20afc47cd6b75f6df150bc3029c4f37852b82

Remove outdated ecs docs

view details

push time in 22 days

push eventmemoryruins/bevy

Carter Anderson

commit sha 6f287fb81570b40a3ca4c1f4734d901cb254c41d

remove custom window mode from example (#637)

view details

François

commit sha 52a4d49bbf08da249d02c4a1eec6b8442ba21e85

set asset path relative to root when loading sync (#643)

view details

push time in 22 days

startedmockersf/bevy_extra

started time in 22 days

issue commentbevyengine/bevy

Ray tracing support?

Ray Tracing on the WGPU seems like a big problem right now. They would need something that supports all of DXR/VKTrace/metal stuff .

Relevant wgpu feature request https://github.com/gfx-rs/wgpu-rs/issues/247

NickelCoating

comment created time in 23 days

issue commentbevyengine/bevy

Refactor {module}/mod.rs to {module}.rs

My real preference is to have implicit mod.rs and directly export public symbols from each file in a folder. But sadly rust chose to support every option but my preference

The following is similar (not implicit though) and is my favorite option for module organization of smaller crates. This is especially nice when a module_name.rs or module_name/mod.rs creates more file clutter than its worth only to export some items.

src/
- lib.rs
- foo/
   - a.rs
   - b.rs
- bar/
  - c.rs
  - d.rs
// lib.rs

// no need for foo.rs or foo/mod.rs
mod foo {
    pub mod a;
    pub mod b;
}

// keep the internal modules private
// and place all public items in bar
mod bar {
    mod c;
    pub use c::*;
    mod d;
    pub use d::*;
}
PravinKumar95

comment created time in 23 days

push eventmemoryruins/bevy

Andrew Hickman

commit sha 9a4167ef7f5115f7fc045a881f5c865f568d34c0

Fix FloatOrd hash being different for different NaN values (#618) * Fix FloatOrd hash being different for different NaN values * Fix FloatOrd hashing +0.0 and -0.0 to different values

view details

Boutillier

commit sha 1bdb9d3b009c12433c2ef31127527afa7df33417

Fix Added behaviour for QueryOne get. (#543) Query unchanged as impacts performances. Added tests in bevy_ecs/hecs

view details

Boutillier

commit sha 219527ed7d5709646c60d22001443d61fb077867

Iter added camera to update their projection (#488)

view details

Downtime

commit sha 125afb41ac28f9ce899f783fb05f3b742de48cda

Exposing winit decorations (#627) Exposing winit decorations

view details

Zach Gotsch

commit sha d61a1735e9d938de7da4fa4cd9aa1f61429ebc59

ui/text example: Use a unit component to identify the target Text (#612)

view details

push time in 24 days

startedchemicstry/wasm_thread

started time in 24 days

starteditsFrank/MinecraftHDL

started time in 24 days

issue commentbevyengine/bevy

Better error message when render is used without wgpu.

it seems that CorePlugin has a dependency on TypeRegistryPlugin, which should also be fixed.

It uses the RegisterType trait for the plugin https://docs.rs/bevy_type_registry/0.2.1/bevy_type_registry/trait.RegisterType.html https://github.com/bevyengine/bevy/blob/9a4167ef7f5115f7fc045a881f5c865f568d34c0/crates/bevy_core/src/lib.rs#L36-L38

also which plugin has the event loop

The high-level runner is in bevy_app, which either uses bevy_app::ScheduleRunner or bevy_winit::winit_runner if there is windowing.

iMplode-nZ

comment created time in 25 days

issue commentbevyengine/bevy

Custom Eventloop?

I would find it helpful to have an event loop that functions without a window.

Check out the headless example where it runs with bevy_app::ScheduleRunnerPlugin. You may need to add back some plugins or features individually by need.

It could also provide more features such as set_timeout

Currently, I have been using a system that uses a time resource or counts ticks that sends an bevy_app::AppExit when complete.

iMplode-nZ

comment created time in 25 days

startedhediet/vscode-drawio

started time in 25 days

startedsuperdump/bevy_prototype_physx

started time in 25 days

issue commentbevyengine/bevy

Inconsistent Rendering/Input Delay between Multiple Windows

@aevyrie Did you have a chance to record the amount of lag you're experiencing? You mentioned that you saw way more delay than what my desktop did.

To post here, this is what bevy_mod_picking with cargo run --release --example multiple_windows looks like on my desktop and laptop. While I find it difficult to see lag on my desktop recording, I'm able to notice some lag on my laptop during fast mouse movements in the primary window (grey background).


Desktop

windows_picking

OS: Windows 10, Version 2004
CPU: i7-6700K @ 4.00GHz
GPU: GTX 1080
Memory: 32GB
$ rustup show
stable-x86_64-pc-windows-msvc (default)
rustc 1.46.0 (04488afe3 2020-08-24)
# home/.cargo/config.toml
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"

Laptop

linux_picking

OS: Arch Linux x86_64
Kernel: 5.4.61-1-lts
Host: 20B7S2AU00 ThinkPad T440
CPU: Intel i5-4300U (4) @ 2.900GHz
GPU: Intel Haswell-ULT
Memory: 8GB
$ rustup show
stable-x86_64-unknown-linux-gnu (default)
rustc 1.46.0 (04488afe3 2020-08-24)
# home/.cargo/config.toml
[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
rustflags = ["-Clink-arg=-fuse-ld=lld"]
aevyrie

comment created time in 25 days

push eventmemoryruins/bevy_mod_picking

Aevyrie Roessler

commit sha d00e4b8ece5e2c6a32d57dfc30e342813ccdbe21

Starting to rename some things

view details

Aevyrie

commit sha 78e421e2bb740d3caa4fcee702b51f6c3abe0f2e

Merge pull request #45 from aevyrie/Revisit-naming Starting to rename some things

view details

Aevyrie

commit sha 650090df6a0fafac0d25b3f786e5191e45c3b179

rename as_transform and Ray3d

view details

Aevyrie

commit sha 74077849cf68b6004cfc72c523a2440fce4fe8c0

Bumped cargo rev

view details

guimcaballero

commit sha d35f0d129209d560ba34558bac7a69018bc2dc7f

Add triangle to PickIntersection

view details

guimcaballero

commit sha 8305558cd2d68d4e37f7912d16bcf0ad2a717c64

Remove mesh_triangle from PickIntersection

view details

Cayle Bray

commit sha ed694b8a6d595f538c45890a2c667d50e02b1010

feature: Interactable Meshes

view details

Cayle Bray

commit sha 3b7bb3657e480e1490fb55670e6c6301f79c32e7

chore: clippy fixes

view details

Aevyrie

commit sha 9da2aad6f1cc800375834c25a615eb93bbe2991f

Merge pull request #46 from guimcaballero/add-triangle-to-pickintersection Add intersection triangle to PickIntersection

view details

Aevyrie

commit sha 68d5ce46af3ffd9670b031cc83ced96d328d9359

Merge branch 'master' into master

view details

Cayle Bray

commit sha a6f94fbb0981aacb8edfb39aae5c38ffa5c58fcd

chore: rust fmt

view details

Cayle Bray

commit sha d8cd34e0f452a93bcd7458e3e7ad34d476472af0

Merge branch 'master' of https://github.com/UnFlimFlammable/bevy_mod_picking

view details

Aevyrie

commit sha ce11879729efeabd575033218a8a96a2adfb126c

Merge pull request #48 from UnFlimFlammable/master feature: Interactable Meshes

view details

Aevyrie

commit sha 9bdf5f66df4137e80039a3c14b37a014a5d69160

Update README.md

view details

push time in 25 days

Pull request review commentbevyengine/bevy

WIP - bevy_webgl2 render backend

 impl RenderGraph { impl Debug for RenderGraph {     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {         for node in self.iter_nodes() {-            writeln!(f, "{:?}", node.id)?;+            writeln!(f, "node: {:?} {:?}", node.id, node.name)?;             writeln!(f, "  in: {:?}", node.input_slots)?;             writeln!(f, "  out: {:?}", node.output_slots)?;+            write!(f, "  in edges:");+            for edge in &node.edges.input_edges {+                edge.fmt_as_input_edge(f, &self.nodes);+            };+            writeln!(f, "");+            write!(f, "  out edges:");+            for edge in &node.edges.output_edges {+                edge.fmt_as_output_edge(f, &self.nodes);+            };+            writeln!(f, "");

writeln! will do the same without "", and ? is consistent with the other writes.

            writeln!(f)?;
            write!(f, "  out edges:")?;
            for edge in &node.edges.output_edges {
                edge.fmt_as_output_edge(f, &self.nodes)?;
            };
            writeln!(f)?;
mrk-its

comment created time in 25 days

Pull request review commentbevyengine/bevy

WIP - bevy_webgl2 render backend

 where                     } else {                         continue;                     };-                     // get an ordered list of entities visible to the camera                     let visible_entities = if let Some(camera_entity) = active_cameras.get(&camera_info.name) {                         world.get::<VisibleEntities>(camera_entity).unwrap()                     } else {                         continue;                     };-+                    let cnt = visible_entities.iter().count();+                    log::info!("visible entities:{:?}", cnt);

since we already have access to the length

                    log::info!("visible entities: {:?}", visible_entities.value.len());
mrk-its

comment created time in 25 days

Pull request review commentbevyengine/bevy

WIP - bevy_webgl2 render backend

 impl Edge {             Edge::NodeEdge { output_node, .. } => *output_node,         }     }++    pub fn fmt_as_output_edge(+        &self,+        f: &mut std::fmt::Formatter<'_>,+        nodes: &HashMap<NodeId, NodeState>,+    ) -> std::fmt::Result {+        match self {+            Edge::SlotEdge { input_index, output_index, .. } => write!(f, " SlotEdge(in #{}, out #{}", input_index, output_index)?,+            Edge::NodeEdge { .. } => write!(f, " NodeEdge(")?,+        }+        let node = nodes.get(&self.get_input_node()).unwrap();+        write!(f, "{:?})", node)+    }++    pub fn fmt_as_input_edge(+        &self,+        f: &mut std::fmt::Formatter<'_>,+        nodes: &HashMap<NodeId, NodeState>,+    ) -> std::fmt::Result {+        match self {+            Edge::SlotEdge { input_index, output_index, .. } => write!(f, " SlotEdge( in #{}, out #{}, ", input_index, output_index)?,+            Edge::NodeEdge {..} => write!(f, " NodeEdge(")?,+        }+        let node = nodes.get(&self.get_output_node()).unwrap();+        write!(f, "{:?})", node)+    }

If the extra spaces/comma weren't intended in fmt_as_input_edge's SlotEdge branch, we could use a private method to format them consistently:

pub fn fmt_as_output_edge(...) -> Result {
    let node = nodes.get(&self.get_output_node()).unwrap();
    self.fmt_as_edge(f, output_node)
}

pub fn fmt_as_input_edge(...) -> Result {
    let node = nodes.get(&self.get_input_node()).unwrap();
    self.fmt_as_edge(f, node)
}

fn fmt_as_edge(&self, f: &mut Formatter<'_>, node: &NodeState) -> Result {
    match self {
        Edge::SlotEdge { input_index, output_index, .. } => write!(f, " SlotEdge(in #{}, out #{}", input_index, output_index)?,
        Edge::NodeEdge { .. } => write!(f, " NodeEdge(")?,
    }
    write!(f, "{:?})", node)
}
mrk-its

comment created time in 25 days

Pull request review commentbevyengine/bevy

WIP - bevy_webgl2 render backend

 impl PipelineDescriptor {             .as_ref()             .map(|handle| shaders.get(&handle).unwrap()); -        let mut layouts = vec![vertex_spirv.reflect_layout(bevy_conventions).unwrap()];-        if let Some(ref fragment_spirv) = fragment_spirv {-            layouts.push(fragment_spirv.reflect_layout(bevy_conventions).unwrap());-        }+        let mut layouts = {+            let mut layouts = vec![vertex_spirv.reflect_layout(bevy_conventions).unwrap()];+            log::info!("vertex shader layout: {:#?}", layouts[0]);+            if let Some(ref fragment_spirv) = fragment_spirv {+                layouts.push(fragment_spirv.reflect_layout(bevy_conventions).unwrap());+                log::info!("fragment shader layout: {:#?}", layouts[1]);+            };++            layouts+        };

an option to avoid indexing the layouts immediately after pushing to the vec

        let vertex_layout = vertex_spirv.reflect_layout(bevy_conventions).unwrap();
        log::info!("vertex shader layout: {:#?}", vertex_layout);
        let mut layouts = vec![vertex_layout];
        if let Some(ref fragment_spirv) = fragment_spirv {
            let fragment_layout = fragment_spirv.reflect_layout(bevy_conventions).unwrap();
            log::info!("fragment shader layout: {:#?}", fragment_layout);
            layouts.push(fragment_layout);   
        }
mrk-its

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

fork memoryruins/bevy_input_map

Input Map aims to decouple game play code from device specific input api. This is achieved by providing apis that allows you to map game actions to device input events instead of directly handling device inputs.

fork in a month

startedPradeepKumarRajamanickam/bevy_input_map

started time in a month

startedantoyo/rustc_codegen_gcc

started time in a month

push eventmemoryruins/bevy

Carter Anderson

commit sha 22a2c88a476c85dcd23f19b25d5ac3f517d59edb

winit: upgrade to 0.23.0 / move back upstream! (#617)

view details

push time in a month

push eventmemoryruins/bevy

Daniel McNab

commit sha cd9e502b12c2cc1a6d4aba33a0fc82ab3db04b4a

Fix ScheduleRunnerPlugin (#610) Fixes #609

view details

Nolan Darilek

commit sha d52f9e32aa643bbcf775dcd64fe07b390653e422

Add `#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]` to gamepad types. (#583) Seems these may have been missed in the gamepad implementation, copied them from keyboard.rs.

view details

Jonas Matser

commit sha 3a4eacbdee33a723f335132f2808686452dabbd8

Adds derive for missing debug implementations (#597)

view details

Gregor

commit sha 056f84a2c1323e8b62b30db167c57c9ce0330370

Expose current_entity in ChildBuilder (#595)

view details

Will Hart

commit sha 1beee4fd28b934edea8622b985ea038ea6c7ee41

Add AppBuilder::asset_loader_from_instance (#580) * Implement add_asset_loader_from_instance * Add example of different data loaders

view details

jngbsn

commit sha 8e876463ecc5f3d1ce57efcf294fc5919eb765b5

Add hierarchy example (#565) add ecs/hierarchy example

view details

EthanYidong

commit sha 4c753e258806999a69c680421ba3804148b4b33c

move dynamic plugin loading to its own optional crate (#544) move dynamic plugin loading to its own crate

view details

push time in a month

PullRequestReviewEvent

Pull request review commentbevyengine/bevy

New & updated `spawn*` methods

 impl CommandsInternal {         self     } +    pub fn spawn_with(&mut self, component: impl Component) -> &mut Self {+        let entity = self+            .entity_reserver+            .as_ref()+            .expect("entity reserver has not been set")+            .reserve_entity();+        self.current_entity = Some(entity);

Should we place this in a private method Commands::new_entity to ensure entity reservation and its error message stays consistent between spawn_with and spawn_with_bundle?

CleanCut

comment created time in a month

PullRequestReviewEvent

issue closedbevyengine/bevy

Events<AppExit> broken

This has been broken since 0.2.0, it works in 0.1.3

use bevy::{app::ScheduleRunnerPlugin, app::AppExit, prelude::*};
use std::time::Duration;

fn main() {
    App::build()
      .add_plugin(ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(1.0)))
      .add_system(update.system())
      .run()
}

pub fn update(mut shutdown: ResMut<Events<AppExit>>) {
  println!("exiting...");
  shutdown.send(AppExit);
}

What should happen: The app should exit

What happens: The ScheduleRunnerPlugin stops controlling frame intervals, and the app doesn't exit.

closed time in a month

ashneverdawn

issue commentbevyengine/bevy

Events<AppExit> broken

Thanks for reporting! This is fixed on master branch #536

ashneverdawn

comment created time in a month

more