pub trait PreviewEngine {
Show 13 methods
// Required methods
fn engine_version(&self) -> String;
fn fps(&self) -> u32;
fn size(&self) -> (u32, u32);
fn total_frames(&self) -> u32;
fn scenes(&self) -> Vec<SceneInfo>;
fn markers(&self) -> Vec<MarkerInfo>;
fn metas(&self) -> Vec<(String, Meta)>;
fn render(&mut self, frame: u32, size: (u32, u32)) -> Image;
fn edit(&mut self, edit: MetaEdit) -> Result<Vec<(String, Meta)>, String>;
fn pick(&mut self, frame: u32, x: f64, y: f64) -> Option<u32>;
fn tree(&mut self, frame: u32) -> Vec<NodeInfo>;
fn inspect(
&mut self,
frame: u32,
node: u32,
) -> Option<(Vec<SignalValue>, [f64; 8])>;
fn waveform(&mut self, buckets: usize) -> Option<Vec<f32>>;
}Expand description
What the preview needs from an engine. Implemented by oxframe::Engine.
Required Methods§
Sourcefn engine_version(&self) -> String
fn engine_version(&self) -> String
Version string sent in Ready.
Sourcefn total_frames(&self) -> u32
fn total_frames(&self) -> u32
Project length in frames.
Sourcefn markers(&self) -> Vec<MarkerInfo>
fn markers(&self) -> Vec<MarkerInfo>
Markers of all scenes.
Sourcefn metas(&self) -> Vec<(String, Meta)>
fn metas(&self) -> Vec<(String, Meta)>
Meta of every scene (sent on Ready so the editor knows eases and
tunables).
Sourcefn edit(&mut self, edit: MetaEdit) -> Result<Vec<(String, Meta)>, String>
fn edit(&mut self, edit: MetaEdit) -> Result<Vec<(String, Meta)>, String>
Applies an edit, re-simulates, persists the meta; returns changed
metas as (scene, meta).
§Errors
A message for the editor if the edit is invalid or saving failed.
Sourcefn pick(&mut self, frame: u32, x: f64, y: f64) -> Option<u32>
fn pick(&mut self, frame: u32, x: f64, y: f64) -> Option<u32>
Hit-test at frame pixels (top-left origin, project size).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".