refactor: 迁移 shader.wgsl 至 static/wgsl/,新增 model 模块

This commit is contained in:
lenn
2026-06-24 17:32:14 +08:00
parent 2497cb93ff
commit ec46e53c75
9 changed files with 296 additions and 136 deletions

View File

@@ -292,9 +292,11 @@ impl Recorder {
let mut pressures = Vec::with_capacity(n_channels);
for f in &fields[..n_channels] {
pressures.push(f.parse::<u32>().with_context(|| {
format!("line {}: bad channel value '{}'", lineno + 2, f)
})?);
pressures.push(
f.parse::<u32>().with_context(|| {
format!("line {}: bad channel value '{}'", lineno + 2, f)
})?,
);
}
let raw_ts = fields[n_channels]
.parse::<u64>()
@@ -320,7 +322,8 @@ impl Recorder {
// Pretend the recording happened `last.timestamp_ms` ago
// so that elapsed_ms() would return that value.
// We store a "fake" start by noting the offset.
r.start = Some(Instant::now() - std::time::Duration::from_millis(last.timestamp_ms));
r.start =
Some(Instant::now() - std::time::Duration::from_millis(last.timestamp_ms));
r.paused_duration_ms = 0;
}
}