Struct bevy_pixel_camera::PixelCameraBundle
source · pub struct PixelCameraBundle {
pub camera: Camera,
pub camera_render_graph: CameraRenderGraph,
pub pixel_projection: PixelProjection,
pub visible_entities: VisibleEntities,
pub frustum: Frustum,
pub transform: Transform,
pub global_transform: GlobalTransform,
pub camera_2d: Camera2d,
}
PixelZoom
component insteadExpand description
Provides the components for the camera entity.
When using this camera, world coordinates are expressed using virtual pixels, which are always mapped to a multiple of actual screen pixels.
Fields§
§camera: Camera
PixelZoom
component insteadcamera_render_graph: CameraRenderGraph
PixelZoom
component insteadpixel_projection: PixelProjection
PixelZoom
component insteadvisible_entities: VisibleEntities
PixelZoom
component insteadfrustum: Frustum
PixelZoom
component insteadtransform: Transform
PixelZoom
component insteadglobal_transform: GlobalTransform
PixelZoom
component insteadcamera_2d: Camera2d
PixelZoom
component insteadImplementations§
source§impl PixelCameraBundle
impl PixelCameraBundle
sourcepub fn new(pixel_projection: PixelProjection) -> Self
👎Deprecated since 0.5.1: please use the PixelZoom
component instead
pub fn new(pixel_projection: PixelProjection) -> Self
PixelZoom
component insteadCreate a component bundle for a camera with the specified projection.
sourcepub fn from_zoom(zoom: i32) -> Self
👎Deprecated since 0.5.1: please use the PixelZoom
component instead
pub fn from_zoom(zoom: i32) -> Self
PixelZoom
component insteadCreate a component bundle for a camera where the size of virtual pixels
are specified with zoom
.
sourcepub fn from_resolution(width: i32, height: i32, set_viewport: bool) -> Self
👎Deprecated since 0.5.1: please use the PixelZoom
component instead
pub fn from_resolution(width: i32, height: i32, set_viewport: bool) -> Self
PixelZoom
component insteadCreate a component bundle for a camera where the size of virtual pixels is automatically set to fit the specified resolution inside the window.
If set_viewport
is true, pixels outside of the desired resolution will
not be displayed. This will automatically set the viewport of the
camera, and resize it when necessary.
sourcepub fn from_width(width: i32, set_viewport: bool) -> Self
👎Deprecated since 0.5.1: please use the PixelZoom
component instead
pub fn from_width(width: i32, set_viewport: bool) -> Self
PixelZoom
component insteadCreate a component bundle for a camera where the size of virtual pixels is automatically set to fit the specified width inside the window.
If set_viewport
is true, pixels outside of the desired width will
not be displayed. This will automatically set the viewport of the
camera, and resize it when necessary.
sourcepub fn from_height(height: i32, set_viewport: bool) -> Self
👎Deprecated since 0.5.1: please use the PixelZoom
component instead
pub fn from_height(height: i32, set_viewport: bool) -> Self
PixelZoom
component insteadCreate a component bundle for a camera where the size of virtual pixels is automatically set to fit the specified height inside the window.
If set_viewport
is true, pixels outside of the desired height will
not be displayed. This will automatically set the viewport of the
camera, and resize it when necessary.
Trait Implementations§
impl Bundle for PixelCameraBundle
impl DynamicBundle for PixelCameraBundle
Auto Trait Implementations§
impl !RefUnwindSafe for PixelCameraBundle
impl Send for PixelCameraBundle
impl Sync for PixelCameraBundle
impl Unpin for PixelCameraBundle
impl !UnwindSafe for PixelCameraBundle
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.