Editor.Assets.TextureParameter
ClassAssociates a texture with a sampler for use in a material pass.
Index
Example
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const assetManager = model.project.assetManager;
const textures = assetManager.assets.filter(
(a) => a.isOfType('Texture')
);
if (textures.length > 0) {
const firstTexture = textures[0];
// Create a TextureParameter referencing the texture by id
const texParam = new Editor.Assets.TextureParameter(firstTexture.id);
// Access the associated Sampler to inspect filtering and wrapping settings
const sampler = texParam.sampler;
console.log(`TextureParameter for "${firstTexture.name}": filteringMode=${sampler.filteringMode}, mipmapsEnabled=${sampler.mipmapsEnabled}, wrapModeU=${sampler.wrapModeU}`);
}
Constructors
Constructor
new TextureParameter(
id):TextureParameter
Create a texture parameter from a UUID.
Parameters
| Parameter | Type |
|---|---|
id | Uuid |
Returns
TextureParameter
Properties
id
id:
Uuid
UUID of the texture this parameter references.
sampler
sampler:
Sampler
Sampler settings for this texture parameter.