InstancedBufferGeometry

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

Core Class

Extends

Extended by

Constructors

Constructor

new InstancedBufferGeometry(): InstancedBufferGeometry

Returns

InstancedBufferGeometry

Inherited from

BufferGeometry.constructor

Properties

name

name: string

The name of viewer, which could be empty.

Inherited from

BufferGeometry.name


isBufferGeometry

isBufferGeometry: boolean

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

Inherited from

BufferGeometry.isBufferGeometry


parameters

parameters: object

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.

Inherited from

BufferGeometry.parameters


meshBVH?

optional meshBVH?: MeshBVH

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

Inherited from

BufferGeometry.meshBVH


_index

_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.

Default Value

null

Inherited from

BufferGeometry._index


attributes

attributes: object

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

Index Signature

[index: string]: BufferAttribute<TypedArray>

Tips

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

Remarks

See BufferAttribute for more details.

Inherited from

BufferGeometry.attributes


drawRange

drawRange: BufferRange

Determines which part of buffer will be rendered.

Deprecated

Default Value

{ start: 0, count: Infinity } All data will be uploaded.

Inherited from

BufferGeometry.drawRange


__topologyMark

__topologyMark: TriangleList

Inherited from

BufferGeometry.__topologyMark


id

id: number

Inherited from

BufferGeometry.id


isInstancedBufferGeometry

isInstancedBufferGeometry: boolean

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


type

type: string

The type of this instance.

Overrides

BufferGeometry.type


userData

readonly userData: Record<keyof any, any>

Inherited from

BufferGeometry.userData


_uuid

_uuid: any

Inherited from

BufferGeometry._uuid


uuid

uuid: string

Inherited from

BufferGeometry.uuid


_listeners

_listeners: Map<Symbol, Listener<never>[]>

Inherited from

BufferGeometry._listeners

Accessors

index

Get Signature

get index(): IndexBufferAttribute

Returns

IndexBufferAttribute

Set Signature

set index(v): void

Parameters
v

IndexBufferAttribute

Returns

void

Inherited from

BufferGeometry.index


position

Get Signature

get position(): BufferAttribute<TypedArray>

Returns

BufferAttribute<TypedArray>

Inherited from

BufferGeometry.position


uv

Get Signature

get uv(): BufferAttribute<TypedArray>

Returns

BufferAttribute<TypedArray>

Inherited from

BufferGeometry.uv


instancedCount

Get Signature

get instancedCount(): number

Returns

number

Set Signature

set instancedCount(v): void

Parameters
v

number

Returns

void


businessTag

Get Signature

get businessTag(): string

Returns

string

Set Signature

set businessTag(v): void

Parameters
v

string

Returns

void

Inherited from

BufferGeometry.businessTag

Methods

getGroup()

getGroup(index): BufferGroup | undefined

get group at index

Parameters

index

number

Returns

BufferGroup | undefined

Inherited from

BufferGeometry.getGroup


setGroup()

setGroup(group, index): void

Split the data into different groups.

Parameters

group

BufferGroup

index

number

Returns

void

Inherited from

BufferGeometry.setGroup


setGroups()

setGroups(groups): this

set entire groups

Parameters

groups

BufferGroup[]

Returns

this

Inherited from

BufferGeometry.setGroups


pushGroup()

pushGroup(group): this

push a group

Parameters

group

BufferGroup

Returns

this

Inherited from

BufferGeometry.pushGroup


addGroup()

addGroup(start, count, materialIndex?): void

Split geometry data to a new group.

Parameters

start

number

count

number

materialIndex?

number

Returns

void

Remarks

See groups| groups for more details.

Inherited from

BufferGeometry.addGroup


clearGroups()

clearGroups(): void

Clean all objects in the groups| groups.

Returns

void

Inherited from

BufferGeometry.clearGroups


getBoundingBox()

getBoundingBox(): Box3

If boundingBox| boundingBox is null, it will be calculated a new one.

Returns

Box3

Inherited from

BufferGeometry.getBoundingBox


getBoundingSphere()

getBoundingSphere(): Sphere

If boundingSphere| boundingSphere is null, it will be calculated a new one.

Returns

Sphere

Inherited from

BufferGeometry.getBoundingSphere


notifyShapeChanged()

notifyShapeChanged(): void

Clear the bounding box and sphere and recalculate them later.

Returns

void

Inherited from

BufferGeometry.notifyShapeChanged


getAttributeLayoutKey()

getAttributeLayoutKey(): string

Generate a hash key according to index| index and all attributes| attributes.

Returns

string

Inherited from

BufferGeometry.getAttributeLayoutKey


className()

className(): string

The name of instance’s class.

Returns

string

Inherited from

BufferGeometry.className


attributeChanged()

attributeChanged(): void

Clean old data of engine and load new data in next update.

Returns

void

Inherited from

BufferGeometry.attributeChanged


getBufferGeometry()

getBufferGeometry(): this

Return current instance of this class.

Returns

this

Inherited from

BufferGeometry.getBufferGeometry


getLineBufferGeometry()

getLineBufferGeometry(): this

Return current instance of this class.

Returns

this

Inherited from

BufferGeometry.getLineBufferGeometry


getIndex()

getIndex(): IndexBufferAttribute

Return the instance of index| index.

Returns

IndexBufferAttribute

Inherited from

BufferGeometry.getIndex


onAttributeUpdate()

onAttributeUpdate(): void

Call this method to let engine refresh data of meshBVH.

Returns

void

Inherited from

BufferGeometry.onAttributeUpdate


setIndex()

setIndex(index): this

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

Parameters

index

TypedArray | number[] | IndexBufferAttribute

source data of the index.

Returns

this

Inherited from

BufferGeometry.setIndex


addAttribute()

addAttribute(name, attribute): this

Parameters

name

string

attribute

BufferAttribute

Returns

this

Inherited from

BufferGeometry.addAttribute


setAttribute()

setAttribute(name, attribute): this

Change the given attributes| attributes for geometry.

Parameters

name

string

the name of data such as position, uv and normal.

attribute

BufferAttribute

source data. see BufferAttribute for more details.

Returns

this

Inherited from

BufferGeometry.setAttribute


addOrSetAttribute()

addOrSetAttribute(name, array, itemSize): void

Get specified attributes| attributes from geometry.

Parameters

name

string

the name of target attributes.

array

TypedArray

itemSize

number

Returns

void

Inherited from

BufferGeometry.addOrSetAttribute


getAttribute()

getAttribute(name): BufferAttribute<TypedArray> | undefined

Parameters

name

string

Returns

BufferAttribute<TypedArray> | undefined

Inherited from

BufferGeometry.getAttribute


removeAttribute()

removeAttribute(name): this

Remove specified attributes| attributes from geometry.

Parameters

name

string

the name of target attributes.

Returns

this

Inherited from

BufferGeometry.removeAttribute


removeAndDestroyAttribute()

removeAndDestroyAttribute(name): this

Parameters

name

string

Returns

this

Inherited from

BufferGeometry.removeAndDestroyAttribute


getGroupByVertexIndex()

getGroupByVertexIndex(index): object

Find the group which the vertex belong to.

Parameters

index

number

Queried vertex index.

Returns

object

group

group: BufferGroup

groupIndex

groupIndex: number

Inherited from

BufferGeometry.getGroupByVertexIndex


setDrawRange()

setDrawRange(start, count): void

Change the value of drawRange.

Parameters

start

number

count

number

Returns

void

Deprecated

Inherited from

BufferGeometry.setDrawRange


computeBoundingBox()

computeBoundingBox(): 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

Inherited from

BufferGeometry.computeBoundingBox


computeBoundingSphere()

computeBoundingSphere(): 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

Inherited from

BufferGeometry.computeBoundingSphere


_computeGroups()

_computeGroups(geometry): void

Parameters

geometry

Geometry

Returns

void

Inherited from

BufferGeometry._computeGroups


getUUID()

getUUID(): string

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

Returns

string

Inherited from

BufferGeometry.getUUID


serialize()

serialize(ctx): void

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

Inherited from

BufferGeometry.serialize


deserialize()

deserialize(ctx): 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

Inherited from

BufferGeometry.deserialize


freeGPU()

freeGPU(): void

Clear the current geometry’s data in memory.

Returns

void

Inherited from

BufferGeometry.freeGPU


destroy()

destroy(): void

Returns

void

Inherited from

BufferGeometry.destroy


destroyAttributes()

destroyAttributes(): void

Returns

void

Inherited from

BufferGeometry.destroyAttributes


freeAttributesGpuResource()

freeAttributesGpuResource(): void

Returns

void

Inherited from

BufferGeometry.freeAttributesGpuResource


destroyAllResourcesOwned()

destroyAllResourcesOwned(): void

Returns

void

Inherited from

BufferGeometry.destroyAllResourcesOwned


freeAllGpuResourceOwned()

freeAllGpuResourceOwned(): void

Returns

void

Inherited from

BufferGeometry.freeAllGpuResourceOwned


forceCastTopology()

forceCastTopology<R>(): BufferGeometry<R>

Type Parameters

R

R extends Topology

Returns

BufferGeometry<R>

Inherited from

BufferGeometry.forceCastTopology


notifyGeometryContentChange()

notifyGeometryContentChange(): void

Returns

void

Inherited from

BufferGeometry.notifyGeometryContentChange


copy()

copy(source): this

Copy the data to this object from source. This method need override in derived classes to copy extended data.

Parameters

source

InstancedBufferGeometry

the data source.

Returns

this

Overrides

BufferGeometry.copy


clone()

clone(): InstancedBufferGeometry

Create a clone of this instance.

Returns

InstancedBufferGeometry

Overrides

BufferGeometry.clone


markBusinessTag()

markBusinessTag(v): this

Parameters

v

string

Returns

this

Inherited from

BufferGeometry.markBusinessTag


isDestroyed()

isDestroyed(): boolean

Returns

boolean

Inherited from

BufferGeometry.isDestroyed


validate()

validate(): void

Returns

void

Inherited from

BufferGeometry.validate


on()

on<T>(_type, _listener): void

Adds a listener to an event type.

Type Parameters

T

T

Parameters

_type

EventType<T>

_listener

Listener<T>

Returns

void

Inherited from

BufferGeometry.on


once()

once<T>(_type, _listener): void

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

Type Parameters

T

T

Parameters

_type

EventType<T>

_listener

Listener<T>

Returns

void

Inherited from

BufferGeometry.once


has()

has<T>(_type, _listener): boolean

Checks if listener is added to an event type.

Type Parameters

T

T

Parameters

_type

EventType<T>

_listener

Listener<T>

Returns

boolean

Inherited from

BufferGeometry.has


off()

off<T>(_type, _listener): void

Removes a listener from listening list.

Type Parameters

T

T

Parameters

_type

EventType<T>

_listener

Listener<T>

Returns

void

Inherited from

BufferGeometry.off


emit()

Call Signature

emit(type): void

Active the event and call the registered listener.

Parameters
type

EventType<never>

Returns

void

Inherited from

BufferGeometry.emit

Call Signature

emit<T>(type, payload): void

Type Parameters
T

T

Parameters
type

EventType<T>

payload

T

Returns

void

Inherited from

BufferGeometry.emit


clearAllListeners()

clearAllListeners(): void

Removes all listeners from listening list.

Returns

void

Inherited from

BufferGeometry.clearAllListeners