From c5e5c8e98f0373892e2394a69b0c2507fbb7f7e9 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Tue, 9 Aug 2022 01:41:33 +0100 Subject: [PATCH] Add crate level doc comment. --- src/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index c9e8088..e2b881c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,18 @@ +//! This crate provides a Bevy plugin, [`OutlinePlugin`], and associated components for +//! rendering outlines around meshes using the vertex extrusion method. +//! +//! Outlines are rendered in a seperate pass following the main 3D pass. The effect of this +//! pass is to present the outlines in depth sorted order according to the model translation +//! of each mesh. This ensures that outlines are not clipped by other geometry. +//! +//! The [`Outline`] component will, by itself, cover the original object entirely with the +//! outline colour. The [`OutlineStencil`] component must also be added to prevent the body of +//! an object from being filled it. This must be added to any entity which needs to appear on +//! top of an outline. +//! +//! Vertex extrusion works best with meshes that have smooth surfaces. For meshes with hard +//! edges, see the [`OutlineMeshExt::generate_outline_normals`] function. + use bevy::asset::load_internal_asset; use bevy::ecs::query::QueryItem; use bevy::prelude::*;