pub struct PerspectiveCameraOptional {
pub translation: Option<Vec3>,
pub rotation: Option<Quat>,
pub scale: Option<Vec3>,
pub main_scene: Option<()>,
pub ui_scene: Option<()>,
pub user_id: Option<String>,
pub aspect_ratio_from_window: Option<EntityId>,
}
Expand description
Optional part of PerspectiveCamera.
Fields§
§translation: Option<Vec3>
Component: ambient_core::transform::translation
Suggested value: Vec3::new(0f32, 0f32, 0f32, )
Component description: The translation/position of this entity.
rotation: Option<Quat>
Component: ambient_core::transform::rotation
Suggested value: Quat::from_xyzw(0f32, 0f32, 0f32, 1f32, )
Component description: The rotation of this entity.
scale: Option<Vec3>
Component: ambient_core::transform::scale
Suggested value: Vec3::new(1f32, 1f32, 1f32, )
Component description: The scale of this entity.
main_scene: Option<()>
Component: ambient_core::app::main_scene
Description: Either the main or UI scene must be specified for this camera to be used.
Component description: If attached, this entity belongs to the main scene.
ui_scene: Option<()>
Component: ambient_core::app::ui_scene
Description: Either the main or UI scene must be specified for this camera to be used.
Component description: If attached, this entity belongs to the UI scene.
user_id: Option<String>
Component: ambient_core::player::user_id
Description: If set, this camera will only be used for the specified user.
Component description: An identifier attached to all things owned by a user, and supplied by the user. This can be attached to more than just the player; by convention, it is also attached to related entities, including their camera and body.
aspect_ratio_from_window: Option<EntityId>
Component: ambient_core::camera::aspect_ratio_from_window
Component description: If attached, the aspect_ratio
component will be automatically updated to match the aspect ratio of the window. Should point to an entity with a window_physical_size
component.
Trait Implementations§
source§impl Clone for PerspectiveCameraOptional
impl Clone for PerspectiveCameraOptional
source§fn clone(&self) -> PerspectiveCameraOptional
fn clone(&self) -> PerspectiveCameraOptional
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PerspectiveCameraOptional
impl Debug for PerspectiveCameraOptional
source§impl Default for PerspectiveCameraOptional
impl Default for PerspectiveCameraOptional
source§fn default() -> PerspectiveCameraOptional
fn default() -> PerspectiveCameraOptional
source§impl<'de> Deserialize<'de> for PerspectiveCameraOptional
impl<'de> Deserialize<'de> for PerspectiveCameraOptional
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<PerspectiveCameraOptional, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PerspectiveCameraOptional, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for PerspectiveCameraOptional
impl PartialEq for PerspectiveCameraOptional
source§fn eq(&self, other: &PerspectiveCameraOptional) -> bool
fn eq(&self, other: &PerspectiveCameraOptional) -> bool
self
and other
values to be equal, and is used
by ==
.