mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-24 02:16:32 +11:00
[examples] Use instant crate's time::Instant
crates.io/crates/instant provides a std::time::Instant implementation that works on both WASM and non-wasm builds.
This commit is contained in:
parent
8a35c51289
commit
5543ad01fe
4 changed files with 4 additions and 2 deletions
|
@ -16,6 +16,7 @@ vello_svg = { path = "../../integrations/vello_svg" }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
clap = { workspace = true, features = ["derive"] }
|
clap = { workspace = true, features = ["derive"] }
|
||||||
image = "0.24.5"
|
image = "0.24.5"
|
||||||
|
instant = "0.1.12"
|
||||||
|
|
||||||
# Used for the `download` command
|
# Used for the `download` command
|
||||||
byte-unit = "4.0"
|
byte-unit = "4.0"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
use std::{
|
use std::{
|
||||||
fs::read_dir,
|
fs::read_dir,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
time::Instant,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{Ok, Result};
|
use anyhow::{Ok, Result};
|
||||||
|
use instant::Instant;
|
||||||
use vello::{kurbo::Vec2, SceneBuilder, SceneFragment};
|
use vello::{kurbo::Vec2, SceneBuilder, SceneFragment};
|
||||||
use vello_svg::usvg;
|
use vello_svg::usvg;
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ vello = { path = "../../", features = ["buffer_labels"] }
|
||||||
scenes = { path = "../scenes" }
|
scenes = { path = "../scenes" }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
clap = { workspace = true, features = ["derive"] }
|
clap = { workspace = true, features = ["derive"] }
|
||||||
|
instant = "0.1.12"
|
||||||
pollster = { workspace = true }
|
pollster = { workspace = true }
|
||||||
|
|
||||||
wgpu = { workspace = true }
|
wgpu = { workspace = true }
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
//
|
//
|
||||||
// Also licensed under MIT license, at your choice.
|
// Also licensed under MIT license, at your choice.
|
||||||
|
|
||||||
|
use instant::Instant;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::time::Instant;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use clap::{CommandFactory, Parser};
|
use clap::{CommandFactory, Parser};
|
||||||
|
|
Loading…
Add table
Reference in a new issue