Skip to content

Commit

Permalink
Add types for CompressedCubeTexture (#700)
Browse files Browse the repository at this point in the history
* Add types for CompressedCubeTexture

* Add extensions

* Optional

* And export it

* Fix lint
  • Loading branch information
Methuselah96 authored Dec 5, 2023
1 parent a220c87 commit 05f6bd4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/three/src/Three.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export * from './scenes/Scene.js';
*/
export * from './textures/VideoTexture.js';
export * from './textures/CompressedArrayTexture.js';
export * from './textures/CompressedCubeTexture.js';
export * from './textures/DataTexture.js';
export * from './textures/CompressedTexture.js';
export * from './textures/CubeTexture.js';
Expand Down
13 changes: 13 additions & 0 deletions types/three/src/textures/CompressedCubeTexture.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { CompressedTexture } from './CompressedTexture.js';
import { CompressedPixelFormat, TextureDataType } from '../constants.js';

export class CompressedCubeTexture extends CompressedTexture {
readonly isCompressedCubeTexture: true;
readonly isCubeTexture: true;

constructor(
images: Array<{ width: number; height: number }>,
format?: CompressedPixelFormat,
type?: TextureDataType,
);
}

0 comments on commit 05f6bd4

Please sign in to comment.