Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strongly type Texture.mipmaps #1025

Merged
merged 6 commits into from
Jun 18, 2024
Merged

Strongly type Texture.mipmaps #1025

merged 6 commits into from
Jun 18, 2024

Conversation

Methuselah96
Copy link
Contributor

Typing Texture.mipmaps as any[] is too loose.

@Methuselah96 Methuselah96 merged commit 6b019f2 into master Jun 18, 2024
4 checks passed
@Methuselah96 Methuselah96 deleted the texture-mipmaps branch June 18, 2024 22:43
@@ -72,7 +72,7 @@ export class CompressedTexture extends Texture {
* The mipmaps array should contain objects with data, width and height. The mipmaps should be of the correct
* format and type.
*/
mipmaps: CompressedTextureMipmap[];
mipmaps: CompressedTextureMipmap[] | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CompressedCubeTexture sets it to undefined here. 😢

Copy link
Contributor

@HunterLarco HunterLarco Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is deeply unfortunate 😢 but nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants