registerSwatchSourcesFromModule
@zylem/game-lib / catalog / registerSwatchSourcesFromModule
Function: registerSwatchSourcesFromModule()
registerSwatchSourcesFromModule(
kind,module,filter?): () =>void
Defined in: packages/game-lib/src/lib/entities/swatch-registry.ts:146
Register every plausible source found on a module namespace object.
kind: 'behavior': every export that is a behavior descriptor.kind: 'shader': every function export; withfiltera host can narrow this to, say, names starting withcreate.
Export names become source ids, which is what makes the live path agree with generated code that imports the same names.
Parameters
kind
module
Record<string, unknown>
filter?
(exportName, value) => boolean
Returns
An unregister function for everything this call registered.
() => void