-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add a NativeImage component #281
Conversation
Deployment preview ready! 🚀 You can view this deployment at: https://staging.pax.dev/281 |
00904f4
to
008e8e2
Compare
Deployment preview ready! 🚀 You can view this deployment at: https://staging.pax.dev/281 |
008e8e2
to
a0684c6
Compare
a0684c6
to
f1affd7
Compare
Deployment preview ready! 🚀 You can view this deployment at: https://staging.pax.dev/281 |
1 similar comment
Deployment preview ready! 🚀 You can view this deployment at: https://staging.pax.dev/281 |
Deployment preview ready! 🚀 You can view this deployment at: https://staging.pax.dev/281 |
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.
Thanks for fixing tests — LGTM!
@@ -140,7 +144,9 @@ impl PaxChassisWeb { | |||
|
|||
let width = window.inner_width().unwrap().as_f64().unwrap(); | |||
let height = window.inner_height().unwrap().as_f64().unwrap(); | |||
(width, height, os_info) | |||
let start = Instant::now(); | |||
let get_time = Box::new(move || start.elapsed().as_millis()); |
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.
nice solution!
@@ -57,6 +61,11 @@ impl NodeContext { | |||
self.node_transform_and_bounds.as_transform().inverse() * p | |||
} | |||
|
|||
/// Get std::time::Instant::now() | |||
pub fn ellapsed_time_millis(&self) -> u128 { |
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.
note spelling typo, should be elapsed
, but we can clean this up later
added a NativeImage primitive (img tags support gif by default).
Did look at pausing the gif in suspended mode but didn't find a straightforward solution - to come back to later (if important).