Expose TextureHandler#parsers as public API with addParser/removePars…#7878
Open
killerdevildog wants to merge 1 commit intoplaycanvas:mainfrom
Open
Expose TextureHandler#parsers as public API with addParser/removePars…#7878killerdevildog wants to merge 1 commit intoplaycanvas:mainfrom
killerdevildog wants to merge 1 commit intoplaycanvas:mainfrom
Conversation
…er methods - Add comprehensive JSDoc documentation for parsers property - Implement addParser() method following ModelHandler pattern for extensibility - Implement removeParser() method to enable tree-shaking of unused parsers - Add private _customParsers array to store custom parsers with decider functions - Update _getParser() method to check custom parsers before default parsers - Update maxRetries setter to handle both default and custom parsers - Maintain 100% backward compatibility with existing functionality - Enable configuration, treeshaking, and better developer experience This resolves the architectural inconsistency between TextureHandler and ModelHandler by applying the proven addParser pattern to texture handling. Custom parsers are checked first, allowing developers to override default behavior or add support for new formats like 16-bit PNGs or headerless textures. Fixes playcanvas#7564
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…er methods
This resolves the architectural inconsistency between TextureHandler and ModelHandler by applying the proven addParser pattern to texture handling. Custom parsers are checked first, allowing developers to override default behavior or add support for new formats like 16-bit PNGs or headerless textures.
Fixes #7564
Fixes #
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.
the google docs link says the form has been deleted.