fix: harden item and baked scene rendering (#522)

This commit is contained in:
Wassim SAMAD
2026-07-20 12:15:08 -04:00
committed by GitHub
parent 1d43a39f9a
commit 10c9c6ad27
9 changed files with 125 additions and 61 deletions
+9
View File
@@ -162,6 +162,15 @@ export function ensureKtx2Support(renderer: unknown): boolean {
}
}
export function configureKtx2Support<T>(
loader: { setKTX2Loader: (ktx2: T) => unknown },
renderer: unknown,
): boolean {
if (!ensureKtx2Support(renderer)) return false
loader.setKTX2Loader(ktx2Loader as unknown as T)
return true
}
export function isKtx2Url(url: string): boolean {
return url.toLowerCase().endsWith('.ktx2')
}