@jpmorganchase/anu / Exports / Selection
Class: Selection
Table of contents
Constructors
Properties
- action
- addTags
- ambientColor
- ambientTexture
- attr
- bind
- bindInstance
- bindThinInstance
- boundingBox
- diffuseColor
- diffuseTexture
- dispose
- drawTextDT
- emissiveColor
- emissiveTexture
- filter
- get
- hasTags
- id
- material
- metadata
- name
- position
- positionUI
- positionX
- positionY
- positionZ
- prop
- props
- registerInstancedBuffer
- removeTags
- rotateUI
- rotation
- rotationX
- rotationY
- rotationZ
- run
- scaleDT
- scaleToDT
- scaleUI
- scaling
- scalingX
- scalingY
- scalingZ
- scene
- select
- selectData
- selectId
- selectName
- selectTag
- selected
- setInstancedBuffer
- specularColor
- specularTexture
- thinInstanceAttributeAt
- thinInstanceColor
- thinInstanceColorAt
- thinInstanceColorFor
- thinInstanceMatrixAt
- thinInstanceMatrixFor
- thinInstancePosition
- thinInstancePositionAt
- thinInstancePositionFor
- thinInstanceRegisterAttribute
- thinInstanceRotation
- thinInstanceRotationAt
- thinInstanceRotationFor
- thinInstanceScaling
- thinInstanceScalingAt
- thinInstanceScalingFor
- thinInstanceSetAttribute
- thinInstanceSetBuffer
- transition
- transitions
- translate
- tween
Methods
Constructors
constructor
• new Selection(nodes
, scene?
): Selection
Parameters
Name | Type |
---|---|
nodes | Mesh [] | AbstractMesh [] | TransformNode [] | Node [] |
scene? | Scene |
Returns
Defined in
Properties
action
• action: (this
: Selection
, action
: Action
| (d
: any
, n
: AbstractMesh
, i
: number
) => Action
) => Selection
= action
Type declaration
▸ (this
, action
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
action | Action | (d : any , n : AbstractMesh , i : number ) => Action |
Returns
Defined in
addTags
• addTags: (this
: Selection
, tags
: string
| (d
: any
, i
: number
) => string
) => Selection
= addTags
Type declaration
▸ (this
, tags
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
tags | string | (d : any , i : number ) => string |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
color | Color3 | (d : any , n : Node , i : number ) => Color3 | A instance of Color3 or a function that returns a Color3 |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
texture | BaseTexture | (d : any , n : Node , i : number ) => BaseTexture | A instance of BaseTexture or a function that returns a BaseTexture |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
accessor | string | The name of the property to be set (e.g. "renderingGroupId", "material.alpha"). |
value | any | The 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
The modified selection
Defined in
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
Name | Type |
---|---|
MeshType | extends keyof MeshTypes |
Parameters
Name | Type | Description |
---|---|---|
this | Selection | - |
shape | MeshType | A string of the type of the mesh geometry being created. |
options | Property <MeshTypes , MeshType > | A object containing the initial mesh parameters for the selected geometry, can be either values or functions. |
data | object [] | The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data. |
Returns
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
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
Name | Type | Description |
---|---|---|
this | Selection | - |
mesh | Mesh | The mesh to create instances from. |
data | object [] | The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data. |
Returns
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
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
Name | Type | Description |
---|---|---|
this | Selection | - |
mesh | Mesh | The mesh to create instances from. |
data | object [] | The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data. |
Returns
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
boundingBox
• boundingBox: (this
: Selection
, exclude
: string
) => BoundingInfo
= boundingBox
Type declaration
▸ (this
, exclude?
): BoundingInfo
Calculates the cumulative bounding box of the current selection.
Parameters
Name | Type | Default value |
---|---|---|
this | Selection | undefined |
exclude | string | "" |
Returns
BoundingInfo
instance of BoundingInfo class, an object containing all bounding box values.
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
color | Color3 | (d : any , node : Node , i : number ) => Color3 | A instance of Color3 or a function that returns a Color3 |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
texture | BaseTexture | (d : any , n : Node , i : number ) => BaseTexture | A instance of BaseTexture or a function that returns a BaseTexture |
Returns
The modified selection
Defined in
dispose
• dispose: (this
: Selection
, filter?
: (d
: any
, i
: number
) => Boolean
) => Selection
= dispose
Type declaration
▸ (this
, filter?
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
filter? | (d : any , i : number ) => Boolean |
Returns
Defined in
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
Name | Type | Default value |
---|---|---|
this | Selection | undefined |
text | string | (d : any , i : number ) => string | undefined |
font | string | (d : any , i : number ) => string | undefined |
x | number | (d : any , i : number ) => number | null |
y | number | (d : any , i : number ) => number | null |
color | string | (d : any , i : number ) => string | null |
clearColor | string | (d : any , i : number ) => string | null |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
color | Color3 | (d : any , n : Node , i : number ) => Color3 | A instance of Color3 or a function that returns a Color3 |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
texture | BaseTexture | (d : any , n : Node , i : number ) => BaseTexture | A instance of BaseTexture or a function that returns a BaseTexture |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
method | (d : any , n : Node , i : number ) => boolean | A function with two parameters d (the binded data) and i (the index) that returns a boolean. |
Returns
The modified selection
Defined in
get
• get: (this
: Selection
, accessor
: string
) => Object
[] = get
Type declaration
▸ (this
, accessor
): Object
[]
Parameters
Name | Type |
---|---|
this | Selection |
accessor | string |
Returns
Object
[]
Defined in
hasTags
• hasTags: (this
: Selection
, query?
: string
) => Object
[] = hasTags
Type declaration
▸ (this
, query?
): Object
[]
Parameters
Name | Type |
---|---|
this | Selection |
query? | string |
Returns
Object
[]
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
id | string | (d : any , n : Node , i : number ) => string | A string or a function that returns a string |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
material | Material | (d : any , n : Node , i : number ) => Material | A instance of the Material class or a function that returns a Material. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
key | string | A 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
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
name | string | (d : any , n : Node , i : number ) => string | A string or a function that returns a string |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 | A instance of Vector3 or a function that returns a Vector3 |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
options | positionUIOptions | The associated options for this prefab. |
Returns
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
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
accessor | string | The name of the property to be set (e.g. "renderingGroupId", "material.alpha"). |
value | any | The 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
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
properties | Object | Object of key value pairs for the properties to be set or changed, e.g., {"renderingGroupId": 2, "material.alpha": 0.2}. |
Returns
The modified selection
Defined in
registerInstancedBuffer
• registerInstancedBuffer: (this
: Selection
, attr
: string
, size
: number
) => Selection
= registerInstancedBuffer
Type declaration
▸ (this
, attr
, size
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
attr | string |
size | number |
Returns
Defined in
removeTags
• removeTags: (this
: Selection
, tags
: string
) => Selection
= removeTags
Type declaration
▸ (this
, tags
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
tags | string |
Returns
Defined in
rotateUI
• rotateUI: (this
: Selection
, options
: rotateUIOptions
) => Selection
= rotateUI
Type declaration
▸ (this
, options?
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
options | rotateUIOptions |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 | A instance of Vector3 or a function that returns a Vector3 |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
run
• run: (this
: Selection
, method
: (d
: any
, node
: Node
, i
: number
) => any
) => Selection
= run
Type declaration
▸ (this
, method
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
method | (d : any , node : Node , i : number ) => any |
Returns
Defined in
scaleDT
• scaleDT: (this
: Selection
, value
: number
| (d
: any
, i
: number
) => number
) => Selection
= scaleDT
Type declaration
▸ (this
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
value | number | (d : any , i : number ) => number |
Returns
Defined in
scaleToDT
• scaleToDT: (this
: Selection
, value
: number
| (d
: any
, i
: number
) => number
) => Selection
= scaleDT
Type declaration
▸ (this
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
value | number | (d : any , i : number ) => number |
Returns
Defined in
scaleUI
• scaleUI: (this
: Selection
, options
: scaleUIOptions
) => Selection
= scaleUI
Type declaration
▸ (this
, options?
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
options | scaleUIOptions |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 | A instance of Vector3 or a function that returns a Vector3 |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | number | (d : any , n : Node , i : number ) => number | A number or a function that returns a number. |
Returns
The modified selection
Defined in
scene
• Optional
scene: Scene
Defined in
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
Name | Type |
---|---|
this | Selection |
name | string |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
key | string | string [] | A string or array of strings of the keys to be searched. |
value | string | number | string [] | number [] | - |
Returns
A new instance of Selection with the selected nodes.
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
id | string | string [] | A string or array of strings of ids of nodes to be selected. |
Returns
A new instance of Selection with the selected nodes.
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
name | string | string [] | A string or array of strings of the names of the nodes to be selected. |
Returns
A new instance of Selection with the selected nodes.
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
tag | string | string [] | A string or array of strings of tags or tag unions of nodes to be selected. |
Returns
A new instance of Selection with the selected nodes.
Defined in
selected
• selected: Mesh
[] | AbstractMesh
[] | TransformNode
[] | Node
[]
Defined in
setInstancedBuffer
• setInstancedBuffer: (this
: Selection
, attr
: string
, value
: any
) => Selection
= setInstancedBuffer
Type declaration
▸ (this
, attr
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
attr | string |
value | any |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
color | Color3 | (d : any , n : Node , i : number ) => Color3 | A instance of Color3 or a function that returns a Color3 |
Returns
The modified selection
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
texture | BaseTexture | (d : any , n : Node , i : number ) => BaseTexture | A instance of BaseTexture or a function that returns a BaseTexture |
Returns
The modified selection
Defined in
thinInstanceAttributeAt
• thinInstanceAttributeAt: (this
: Selection
, attribute
: string
, index
: number
, value
: any
) => Selection
= thinInstanceAttributeAt
Type declaration
▸ (this
, attribute
, index
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
attribute | string |
index | number |
value | any |
Returns
Defined in
thinInstanceColor
• thinInstanceColor: (this
: Selection
, value
: Color4
| (d
: any
, n
: Node
, i
: number
) => Color4
, staticBuffer
: boolean
) => Selection
= thinInstanceColor
Type declaration
▸ (this
, value
, staticBuffer?
): Selection
Parameters
Name | Type | Default value |
---|---|---|
this | Selection | undefined |
value | Color4 | (d : any , n : Node , i : number ) => Color4 | undefined |
staticBuffer | boolean | false |
Returns
Defined in
thinInstanceColorAt
• thinInstanceColorAt: (this
: Selection
, index
: number
, value
: Color4
| (d
: any
, n
: Node
, i
: number
) => Color4
) => Selection
= thinInstanceColorAt
Type declaration
▸ (this
, index
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
index | number |
value | Color4 | (d : any , n : Node , i : number ) => Color4 |
Returns
Defined in
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
Name | Type |
---|---|
this | Selection |
method | (d : any , n : Node , i : number ) => boolean |
value | Color4 | (d : any , n : Node , i : number ) => Color4 |
Returns
Defined in
thinInstanceMatrixAt
• thinInstanceMatrixAt: (this
: Selection
, index
: number
, value
: Matrix
| (d
: any
, n
: Node
, i
: number
) => Matrix
) => Selection
= thinInstanceMatrixAt
Type declaration
▸ (this
, index
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
index | number |
value | Matrix | (d : any , n : Node , i : number ) => Matrix |
Returns
Defined in
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
Name | Type |
---|---|
this | Selection |
method | (d : any , n : Node , i : number ) => boolean |
value | Matrix | (d : any , n : Node , i : number ) => Matrix |
Returns
Defined in
thinInstancePosition
• thinInstancePosition: (this
: Selection
, value
: Vector3
| (d
: any
, n
: Node
, i
: number
) => Vector3
, staticBuffer
: boolean
) => Selection
= thinInstancePosition
Type declaration
▸ (this
, value
, staticBuffer?
): Selection
Parameters
Name | Type | Default value |
---|---|---|
this | Selection | undefined |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 | undefined |
staticBuffer | boolean | false |
Returns
Defined in
thinInstancePositionAt
• thinInstancePositionAt: (this
: Selection
, index
: number
, value
: Vector3
| (d
: any
, n
: Node
, i
: number
) => Vector3
) => Selection
= thinInstancePositionAt
Type declaration
▸ (this
, index
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
index | number |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 |
Returns
Defined in
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
Name | Type |
---|---|
this | Selection |
method | (d : any , n : Node , i : number ) => boolean |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 |
Returns
Defined in
thinInstanceRegisterAttribute
• thinInstanceRegisterAttribute: (this
: Selection
, attribute
: string
, stride
: number
) => Selection
= thinInstanceRegisterAttribute
Type declaration
▸ (this
, attribute
, stride
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
attribute | string |
stride | number |
Returns
Defined in
thinInstanceRotation
• thinInstanceRotation: (this
: Selection
, value
: Vector3
| (d
: any
, n
: Node
, i
: number
) => Vector3
, staticBuffer
: boolean
) => Selection
= thinInstanceRotation
Type declaration
▸ (this
, value
, staticBuffer?
): Selection
Parameters
Name | Type | Default value |
---|---|---|
this | Selection | undefined |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 | undefined |
staticBuffer | boolean | false |
Returns
Defined in
thinInstanceRotationAt
• thinInstanceRotationAt: (this
: Selection
, index
: number
, value
: Vector3
| (d
: any
, n
: Node
, i
: number
) => Vector3
) => Selection
= thinInstanceRotationAt
Type declaration
▸ (this
, index
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
index | number |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 |
Returns
Defined in
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
Name | Type |
---|---|
this | Selection |
method | (d : any , n : Node , i : number ) => boolean |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 |
Returns
Defined in
thinInstanceScaling
• thinInstanceScaling: (this
: Selection
, value
: Vector3
| (d
: any
, n
: Node
, i
: number
) => Vector3
, staticBuffer
: boolean
) => Selection
= thinInstanceScaling
Type declaration
▸ (this
, value
, staticBuffer?
): Selection
Parameters
Name | Type | Default value |
---|---|---|
this | Selection | undefined |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 | undefined |
staticBuffer | boolean | false |
Returns
Defined in
thinInstanceScalingAt
• thinInstanceScalingAt: (this
: Selection
, index
: number
, value
: Vector3
| (d
: any
, n
: Node
, i
: number
) => Vector3
) => Selection
= thinInstanceScalingAt
Type declaration
▸ (this
, index
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
index | number |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 |
Returns
Defined in
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
Name | Type |
---|---|
this | Selection |
method | (d : any , n : Node , i : number ) => boolean |
value | Vector3 | (d : any , n : Node , i : number ) => Vector3 |
Returns
Defined in
thinInstanceSetAttribute
• thinInstanceSetAttribute: (this
: Selection
, attribute
: string
, value
: any
) => Selection
= thinInstanceSetAttribute
Type declaration
▸ (this
, attribute
, value
): Selection
Parameters
Name | Type |
---|---|
this | Selection |
attribute | string |
value | any |
Returns
Defined in
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
Name | Type | Default value |
---|---|---|
this | Selection | undefined |
attribute | string | undefined |
value | Float32Array | (d : any , n : Node , i : number ) => Float32Array | undefined |
stride? | number | undefined |
staticBuffer | boolean | false |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
options | TransitionOptions | (d : any , n : Node , i : number ) => TransitionOptions | The 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
The modified transition selection.
Defined in
transitions
• transitions: Transition
[]
Defined in
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
Name | Type |
---|---|
this | Selection |
value | Vector3 | (d : any , i : number ) => Vector3 |
distance | number | (d : any , i : number ) => number |
space? | Space |
Returns
Defined in
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
Name | Type | Description |
---|---|---|
this | Selection | - |
value | (d : any , n : any , i : any ) => (t : any ) => void | A 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
The modified selection with the applied tweening animations.
Defined in
Methods
updateTransitions
▸ updateTransitions(transition
): void
Parameters
Name | Type |
---|---|
transition | Transition |
Returns
void