Comments (6)
Rectangle
and Cuboid
are defined just by their half-extents, and don't have any notion of their position. This is useful for things like colliders (more efficient and ergonomic), but means that they cannot be used as AABBs or replace the rect types.
from bevy.
I think having a single type for every usages is more confusing than having specific types whose documentation can be tailored to what they're used for. And names of those types should convey their usage.
There's also UiRect
which is not a rectangle
from bevy.
I have been wanting to get rid of NodeRect
in the animation_graph
example.
from bevy.
Eliminate bevy_render::Aabb in favor of the bevy_math types. Needs benchmarking.
Render::Aabb is a component and has a trait implementation for a render primitive so you can't remove it. I wouldn't be against newtyping, but delegation in Rust is terrible so i don't think there is anything to win either.
from bevy.
Just as an aside, the equivalent types in three.js are Box2
and Box3
, both of which are defined by min/max vectors. (Theoretically you could have BoxN for any N whose min/max values are VecN. In practice, N is always either 2 or 3.)
from bevy.
I think having a single type for every usages is more confusing than having specific types whose documentation can be tailored to what they're used for. And names of those types should convey their usage.
A valid point, but it doesn't feel like this is being applied. prelude::*
exports Rectangle
, URect
, and Rect
which all reads as "rectangle". Rectangle
contains no position information, but that's not apparent from the name. URect
has essentially the same documentation as Rect
and it's not suggested anywhere why I might want to use it over Rect
.
Rectangle
andCuboid
are defined just by their half-extents, and don't have any notion of their position. This is useful for things like colliders (more efficient and ergonomic), but means that they cannot be used as AABBs or replace the rect types.
I ran into a bit of a snag with AabbCast2d
where I wasn't sure if I should be providing the positional data in the ray or the aabb. Is Rectangle
more suitable here?
from bevy.
Related Issues (20)
- `Commands` apply at unexpected times with exclusive `World` access
- Is it intended for FixedUpdate not to be executed in the first frame? HOT 1
- `Query::transmute_filtered` doesn't respect the new filters HOT 2
- `Query::transmute`/`Query::transmute_filtered` accept any `&Components` parameter and this is unsound
- Docs for bevy_reflect::impl_reflect imply that they can be used by user code to implement Reflect for foreign types HOT 1
- Example for saving assets HOT 1
- Add Stochastic Screen-Space Reflections HOT 3
- Implement `Resource` for `()` HOT 1
- Buildable `ParamSet` HOT 2
- Shadows disabled when second camera is activated HOT 1
- `World::clear_entities` causes observer logic to break safety HOT 1
- Observers that can observe multiple different event types HOT 6
- Grid gizmo seems hard to handle
- More anti-aliasing options HOT 5
- Create a custom diagnostic for observer system params order HOT 1
- `build-wasm-atomics` job is failing HOT 1
- Meshlet simplification might be a bottleneck in bevy's Nanite solution HOT 16
- `build-wasm-atomics` CI check failing HOT 3
- Improve CompressedImageSaver HOT 8
- `msaa_writeback` is inefficient
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy.