Class RingGeometry

This is a superefficent class for geometries because it saves all data in buffers. It reduces memory costs and cpu cycles. But it is not as easy to work with because of all the necessary buffer calculations. It is mainly interesting when working with static objects.

see https://github.com/mrdoob/three.js/blob/master/src/core/BufferGeometry.js|src/core/BufferGeometry.js

Hierarchy

Constructors

  • Parameters

    • Optional innerRadius: number
    • Optional outerRadius: number
    • Optional thetaSegments: number
    • Optional phiSegments: number
    • Optional thetaStart: number
    • Optional thetaLength: number

    Returns RingGeometry

Properties

attributes: {
    [name: string]: BufferAttribute | InterleavedBufferAttribute;
}

Default

Type declaration

boundingBox: Box3

Default

null

boundingSphere: Sphere

Default

null

drawRange: {
    count: number;
    start: number;
}

Default

Type declaration

  • count: number
  • start: number
drawcalls: any

Deprecated

Use .groups instead.

groups: {
    count: number;
    materialIndex?: number;
    start: number;
}[]

Default

[]

id: number

Unique number of this buffergeometry instance

Default

null

isBufferGeometry: true
morphAttributes: {
    [name: string]: (BufferAttribute | InterleavedBufferAttribute)[];
}

Default

Type declaration

morphTargetsRelative: boolean

Default

false

name: string

Default

''

offsets: any

Deprecated

Use .groups instead.

parameters: {
    innerRadius: number;
    outerRadius: number;
    phiSegments: number;
    thetaLength: number;
    thetaSegments: number;
    thetaStart: number;
}

Type declaration

  • innerRadius: number
  • outerRadius: number
  • phiSegments: number
  • thetaLength: number
  • thetaSegments: number
  • thetaStart: number
type: string

Default

'RingGeometry'

userData: {
    [key: string]: any;
}

Default

Type declaration

  • [key: string]: any
uuid: string

Methods

  • Deprecated

    Use .addGroup() instead.

    Parameters

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

    Returns void

  • Parameters

    • start: number
    • count: number
    • Optional materialIndex: number

    Returns void

  • Deprecated

    Use .setIndex() instead.

    Parameters

    • index: any

    Returns void

  • Returns 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

  • 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

  • Computes and adds tangent attribute to this geometry.

    Returns void

  • Computes vertex normals by averaging face normals.

    Returns void

  • Fire an event type.

    Parameters

    Returns void

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

    Returns void

  • Checks if listener is added to an event type.

    Type Parameters

    • T extends string

    Parameters

    Returns boolean

  • Returns void

  • Parameters

    • start: number
    • count: number

    Returns void

  • Returns any

  • Parameters

    • data: any

    Returns RingGeometry

Generated using TypeDoc