diff --git a/packages/cubemap-adapter/src/CubemapAdapter.ts b/packages/cubemap-adapter/src/CubemapAdapter.ts index f0b71671f..6260e19c9 100644 --- a/packages/cubemap-adapter/src/CubemapAdapter.ts +++ b/packages/cubemap-adapter/src/CubemapAdapter.ts @@ -13,7 +13,7 @@ import { import { cleanCubemap, cleanCubemapArray, isCubemap } from './utils'; type CubemapMesh = Mesh; -type CubemapTexture = TextureData; +type CubemapTexture = TextureData; const getConfig = utils.getConfigParser({ flipTopBottom: false, @@ -85,7 +85,7 @@ export class CubemapAdapter extends AbstractAdapter throw new PSVError('Invalid cubemap panorama, are you using the right adapter?'); } - return { panorama: cleanPanorama, texture }; + return { panorama, texture }; } private loadTexturesSeparate(paths: string[]): Promise { @@ -254,7 +254,7 @@ void main() { setTexture(mesh: CubemapMesh, textureData: CubemapTexture) { const { texture, panorama } = textureData; - const isNet = panorama.type === 'net'; + const isNet = (panorama as CubemapNet).type === 'net'; const flipTopBottom = isNet ? !this.config.flipTopBottom : this.config.flipTopBottom; for (let i = 0; i < 6; i++) {