Expand description
Backend-independent motion engine primitives.
This package owns time, geometry, animation, colors and diagnostics without rendering devices, font engines, media codecs or window-system dependencies.
use motion_core::{FrameRate, Time, TimeLiteral};
let boundary = Time::from_frame(30_000, FrameRate::NTSC);
assert_eq!(boundary, 1001.seconds().after_origin());
assert_eq!(boundary.to_frame(FrameRate::NTSC), 30_000);Re-exports§
pub use animation::Constant;pub use animation::Easing;pub use animation::FiniteAnimation;pub use animation::Interpolate;pub use animation::Interval;pub use animation::Keyframes;pub use animation::Signal;pub use animation::Spring;pub use animation::SpringBuilder;pub use animation::Tween;pub use animation::Extrapolate;pub use animation::FollowPath;pub use animation::Noise;pub use animation::NoiseBuilder;pub use animation::Oscillator;pub use animation::OscillatorBuilder;pub use animation::PathSample;pub use animation::Waveform;pub use animation::piecewise;pub use animation::remap;pub use animation::try_piecewise;pub use animation::try_remap;pub use asset::environment::FontEnvironment;pub use asset::environment::FontIdentity;pub use asset::environment::FontUsage;pub use asset::Asset;pub use asset::AssetState;pub use asset::Assets;pub use asset::Handle;pub use asset::LoadContext;pub use asset::RequestDiagnostics;pub use asset::ResourceLimits;pub use asset::ResourceStore;pub use asset::Source;pub use audio::AudioBus;pub use audio::AudioChapter;pub use audio::AudioClip;pub use audio::AudioClipParameters;pub use audio::AudioEffect;pub use audio::AudioMetadata;pub use audio::AudioSource;pub use audio::Duck;pub use audio::DuckTrigger;pub use audio::Ducking;pub use audio::Limiter;pub use audio::Loudness;pub use audio::Master;pub use audio::PanLaw;pub use authoring::camera::camera;pub use authoring::camera::Camera;pub use authoring::camera::DepthOfField;pub use authoring::camera::DepthPlane;pub use authoring::camera::try_camera;pub use authoring::context::CacheLimits;pub use authoring::context::CachePartition;pub use authoring::context::RenderCache;pub use authoring::context::SceneCache;pub use authoring::context::SceneContext;pub use authoring::elevation::Elevation;pub use authoring::elevation::ShadowLayer;pub use authoring::sampling::MotionBlur;pub use authoring::sampling::ShutterCurve;pub use authoring::sampling::ShutterSampling;pub use authoring::sampling::sample_offsets;pub use authoring::scene::IntoSceneOutput;pub use authoring::scene::scene;pub use authoring::skeleton::Bone;pub use authoring::skeleton::BonePose;pub use authoring::skeleton::BoneTransform;pub use authoring::skeleton::Pose;pub use authoring::skeleton::Skeleton;pub use authoring::timeline::BoundaryAdjustment;pub use authoring::timeline::BoundaryEdge;pub use authoring::timeline::Clip;pub use authoring::timeline::Diagnostics;pub use authoring::timeline::ResolvedAudio;pub use authoring::timeline::Soundtrack;pub use authoring::timeline::Timeline;pub use authoring::timeline::TimelineBuilder;pub use authoring::timeline::TimelineVisual;pub use authoring::timeline::TimelineWarning;pub use authoring::timeline::Track;pub use authoring::timeline::TrackBuilder;pub use authoring::transition::Direction;pub use authoring::transition::CrossFade;pub use authoring::transition::Iris;pub use authoring::transition::IrisShape;pub use authoring::transition::Push;pub use authoring::transition::Slide;pub use authoring::transition::Transition;pub use authoring::transition::Wipe;pub use authoring::transition::ZoomBlur;pub use authoring::Alignment;pub use authoring::Column;pub use authoring::Layout;pub use authoring::Node;pub use authoring::NodeModifiers;pub use authoring::Row;pub use authoring::Scene;pub use authoring::Side;pub use budget::RasterLimits;pub use budget::SceneLimits;pub use color::Color;pub use color::math::linear_to_srgb;pub use color::math::premultiply;pub use color::math::rec709_luminance;pub use color::math::srgb_to_linear;pub use color::math::unpremultiply;pub use display_list::DisplayList;pub use display_list::PixelSize;pub use display_list::ValidatedDisplayList;pub use drawing::AtmosphereKind;pub use drawing::AtmospherePaint;pub use drawing::AtmosphereParameters;pub use drawing::BlendMode;pub use drawing::BlendSpace;pub use drawing::Canvas;pub use drawing::ClipMode;pub use drawing::DeferredContent;pub use drawing::DrawCommand;pub use drawing::DrawContext;pub use drawing::Drawable;pub use drawing::Evaluation;pub use drawing::FillRule;pub use drawing::IntoShapeClip;pub use drawing::LineCap;pub use drawing::LineJoin;pub use drawing::MAX_STROKE_VERBS;pub use drawing::MaskMode;pub use drawing::Paint;pub use drawing::PathClip;pub use drawing::RectClip;pub use drawing::RenderQuality;pub use drawing::Shape;pub use drawing::ShapeClip;pub use drawing::StrokeStyle;pub use drawing::Styled;pub use drawing::GradientExtend;pub use drawing::GradientSpace;pub use drawing::GradientUnits;pub use drawing::ImagePattern;pub use drawing::LinearGradient;pub use drawing::PatternImage;pub use drawing::RadialGradient;pub use drawing::SweepGradient;pub use drawing::WeakPatternImage;pub use drawing::MAX_MESH_POINTS_PER_AXIS;pub use drawing::MAX_MESH_SUBDIVISIONS;pub use drawing::MeshGradient;pub use drawing::MeshImage;pub use drawing::MeshPaint;pub use drawing::MeshPatch;pub use drawing::MeshVertex;pub use error::BoxedError;pub use error::Error;pub use error::ErrorKind;pub use filter::Filter;pub use filter::FilterOperation;pub use geometry::bounds::Pivot;pub use geometry::bounds::Rect;pub use geometry::bounds::Size;pub use geometry::AngleLiteral;pub use geometry::MAX_PERSPECTIVE_CURVE_PIECES;pub use geometry::Perspective;pub use geometry::Point;pub use geometry::Transform;pub use geometry::TransformComponents;pub use geometry::Vector2;pub use grading::Cdl;pub use grading::ColorWheels;pub use grading::Lut1d;pub use grading::Lut3d;pub use grading::LutInput;pub use optics::ApertureShape;pub use optics::HeightFrom;pub use optics::Optics;pub use path2d::MAX_BOOLEAN_EDGES;pub use path2d::MAX_PATH_VERBS;pub use path2d::MAX_SVG_PATH_BYTES;pub use path2d::MorphPath;pub use path2d::Path2D;pub use path2d::PathBooleanOp;pub use path2d::PathBooleanOptions;pub use path2d::PathBuilder;pub use path2d::PathVerb;pub use pixels::ImagePixels;pub use pixels::Sampling;pub use random::Random;pub use report::ErrorReport;pub use shape::Arc as ArcShape;pub use shape::Arrow;pub use shape::ArrowHead;pub use shape::Circle;pub use shape::Ellipse;pub use shape::FunctionGraph;pub use shape::Line;pub use shape::Polygon;pub use shape::Polyline;pub use shape::RegularPolygon;pub use shape::Ring;pub use shape::RoundedRect;pub use shape::Spline;pub use shape::Star;pub use time::Duration;pub use time::FrameRate;pub use time::TICKS_PER_SECOND;pub use time::Time;pub use time::TimeLiteral;pub use time::TimeOffset;pub use validation::SceneStats;pub use validation::ValidationError;pub use validation::ValidationErrorKind;pub use validation::ValidationLimits;
Modules§
- animation
- Clock-free easing and value interpolation.
- asset
- Lazy typed assets with explicit bounded project resource stores and request diagnostics.
- audio
- Stateless audio sources and immutable timeline occurrence metadata.
- authoring
- Immutable Node snapshots, scene evaluation and composition.
- budget
- Shared logical resource admission for bounded geometry and rendering.
- color
- Floating straight-alpha sRGB values and perceptual Oklab calculations.
- display_
list - Validated device-space drawing commands, with explicit transforms and resources.
- drawing
- Logical drawing contracts and bounded rectangle/path fill commands.
- error
- Unified engine failures with retained causes and frame diagnostics.
- filter
- Linear-light filter data, validation and conservative device bounds.
- geometry
- Double-precision authoring points, vectors, transforms and bounds.
- grading
- Immutable color grading data, without filesystem or renderer dependencies.
- instances
- Validated opaque instance records shared by content and render packages.
- key
- Bit-exact float keys for pure authoring caches.
- math
- Deterministic authoring mathematics and interpolation.
- noise
- Stateless integer-hashed procedural noise with analytic spatial derivatives.
- optics
- Bounded physical lens and height-field effect descriptions.
- path2d
- Double-precision path values, with copy-on-write geometry.
- pixels
- Immutable image sampling contracts, independent of decoding and rendering.
- prelude
- Common backend-independent authoring values.
- random
- Key-derived deterministic random streams without global or frame-local state.
- report
- Bounded error report that collects every failure of one authoring step.
- shape
- Logical shapes and styled geometry.
- sync
- Poison-tolerant locking shared by every crate.
- time
- Integer-tick time points, nonnegative durations, signed offsets and rational frame rates.
- validation
- Backend-independent scene diagnostics and bounded structural traversal.
Macros§
- fps
- Builds a
FrameRateof whole frames per second from an integer constant. - group
- Groups heterogeneous drawable or node values in source order.
Type Aliases§
- Result
- A classified failure retaining its original source.