@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
59 lines (52 loc) • 2.41 kB
TypeScript
import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
/** @since 5.0 */
export interface MeshVertexAttributesProperties extends Partial<Pick<MeshVertexAttributes, "color" | "normal" | "position" | "tangent" | "uv">> {}
/** @since 5.0 */
export default class MeshVertexAttributes extends MeshVertexAttributesSuperclass {
constructor(properties?: MeshVertexAttributesProperties);
/**
* A flat array of the vertex colors (4 elements per vertex ranging from 0 to 255).
* Vertex colors are multiplied by the component material color (if any is defined).
*/
accessor color: MeshVertexColor | null | undefined;
/**
* A flat array of the vertex normals (3 elements per vertex ranging from -1 to 1).
*
* @since 5.0
*/
accessor normal: MeshVertexNormal | null | undefined;
/**
* A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial
* reference system of the geometry.
*
* @since 5.0
*/
accessor position: MeshVertexPosition;
/**
* A flat array of the vertex tangents (4 elements per vertex ranging from -1 to 1. The 4th element is a sign value
* (-1 or +1) indicating handedness of the tangent basis). An array of 4-component vectors specifying per-vertex tangents.
* Tangents are used (and currently required) for normal mapping—see [MeshMaterial.normalTexture](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/MeshMaterial/#normalTexture).
* For more details on the expected encoding of these, see the [glTF 2.0 spec](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0).
*
* @since 5.0
*/
accessor tangent: MeshVertexTangent | null | undefined;
/**
* A flat array of vertex uv coordinates (2 elements per vertex).
*
* @since 5.0
*/
accessor uv: MeshVertexUV | null | undefined;
}
declare const MeshVertexAttributesSuperclass: typeof JSONSupport & typeof ClonableMixin
/** @since 5.0 */
export type MeshVertexPosition = Float64Array<ArrayBuffer>;
/** @since 5.0 */
export type MeshVertexUV = Float32Array<ArrayBuffer>;
/** @since 5.0 */
export type MeshVertexNormal = Float32Array<ArrayBuffer>;
/** @since 5.0 */
export type MeshVertexTangent = Float32Array<ArrayBuffer>;
/** @since 5.0 */
export type MeshVertexColor = Uint8Array<ArrayBuffer>;