bevy/examples/math
Lynn 9a82ecfcba
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-11 02:01:14 +02:00
..
custom_primitives.rs Custom primitives example (#13795) 2024-06-11 02:01:14 +02:00
random_sampling.rs Updates default Text font size to 24px (#13603) 2024-05-31 16:41:27 +00:00
render_primitives.rs Meshable extrusions (#13478) 2024-06-04 17:27:32 +00:00
sampling_primitives.rs Meshable extrusions (#13478) 2024-06-04 17:27:32 +00:00