Mesh
Evaluated shape.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Face } from "./Face.js";
import type { MeshEdge } from "./MeshEdge.js";
import type { MeshVertex } from "./MeshVertex.js";
export type Mesh = {
/**
* geometry — positions the edges index.
*/
vertices: Array<MeshVertex>,
/**
* geometry — vertex-id pairs; at most two faces per edge.
*/
edges: Array<MeshEdge>,
/**
* geometry — planar faces; `Face.loops[0]` is the outer boundary.
*/
faces: Array<Face>, };// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type MeshVertex = {
/**
* geometry — mm, Z-up.
*/
position: [number, number, number],
/**
* intent
*/
attributes?: Record<string, unknown>, };// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type MeshEdge = {
/**
* geometry — vertex id.
*/
start: number,
/**
* geometry — vertex id, never `start`.
*/
end: number,
/**
* intent — not drawn, shading interpolated across it.
*/
smooth: boolean,
/**
* intent — by name.
*/
material?: string,
/**
* intent — by name.
*/
layer?: string,
/**
* intent
*/
attributes?: Record<string, unknown>, };// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Face = {
/**
* geometry — edge ids; `loops[0]` is the outer boundary, the rest are holes; planar.
*/
loops: Array<Array<number>>,
/**
* intent — 4x4 column-major `Matrix4`, world -> (u, v), z dropped.
*/
uv?: number[],
/**
* intent — by name.
*/
material?: string,
/**
* intent — by name.
*/
layer?: string,
/**
* intent
*/
attributes?: Record<string, unknown>, };📖 1 min read