Struct three_d::window::FrameInput
source · pub struct FrameInput {
pub events: Vec<Event>,
pub elapsed_time: f64,
pub accumulated_time: f64,
pub viewport: Viewport,
pub window_width: u32,
pub window_height: u32,
pub device_pixel_ratio: f64,
pub first_frame: bool,
pub context: Context,
}Expand description
Input from the window to the rendering (and whatever else needs it) each frame.
Fields§
§events: Vec<Event>A list of events which has occurred since last frame.
elapsed_time: f64Milliseconds since last frame.
accumulated_time: f64Milliseconds accumulated time since start.
viewport: ViewportViewport of the window in physical pixels (the size of the screen RenderTarget which is returned from FrameInput::screen).
window_width: u32Width of the window in logical pixels.
window_height: u32Height of the window in logical pixels.
device_pixel_ratio: f64Number of physical pixels for each logical pixel.
first_frame: boolWhether or not this is the first frame.
context: ContextThe graphics context for the window.
Implementations§
source§impl FrameInput
impl FrameInput
sourcepub fn screen(&self) -> RenderTarget<'_>
pub fn screen(&self) -> RenderTarget<'_>
Returns the screen render target, which is used for drawing to the screen, for this window. Same as
RenderTarget::screen(&frame_input.context, frame_input.viewport.width, frame_input.viewport.height)
Trait Implementations§
source§impl Clone for FrameInput
impl Clone for FrameInput
source§fn clone(&self) -> FrameInput
fn clone(&self) -> FrameInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more