Skip to content

@jpmorganchase/anu / Exports

@jpmorganchase/anu

Table of contents

Classes

Variables

Functions

Variables

schemes

schemes: StringByAny

Defined in

src/prefabs/Chromatic/Chromatic.ts:105

Functions

bind

bind<MeshType>(shape, options?, data?, scene?): Selection

Take a shape type, a scene, 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
shapeMeshTypeA 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.
dataany[]The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data.
scene?SceneThe Babylon scene you are targeting.

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/bind.ts:30


bindClone

bindClone(mesh, data?, scene?): Selection

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

Parameters

NameTypeDescription
meshMeshThe mesh to create instances from.
dataany[]The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data.
scene?Scene-

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/bind.ts:53


bindInstance

bindInstance(mesh, data?, scene?): 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
meshMeshThe mesh to create instances from.
dataany[]The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data.
scene?Scene-

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/bind.ts:76


bindThinInstance

bindThinInstance(mesh, data?, scene?): 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
meshMeshThe mesh to create instances from.
dataany[]The data to bind elements too, must be passed as a list of objects where each object represents a row of tabular data.
scene?Scene-

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/bind.ts:99


create

create<MeshType>(shape, name, options?, data?, scene?): Mesh

Helper function to build meshes of a specified type with options optionally set with functions and data.

Type parameters

NameType
MeshTypeextends keyof MeshTypes

Parameters

NameTypeDescription
shapeMeshTypeThe name of the mesh type you want to create.
namestringThe string that will be used as the inital mesh ID and name.
optionsProperty<MeshTypes, MeshType>An object containg the mesh parametetrs as either absolutle values or functions.
dataobjectAn object containg the data that may be used to execute any functions passed in options.
scene?SceneThe scene to create the mesh in.

Returns

Mesh

A mesh object created with the passed parameters.

Defined in

src/create.ts:112


createAxes

createAxes(name, scene, options): Axis

Creates an instance of Axes with the specified configuration.

This function supports two argument orders for backward compatibility:

  1. createAxes(name, scene, options)
  2. createAxes(name, options, scene?)

Parameters

NameTypeDescription
namestringThe name of the axes.
sceneScene-
optionsAxesOptionsInterface | AxesConfig-

Returns

Axis

An instance of Axes configured with the specified options.

Remarks

For more information, see the Axes Documentation.

Example

javascript
const options: AxesOptionsInterface = { scale: {x: scaleX, y: scaleY, z: scaleZ} };
const axes = createAxes('myAxes', scene, options);

Defined in

src/prefabs/Axis/Axis.ts:109

createAxes(name, options, scene?): Axis

Creates an instance of Axes with the specified configuration.

This function supports two argument orders for backward compatibility:

  1. createAxes(name, scene, options)
  2. createAxes(name, options, scene?)

Parameters

NameTypeDescription
namestringThe name of the axes.
optionsAxesOptionsInterface | AxesConfig-
scene?Scene-

Returns

Axis

An instance of Axes configured with the specified options.

Remarks

For more information, see the Axes Documentation.

Example

javascript
const options: AxesOptionsInterface = { scale: {x: scaleX, y: scaleY, z: scaleZ} };
const axes = createAxes('myAxes', scene, options);

Defined in

src/prefabs/Axis/Axis.ts:110


createBrush

createBrush(name, scene, options): Brush

Creates an instance of Brush with the specified configuration.

This function supports two argument orders for backward compatibility, scene is optional if passed last:

  1. createBrush(name, scene, options)
  2. createBrush(name, options, scene?)

Parameters

NameTypeDescription
namestringThe name of the brush.
sceneScene-
optionsBrushOptionsInterface-

Returns

Brush

An instance of Brush configured with the specified options.

Throws

Will throw an error if no scales are defined in the options.

Throws

Will throw an error if no parent is defined in the options.

Remarks

The function determines the order of the scene and options arguments based on their types. If arg2 is an instance of Scene, it is treated as the scene, and arg3 is treated as the options. Otherwise, arg2 is treated as the options, and arg3 is treated as the scene.

The options parameter allows for extensive customization of the brush, including scales, material, and axes transformations.

For more information, see the Brush Documentation.

Defined in

src/prefabs/Brushing/brush.ts:393

createBrush(name, options, scene?): Brush

Creates an instance of Brush with the specified configuration.

This function supports two argument orders for backward compatibility, scene is optional if passed last:

  1. createBrush(name, scene, options)
  2. createBrush(name, options, scene?)

Parameters

NameTypeDescription
namestringThe name of the brush.
optionsBrushOptionsInterface-
scene?Scene-

Returns

Brush

An instance of Brush configured with the specified options.

Throws

Will throw an error if no scales are defined in the options.

Throws

Will throw an error if no parent is defined in the options.

Remarks

The function determines the order of the scene and options arguments based on their types. If arg2 is an instance of Scene, it is treated as the scene, and arg3 is treated as the options. Otherwise, arg2 is treated as the options, and arg3 is treated as the scene.

The options parameter allows for extensive customization of the brush, including scales, material, and axes transformations.

For more information, see the Brush Documentation.

Defined in

src/prefabs/Brushing/brush.ts:394


createMeshMap

createMeshMap(name, options, scene?): MeshMap

Parameters

NameType
namestring
optionsObject
options.cot?Node | TransformNode | Mesh
options.depth?number
options.geoJsonGeoGeometryObjects
options.projection?GeoProjection
options.simplification?number
options.size?[number, number]
options.transform?[number, number]
scene?Scene

Returns

MeshMap

Defined in

src/prefabs/Mapping/MeshMap.ts:108


createPlaneText

createPlaneText(name, options, scene): PlaneText

Creates a new PlaneText prefab.

Parameters

NameTypeDescription
namestringThe name of this PlaneText.
optionsPlaneTextOptionsAn options object of the PlaneText.
sceneSceneThe target scene for the created PlaneText.

Returns

PlaneText

Defined in

src/prefabs/Text/planeText.ts:226


createTextureGlobe

createTextureGlobe(name, options?, scene?): TextureGlobe

Parameters

NameType
namestring
optionsObject
options.diameter?number
options.layers?TileLayer<any>[]
options.resolution?Vector2
options.view?View
scene?Scene

Returns

TextureGlobe

Defined in

src/prefabs/Mapping/textureGlobe.ts:131


createTextureMap

createTextureMap(name, options?, scene?): TextureMap

Parameters

NameType
namestring
optionsObject
options.layers?TileLayer<any>[]
options.mapHeight?number
options.mapWidth?number
options.meshSize?number
options.view?View
scene?Scene

Returns

TextureMap

Defined in

src/prefabs/Mapping/textureMap.ts:193


cylinderLayout

cylinderLayout(name, options, scene): Layout

Parameters

NameType
namestring
optionsLayoutOptions
sceneScene

Returns

Layout

Defined in

src/prefabs/Layout/Layout.ts:281


ordinalChromatic

ordinalChromatic(scheme): OrdinalChromatic

Parameters

NameType
schemestring | string[]

Returns

OrdinalChromatic

Defined in

src/prefabs/Chromatic/Chromatic.ts:93


planeLayout

planeLayout(name, options, scene): Layout

Parameters

NameType
namestring
optionsLayoutOptions
sceneScene

Returns

Layout

Defined in

src/prefabs/Layout/Layout.ts:269


select

select(name, scene): Selection

Select all nodes from the scene graph matching the indicator and return them as a instance of Selection.

Parameters

NameTypeDescription
namestringThe prefix and text of the selection, selection types include: .<name>, #<id>, $<tags>.
sceneSceneThe babylon scene the to select from.

Returns

Selection

an instance of Selection, a class contating 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/select.ts:19


selectData

selectData(key, value, scene?, useAndLogic?): Selection

Select all nodes from the scene graph with binded data matching the given key value pairs and return them as a instance of Selection.

Parameters

NameTypeDescription
keystring | string[]the key or list of keys of the nodes to be selected.
valuestring | number | number[] | string[]the value or list of values corresponding to the respective key(s) passed.
scene?SceneThe babylon scene the to select from. Defaults to the last created scene if undefined.
useAndLogic?booleanIf true, all keys and values must exist and match to be selected. Defaults to false.

Returns

Selection

an instance of Selection, a class contating 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/select.ts:101


selectId

selectId(id, scene): Selection

Select all nodes from the scene graph matching the given ID(s) and return them as a instance of Selection.

Parameters

NameTypeDescription
idstring | string[]the ID or list of IDs of the nodes to be selected
sceneSceneThe babylon scene the to select from.

Returns

Selection

an instance of Selection, a class contating 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/select.ts:63


selectName

selectName(name, scene): Selection

Select all nodes from the scene graph matching the given name(s) and return them as a instance of Selection.

Parameters

NameTypeDescription
namestring | string[]the name or list of names of the nodes to be selected
sceneSceneThe babylon scene the to select from.

Returns

Selection

an instance of Selection, a class contating 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/select.ts:46


selectTag

selectTag(tag, scene): Selection

Select all nodes from the scene graph matching the given tag(s) and return them as a instance of Selection.

Parameters

NameTypeDescription
tagstring | string[]the tag and tag logic or list of tags of the nodes to be selected
sceneSceneThe babylon scene the to select from.

Returns

Selection

an instance of Selection, a class contating 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/select.ts:80


sequentialChromatic

sequentialChromatic(scheme): SequentialChromatic

Parameters

NameType
schemestring

Returns

SequentialChromatic

Defined in

src/prefabs/Chromatic/Chromatic.ts:97