ThreePipe
    Preparing search index...

    Class LineMaterial2<TE>

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

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    alphaToCoverage: boolean
    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" = ...
    autoUpdateResolution: boolean = true
    color: Color
    constructor: typeof LineMaterial2

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

    dashed: boolean
    dashOffset: number
    dashScale: number
    dashSize: number
    extraUniformsToUpload: Record<string, IUniform> = {}
    gapSize: number
    generator?: IMaterialGenerator

    Managed internally, do not change manually

    isLineMaterial2: true
    linewidth: number
    materialExtensions: MaterialExtension[] = []
    name: string

    Material name. Default is an empty string.

    ''
    
    registerMaterialExtensions: (
        this: IMaterial,
        customMaterialExtensions: MaterialExtension[],
    ) => void = iMaterialCommons.registerMaterialExtensions
    resolution: Vector2
    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.

    {}
    
    worldUnits: boolean
    InterpolateProperties: string[] = ...
    MaterialProperties: {
        allowOverride: boolean;
        alphaHash: boolean;
        alphaTest: number;
        alphaToCoverage: boolean;
        blendAlpha: number;
        blendColor: string;
        blendDst: 205;
        blendDstAlpha: null;
        blendEquation: 100;
        blendEquationAlpha: null;
        blending: 1;
        blendSrc: 204;
        blendSrcAlpha: null;
        clipIntersection: boolean;
        clipping: boolean;
        clippingPlanes: null;
        clipShadows: boolean;
        color: Color;
        colorWrite: boolean;
        dashed: boolean;
        dashOffset: number;
        dashScale: number;
        dashSize: number;
        defines: {};
        depthFunc: 3;
        depthTest: boolean;
        depthWrite: boolean;
        dithering: boolean;
        extensions: {};
        fog: boolean;
        forceSinglePass: boolean;
        fragmentShader: string;
        gapSize: number;
        linewidth: number;
        name: string;
        opacity: number;
        polygonOffset: boolean;
        polygonOffsetFactor: number;
        polygonOffsetUnits: number;
        precision: null;
        premultipliedAlpha: boolean;
        resolution: Vector2;
        shadowSide: null;
        side: 0;
        stencilFail: 7680;
        stencilFunc: 519;
        stencilFuncMask: number;
        stencilRef: number;
        stencilWrite: boolean;
        stencilWriteMask: number;
        stencilZFail: 7680;
        stencilZPass: 7680;
        toneMapped: boolean;
        transparent: boolean;
        uniforms: {};
        userData: {};
        vertexColors: boolean;
        vertexShader: string;
        visible: boolean;
        worldUnits: boolean;
    } = ...
    MaterialTemplate: IMaterialTemplate<
        LineMaterial2<IMaterialEventMap>,
        Partial<
            {
                allowOverride: boolean;
                alphaHash: boolean;
                alphaTest: number;
                alphaToCoverage: boolean;
                blendAlpha: number;
                blendColor: string;
                blendDst: 205;
                blendDstAlpha: null;
                blendEquation: 100;
                blendEquationAlpha: null;
                blending: 1;
                blendSrc: 204;
                blendSrcAlpha: null;
                clipIntersection: boolean;
                clipping: boolean;
                clippingPlanes: null;
                clipShadows: boolean;
                color: Color;
                colorWrite: boolean;
                dashed: boolean;
                dashOffset: number;
                dashScale: number;
                dashSize: number;
                defines: {};
                depthFunc: 3;
                depthTest: boolean;
                depthWrite: boolean;
                dithering: boolean;
                extensions: {};
                fog: boolean;
                forceSinglePass: boolean;
                fragmentShader: string;
                gapSize: number;
                linewidth: number;
                name: string;
                opacity: number;
                polygonOffset: boolean;
                polygonOffsetFactor: number;
                polygonOffsetUnits: number;
                precision: null;
                premultipliedAlpha: boolean;
                resolution: Vector2;
                shadowSide: null;
                side: 0;
                stencilFail: 7680;
                stencilFunc: 519;
                stencilFuncMask: number;
                stencilRef: number;
                stencilWrite: boolean;
                stencilWriteMask: number;
                stencilZFail: 7680;
                stencilZPass: 7680;
                toneMapped: boolean;
                transparent: boolean;
                uniforms: {};
                userData: {};
                vertexColors: boolean;
                vertexShader: string;
                visible: boolean;
                worldUnits: boolean;
            },
        >,
    > = ...
    TYPE: "LineMaterial2" = 'LineMaterial2'
    TypeSlug: "lmat" = 'lmat'

    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> | LineMaterialParameters & { 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

      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