Class LineBasicMaterial2

And extension of three.js LineBasicMaterial that can be assigned to lines, and support threepipe features, uiconfig, and serialization.

Hierarchy (View Summary)

Constructors

Properties

appliedMeshes: Set<IObject3D> = ...

Managed internally, do not change manually

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

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

extraUniformsToUpload: Record<string, IUniform> = {}
generator?: IMaterialGenerator

Managed internally, do not change manually

isUnlitLineMaterial: true
materialExtensions: MaterialExtension[] = []
onAfterRender: (
    renderer: WebGLRenderer,
    scene: Scene,
    camera: Camera,
    geometry: BufferGeometry,
    object: Object3D,
) => void = ...
onBeforeRender: (
    renderer: WebGLRenderer,
    scene: Scene,
    camera: Camera,
    geometry: BufferGeometry,
    object: Object3D,
) => void = ...
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.

{}
MaterialProperties: {
    alphaTest: number;
    alphaToCoverage: boolean;
    blendDst: 205;
    blendDstAlpha: null;
    blendEquation: 100;
    blendEquationAlpha: null;
    blending: 1;
    blendSrc: 204;
    blendSrcAlpha: null;
    clipIntersection: boolean;
    clippingPlanes: null;
    clipShadows: boolean;
    color: Color;
    colorWrite: boolean;
    depthFunc: 3;
    depthTest: boolean;
    depthWrite: boolean;
    dithering: boolean;
    fog: boolean;
    forceSinglePass: boolean;
    linecap: string;
    linejoin: string;
    linewidth: number;
    map: null;
    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;
} = ...
MaterialTemplate: IMaterialTemplate<
    UnlitLineMaterial,
    Partial<
        {
            alphaTest: number;
            alphaToCoverage: boolean;
            blendDst: 205;
            blendDstAlpha: null;
            blendEquation: 100;
            blendEquationAlpha: null;
            blending: 1;
            blendSrc: 204;
            blendSrcAlpha: null;
            clipIntersection: boolean;
            clippingPlanes: null;
            clipShadows: boolean;
            color: Color;
            colorWrite: boolean;
            depthFunc: 3;
            depthTest: boolean;
            depthWrite: boolean;
            dithering: boolean;
            fog: boolean;
            forceSinglePass: boolean;
            linecap: string;
            linejoin: string;
            linewidth: number;
            map: null;
            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;
        },
    >,
> = ...
TYPE: "UnlitLineMaterial" = 'UnlitLineMaterial'
TypeSlug: "blmat" = 'blmat'

Methods

  • 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 | LineBasicMaterialParameters & { 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.

    Returns this