CLEAR

MaterialsModule


The Materials module enables working with textures and making adjustments to qualities like opacity and reflectivity.

Example

const Materials = require('Materials');
const Scene = require('Scene');

const redMaterial = Materials.get('redMaterial');
const plane = Scene.root.find('plane');

plane.material = redMaterial;

Properties

This class exposes no properties.

Methods

MethodDescription

get

get(materialName: string): MaterialBase

Returns a MaterialBase class that represents the material specified by the materialName parameter. The materials are defined in the AR Studio project.

An exception is thrown when the identifier isn't found in the project.

See Also: MaterialBase.name.

Classes

ClassDescription

BlendShapeImageWarpMaterial

The BlendShapeImageWarpMaterial class.

BlendShapeToWarpMapMaterial

The BlendShapeToWarpMapMaterial class.

BlendedMaterial

The BlendedMaterial class encapsulates materials blended from multiple textures.

ColorPaintMaterial

The ColorPaintMaterial class encapsulates a face-paint material.

CustomMaterial

The CustomMaterial class describes a custom material shader.

DefaultMaterial

The DefaultMaterial class encapsulates an image-based material.

MaterialBase

The MaterialBase class exposes properties common to all material types.

MetallicRoughnessPbrMaterial

The MetallicRoughnessPbrMaterial class encapsulates physically based materials.

RetouchingMaterial

The RetouchingMaterial class encapsulates parameters which define the extend of certain beautification techniques.

TextureTransform

The TextureTransform class encapsulates scaling and translation transforms about a textures UV axis.