Types
import type { VertexSpaceParameters, GeographicParameters, MaterialParameters, CreateParameters, CreateBoxParameters } from "@arcgis/core/geometry/support/meshUtils/types.js";

Type definitions

VertexSpaceParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

vertexSpace

Property
Type
"local" | "georeferenced" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Specifies the vertex space of the created mesh. If not specified, a vertex space is chosen according to the spatial reference where a MeshLocalVertexSpace is used for geographic or WebMercator spatial references and MeshGeoreferencedVertexSpace is used otherwise. If vertexSpace is "georeferenced", then the vertex space will also be MeshGeoreferencedVertexSpace where mesh vertices are georeferenced offsets to the location provided with the create function. If the vertexSpace is "georeferenced" and the spatial reference is geographic, then vertex data will be first created in a "local" vertex space and then converted to the "georeferenced" vertex space. In case of vertex space being "local", mesh vertices will be defined in a local Cartesian coordinate frame placed at the location provided with the create function. This will be represented by MeshLocalVertexSpace

unit

Property
Type
LengthUnit | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The unit of the size (defaults to the unit of the location's spatial reference).

GeographicParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

unit

Property
Type
LengthUnit | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates the unit of the source data. A linear scale will be applied to the position attributes to convert the source data to the unit of the spatial reference at which the mesh is being georeferenced. By default the unit of the source data is assumed to be the same as the target spatial reference.

MaterialParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

material

Property
Type
MeshMaterialProperties | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The material to be used for the mesh.

CreateParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

size

Property
Type
number | Size | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a specific unit is specified. The default unit for a GCS is always meters.

CreateBoxParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Parameters used to configure box mesh creation.

Supertypes
CreateParameters

imageFace

Property
Type
Facing | "all" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The face for generating image UV coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the imageFace parameter to one of east, west, north, south, up or down, the specified face will have full-sized UV coordinates while the other faces will retain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided material parameter will be applied to the specified imageFace. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box.

CreateSphereParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Parameters used to configure sphere mesh creation.

Supertypes
CreateParameters

densificationFactor

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance).

CreateCylinderParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Parameters used to configure cylinder mesh creation.

Supertypes
CreateParameters

densificationFactor

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a cylinder (at the cost of processing and rendering performance).

CreatePlaneParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Parameters used to configure plane mesh creation.

size

Property
Type
number | Size2D | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location, unless a specific unit is specified. The default unit for a GCS is always meters.

facing

Property
Type
Facing | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Direction the plane is facing.

Default value
"up"

CreateFromGLTFParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Parameters used to configure glTF mesh creation.

RotateParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

origin

Property
Type
Point | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The origin around which to rotate. If not specified, the mesh will be rotated around the Mesh.origin.

ScaleParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

origin

Property
Type
Point | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The origin point for scaling. If not specified, the mesh will be scaled around the Mesh.origin.

CenterAtParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

origin

Property
Type
Point | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The origin at which to center. If not specified, the mesh will be centered at the mesh extent center.

CreateFromElevationParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
AbortOptions

material

Property
Type
MeshMaterial | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The material to be used for the mesh.

demResolution

Property
Type
ElevationQueryDemResolution | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to auto). See ElevationLayer.queryElevation() for more details on the different settings.

Default value
"auto"

CreateElevationSamplerParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

noDataValue

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The value to use when there is no data available.

Default value
0

Size

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

width

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The width of the created mesh.

depth

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The depth of the created mesh.

height

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The height of the created mesh.

Size2D

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

width

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The width of the created mesh.

height

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The height of the created mesh.

Facing

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"east" | "west" | "north" | "south" | "up" | "down"

ExportGLTFOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
AbortOptions

origin

Property
Type
Point
Since
ArcGIS Maps SDK for JavaScript 5.0

The origin of the exported model, defaults to Mesh.origin. This location will correspond to the (0, 0, 0) coordinate in the binary glTF model.

VertexAttributes

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Represents the position and normal vertex attribute buffers of a mesh.

position

Property
Type
Float64Array<ArrayBuffer>
Since
ArcGIS Maps SDK for JavaScript 5.0

The position buffer.

normal

Property
Type
Float32Array<ArrayBuffer> | null | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The normal buffer.

tangent

Property
Type
Float32Array<ArrayBuffer> | null | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The tangent buffer.