TexturesModule
The TexturesModule class enables images, animation sequences, videos, colors, and other visual artifacts to be combined to form materials.
Example
//==============================================================================
// The following example demonstrates how to access a texture in the Assets and
// assign it to a material.
//
// Project setup:
// - Insert a plane
// - Create a material
// - Import an image to use as a texture (renaming it texture0)
// - Assign the material to the plane
//==============================================================================
// Load in the required modules
const Materials = require('Materials');
const Textures = require('Textures');
// Locate the material and texture in the Assets
const material = Materials.get('defaultMaterial0');
const texture = Textures.get('texture0');
// Assign the texture to the material
material.diffuse = texture;Properties
This module exposes no properties.
Methods
| Method | Description |
|---|---|
|
Returns a promise that is resolved with the texture of a requested name or null if none was found. See Also: |
|
Returns a promise that is resolved with the all of the textures matching the name pattern or empty array if none was found. Pattern format:
Examples:
See Also: |
|
Returns a texture object, derived from
See Also: |
|
Returns a promise that is resolved with all of the textures. See Also: |
Classes
| Class | Description |
|---|---|
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The | |
The |