From 3a6068095ab724025c39efeee2e883e5c63e7a50 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sun, 23 Nov 2025 11:53:43 +0100 Subject: [PATCH] Fix documentation links in examples --- examples/2d/2d_shapes.rs | 2 +- examples/3d/3d_shapes.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/2d/2d_shapes.rs b/examples/2d/2d_shapes.rs index 844c7778eceb2..c0c80339a526a 100644 --- a/examples/2d/2d_shapes.rs +++ b/examples/2d/2d_shapes.rs @@ -2,7 +2,7 @@ //! //! Meshes are better known for their use in 3D rendering, but we can use them in a 2D context too. Without a third dimension, the meshes we're building are flat – like paper on a table. These are still very useful for "vector-style" graphics, picking behavior, or as a foundation to build off of for where to apply a shader. //! -//! A "shape definition" is not a mesh on its own. A circle can be defined with a radius, i.e. [`Circle::new(50.0)`][Circle::new], but rendering tends to happen with meshes built out of triangles. So we need to turn shape descriptions into meshes. +//! A "shape definition" is not a mesh on its own. A circle can be defined with a radius, i.e. [`Circle::new(50.0)`](Circle::new), but rendering tends to happen with meshes built out of triangles. So we need to turn shape descriptions into meshes. //! //! Thankfully, we can add shape primitives directly to [`Assets`] because [`Mesh`] implements [`From`] for shape primitives and [`Assets::add`] can be given any value that can be "turned into" `T`! //! diff --git a/examples/3d/3d_shapes.rs b/examples/3d/3d_shapes.rs index a256ae1ce8b32..69ef3bf07c12f 100644 --- a/examples/3d/3d_shapes.rs +++ b/examples/3d/3d_shapes.rs @@ -1,6 +1,6 @@ //! Here we use shape primitives to generate meshes for 3d objects as well as attaching a runtime-generated patterned texture to each 3d object. //! -//! "Shape primitives" here are just the mathematical definition of certain shapes, they're not meshes on their own! A sphere with radius `1.0` can be defined with [`Sphere::new(1.0)`][Sphere::new] but all this does is store the radius. So we need to turn these descriptions of shapes into meshes. +//! "Shape primitives" here are just the mathematical definition of certain shapes, they're not meshes on their own! A sphere with radius `1.0` can be defined with [`Sphere::new(1.0)`](Sphere::new) but all this does is store the radius. So we need to turn these descriptions of shapes into meshes. //! //! While a shape is not a mesh, turning it into one in Bevy is easy. In this example we call [`meshes.add(/* Shape here! */)`][`Assets::add`] on the shape, which works because the [`Assets::add`] method takes anything that can be turned into the asset type it stores. There's an implementation for [`From`] on shape primitives into [`Mesh`], so that will get called internally by [`Assets::add`]. //!