entangled-worlds-orbiters-shared 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -175,19 +175,19 @@ export async function loadCubeMap({ faceKeys, skycubeName, preferKTX2 = true, fo
|
|
|
175
175
|
try {
|
|
176
176
|
return await loadFacesKTX2(resolvedUrls, renderer);
|
|
177
177
|
} catch (e) {
|
|
178
|
-
console.warn('[CubeMapLoader] KTX2 load failed, trying
|
|
179
|
-
// Fall through to
|
|
178
|
+
console.warn('[CubeMapLoader] KTX2 load failed, trying PNG fallback:', e);
|
|
179
|
+
// Fall through to PNG attempt
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
// Try
|
|
184
|
-
const
|
|
183
|
+
// Try PNG fallback (convert URLs if needed)
|
|
184
|
+
const pngUrls = {};
|
|
185
185
|
FACE_ORDER.forEach(face => {
|
|
186
|
-
|
|
186
|
+
pngUrls[face] = resolvedUrls[face].replace(/\.ktx2$/, '.png');
|
|
187
187
|
});
|
|
188
188
|
|
|
189
189
|
try {
|
|
190
|
-
return await loadFacesJPG(
|
|
190
|
+
return await loadFacesJPG(pngUrls);
|
|
191
191
|
} catch (e) {
|
|
192
192
|
console.error('[CubeMapLoader] All loading attempts failed:', e);
|
|
193
193
|
throw new Error('Failed to load cube map with any format');
|