InstancedBufferGeometry
Core.InstancedBufferGeometry exported from @manycore/aholo-viewer.
Extends
Extended by
Constructors
Constructor
new InstancedBufferGeometry():
InstancedBufferGeometry
Returns
InstancedBufferGeometry
Inherited from
Properties
name
name:
string
The name of viewer, which could be empty.
Inherited from
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
meshBVH?
optionalmeshBVH?: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
_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
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
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
__topologyMark
__topologyMark:
TriangleList
Inherited from
id
id:
number
Inherited from
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
userData
readonlyuserData:Record<keyofany,any>
Inherited from
_uuid
_uuid:
any
Inherited from
uuid
uuid:
string
Inherited from
_listeners
_listeners:
Map<Symbol,Listener<never>[]>
Inherited from
Accessors
index
Get Signature
get index():
IndexBufferAttribute
Returns
IndexBufferAttribute
Set Signature
set index(
v):void
Parameters
v
IndexBufferAttribute
Returns
void
Inherited from
position
Get Signature
get position():
BufferAttribute<TypedArray>
Returns
BufferAttribute<TypedArray>
Inherited from
uv
Get Signature
get uv():
BufferAttribute<TypedArray>
Returns
BufferAttribute<TypedArray>
Inherited from
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
Methods
getGroup()
getGroup(
index):BufferGroup|undefined
get group at index
Parameters
index
number
Returns
BufferGroup | undefined
Inherited from
setGroup()
setGroup(
group,index):void
Split the data into different groups.
Parameters
group
BufferGroup
index
number
Returns
void
Inherited from
setGroups()
setGroups(
groups):this
set entire groups
Parameters
groups
BufferGroup[]
Returns
this
Inherited from
pushGroup()
pushGroup(
group):this
push a group
Parameters
group
BufferGroup
Returns
this
Inherited from
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
clearGroups()
clearGroups():
void
Clean all objects in the groups| groups.
Returns
void
Inherited from
getBoundingBox()
getBoundingBox():
Box3
If boundingBox| boundingBox is null, it will be calculated a new one.
Returns
Inherited from
getBoundingSphere()
getBoundingSphere():
Sphere
If boundingSphere| boundingSphere is null, it will be calculated a new one.
Returns
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
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
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
addAttribute()
addAttribute(
name,attribute):this
Parameters
name
string
attribute
Returns
this
Inherited from
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
source data. see BufferAttribute for more details.
Returns
this
Inherited from
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
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
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
getUUID()
getUUID():
string
UUID of this BufferGeometries instance. This gets automatically assigned, so this shouldn’t be edited.
Returns
string
Inherited from
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
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
freeGPU()
freeGPU():
void
Clear the current geometry’s data in memory.
Returns
void
Inherited from
destroy()
destroy():
void
Returns
void
Inherited from
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
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
clone()
clone():
InstancedBufferGeometry
Create a clone of this instance.
Returns
InstancedBufferGeometry
Overrides
markBusinessTag()
markBusinessTag(
v):this
Parameters
v
string
Returns
this
Inherited from
BufferGeometry.markBusinessTag
isDestroyed()
isDestroyed():
boolean
Returns
boolean
Inherited from
validate()
validate():
void
Returns
void
Inherited from
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
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
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
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
emit()
Call Signature
emit(
type):void
Active the event and call the registered listener.
Parameters
type
EventType<never>
Returns
void
Inherited from
Call Signature
emit<
T>(type,payload):void
Type Parameters
T
T
Parameters
type
EventType<T>
payload
T
Returns
void
Inherited from
clearAllListeners()
clearAllListeners():
void
Removes all listeners from listening list.
Returns
void