Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LineGeometry

Hierarchy

Index

Constructors

constructor

Properties

attributes

attributes: object
default

{}

Type declaration

  • [name: string]: BufferAttribute | InterleavedBufferAttribute

boundingBox

boundingBox: Box3 | null
default

null

boundingSphere

boundingSphere: Sphere | null
default

null

drawRange

drawRange: object
default

{ start: 0, count: Infinity }

Type declaration

  • count: number
  • start: number

drawcalls

drawcalls: any
deprecated

Use {@link BufferGeometry#groups .groups} instead.

groups

groups: Array<object>

id

id: number

Unique number of this buffergeometry instance

index

index: BufferAttribute | null
default

null

instanceCount

instanceCount: number
default

Infinity

isBufferGeometry

isBufferGeometry: true

isInstancedBufferGeometry

isInstancedBufferGeometry: boolean

isLineGeometry

isLineGeometry: true

isLineSegmentsGeometry

isLineSegmentsGeometry: true

morphAttributes

morphAttributes: object
default

{}

Type declaration

  • [name: string]: Array<BufferAttribute | InterleavedBufferAttribute>

morphTargetsRelative

morphTargetsRelative: boolean
default

false

name

name: string
default

''

offsets

offsets: any
deprecated

Use {@link BufferGeometry#groups .groups} instead.

type

type: string
default

'InstancedBufferGeometry

userData

userData: object
default

{}

Type declaration

  • [key: string]: any

uuid

uuid: string

Static MaxIndex

MaxIndex: number

Methods

addAttribute

  • addAttribute(name: string, attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry
  • addAttribute(name: any, array: any, itemSize: any): any
  • deprecated

    Use {@link BufferGeometry#setAttribute .setAttribute()} instead.

    Parameters

    • name: string
    • attribute: BufferAttribute | InterleavedBufferAttribute

    Returns BufferGeometry

  • Parameters

    • name: any
    • array: any
    • itemSize: any

    Returns any

addDrawCall

  • addDrawCall(start: any, count: any, indexOffset?: any): void
  • deprecated

    Use {@link BufferGeometry#addGroup .addGroup()} instead.

    Parameters

    • start: any
    • count: any
    • Optional indexOffset: any

    Returns void

addEventListener

  • addEventListener(type: string, listener: function): void
  • Adds a listener to an event type.

    Parameters

    • type: string

      The type of event to listen to.

    • listener: function

      The function that gets called when the event is fired.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns void

addGroup

  • addGroup(start: number, count: number, instances: number): void
  • Parameters

    • start: number
    • count: number
    • instances: number

    Returns void

addIndex

  • addIndex(index: any): void
  • deprecated

    Use {@link BufferGeometry#setIndex .setIndex()} instead.

    Parameters

    • index: any

    Returns void

applyMatrix

  • applyMatrix(matrix: any): any

applyMatrix4

  • applyMatrix4(matrix: any): this
  • Parameters

    • matrix: any

    Returns this

center

  • center(): BufferGeometry
  • Returns BufferGeometry

clearDrawCalls

  • clearDrawCalls(): void
  • deprecated

    Use {@link BufferGeometry#clearGroups .clearGroups()} instead.

    Returns void

clearGroups

  • clearGroups(): void
  • Returns void

clone

  • clone(): BufferGeometry
  • Returns BufferGeometry

computeBoundingBox

  • computeBoundingBox(): void
  • Computes bounding box of the geometry, updating Geometry.boundingBox attribute. Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

computeBoundingSphere

  • computeBoundingSphere(): void
  • Computes bounding sphere of the geometry, updating Geometry.boundingSphere attribute. Bounding spheres aren't' computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

computeTangents

  • computeTangents(): void
  • Computes and adds tangent attribute to this geometry.

    Returns void

computeVertexNormals

  • computeVertexNormals(): void
  • Computes vertex normals by averaging face normals.

    Returns void

copy

  • copy(source: BufferGeometry): this
  • Parameters

    • source: BufferGeometry

    Returns this

deleteAttribute

  • deleteAttribute(name: BuiltinShaderAttributeName | string & __type): BufferGeometry
  • Parameters

    • name: BuiltinShaderAttributeName | string & __type

    Returns BufferGeometry

dispatchEvent

  • dispatchEvent(event: object): void
  • Fire an event type.

    Parameters

    • event: object
      • [attachment: string]: any
      • type: string

    Returns void

dispose

  • dispose(): void
  • Disposes the object from memory. You need to call this when you want the bufferGeometry removed while the application is running.

    Returns void

fromEdgesGeometry

  • fromEdgesGeometry(geometry: any): this

fromLine

  • fromLine(line: any): any
  • Parameters

    • line: any

    Returns any

fromLineSegments

  • fromLineSegments(lineSegments: any): any

fromMesh

  • fromMesh(mesh: any): this
  • Parameters

    • mesh: any

    Returns this

fromWireframeGeometry

  • fromWireframeGeometry(geometry: any): this

getAttribute

  • getAttribute(name: BuiltinShaderAttributeName | string & __type): BufferAttribute | InterleavedBufferAttribute
  • Parameters

    • name: BuiltinShaderAttributeName | string & __type

    Returns BufferAttribute | InterleavedBufferAttribute

getIndex

  • getIndex(): BufferAttribute | null
  • Returns BufferAttribute | null

hasAttribute

  • hasAttribute(name: BuiltinShaderAttributeName | string & __type): boolean
  • Parameters

    • name: BuiltinShaderAttributeName | string & __type

    Returns boolean

hasEventListener

  • hasEventListener(type: string, listener: function): boolean
  • Checks if listener is added to an event type.

    Parameters

    • type: string

      The type of event to listen to.

    • listener: function

      The function that gets called when the event is fired.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns boolean

lookAt

  • lookAt(v: Vector3): void
  • Parameters

    • v: Vector3

    Returns void

merge

  • merge(geometry: BufferGeometry, offset?: undefined | number): BufferGeometry
  • Parameters

    • geometry: BufferGeometry
    • Optional offset: undefined | number

    Returns BufferGeometry

normalizeNormals

  • normalizeNormals(): void
  • Returns void

removeAttribute

  • removeAttribute(name: string): BufferGeometry
  • deprecated

    Use {@link BufferGeometry#deleteAttribute .deleteAttribute()} instead.

    Parameters

    • name: string

    Returns BufferGeometry

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Removes a listener from an event type.

    Parameters

    • type: string

      The type of the listener that gets removed.

    • listener: function

      The listener function that gets removed.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns void

rotateX

  • rotateX(angle: number): BufferGeometry
  • Parameters

    • angle: number

    Returns BufferGeometry

rotateY

  • rotateY(angle: number): BufferGeometry
  • Parameters

    • angle: number

    Returns BufferGeometry

rotateZ

  • rotateZ(angle: number): BufferGeometry
  • Parameters

    • angle: number

    Returns BufferGeometry

scale

  • scale(x: number, y: number, z: number): BufferGeometry
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns BufferGeometry

setAttribute

  • setAttribute(name: BuiltinShaderAttributeName | string & __type, attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry
  • Parameters

    • name: BuiltinShaderAttributeName | string & __type
    • attribute: BufferAttribute | InterleavedBufferAttribute

    Returns BufferGeometry

setColors

  • setColors(array: any[]): any

setDrawRange

  • setDrawRange(start: number, count: number): void
  • Parameters

    • start: number
    • count: number

    Returns void

setFromPoints

  • setFromPoints(points: Vector3[] | Vector2[]): BufferGeometry
  • Parameters

    • points: Vector3[] | Vector2[]

    Returns BufferGeometry

setIndex

  • setIndex(index: BufferAttribute | number[] | null): BufferGeometry
  • Parameters

    • index: BufferAttribute | number[] | null

    Returns BufferGeometry

setPositions

  • setPositions(array: any[]): any

toJSON

  • toJSON(): any
  • Returns any

toNonIndexed

  • toNonIndexed(): BufferGeometry
  • Returns BufferGeometry

translate

  • translate(x: number, y: number, z: number): BufferGeometry
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns BufferGeometry