Request

Response

    Autodesk.Viewing.Scene
    Version 8 preview
    This page documents a preview of the Viewer SDK v8. APIs and content can still change before the final release.

    PointsMaterial

    Unlit material for 3D point geometry.

    new PointsMaterial(params)

    Parameters

    Expand all
    params
    object
    colorPoint color. Default: white.
    opacity
    number
    Point opacity in [0, 1]. Default: 1.
    size
    number
    Point size in pixels. Default: 1.
    mapTexture map applied to each point sprite. Default: null.
    vertexColors
    boolean
    Use per-vertex colors stored in the geometry. Default: false.
    depthWrite
    boolean
    Write to the depth buffer. Default: true.
    depthTest
    boolean
    Depth-test against the depth buffer. Default: true.
    transparent
    boolean
    Render in the transparent pass with alpha blending. Default: false.

    Methods

    clone(material)

    Parameters

    materialTarget to copy into. Default: a new PointsMaterial.

    Returns

    typedescription
    PointsMaterial

    getColor()

    Returns

    typedescription
    Color A copy of the point color.

    setColor(c)

    Parameters

    c*Point color. Copied into the existing Color.
    * Required

    getOpacity()

    Returns

    typedescription
    number Point opacity in [0, 1].

    setOpacity(o)

    Parameters

    o*
    number
    Point opacity in [0, 1]. Requires setTransparent(true) for < 1.
    * Required

    getSize()

    Returns

    typedescription
    number Point size in pixels.

    setSize(s)

    Parameters

    s*
    number
    Point size in pixels.
    * Required

    getMap()

    Returns the texture map applied to each point sprite.

    Returns

    typedescription
    Texture Texture map, or null.

    setMap(t)

    Sets the texture map applied to each point sprite.

    Parameters

    t*Texture map, or null.
    * Required

    getVertexColors()

    Returns

    typedescription
    boolean Whether to use per-vertex colors from the geometry’s color attribute.

    setVertexColors(v)

    Parameters

    v*
    boolean
    Whether to use per-vertex colors.
    * Required

    getDepthWrite()

    Returns

    typedescription
    boolean Whether to write to the depth buffer.

    setDepthWrite(v)

    Parameters

    v*
    boolean
    Whether to write to the depth buffer.
    * Required

    getDepthTest()

    Returns

    typedescription
    boolean Whether to depth-test against the depth buffer.

    setDepthTest(v)

    Parameters

    v*
    boolean
    Whether to depth-test against the depth buffer.
    * Required

    getTransparent()

    Returns

    typedescription
    boolean Whether the material renders in the transparent pass.

    setTransparent(v)

    Parameters

    v*
    boolean
    Whether the material renders in the transparent pass with alpha blending.
    * Required