pub struct ZoomSpecification {
pub distance: f64,
pub max_distance: f64,
pub zoom: f64,
}Expand description
A table specifying a fixed or dynamically-computed zoom level using one of the supported methods. Used by ZoomLimits.
Method 1 only uses the zoom field. The zoom level is fixed and will not change at runtime. Directly correlates to the perceived size of objects in the game world.
Method 2 only uses distance and optionally max_distance. The zoom level is computed dynamically based on the player’s window dimensions and aspect ratio. This method is ideal for limiting how far the player can see.
If there is ambiguity in which method should be used (i.e. both zoom and distance fields are provided), an error will be thrown during parsing.
Fields§
§distance: f64§max_distance: f64§zoom: f64Trait Implementations§
Source§impl Clone for ZoomSpecification
impl Clone for ZoomSpecification
Source§fn clone(&self) -> ZoomSpecification
fn clone(&self) -> ZoomSpecification
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ZoomSpecification
Source§impl Debug for ZoomSpecification
impl Debug for ZoomSpecification
Source§impl Default for ZoomSpecification
impl Default for ZoomSpecification
Source§fn default() -> ZoomSpecification
fn default() -> ZoomSpecification
Returns the “default value” for a type. Read more
Source§impl PartialEq for ZoomSpecification
impl PartialEq for ZoomSpecification
impl StructuralPartialEq for ZoomSpecification
Auto Trait Implementations§
impl Freeze for ZoomSpecification
impl RefUnwindSafe for ZoomSpecification
impl Send for ZoomSpecification
impl Sync for ZoomSpecification
impl Unpin for ZoomSpecification
impl UnsafeUnpin for ZoomSpecification
impl UnwindSafe for ZoomSpecification
Blanket Implementations§
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
Mutably borrows from an owned value. Read more