Module prelude

Source
Expand description

The render prelude.

This includes the most common types in this crate, re-exported for your convenience.

Structs§

Camera
The defining Component for camera entities, storing information about how and what to render through this camera.
ClearColor
A Resource that stores the color that is used to clear the screen between frames.
ExtractSchedule
Schedule which extract data from the main world and inserts it into the render world.
ImagePlugin
Adds the Image as an asset and makes sure that they are extracted and prepared for the GPU.
InheritedVisibility
Whether or not an entity is visible in the hierarchy. This will not be accurate until VisibilityPropagate runs in the PostUpdate schedule.
Mesh
A 3D object made out of vertices representing triangles, lines, or points, with “attribute” values for each vertex.
Mesh2d
A component for 2D meshes. Requires a MeshMaterial2d to be rendered, commonly using a ColorMaterial.
Mesh3d
A component for 3D meshes. Requires a MeshMaterial3d to be rendered, commonly using a StandardMaterial.
MorphWeights
Controls the morph targets for all child Mesh3d entities. In most cases, MorphWeights should be considered the “source of truth” when writing morph targets for meshes. However you can choose to write child MeshMorphWeights if your situation requires more granularity. Just note that if you set MorphWeights, it will overwrite child MeshMorphWeights values.
OrthographicProjection
Project a 3D space onto a 2D surface using parallel lines, i.e., unlike PerspectiveProjection, the size of objects remains the same regardless of their distance to the camera.
PerspectiveProjection
A 3D camera projection in which distant objects appear smaller than close objects.
Shader
A shader, as defined by its ShaderSource and ShaderStage This is an “unprocessed” shader. It can contain preprocessor directives.
SpatialBundleDeprecated
A Bundle that allows the correct positional rendering of an entity.
ViewVisibility
Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering.
VisibilityBundleDeprecated
A Bundle of the Visibility, InheritedVisibility, and ViewVisibility Components, which describe the visibility of an entity.

Enums§

AlphaMode
Sets how a material’s base color alpha channel is used for transparency.
ClearColorConfig
For a camera, specifies the color used to clear the viewport before rendering.
Msaa
Component for configuring the number of samples for Multi-Sample Anti-Aliasing for a Camera.
Projection
A configurable CameraProjection that can select its projection type at runtime.
Visibility
User indication of whether an entity is visible. Propagates down the entity hierarchy.

Traits§

MeshBuilder
A trait used to build Meshes from a configuration
Meshable
A trait for shapes that can be turned into a Mesh.