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

KTX2Loader: Add parse() method for direct buffer processing. #28936

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

laddish
Copy link
Contributor

@laddish laddish commented Jul 22, 2024

Description

This pull request adds a parse method to the KTX2Loader class, allowing for direct buffer processing. Previously, the load method was responsible for loading and processing the buffer. By introducing the parse method, we enhance modularity and provide a way to directly handle buffer parsing, which is useful for cases where the buffer is already available and doesn't need to be loaded from a URL.

Changes made:

Added a parse method to handle buffer processing and texture creation.
Refactored the load method to call the parse method with the buffer.
This change resolves the need to directly parse buffers in scenarios where using the KTX2Loader is necessary, improving flexibility and usability in various applications.

@Mugen87 Mugen87 added this to the r168 milestone Jul 25, 2024
@Mugen87 Mugen87 merged commit 3602b98 into mrdoob:dev Jul 25, 2024
11 checks passed
@Mugen87 Mugen87 changed the title Added parse method to KTX2Loader for direct buffer processing KTX2Loader: Add parse() method for direct buffer processing. Jul 25, 2024
@donmccurdy
Copy link
Collaborator

Thank you @laddish!

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.

3 participants