-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring more of the Velato runtime, including Composition, Renderer. #15
Bring more of the Velato runtime, including Composition, Renderer. #15
Conversation
71688cc
to
dc853aa
Compare
This code will need a lot of enhancements and improvements, but it is still very close to what was in Velato with only minimal changes. This brings an optional dependency on Vello so that the `Renderer` can be used to create a Vello `Scene` from the animation and composition data.
dc853aa
to
53c4ce6
Compare
There's a reasonable argument that some of this should be elsewhere and not in But we don't have another place yet, we don't have a clear idea of which pieces would belong where, and we're not sure which pieces will survive the coming refactors and changes ... So this gets stuff moved to where we can start iterating, and we can always think about splitting up the crate further in the future. |
I've filed #16 to track the work of making interpoli multi-crate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are design improvements that should follow after this, but we know this code works and it is not crazy.
/// Frames in which the animation is active. | ||
pub frames: Range<f64>, | ||
/// Frames per second. | ||
pub frame_rate: f64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improvement: The interval of frames should not be fixed in the composition, but encoded on the frames themselves.
Filed as #17
pub height: f64, | ||
/// Blend mode for the layer. | ||
pub blend_mode: Option<peniko::BlendMode>, | ||
/// Range of frames in which the layer is active. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are hax to address the design issue of putting frame_rate
on Composition
, which should be addressed by the change in #17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frames
is not related to that ... That's so that a layer can be active for some subset of the full composition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are relative to the Composition
's rate though, right?
pub height: usize, | ||
/// Precomposed layers that may be instanced. | ||
#[cfg(feature = "std")] | ||
pub assets: HashMap<String, Vec<Layer>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this #[cfg(feature = "std")]
to keep it compiling as it is to get it landed.
After it lands, I'll replace with hashbrown
so that no_std
works (with alloc
).
This code will need a lot of enhancements and improvements, but it is still very close to what was in Velato with only minimal changes.
This brings an optional dependency on Vello so that the
Renderer
can be used to create a VelloScene
from the animation and composition data.