engine icon indicating copy to clipboard operation
engine copied to clipboard

Expose TextureHandler#parsers as public API with addParser/removePars…

Open killerdevildog opened this issue 6 months ago • 0 comments

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

killerdevildog avatar Aug 01 '25 03:08 killerdevildog