Skip to main content

BakeOptions

Struct BakeOptions 

Source
pub struct BakeOptions {
    pub frame_px: u32,
    pub oversample: u32,
    pub azimuths: Vec<f32>,
    pub pitch_deg: f32,
    pub margin: f32,
    pub shaded: bool,
    pub anim_frames: u32,
    pub animation: Option<AnimationId>,
}
Expand description

How to bake. Defaults: four frames (N/E/S/W-ish), true isometric pitch, 128 px sprites, 2× supersampling, shaded, one still frame per view.

Fields§

§frame_px: u32

Edge length of one sprite frame in pixels (8..=1024).

§oversample: u32

Supersampling factor per axis (1..=4); 2 gives nice sprite edges.

§azimuths: Vec<f32>

One azimuth per output frame, degrees around +Y (0 = camera at +Z).

§pitch_deg: f32

Camera elevation above the horizon; 35.264° = true isometric.

§margin: f32

Fraction of the frame kept free around the object (0..=0.4).

§shaded: bool

false = flat base colors, true = Lambert shading like the viewer.

§anim_frames: u32

Motion cycle samples per azimuth (1..=24). 1 = sprite at rest;

1 bakes the procedural motion as a strip: waves/sway/bob run one full loop cycle (2π of loop time, independent of speed — pick the playback fps in your engine instead).

§animation: Option<AnimationId>

Keyframe clip to bake: with Some, every animation column samples this clip at t = duration·k/anim_frames (rigs are skinned, cf. ops::sample_pose) instead of the static procedural motion loop. Set looping = true on the clip for a seamless sprite loop.

Trait Implementations§

Source§

impl Clone for BakeOptions

Source§

fn clone(&self) -> BakeOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BakeOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BakeOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.