applyHierarchicalPresets
applyHierarchicalPresets(
texture,instanceOptions?,loaderOptions?):void
Defined in: packages/three-flatland/src/loaders/TextureLoader.ts:180
Apply hierarchical texture presets to a texture.
Useful when you need to override presets after loading, or when using Three’s TextureLoader directly.
Hierarchy (highest to lowest priority):
- instanceOptions (per-call override)
- loaderOptions (loader-level default)
- TextureConfig.options (texture-specific default)
- FlatlandConfig.options (library-wide default)
- ‘pixel-art’ (system default)
Parameters
Section titled “Parameters”texture
Section titled “texture”instanceOptions?
Section titled “instanceOptions?”TexturePreset | TextureOptions
loaderOptions?
Section titled “loaderOptions?”TexturePreset | TextureOptions
Returns
Section titled “Returns”void
Example
Section titled “Example”// Override presets on an already-loaded textureconst texture = await TextureLoader.load('/sprite.png')applyHierarchicalPresets(texture, 'smooth') // Override to smooth filtering