Skip to content
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

Merged
merged 4 commits into from
Oct 1, 2024
Merged

Add a NativeImage component #281

merged 4 commits into from
Oct 1, 2024

Conversation

samuelselleck
Copy link
Contributor

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).

Copy link

Deployment preview ready! 🚀

You can view this deployment at: https://staging.pax.dev/281

Copy link

Deployment preview ready! 🚀

You can view this deployment at: https://staging.pax.dev/281

Copy link

github-actions bot commented Oct 1, 2024

Deployment preview ready! 🚀

You can view this deployment at: https://staging.pax.dev/281

1 similar comment
Copy link

github-actions bot commented Oct 1, 2024

Deployment preview ready! 🚀

You can view this deployment at: https://staging.pax.dev/281

Copy link

github-actions bot commented Oct 1, 2024

Deployment preview ready! 🚀

You can view this deployment at: https://staging.pax.dev/281

Copy link
Member

@zackbrown zackbrown left a 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());
Copy link
Member

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 {
Copy link
Member

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

@zackbrown zackbrown merged commit f4583b7 into dev Oct 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants