Document ClearColorConfig (#9288)
# Objective Document the `ClearColorConfig` enum, and describe the behavior of its variants.
This commit is contained in:
parent
b4bc9e4a11
commit
a88b9fc6a9
@ -4,12 +4,18 @@ use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize};
|
|||||||
use bevy_render::{color::Color, extract_resource::ExtractResource};
|
use bevy_render::{color::Color, extract_resource::ExtractResource};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
/// For a camera, specifies the color used to clear the viewport before rendering.
|
||||||
#[derive(Reflect, Serialize, Deserialize, Clone, Debug, Default)]
|
#[derive(Reflect, Serialize, Deserialize, Clone, Debug, Default)]
|
||||||
#[reflect(Serialize, Deserialize)]
|
#[reflect(Serialize, Deserialize)]
|
||||||
pub enum ClearColorConfig {
|
pub enum ClearColorConfig {
|
||||||
|
/// The clear color is taken from the world's [`ClearColor`] resource.
|
||||||
#[default]
|
#[default]
|
||||||
Default,
|
Default,
|
||||||
|
/// The given clear color is used, overriding the [`ClearColor`] resource defined in the world.
|
||||||
Custom(Color),
|
Custom(Color),
|
||||||
|
/// No clear color is used: the camera will simply draw on top of anything already in the viewport.
|
||||||
|
///
|
||||||
|
/// This can be useful when multiple cameras are rendering to the same viewport.
|
||||||
None,
|
None,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user