bevy/examples/math
Lynn c172c3c4b5
Custom primitives example (#13795)
# Objective

- Add a new example showcasing how to add custom primitives and what you
can do with them.

## Solution

- Added a new example `custom_primitives` with a 2D heart shape
primitive highlighting
  - `Bounded2d` by implementing and visualising bounding shapes,
  - `Measured2d` by implementing it,
  - `Meshable` to show the shape on the screen
- The example also includes an `Extrusion<Heart>` implementing
  - `Measured3d`,
  - `Bounded3d` using the `BoundedExtrusion` trait and
  - meshing using the `Extrudable` trait.

## Additional information

Here are two images of the heart and its extrusion:

![image_2024-06-10_194631194](https://github.com/bevyengine/bevy/assets/62256001/53f1836c-df74-4ba6-85e9-fabdafa94c66)
![Screenshot 2024-06-10
194609](https://github.com/bevyengine/bevy/assets/62256001/b1630e71-6e94-4293-b7b5-da8d9cc98faf)

---------

Co-authored-by: Jakub Marcowski <37378746+Chubercik@users.noreply.github.com>
2024-06-10 21:15:21 +00:00
..
custom_primitives.rs Custom primitives example (#13795) 2024-06-10 21:15:21 +00:00
random_sampling.rs Updates default Text font size to 24px (#13603) 2024-05-31 16:41:27 +00:00
render_primitives.rs Re-name and Extend Run Conditions API (#13784) 2024-06-10 13:41:56 +00:00
sampling_primitives.rs Meshable extrusions (#13478) 2024-06-04 17:27:32 +00:00
smooth_follow.rs Stable interpolation and smooth following (#13741) 2024-06-10 12:50:59 +00:00