bevy/examples/3d
woodroww 1bd390806f added subdivisions to shape::Plane (#7546)
# Objective

There was issue #191 requesting subdivisions on the shape::Plane.
I also could have used this recently. I then write the solution.

Fixes  #191

## Solution

I changed the shape::Plane to include subdivisions field and the code to create the subdivisions. I don't know how people are counting subdivisions so as I put in the doc comments 0 subdivisions results in the original geometry of the Plane.
Greater then 0 results in the number of lines dividing the plane.

I didn't know if it would be better to create a new struct that implemented this feature, say SubdivisionPlane or change Plane. I decided on changing Plane as that was what the original issue was.

It would be trivial to alter this to use another struct instead of altering Plane.
The issues of migration, although small, would be eliminated if a new struct was implemented.
 
## Changelog
### Added
Added subdivisions field to shape::Plane

## Migration Guide
All the examples needed to be updated to initalize the subdivisions field.
Also there were two tests in tests/window that need to be updated.

A user would have to update all their uses of shape::Plane to initalize the subdivisions field.
2023-02-13 18:20:20 +00:00
..
3d_scene.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
3d_shapes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
atmospheric_fog.rs Better cascades config defaults + builder, tweak example configs (#7456) 2023-02-05 08:06:32 +00:00
blend_modes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
bloom.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
fog.rs Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
fxaa.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
lighting.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
lines.rs Allow passing glam vector types as vertex attributes (#6442) 2022-11-04 03:45:17 +00:00
load_gltf.rs EnvironmentMapLight, BRDF Improvements (#7051) 2023-02-09 16:46:32 +00:00
msaa.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
orthographic.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
parenting.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
pbr.rs EnvironmentMapLight, BRDF Improvements (#7051) 2023-02-09 16:46:32 +00:00
render_to_texture.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
shadow_biases.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
shadow_caster_receiver.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
skybox.rs Make AsBindGroup unsized (#6937) 2022-12-16 01:40:15 +00:00
spherical_area_lights.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
split_screen.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
spotlight.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
texture.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
transparency_3d.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
two_passes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
update_gltf_scene.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
vertex_colors.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
wireframe.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00