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

add forcedExtension to ITextureCreationOptions #15872

Conversation

noname0310
Copy link
Contributor

The forcedExtension option seems to be missing from ITextureCreationOptions.

Currently I am using the ITextureCreationOptions to create the texture:

const tex = new Texture(
    "url...",
    scene,
    {
        noMipmap: true,
        invertY: false,
        samplingMode: Texture.NEAREST_SAMPLINGMODE,
        onLoad: (): void => {
            // do something
        }
    }
);

But in order to use forcedExtension here, the code should look like this:

const tex = new Texture(
    "url...",
    scene,
    {
        noMipmap: true,
        invertY: false,
        samplingMode: Texture.NEAREST_SAMPLINGMODE,
        onLoad: (): void => {
            // do something
        }
    },
    undefined, // invertY
    undefined, // samplingMode
    undefined, // onLoad
    undefined, // onError
    undefined, // buffer
    undefined, // deleteBuffer
    undefined, // format
    undefined, // mimeType
    undefined, // loaderOptions
    undefined, // creationFlags
    ".bmp" // forcedExtension
);

I guess this is not the intended design. That's why this change is proposed.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 22, 2024

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 22, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 22, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 22, 2024

@sebavan sebavan enabled auto-merge November 22, 2024 16:04
@sebavan sebavan merged commit 89189db into BabylonJS:master Nov 22, 2024
12 checks passed
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.

4 participants