Skip to content

Consider single-file extension implementations #1781

@donmccurdy

Description

@donmccurdy

Currently most extension implementations consist of 2+ files. For example:

Often these files have very similar names (clearcoat.ts, materials-clearcoat.ts), and a mostly-pointless index.js barrel file, and the total amount of code per extension is not much. The filenames don't currently include EXT_ or KHR_ prefixes, which makes disambiguating KHR_meshopt_compression and EXT_meshopt_compression a bit weird.

None of which is a huge deal, but in retrospect I think I'd have preferred to just write each extension as a single file, like:

  • khr-materials-variants.ts
  • khr-materials-anisotropy.ts

This would also match how unit tests are already structured.

The more complex extensions (e.g. Draco and Meshopt) could still have utility files as needed. Though, having those two extensions in single-file implementations might also 'motivate' me to simplify them, which would be a good thing on its own. :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions