MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / getCachedFrustumBitmap

Function getCachedFrustumBitmap

src/hooks/frustumTextureCache.ts:42–52  ·  view source on GitHub ↗
(
  bitmapCache: FrustumBitmapCache,
  imageName: string,
  now = Date.now
)

Source from the content-addressed store, hash-verified

40}
41
42export function getCachedFrustumBitmap(
43 bitmapCache: FrustumBitmapCache,
44 imageName: string,
45 now = Date.now
46): ImageBitmap | null {
47 const cached = bitmapCache.get(imageName);
48 if (!cached) return null;
49
50 cached.lastUsed = now();
51 return cached.bitmap;
52}
53
54export async function getOrLoadFrustumBitmap(
55 url: string,

Callers 7

getCachedFrustumTextureFunction · 0.90
getOrLoadBitmapFunction · 0.90
useFrustumTextureFunction · 0.90
getOrLoadFrustumBitmapFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected