Interface IMaterial<E, ET>

interface IMaterial<E, ET> {
    __matExtUiConfigs?: Record<string, undefined | UiObjectConfig<any, string, any>>;
    alphaMap?: null | ITexture;
    aoMap?: null | ITexture;
    aoMapIntensity?: number;
    appliedMeshes: Set<IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>>;
    assetType: "material";
    bumpMap?: null | ITexture;
    color?: Color;
    constructor: {
        MaterialProperties?: Record<string, any>;
        MaterialTemplate?: IMaterialTemplate<IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>, any>;
        TYPE: string;
        TypeSlug: string;
    };
    displacementMap?: null | ITexture;
    envMap?: null | ITexture;
    envMapIntensity?: number;
    extraUniformsToUpload: Record<string, IUniform<any>>;
    flatShading?: boolean;
    generator?: IMaterialGenerator<IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>>;
    isGBufferMaterial?: boolean;
    isPhysicalMaterial?: boolean;
    isRawShaderMaterial?: boolean;
    isUnlitMaterial?: boolean;
    lastShader?: Shader;
    lightMap?: null | ITexture;
    lightMapIntensity?: number;
    linewidth?: number;
    map?: null | ITexture;
    materialExtensions: MaterialExtension[];
    metalness?: number;
    metalnessMap?: null | ITexture;
    needsUpdate: boolean;
    normalMap?: null | ITexture;
    registerMaterialExtensions: ((customMaterialExtensions) => void);
    roughness?: number;
    roughnessMap?: null | ITexture;
    transmission?: number;
    transmissionMap?: null | ITexture;
    unregisterMaterialExtensions: ((customMaterialExtensions) => void);
    userData: IMaterialUserData;
    wireframe?: boolean;
    dispose(force?): void;
    fromJSON(json, meta?, _internal?): null | IMaterial<E, ET>;
    setDirty(options?): void;
    setValues(parameters, allowInvalidType?, clearCurrentUserData?): this;
    toJSON(meta?, _internal?): any;
}

Type Parameters

Hierarchy

Implemented by

Properties

__matExtUiConfigs?: Record<string, undefined | UiObjectConfig<any, string, any>>
alphaMap?: null | ITexture
aoMap?: null | ITexture
aoMapIntensity?: number

Managed internally, do not change manually

assetType: "material"
bumpMap?: null | ITexture
color?: Color
constructor: {
    MaterialProperties?: Record<string, any>;
    MaterialTemplate?: IMaterialTemplate<IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>, any>;
    TYPE: string;
    TypeSlug: string;
}

Type declaration

displacementMap?: null | ITexture
envMap?: null | ITexture
envMapIntensity?: number
extraUniformsToUpload: Record<string, IUniform<any>>
flatShading?: boolean

Managed internally, do not change manually

isGBufferMaterial?: boolean
isPhysicalMaterial?: boolean
isRawShaderMaterial?: boolean
isUnlitMaterial?: boolean
lastShader?: Shader
lightMap?: null | ITexture
lightMapIntensity?: number
linewidth?: number
map?: null | ITexture
materialExtensions: MaterialExtension[]
metalness?: number
metalnessMap?: null | ITexture
needsUpdate: boolean
normalMap?: null | ITexture
registerMaterialExtensions: ((customMaterialExtensions) => void)

Type declaration

    • (customMaterialExtensions): void
    • Parameters

      Returns void

roughness?: number
roughnessMap?: null | ITexture
transmission?: number
transmissionMap?: null | ITexture
unregisterMaterialExtensions: ((customMaterialExtensions) => void)

Type declaration

    • (customMaterialExtensions): void
    • Parameters

      Returns void

wireframe?: boolean

Methods

  • Disposes the material from the GPU. Set force to false if not sure the material is used by any object in the scene. // todo add check for visible in scene also? or is that overkill

    Parameters

    • Optional force: boolean

      when true, same as three.js dispose. when false, only disposes if disposeOnIdle not false and not used by any object in the scene. default: true

    Returns void

  • Parameters

    • parameters: Material<Event, string> | MaterialParameters & {
          type?: string;
      }
    • Optional allowInvalidType: boolean
    • Optional clearCurrentUserData: boolean

    Returns this

Generated using TypeDoc