Variable iMaterialCommonsConst

iMaterialCommons: {
    clone: ((superClone) => (() => this));
    customProgramCacheKey: ((this) => string);
    customProgramCacheKeyOverride: ((superCustomPropertyCacheKey) => (() => string));
    dispatchEvent: ((superDispatchEvent) => ((event) => void));
    dispose: ((superDispose) => ((force?) => void));
    onAfterRender: ((renderer, scene, camera, geometry, object) => void);
    onAfterRenderOverride: ((superOnAfterRender) => ((renderer, scene, camera, geometry, object) => void));
    onBeforeCompile: ((this, shader, renderer) => void);
    onBeforeCompileOverride: ((superOnBeforeCompile) => ((shader, renderer) => void));
    onBeforeRender: ((renderer, scene, camera, geometry, object) => void);
    onBeforeRenderOverride: ((superOnBeforeRender) => ((renderer, scene, camera, geometry, object) => void));
    registerMaterialExtensions: ((this, customMaterialExtensions) => void);
    setDirty: ((this, options?) => void);
    setValues: ((superSetValues) => ((parameters, allowInvalidType?, clearCurrentUserData?) => this));
    threeMaterialPropList: {
        alphaTest: number;
        alphaToCoverage: boolean;
        blendDst: 205;
        blendDstAlpha: null;
        blendEquation: 100;
        blendEquationAlpha: null;
        blendSrc: 204;
        blendSrcAlpha: null;
        blending: 1;
        clipIntersection: boolean;
        clipShadows: boolean;
        clippingPlanes: null;
        colorWrite: boolean;
        depthFunc: 3;
        depthTest: boolean;
        depthWrite: boolean;
        dithering: boolean;
        forceSinglePass: boolean;
        name: string;
        opacity: number;
        polygonOffset: boolean;
        polygonOffsetFactor: number;
        polygonOffsetUnits: number;
        precision: null;
        premultipliedAlpha: boolean;
        shadowSide: null;
        side: 0;
        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;
    };
    unregisterMaterialExtensions: ((this, customMaterialExtensions) => void);
    upgradeMaterial: ((this) => IMaterial);
} = ...

Type declaration

  • Readonly clone: ((superClone) => (() => this))
      • (superClone): (() => this)
      • Parameters

        • superClone: (() => this)
            • (): this
            • Return a new material with the same parameters as this material.

              Returns this

        Returns (() => this)

          • (): this
          • Return a new material with the same parameters as this material.

            Returns this

  • Readonly customProgramCacheKey: ((this) => string)
  • Readonly customProgramCacheKeyOverride: ((superCustomPropertyCacheKey) => (() => string))
      • (superCustomPropertyCacheKey): (() => string)
      • Parameters

        • superCustomPropertyCacheKey: (() => string)
            • (): string
            • 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

        Returns (() => string)

          • (): string
          • 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

  • Readonly dispatchEvent: ((superDispatchEvent) => ((event) => void))
      • (superDispatchEvent): ((event) => void)
      • Parameters

        • superDispatchEvent: ((event) => void)
            • (event): void
            • Fire an event type.

              Parameters

              • event: Event & {
                    [a: string]: any;
                }

                The event that gets fired.

              Returns void

        Returns ((event) => void)

  • Readonly dispose: ((superDispose) => ((force?) => void))
      • (superDispose): ((force?) => void)
      • Parameters

        • superDispose: (() => void)
            • (): void
            • This disposes the material. Textures of a material don't get disposed. These needs to be disposed by Texture.

              Returns void

        Returns ((force?) => void)

          • (force?): void
          • 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

  • Readonly onAfterRender: ((renderer, scene, camera, geometry, object) => void)
  • Readonly onAfterRenderOverride: ((superOnAfterRender) => ((renderer, scene, camera, geometry, object) => void))
  • Readonly onBeforeCompile: ((this, shader, renderer) => void)
  • Readonly onBeforeCompileOverride: ((superOnBeforeCompile) => ((shader, renderer) => void))
      • (superOnBeforeCompile): ((shader, renderer) => void)
      • Parameters

        • superOnBeforeCompile: ((shader, renderer) => void)
            • (shader, renderer): void
            • An optional callback that is executed immediately before the shader program is compiled. This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.

              Parameters

              • shader: Shader

                Source code of the shader

              • renderer: WebGLRenderer

                WebGLRenderer Context that is initializing the material

              Returns void

        Returns ((shader, renderer) => void)

          • (shader, renderer): void
          • An optional callback that is executed immediately before the shader program is compiled. This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.

            Parameters

            • shader: Shader

              Source code of the shader

            • renderer: WebGLRenderer

              WebGLRenderer Context that is initializing the material

            Returns void

  • Readonly onBeforeRender: ((renderer, scene, camera, geometry, object) => void)
  • Readonly onBeforeRenderOverride: ((superOnBeforeRender) => ((renderer, scene, camera, geometry, object) => void))
  • Readonly registerMaterialExtensions: ((this, customMaterialExtensions) => void)
  • Readonly setDirty: ((this, options?) => void)
  • Readonly setValues: ((superSetValues) => ((parameters, allowInvalidType?, clearCurrentUserData?) => this))
      • (superSetValues): ((parameters, allowInvalidType?, clearCurrentUserData?) => this)
      • Parameters

        • superSetValues: ((values) => void)
            • (values): void
            • Sets the properties based on the values.

              Parameters

              Returns void

        Returns ((parameters, allowInvalidType?, clearCurrentUserData?) => this)

          • (parameters, allowInvalidType?, clearCurrentUserData?): this
          • Parameters

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

            Returns this

  • threeMaterialPropList: {
        alphaTest: number;
        alphaToCoverage: boolean;
        blendDst: 205;
        blendDstAlpha: null;
        blendEquation: 100;
        blendEquationAlpha: null;
        blendSrc: 204;
        blendSrcAlpha: null;
        blending: 1;
        clipIntersection: boolean;
        clipShadows: boolean;
        clippingPlanes: null;
        colorWrite: boolean;
        depthFunc: 3;
        depthTest: boolean;
        depthWrite: boolean;
        dithering: boolean;
        forceSinglePass: boolean;
        name: string;
        opacity: number;
        polygonOffset: boolean;
        polygonOffsetFactor: number;
        polygonOffsetUnits: number;
        precision: null;
        premultipliedAlpha: boolean;
        shadowSide: null;
        side: 0;
        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;
    }
    • alphaTest: number
    • alphaToCoverage: boolean
    • blendDst: 205
    • blendDstAlpha: null
    • blendEquation: 100
    • blendEquationAlpha: null
    • blendSrc: 204
    • blendSrcAlpha: null
    • blending: 1
    • clipIntersection: boolean
    • clipShadows: boolean
    • clippingPlanes: null
    • colorWrite: boolean
    • depthFunc: 3
    • depthTest: boolean
    • depthWrite: boolean
    • dithering: boolean
    • forceSinglePass: boolean
    • name: string
    • opacity: number
    • polygonOffset: boolean
    • polygonOffsetFactor: number
    • polygonOffsetUnits: number
    • precision: null
    • premultipliedAlpha: boolean
    • shadowSide: null
    • side: 0
    • 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
    • Readonly unregisterMaterialExtensions: ((this, customMaterialExtensions) => void)
    • Readonly upgradeMaterial: ((this) => IMaterial)

    Generated using TypeDoc