ThreePipe
    Preparing search index...

    Class LegacyPhongMaterial<TE>

    Type Parameters

    Hierarchy

    Implements

    Index

    Constructors

    Properties

    appliedMeshes: Set<
        IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >,
    > = ...

    Objects in the scene that are using this material. This is set in the Object3DManager when the objects are added/removed from the scene. Do not modify this set directly.

    assetType: "material" = ...
    constructor: typeof LegacyPhongMaterial

    The initial value of Object.prototype.constructor is the standard built-in Object constructor.

    envMap: null | ITexture<TextureEventMap> = null
    null
    
    extraUniformsToUpload: Record<string, IUniform> = {}
    generator?: IMaterialGenerator

    Managed internally, do not change manually

    isLegacyPhongMaterial: true
    materialExtensions: MaterialExtension[] = []
    registerMaterialExtensions: (
        this: IMaterial,
        customMaterialExtensions: MaterialExtension[],
    ) => void = iMaterialCommons.registerMaterialExtensions
    setDirty: (this: IMaterial, options?: IMaterialSetDirtyOptions) => void = iMaterialCommons.setDirty
    uiConfig: UiObjectConfig = ...
    unregisterMaterialExtensions: (
        this: IMaterial,
        customMaterialExtensions: MaterialExtension[],
    ) => void = iMaterialCommons.unregisterMaterialExtensions

    An object that can be used to store custom data about the Material. It should not hold references to functions as these will not be cloned.

    {}
    
    InterpolateProperties: string[] = ...
    MapProperties: string[] = ...
    MaterialProperties: {
        allowOverride: boolean;
        alphaHash: boolean;
        alphaMap: null;
        alphaTest: number;
        alphaToCoverage: boolean;
        aoMap: null;
        aoMapIntensity: number;
        blendAlpha: number;
        blendColor: string;
        blendDst: 205;
        blendDstAlpha: null;
        blendEquation: 100;
        blendEquationAlpha: null;
        blending: 1;
        blendSrc: 204;
        blendSrcAlpha: null;
        bumpMap: null;
        bumpScale: number;
        clipIntersection: boolean;
        clippingPlanes: null;
        clipShadows: boolean;
        color: Color;
        colorWrite: boolean;
        combine: 0;
        depthFunc: 3;
        depthTest: boolean;
        depthWrite: boolean;
        displacementBias: number;
        displacementMap: null;
        displacementScale: number;
        dithering: boolean;
        emissive: Color;
        emissiveIntensity: number;
        emissiveMap: null;
        envMap: null;
        envMapIntensity: number;
        flatShading: boolean;
        fog: boolean;
        forceSinglePass: boolean;
        lightMap: null;
        lightMapIntensity: number;
        map: null;
        name: string;
        normalMap: null;
        normalMapType: string;
        normalScale: Vector2;
        opacity: number;
        polygonOffset: boolean;
        polygonOffsetFactor: number;
        polygonOffsetUnits: number;
        precision: null;
        premultipliedAlpha: boolean;
        reflectivity: number;
        refractionRatio: number;
        shadowSide: null;
        shininess: number;
        side: 0;
        skinning: boolean;
        specular: Color;
        specularMap: null;
        stencilFail: 7680;
        stencilFunc: 519;
        stencilFuncMask: number;
        stencilRef: number;
        stencilWrite: boolean;
        stencilWriteMask: number;
        stencilZFail: 7680;
        stencilZPass: 7680;
        toneMapped: boolean;
        transparent: boolean;
        userData: {};
        vertexColors: boolean;
        visible: boolean;
        wireframe: boolean;
        wireframeLinecap: string;
        wireframeLinejoin: string;
        wireframeLinewidth: number;
    } = ...
    MaterialTemplate: IMaterialTemplate<
        LegacyPhongMaterial<IMaterialEventMap>,
        Partial<
            {
                allowOverride: boolean;
                alphaHash: boolean;
                alphaMap: null;
                alphaTest: number;
                alphaToCoverage: boolean;
                aoMap: null;
                aoMapIntensity: number;
                blendAlpha: number;
                blendColor: string;
                blendDst: 205;
                blendDstAlpha: null;
                blendEquation: 100;
                blendEquationAlpha: null;
                blending: 1;
                blendSrc: 204;
                blendSrcAlpha: null;
                bumpMap: null;
                bumpScale: number;
                clipIntersection: boolean;
                clippingPlanes: null;
                clipShadows: boolean;
                color: Color;
                colorWrite: boolean;
                combine: 0;
                depthFunc: 3;
                depthTest: boolean;
                depthWrite: boolean;
                displacementBias: number;
                displacementMap: null;
                displacementScale: number;
                dithering: boolean;
                emissive: Color;
                emissiveIntensity: number;
                emissiveMap: null;
                envMap: null;
                envMapIntensity: number;
                flatShading: boolean;
                fog: boolean;
                forceSinglePass: boolean;
                lightMap: null;
                lightMapIntensity: number;
                map: null;
                name: string;
                normalMap: null;
                normalMapType: string;
                normalScale: Vector2;
                opacity: number;
                polygonOffset: boolean;
                polygonOffsetFactor: number;
                polygonOffsetUnits: number;
                precision: null;
                premultipliedAlpha: boolean;
                reflectivity: number;
                refractionRatio: number;
                shadowSide: null;
                shininess: number;
                side: 0;
                skinning: boolean;
                specular: Color;
                specularMap: null;
                stencilFail: 7680;
                stencilFunc: 519;
                stencilFuncMask: number;
                stencilRef: number;
                stencilWrite: boolean;
                stencilWriteMask: number;
                stencilZFail: 7680;
                stencilZPass: 7680;
                toneMapped: boolean;
                transparent: boolean;
                userData: {};
                vertexColors: boolean;
                visible: boolean;
                wireframe: boolean;
                wireframeLinecap: string;
                wireframeLinejoin: string;
                wireframeLinewidth: number;
            },
        >,
    > = ...
    TYPE: "LegacyPhongMaterial" = 'LegacyPhongMaterial'
    TypeSlug: "phongmat" = 'phongmat'

    Methods

    • Copy the parameters from the passed material into this material.

      Parameters

      • source: any

      Returns this

    • In case onBeforeCompile is used, this callback can be used to identify values of settings used in onBeforeCompile, so three.js can reuse a cached shader or recompile the shader as needed.

      Returns string

    • Sets the values of this material based on the values of the passed material or an object with material properties The input is expected to be a valid material or a deserialized material parameters object(including the deserialized userdata)

      Parameters

      • parameters: Material<MaterialEventMap> | MeshPhongMaterialParameters & { type?: string }

        material or material parameters object

      • allowInvalidType: boolean = true

        if true, the type of the oldMaterial is not checked. Objects without type are always allowed.

      • clearCurrentUserData: undefined | boolean = undefined

        if undefined, then depends on material.isMaterial. if true, the current userdata is cleared before setting the new values, because it can have data which wont be overwritten if not present in the new material.

      • Optionaltime: AnimateTime

        optional data to animate(lerp) from current value to the target value.

      Returns this

    • Serializes this material to JSON.

      Parameters

      • Optionalmeta: SerializationMetaType

        metadata for serialization

      • _internal: boolean = false

        Calls only super.toJSON, does internal three.js serialization and @serialize tags. Set it to true only if you know what you are doing. This is used in Serialization->serializer->material

      Returns any