InstancedMesh

THREE.InstancedMesh
class InstancedMesh(geometry: UndefOr[BufferGeometry], material: UndefOr[Material | Array[Material]], val count: UndefOr[Int]) extends Mesh

A special version of Mesh with instanced rendering support. Use this if you have to render a large number of objects with the same geometry and material.

Attributes

Graph
Supertypes
class Mesh
class Object3D
class Object
trait Any
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def dispose(): Unit

Disposes of this instance of InstancedMesh.

Disposes of this instance of InstancedMesh.

Attributes

def getColorAt(index: Int, color: Color): Unit

Gets the color for the instance at the specified index.

Gets the color for the instance at the specified index.

Attributes

def getMatrixAt(index: Int, matrix: Matrix4): Unit

Gets the position, quaternion and scale for the instances' matrix transformation.

Gets the position, quaternion and scale for the instances' matrix transformation.

Attributes

def setColorAt(index: Int, color: Color): Unit

Sets the color for the instance at the specified index.

Sets the color for the instance at the specified index.

Attributes

def setMatrixAt(index: Int, matrix: Matrix4): Unit

Sets the position, quaternion and scale for the instances' matrix transformation.

Sets the position, quaternion and scale for the instances' matrix transformation.

Attributes

Inherited methods

def add(obj: Object3D*): Object3D.this.type

Attributes

Inherited from:
Object3D
def applyMatrix4(matrix: Matrix4): Unit

Attributes

Inherited from:
Object3D
def applyQuaternion(q: Quaternion): Object3D.this.type

Attributes

Inherited from:
Object3D
def attach(obj: Object3D): Object3D.this.type

Attributes

Inherited from:
Object3D
def clear(): Object3D.this.type

Attributes

Inherited from:
Object3D
def copy(source: Object3D, recursive: Boolean): Object3D.this.type

Attributes

Inherited from:
Object3D
def getObjectById(id: Int): UndefOr[Object3D]

Attributes

Inherited from:
Object3D
def getObjectByName(name: String): UndefOr[Object3D]

Attributes

Inherited from:
Object3D
def getObjectByProperty(name: String, value: Any): UndefOr[Object3D]

Attributes

Inherited from:
Object3D
def getVertexPosition(index: Int, target: Vector3): Vector3

Returns the local-space position of the vertex at the given index, taking into account the current animation state of both morph targets and skinning.

Returns the local-space position of the vertex at the given index, taking into account the current animation state of both morph targets and skinning.

Value parameters

index

The vertex index

target

The target object that is used to store the method's result

Attributes

Returns

The vertex position in local space

Inherited from:
Mesh

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D
def getWorldScale(target: Vector3): Vector3

Attributes

Inherited from:
Object3D
def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def jsClone(recursive: Boolean): Object3D.this.type

Attributes

Inherited from:
Object3D
def localToWorld(vector: Vector3): Vector3

Attributes

Inherited from:
Object3D
def lookAt(x: Any, y: UndefOr[Double], z: UndefOr[Double]): Unit

Attributes

Inherited from:
Object3D
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def raycast(raycaster: Object, intersects: Array[Object]): Unit

Attributes

Inherited from:
Object3D
def remove(ob: Object3D*): Object3D.this.type

Attributes

Inherited from:
Object3D
def rotateOnAxis(axis: Vector3, angle: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def rotateOnWorldAxis(axis: Vector3, angle: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def rotateX(angle: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def rotateY(angle: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def rotateZ(angle: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def setRotationFromAxisAngle(axis: Vector3, angle: Double): Unit

Attributes

Inherited from:
Object3D
def setRotationFromEuler(euler: Euler): Unit

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D
def toLocaleString(): String

Attributes

Inherited from:
Object
def translateOnAxis(axis: Vector3, distance: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def translateX(distance: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def translateY(distance: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def translateZ(distance: Double): Object3D.this.type

Attributes

Inherited from:
Object3D
def traverse(callback: Function1[Object3D, Unit]): Unit

Attributes

Inherited from:
Object3D
def traverseAncestors(callback: Function1[Object3D, Unit]): Unit

Attributes

Inherited from:
Object3D
def traverseVisible(callback: Function1[Object3D, Unit]): Unit

Attributes

Inherited from:
Object3D
def updateMatrix(): Unit

Attributes

Inherited from:
Object3D
def updateMatrixWorld(force: Boolean): Unit

Attributes

Inherited from:
Object3D
def updateMorphTargets(): Unit

Sets the values of morphTargetDictionary and morphTargetInfluences to make sure existing morph targets can influence this 3D object.

Sets the values of morphTargetDictionary and morphTargetInfluences to make sure existing morph targets can influence this 3D object.

Attributes

Inherited from:
Mesh
def updateWorldMatrix(updateParent: Boolean, updateChildren: Boolean): Unit

Attributes

Inherited from:
Object3D
def valueOf(): Any

Attributes

Inherited from:
Object
def worldToLocal(vector: Vector3): Vector3

Attributes

Inherited from:
Object3D

Concrete fields

val count: UndefOr[Int]
var instanceColor: UndefOr[Object]

Default is null.

Default is null.

Attributes

var instanceMatrix: Object

Default is false.

Default is false.

Attributes

val isInstancedMesh: Boolean

This flag can be used for type testing.

This flag can be used for type testing.

Attributes

Inherited fields

val `type`: String

Attributes

Inherited from:
Object3D
var castShadow: Boolean

Attributes

Inherited from:
Object3D
val children: Array[Object3D]

Attributes

Inherited from:
Object3D
var frustumCulled: Boolean

Attributes

Inherited from:
Object3D
val id: Int

Attributes

Inherited from:
Object3D
val isMesh: Boolean

This flag can be used for type testing.

This flag can be used for type testing.

Attributes

Inherited from:
Mesh
var layers: Object

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D
var matrixAutoUpdate: Boolean

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D
var matrixWorldNeedsUpdate: Boolean

Attributes

Inherited from:
Object3D
var morphTargetDictionary: UndefOr[Dictionary[Int]]

A dictionary representing the morph targets in the geometry. The key is the morph targets name, the value its attribute index. This member is undefined by default and only set when morph targets are detected in the geometry.

A dictionary representing the morph targets in the geometry. The key is the morph targets name, the value its attribute index. This member is undefined by default and only set when morph targets are detected in the geometry.

Attributes

Inherited from:
Mesh
var morphTargetInfluences: UndefOr[Array[Double]]

An array of weights typically in the range [0,1] that specify how much of the morph is applied. This member is undefined by default and only set when morph targets are detected in the geometry.

An array of weights typically in the range [0,1] that specify how much of the morph is applied. This member is undefined by default and only set when morph targets are detected in the geometry.

Attributes

Inherited from:
Mesh
var name: String

Attributes

Inherited from:
Object3D
var parent: UndefOr[Object3D]

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D
var receiveShadow: Boolean

Attributes

Inherited from:
Object3D
var renderOrder: Double

Attributes

Inherited from:
Object3D

Attributes

Inherited from:
Object3D
var scale: Vector3

Attributes

Inherited from:
Object3D
var userData: Object

Attributes

Inherited from:
Object3D
val uuid: String

Attributes

Inherited from:
Object3D
var visible: Boolean

Attributes

Inherited from:
Object3D