Skip to content

Conversation

killerdevildog
Copy link

…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
  • Maintained 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 #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.

…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
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.

Should texture parsers be public API?

1 participant