Fix running tests locally; fix migrations for relocated nodes (#2805)

* fix `BoundingBox for Raster<GPU>` when `wgpu` feature is disabled

* fix `tinyvec` crate not being `std` by default

* fixup migration for `CoordinateValueNode`

* fixup migration for raster nodes
This commit is contained in:
Firestar99
2025-07-04 11:56:22 +02:00
committed by GitHub
parent a182a7347e
commit 8a0241f0fa
3 changed files with 30 additions and 4 deletions

View File

@@ -97,11 +97,20 @@ impl Raster<GPU> {
let RasterStorage::Gpu(gpu) = &self.data else { unreachable!() };
gpu.clone()
}
}
impl Raster<GPU> {
#[cfg(feature = "wgpu")]
pub fn is_empty(&self) -> bool {
let data = self.data();
data.width() == 0 || data.height() == 0
}
#[cfg(not(feature = "wgpu"))]
pub fn is_empty(&self) -> bool {
true
}
}
#[cfg(feature = "wgpu")]
impl Deref for Raster<GPU> {
type Target = wgpu::Texture;
@@ -110,6 +119,7 @@ impl Deref for Raster<GPU> {
self.data()
}
}
pub type RasterDataTable<Storage> = Instances<Raster<Storage>>;
// TODO: Make this not dupliated