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: u32Edge length of one sprite frame in pixels (8..=1024).
oversample: u32Supersampling 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: f32Camera elevation above the horizon; 35.264° = true isometric.
margin: f32Fraction of the frame kept free around the object (0..=0.4).
shaded: boolfalse = flat base colors, true = Lambert shading like the viewer.
anim_frames: u32Motion 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 ofspeed— 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
impl Clone for BakeOptions
Source§fn clone(&self) -> BakeOptions
fn clone(&self) -> BakeOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more