Skip to content

@jpmorganchase/anu / Exports / Selection

Class: Selection

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Selection(nodes, scene?): Selection

Parameters

NameType
nodesMesh[] | AbstractMesh[] | TransformNode[] | Node[]
scene?Scene

Returns

Selection

Defined in

src/selection/index.ts:54

Properties

action

action: (this: Selection, action: Action | (d: any, n: AbstractMesh, i: number) => Action) => Selection = action

Type declaration

▸ (this, action): Selection

Parameters
NameType
thisSelection
actionAction | (d: any, n: AbstractMesh, i: number) => Action
Returns

Selection

Defined in

src/selection/index.ts:90


addTags

addTags: (this: Selection, tags: string | (d: any, i: number) => string) => Selection = addTags

Type declaration

▸ (this, tags): Selection

Parameters
NameType
thisSelection
tagsstring | (d: any, i: number) => string
Returns

Selection

Defined in

src/selection/index.ts:87


ambientColor

ambientColor: (this: Selection, color: Color3 | (d: any, n: Node, i: number) => Color3) => Selection = ambientColor

Type declaration

▸ (this, color): Selection

Sets the material ambient color on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
colorColor3 | (d: any, n: Node, i: number) => Color3A instance of Color3 or a function that returns a Color3
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:95


ambientTexture

ambientTexture: (this: Selection, texture: BaseTexture | (d: any, n: Node, i: number) => BaseTexture) => Selection = ambientTexture

Type declaration

▸ (this, texture): Selection

Sets the material ambient texture on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
textureBaseTexture | (d: any, n: Node, i: number) => BaseTextureA instance of BaseTexture or a function that returns a BaseTexture
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:102


attr

attr: (this: Selection, accessor: string, value: any) => Selection = attr

Type declaration

▸ (this, accessor, value): Selection

Called from a selection this method allows you to set any property or subproperty of nodes in the selection given that property exists.

Parameters
NameTypeDescription
thisSelection-
accessorstringThe name of the property to be set (e.g. "renderingGroupId", "material.alpha").
valueanyThe value to set the property or a function(d, i) returing the value for said property with scope of the binded data "d", mesh "m", and the index "i".
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:86


bind

bind: <MeshType>(this: Selection, shape: MeshType, options: Property<MeshTypes, MeshType>, data: object[]) => Selection = bind

Type declaration

▸ <MeshType>(this, shape, options?, data?): Selection

Take a selection, a shape type, and data. For each index in the data create a new mesh for each node in the selection as the parent. The data index of the mesh is also attached to the mesh node object under the metadata property.

Type parameters
NameType
MeshTypeextends keyof MeshTypes
Parameters
NameTypeDescription
thisSelection-
shapeMeshTypeA string of the type of the mesh geometry being created.
optionsProperty<MeshTypes, MeshType>A object containing the initial mesh parameters for the selected geometry, can be either values or functions.
dataobject[]The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data.
Returns

Selection

An instance of Selection, a class containing a array of selected nodes, the scene, and the functions of the class Selection, or undefined if a selection could not be made.

Defined in

src/selection/index.ts:69


bindInstance

bindInstance: (this: Selection, mesh: Mesh, data: object[]) => Selection = bindInstance

Type declaration

▸ (this, mesh, data?): Selection

Take a selection, a shape type, and data. For each index in the data create a new mesh for each node in the selection as the parent. The data index of the mesh is also attached to the mesh node object under the metadata property.

Parameters
NameTypeDescription
thisSelection-
meshMeshThe mesh to create instances from.
dataobject[]The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data.
Returns

Selection

An instance of Selection, a class containing a array of selected nodes, the scene, and the functions of the class Selection, or undefined if a selection could not be made.

Defined in

src/selection/index.ts:71


bindThinInstance

bindThinInstance: (this: Selection, mesh: Mesh, data: object[]) => Selection = bindThinInstance

Type declaration

▸ (this, mesh, data?): Selection

Take a selection, a mesh, and data. For each index in the data create a new mesh for each node in the selection as the parent. The data index of the mesh is also attached to the mesh node object under the metadata property.

Parameters
NameTypeDescription
thisSelection-
meshMeshThe mesh to create instances from.
dataobject[]The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data.
Returns

Selection

An instance of Selection, a class containing a array of selected nodes, the scene, and the functions of the class Selection, or undefined if a selection could not be made.

Defined in

src/selection/index.ts:134


boundingBox

boundingBox: (this: Selection, exclude: string) => BoundingInfo = boundingBox

Type declaration

▸ (this, exclude?): BoundingInfo

Calculates the cumulative bounding box of the current selection.

Parameters
NameTypeDefault value
thisSelectionundefined
excludestring""
Returns

BoundingInfo

instance of BoundingInfo class, an object containing all bounding box values.

Defined in

src/selection/index.ts:106


diffuseColor

diffuseColor: (this: Selection, color: Color3 | (d: any, node: Node, i: number) => Color3) => Selection = diffuseColor

Type declaration

▸ (this, color): Selection

Sets the material diffuse color on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
colorColor3 | (d: any, node: Node, i: number) => Color3A instance of Color3 or a function that returns a Color3
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:92


diffuseTexture

diffuseTexture: (this: Selection, texture: BaseTexture | (d: any, n: Node, i: number) => BaseTexture) => Selection = diffuseTexture

Type declaration

▸ (this, texture): Selection

Sets the material diffuse texture on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
textureBaseTexture | (d: any, n: Node, i: number) => BaseTextureA instance of BaseTexture or a function that returns a BaseTexture
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:99


dispose

dispose: (this: Selection, filter?: (d: any, i: number) => Boolean) => Selection = dispose

Type declaration

▸ (this, filter?): Selection

Parameters
NameType
thisSelection
filter?(d: any, i: number) => Boolean
Returns

Selection

Defined in

src/selection/index.ts:98


drawTextDT

drawTextDT: (this: Selection, text: string | (d: any, i: number) => string, font: string | (d: any, i: number) => string, x: number | (d: any, i: number) => number, y: number | (d: any, i: number) => number, color: string | (d: any, i: number) => string, clearColor: string | (d: any, i: number) => string) => Selection = drawTextDT

Type declaration

▸ (this, text, font, x?, y?, color?, clearColor?): Selection

Parameters
NameTypeDefault value
thisSelectionundefined
textstring | (d: any, i: number) => stringundefined
fontstring | (d: any, i: number) => stringundefined
xnumber | (d: any, i: number) => numbernull
ynumber | (d: any, i: number) => numbernull
colorstring | (d: any, i: number) => stringnull
clearColorstring | (d: any, i: number) => stringnull
Returns

Selection

Defined in

src/selection/index.ts:105


emissiveColor

emissiveColor: (this: Selection, color: Color3 | (d: any, n: Node, i: number) => Color3) => Selection = emissiveColor

Type declaration

▸ (this, color): Selection

Sets the material emissive color on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
colorColor3 | (d: any, n: Node, i: number) => Color3A instance of Color3 or a function that returns a Color3
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:94


emissiveTexture

emissiveTexture: (this: Selection, texture: BaseTexture | (d: any, n: Node, i: number) => BaseTexture) => Selection = emissiveTexture

Type declaration

▸ (this, texture): Selection

Sets the material emissive texture on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
textureBaseTexture | (d: any, n: Node, i: number) => BaseTextureA instance of BaseTexture or a function that returns a BaseTexture
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:101


filter

filter: (this: Selection, method: (d: any, n: Node, i: number) => boolean) => Selection = filter

Type declaration

▸ (this, method): Selection

Filters a seclection based on the function provided

Parameters
NameTypeDescription
thisSelection-
method(d: any, n: Node, i: number) => booleanA function with two parameters d (the binded data) and i (the index) that returns a boolean.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:107


get

get: (this: Selection, accessor: string) => Object[] = get

Type declaration

▸ (this, accessor): Object[]

Parameters
NameType
thisSelection
accessorstring
Returns

Object[]

Defined in

src/selection/index.ts:85


hasTags

hasTags: (this: Selection, query?: string) => Object[] = hasTags

Type declaration

▸ (this, query?): Object[]

Parameters
NameType
thisSelection
query?string
Returns

Object[]

Defined in

src/selection/index.ts:89


id

id: (this: Selection, id: string | (d: any, n: Node, i: number) => string) => Selection = id

Type declaration

▸ (this, id): Selection

Sets the id on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
idstring | (d: any, n: Node, i: number) => stringA string or a function that returns a string
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:111


material

material: (this: Selection, material: Material | (d: any, n: Node, i: number) => Material) => Selection = material

Type declaration

▸ (this, material): Selection

Sets the material on all meshes in the selection, non-meshes will be skipped.

Parameters
NameTypeDescription
thisSelection-
materialMaterial | (d: any, n: Node, i: number) => MaterialA instance of the Material class or a function that returns a Material.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:91


metadata

metadata: (this: Selection, key: string, value: {} | (d: any, n: Node, i: number) => {}) => Selection = metadata

Type declaration

▸ (this, key, value): Selection

Adds to the metadata on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
keystringA string to be the key for your object inside node.metadata
value{} | (d: any, n: Node, i: number) => {}An object or a function that returns an object
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:112


name

name: (this: Selection, name: string | (d: any, n: Node, i: number) => string) => Selection = name

Type declaration

▸ (this, name): Selection

Sets the Name on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
namestring | (d: any, n: Node, i: number) => stringA string or a function that returns a string
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:110


position

position: (this: Selection, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = position

Type declaration

▸ (this, value): Selection

Sets the XYZ position on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valueVector3 | (d: any, n: Node, i: number) => Vector3A instance of Vector3 or a function that returns a Vector3
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:72


positionUI

positionUI: (this: Selection, options: positionUIOptions) => Selection = positionUI

Type declaration

▸ (this, options?): Selection

Take a selection, for each node in the selection attach UI elements that provide positioning behavior

Parameters
NameTypeDescription
thisSelection-
optionspositionUIOptionsThe associated options for this prefab.
Returns

Selection

An instance of Selection, a class containing a array of selected nodes, the scene, and the functions of the class Selection, or undefined if a selection could not be made.

Defined in

src/selection/index.ts:113


positionX

positionX: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = positionX

Type declaration

▸ (this, value): Selection

Sets the X position on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:73


positionY

positionY: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = positionY

Type declaration

▸ (this, value): Selection

Sets the Y position on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:74


positionZ

positionZ: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = positionZ

Type declaration

▸ (this, value): Selection

Sets the Z position on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:75


prop

prop: (this: Selection, accessor: string, value: any) => Selection = prop

Type declaration

▸ (this, accessor, value): Selection

Called from a selection this method allows you to set any property or subproperty of nodes in the selection given that property exists.

Parameters
NameTypeDescription
thisSelection-
accessorstringThe name of the property to be set (e.g. "renderingGroupId", "material.alpha").
valueanyThe value to set the property or a function(d, i) returing the value for said property with scope of the binded data "d", mesh "m", and the index "i".
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:109


props

props: (this: Selection, properties: {}) => Selection = props

Type declaration

▸ (this, properties): Selection

Called from a selection this method allows you to set multiple properties or subproperties of nodes in the selection given that property exists. Use this method to improve performance when setting or changing many properties.

Parameters
NameTypeDescription
thisSelection-
propertiesObjectObject of key value pairs for the properties to be set or changed, e.g., {"renderingGroupId": 2, "material.alpha": 0.2}.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:108


registerInstancedBuffer

registerInstancedBuffer: (this: Selection, attr: string, size: number) => Selection = registerInstancedBuffer

Type declaration

▸ (this, attr, size): Selection

Parameters
NameType
thisSelection
attrstring
sizenumber
Returns

Selection

Defined in

src/selection/index.ts:96


removeTags

removeTags: (this: Selection, tags: string) => Selection = removeTags

Type declaration

▸ (this, tags): Selection

Parameters
NameType
thisSelection
tagsstring
Returns

Selection

Defined in

src/selection/index.ts:88


rotateUI

rotateUI: (this: Selection, options: rotateUIOptions) => Selection = rotateUI

Type declaration

▸ (this, options?): Selection

Parameters
NameType
thisSelection
optionsrotateUIOptions
Returns

Selection

Defined in

src/selection/index.ts:115


rotation

rotation: (this: Selection, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = rotation

Type declaration

▸ (this, value): Selection

Sets the XYZ rotation in raidians on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valueVector3 | (d: any, n: Node, i: number) => Vector3A instance of Vector3 or a function that returns a Vector3
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:77


rotationX

rotationX: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = rotationX

Type declaration

▸ (this, value): Selection

Sets the X rotation in radians on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:78


rotationY

rotationY: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = rotationY

Type declaration

▸ (this, value): Selection

Sets the Y rotation in radians on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:79


rotationZ

rotationZ: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = rotationZ

Type declaration

▸ (this, value): Selection

Sets the Z rotation in radians on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:80


run

run: (this: Selection, method: (d: any, node: Node, i: number) => any) => Selection = run

Type declaration

▸ (this, method): Selection

Parameters
NameType
thisSelection
method(d: any, node: Node, i: number) => any
Returns

Selection

Defined in

src/selection/index.ts:70


scaleDT

scaleDT: (this: Selection, value: number | (d: any, i: number) => number) => Selection = scaleDT

Type declaration

▸ (this, value): Selection

Parameters
NameType
thisSelection
valuenumber | (d: any, i: number) => number
Returns

Selection

Defined in

src/selection/index.ts:103


scaleToDT

scaleToDT: (this: Selection, value: number | (d: any, i: number) => number) => Selection = scaleDT

Type declaration

▸ (this, value): Selection

Parameters
NameType
thisSelection
valuenumber | (d: any, i: number) => number
Returns

Selection

Defined in

src/selection/index.ts:104


scaleUI

scaleUI: (this: Selection, options: scaleUIOptions) => Selection = scaleUI

Type declaration

▸ (this, options?): Selection

Parameters
NameType
thisSelection
optionsscaleUIOptions
Returns

Selection

Defined in

src/selection/index.ts:114


scaling

scaling: (this: Selection, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = scaling

Type declaration

▸ (this, value): Selection

Sets the XYZ scaling on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valueVector3 | (d: any, n: Node, i: number) => Vector3A instance of Vector3 or a function that returns a Vector3
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:81


scalingX

scalingX: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = scalingX

Type declaration

▸ (this, value): Selection

Sets the X scaling on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:82


scalingY

scalingY: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = scalingY

Type declaration

▸ (this, value): Selection

Sets the Y scaling on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:83


scalingZ

scalingZ: (this: Selection, value: number | (d: any, n: Node, i: number) => number) => Selection = scalingZ

Type declaration

▸ (this, value): Selection

Sets the Z scaling on all nodes in the selection.

Parameters
NameTypeDescription
thisSelection-
valuenumber | (d: any, n: Node, i: number) => numberA number or a function that returns a number.
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:84


scene

Optional scene: Scene

Defined in

src/selection/index.ts:50


select

select: (this: Selection, name: string) => Selection = select

Type declaration

▸ (this, name): Selection

Select all nodes from the childern graph(s) of selected matching the indicator and return it as a instance of Selection.

selection types; .<Name> : select by Name #<ID> : select by ID $<Tags> : select by tags

Parameters
NameType
thisSelection
namestring
Returns

Selection

Defined in

src/selection/index.ts:64


selectData

selectData: (this: Selection, key: string | string[], value: string | number | string[] | number[]) => Selection = selectData

Type declaration

▸ (this, key, value): Selection

Select nodes from the childern graph(s) of a selection by key value pairs or list of key value pairs and return them as a instance of Selection.

Parameters
NameTypeDescription
thisSelection-
keystring | string[]A string or array of strings of the keys to be searched.
valuestring | number | string[] | number[]-
Returns

Selection

A new instance of Selection with the selected nodes.

Defined in

src/selection/index.ts:68


selectId

selectId: (this: Selection, id: string | string[]) => Selection = selectId

Type declaration

▸ (this, id): Selection

Select nodes from the childern graph(s) of a selection by ID or list of IDs and return them as a instance of Selection.

Parameters
NameTypeDescription
thisSelection-
idstring | string[]A string or array of strings of ids of nodes to be selected.
Returns

Selection

A new instance of Selection with the selected nodes.

Defined in

src/selection/index.ts:66


selectName

selectName: (this: Selection, name: string | string[]) => Selection = selectName

Type declaration

▸ (this, name): Selection

Select nodes from the childern graph(s) of a selection by name or list of names and return them as a instance of Selection.

Parameters
NameTypeDescription
thisSelection-
namestring | string[]A string or array of strings of the names of the nodes to be selected.
Returns

Selection

A new instance of Selection with the selected nodes.

Defined in

src/selection/index.ts:65


selectTag

selectTag: (this: Selection, tag: string | string[]) => Selection = selectTag

Type declaration

▸ (this, tag): Selection

Select nodes from the childern graph(s) of a selection by tag or list of tags and return them as a instance of Selection.

Parameters
NameTypeDescription
thisSelection-
tagstring | string[]A string or array of strings of tags or tag unions of nodes to be selected.
Returns

Selection

A new instance of Selection with the selected nodes.

Defined in

src/selection/index.ts:67


selected

selected: Mesh[] | AbstractMesh[] | TransformNode[] | Node[]

Defined in

src/selection/index.ts:49


setInstancedBuffer

setInstancedBuffer: (this: Selection, attr: string, value: any) => Selection = setInstancedBuffer

Type declaration

▸ (this, attr, value): Selection

Parameters
NameType
thisSelection
attrstring
valueany
Returns

Selection

Defined in

src/selection/index.ts:97


specularColor

specularColor: (this: Selection, color: Color3 | (d: any, n: Node, i: number) => Color3) => Selection = specularColor

Type declaration

▸ (this, color): Selection

Sets the material specular color on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
colorColor3 | (d: any, n: Node, i: number) => Color3A instance of Color3 or a function that returns a Color3
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:93


specularTexture

specularTexture: (this: Selection, texture: BaseTexture | (d: any, n: Node, i: number) => BaseTexture) => Selection = specularTexture

Type declaration

▸ (this, texture): Selection

Sets the material specular texture on all meshes in the selection, meshs without materials won't be affected.

Parameters
NameTypeDescription
thisSelection-
textureBaseTexture | (d: any, n: Node, i: number) => BaseTextureA instance of BaseTexture or a function that returns a BaseTexture
Returns

Selection

The modified selection

Defined in

src/selection/index.ts:100


thinInstanceAttributeAt

thinInstanceAttributeAt: (this: Selection, attribute: string, index: number, value: any) => Selection = thinInstanceAttributeAt

Type declaration

▸ (this, attribute, index, value): Selection

Parameters
NameType
thisSelection
attributestring
indexnumber
valueany
Returns

Selection

Defined in

src/selection/index.ts:122


thinInstanceColor

thinInstanceColor: (this: Selection, value: Color4 | (d: any, n: Node, i: number) => Color4, staticBuffer: boolean) => Selection = thinInstanceColor

Type declaration

▸ (this, value, staticBuffer?): Selection

Parameters
NameTypeDefault value
thisSelectionundefined
valueColor4 | (d: any, n: Node, i: number) => Color4undefined
staticBufferbooleanfalse
Returns

Selection

Defined in

src/selection/index.ts:120


thinInstanceColorAt

thinInstanceColorAt: (this: Selection, index: number, value: Color4 | (d: any, n: Node, i: number) => Color4) => Selection = thinInstanceColorAt

Type declaration

▸ (this, index, value): Selection

Parameters
NameType
thisSelection
indexnumber
valueColor4 | (d: any, n: Node, i: number) => Color4
Returns

Selection

Defined in

src/selection/index.ts:129


thinInstanceColorFor

thinInstanceColorFor: (this: Selection, method: (d: any, n: Node, i: number) => boolean, value: Color4 | (d: any, n: Node, i: number) => Color4) => Selection = thinInstanceColorFor

Type declaration

▸ (this, method, value): Selection

Parameters
NameType
thisSelection
method(d: any, n: Node, i: number) => boolean
valueColor4 | (d: any, n: Node, i: number) => Color4
Returns

Selection

Defined in

src/selection/index.ts:133


thinInstanceMatrixAt

thinInstanceMatrixAt: (this: Selection, index: number, value: Matrix | (d: any, n: Node, i: number) => Matrix) => Selection = thinInstanceMatrixAt

Type declaration

▸ (this, index, value): Selection

Parameters
NameType
thisSelection
indexnumber
valueMatrix | (d: any, n: Node, i: number) => Matrix
Returns

Selection

Defined in

src/selection/index.ts:124


thinInstanceMatrixFor

thinInstanceMatrixFor: (this: Selection, method: (d: any, n: Node, i: number) => boolean, value: Matrix | (d: any, n: Node, i: number) => Matrix) => Selection = thinInstanceMatrixFor

Type declaration

▸ (this, method, value): Selection

Parameters
NameType
thisSelection
method(d: any, n: Node, i: number) => boolean
valueMatrix | (d: any, n: Node, i: number) => Matrix
Returns

Selection

Defined in

src/selection/index.ts:125


thinInstancePosition

thinInstancePosition: (this: Selection, value: Vector3 | (d: any, n: Node, i: number) => Vector3, staticBuffer: boolean) => Selection = thinInstancePosition

Type declaration

▸ (this, value, staticBuffer?): Selection

Parameters
NameTypeDefault value
thisSelectionundefined
valueVector3 | (d: any, n: Node, i: number) => Vector3undefined
staticBufferbooleanfalse
Returns

Selection

Defined in

src/selection/index.ts:117


thinInstancePositionAt

thinInstancePositionAt: (this: Selection, index: number, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = thinInstancePositionAt

Type declaration

▸ (this, index, value): Selection

Parameters
NameType
thisSelection
indexnumber
valueVector3 | (d: any, n: Node, i: number) => Vector3
Returns

Selection

Defined in

src/selection/index.ts:126


thinInstancePositionFor

thinInstancePositionFor: (this: Selection, method: (d: any, n: Node, i: number) => boolean, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = thinInstancePositionFor

Type declaration

▸ (this, method, value): Selection

Parameters
NameType
thisSelection
method(d: any, n: Node, i: number) => boolean
valueVector3 | (d: any, n: Node, i: number) => Vector3
Returns

Selection

Defined in

src/selection/index.ts:130


thinInstanceRegisterAttribute

thinInstanceRegisterAttribute: (this: Selection, attribute: string, stride: number) => Selection = thinInstanceRegisterAttribute

Type declaration

▸ (this, attribute, stride): Selection

Parameters
NameType
thisSelection
attributestring
stridenumber
Returns

Selection

Defined in

src/selection/index.ts:123


thinInstanceRotation

thinInstanceRotation: (this: Selection, value: Vector3 | (d: any, n: Node, i: number) => Vector3, staticBuffer: boolean) => Selection = thinInstanceRotation

Type declaration

▸ (this, value, staticBuffer?): Selection

Parameters
NameTypeDefault value
thisSelectionundefined
valueVector3 | (d: any, n: Node, i: number) => Vector3undefined
staticBufferbooleanfalse
Returns

Selection

Defined in

src/selection/index.ts:119


thinInstanceRotationAt

thinInstanceRotationAt: (this: Selection, index: number, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = thinInstanceRotationAt

Type declaration

▸ (this, index, value): Selection

Parameters
NameType
thisSelection
indexnumber
valueVector3 | (d: any, n: Node, i: number) => Vector3
Returns

Selection

Defined in

src/selection/index.ts:128


thinInstanceRotationFor

thinInstanceRotationFor: (this: Selection, method: (d: any, n: Node, i: number) => boolean, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = thinInstanceRotationFor

Type declaration

▸ (this, method, value): Selection

Parameters
NameType
thisSelection
method(d: any, n: Node, i: number) => boolean
valueVector3 | (d: any, n: Node, i: number) => Vector3
Returns

Selection

Defined in

src/selection/index.ts:132


thinInstanceScaling

thinInstanceScaling: (this: Selection, value: Vector3 | (d: any, n: Node, i: number) => Vector3, staticBuffer: boolean) => Selection = thinInstanceScaling

Type declaration

▸ (this, value, staticBuffer?): Selection

Parameters
NameTypeDefault value
thisSelectionundefined
valueVector3 | (d: any, n: Node, i: number) => Vector3undefined
staticBufferbooleanfalse
Returns

Selection

Defined in

src/selection/index.ts:118


thinInstanceScalingAt

thinInstanceScalingAt: (this: Selection, index: number, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = thinInstanceScalingAt

Type declaration

▸ (this, index, value): Selection

Parameters
NameType
thisSelection
indexnumber
valueVector3 | (d: any, n: Node, i: number) => Vector3
Returns

Selection

Defined in

src/selection/index.ts:127


thinInstanceScalingFor

thinInstanceScalingFor: (this: Selection, method: (d: any, n: Node, i: number) => boolean, value: Vector3 | (d: any, n: Node, i: number) => Vector3) => Selection = thinInstanceScalingFor

Type declaration

▸ (this, method, value): Selection

Parameters
NameType
thisSelection
method(d: any, n: Node, i: number) => boolean
valueVector3 | (d: any, n: Node, i: number) => Vector3
Returns

Selection

Defined in

src/selection/index.ts:131


thinInstanceSetAttribute

thinInstanceSetAttribute: (this: Selection, attribute: string, value: any) => Selection = thinInstanceSetAttribute

Type declaration

▸ (this, attribute, value): Selection

Parameters
NameType
thisSelection
attributestring
valueany
Returns

Selection

Defined in

src/selection/index.ts:121


thinInstanceSetBuffer

thinInstanceSetBuffer: (this: Selection, attribute: string, value: Float32Array | (d: any, n: Node, i: number) => Float32Array, stride?: number, staticBuffer: boolean) => Selection = thinInstanceSetBuffer

Type declaration

▸ (this, attribute, value, stride?, staticBuffer?): Selection

Parameters
NameTypeDefault value
thisSelectionundefined
attributestringundefined
valueFloat32Array | (d: any, n: Node, i: number) => Float32Arrayundefined
stride?numberundefined
staticBufferbooleanfalse
Returns

Selection

Defined in

src/selection/index.ts:116


transition

transition: (this: Selection, options: TransitionOptions | (d: any, n: Node, i: number) => TransitionOptions) => Selection = transition

Type declaration

▸ (this, options): Selection

Initiates and returns a new transition selection object or adds a new transition sequence to an existing transition selection object. This method is called from a selection and is used to animate the change in transforms of each node in the selection. The transition can be customized using the provided options or a function that returns options for each node.

Parameters
NameTypeDescription
thisSelection-
optionsTransitionOptions | (d: any, n: Node, i: number) => TransitionOptionsThe transition options to apply. This can be a TransitionOptions object or a function that returns a TransitionOptions object for each node. The function receives the data bound to the node, the node itself, and the index of the node as arguments. TransitionOptions: - duration (optional): The duration of the transition in milliseconds. - delay (optional): The delay before the transition starts, in milliseconds. - framePerSecond (optional): The number of frames per second for the transition. - sequence (optional): A boolean indicating whether the transition should be part of a sequence. - easingFunction (optional): An easing function to control the transition's rate of change. - loopMode (optional): A number (0 to 4) indicating the loop mode for the transition. - onAnimationEnd (optional): A callback function to be executed when the transition ends.
Returns

Selection

The modified transition selection.

Defined in

src/selection/index.ts:135


transitions

transitions: Transition[]

Defined in

src/selection/index.ts:51


translate

translate: (this: Selection, value: Vector3 | (d: any, i: number) => Vector3, distance: number | (d: any, i: number) => number, space?: Space) => Selection = translate

Type declaration

▸ (this, value, distance, space?): Selection

Parameters
NameType
thisSelection
valueVector3 | (d: any, i: number) => Vector3
distancenumber | (d: any, i: number) => number
space?Space
Returns

Selection

Defined in

src/selection/index.ts:76


tween

tween: (this: Selection, value: (d: any, n: any, i: any) => (t: any) => void) => Selection = tween

Type declaration

▸ (this, value): Selection

Applies a tweening function to each node in the selection, returning a eased time value between 0-1 to be used for animation control for the total duration of the transition. The tweening function is executed for each node, allowing for fine-grained control over the animation process.

Parameters
NameTypeDescription
thisSelection-
value(d: any, n: any, i: any) => (t: any) => voidA function that returns a tweening function for each node. The outer function receives the data bound to the node, the node itself, and the index of the node as arguments. The returned tweening function is called with a parameter t that represents the normalized time (from 0 to 1) of the animation.
Returns

Selection

The modified selection with the applied tweening animations.

Defined in

src/selection/index.ts:136

Methods

updateTransitions

updateTransitions(transition): void

Parameters

NameType
transitionTransition

Returns

void

Defined in

src/selection/index.ts:60