InstancedBufferGeometry

Core.InstancedBufferGeometry exported from @manycore/aholo-viewer.

Core Class

Hierarchy

Constructors

Properties

name: string

The name of viewer, which could be empty.

isBufferGeometry: boolean

Flag to indicate the type of this class. This value should not be changed by user.

parameters: {}

This object is used to record all parameters which are set when instance is initialized. But, change the value of this object may not change the geometry directly.

meshBVH?: MeshBVH

Use BVH to accelerate rendering. This value usually dose not need you to change it, it is built by the engine automatically.

_index: Nullable<IndexBufferAttribute>

Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles".
and works much the same as it does in Geometry: each triangle is associated with the indices of three vertices.
This attribute therefore stores the index of each vertex for each triangular face.
If this attribute is not set, the renderer assumes that each three contiguous positions represent a single triangle.
This should be set by setIndex| setIndex() to avoid error.

attributes: { [index: string]: BufferAttribute<TypedArray> }

Core data of Geometry such as vertex positions, normals, UVs and color.

It's better to use addAttribute| addAttribute() or setAttribute| setAttribute() to change this.

See BufferAttribute for more details.

drawRange: BufferRange

Determines which part of buffer will be rendered.

__topologyMark: TriangleList
id: number
isInstancedBufferGeometry: boolean

Used to check type of this or extended instance. This value should not be changed by user.

type: string

The type of this instance.

userData: Record<keyof any, any>
_uuid: any
uuid: string
_listeners: Map<Symbol, Listener<never>[]>

Accessors

  • get index(): IndexBufferAttribute

    Returns IndexBufferAttribute

  • set index(v: IndexBufferAttribute): void

    Parameters

    • v: IndexBufferAttribute

    Returns void

  • get instancedCount(): number

    Returns number

  • set instancedCount(v: number): void

    Parameters

    • v: number

    Returns void

  • get businessTag(): string

    Returns string

  • set businessTag(v: string): void

    Parameters

    • v: string

    Returns void

Methods

  • get group at index

    Parameters

    • index: number

    Returns BufferGroup | undefined

  • Split the data into different groups.

    Parameters

    • group: BufferGroup
    • index: number

    Returns void

  • set entire groups

    Parameters

    • groups: BufferGroup[]

    Returns this

  • push a group

    Parameters

    • group: BufferGroup

    Returns this

  • Split geometry data to a new group.

    Parameters

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

    Returns void

    See groups| groups for more details.

  • Return the instance of index| index.

    Returns IndexBufferAttribute

  • Use this method to set new index| index for geometry.

    Parameters

    • index: TypedArray | number[] | IndexBufferAttribute

      source data of the index.

    Returns this

  • Get specified attributes| attributes from geometry.

    Parameters

    • name: string

      the name of target attributes.

    • array: TypedArray
    • itemSize: number

    Returns void

  • Remove specified attributes| attributes from geometry.

    Parameters

    • name: string

      the name of target attributes.

    Returns this

  • Find the group which the vertex belong to.

    Parameters

    • index: number

      Queried vertex index.

    Returns { group: BufferGroup; groupIndex: number }

  • Change the value of drawRange.

    Parameters

    • start: number
    • count: number

    Returns void

  • Computes bounding box according to vertexes, updating boundingBox attribute. Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

  • Computes bounding sphere according to vertexes, updating boundingSphere attribute. Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

  • UUID of this BufferGeometries instance. This gets automatically assigned, so this shouldn't be edited.

    Returns string

  • Store the attributes of this class into string as serializing format.

    Parameters

    • ctx: Serializer

      this parameter has not supported external Serializer yet. It may cause that this method can not be used directly.

    Returns void

  • Parse the data for this class from string according to serializing format.

    Parameters

    • ctx: Deserializer

      this parameter has not supported external Deserializer yet. It may cause that this method can not be used directly.

    Returns void

  • Clear the current geometry's data in memory.

    Returns void

  • Adds a listener to an event type.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Only active the listener one times and then off it| it.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Checks if listener is added to an event type.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns boolean

  • Removes a listener from listening list.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Active the event and call the registered listener.

    Parameters

    • type: EventType<never>

    Returns void

  • Type Parameters

    • T

    Parameters

    • type: EventType<T>
    • payload: T

    Returns void