Mesh
A SceneObject whose data is { "type": "mesh", …Mesh } — the tag plus every field of Mesh.
Mesh
// 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>, };| field | type | optional | class | doc |
|---|---|---|---|---|
vertices | Array<MeshVertex> | no | geometry | geometry — positions the edges index. |
edges | Array<MeshEdge> | no | geometry | geometry — vertex-id pairs; at most two faces per edge. |
faces | Array<Face> | no | geometry | geometry — planar faces; Face.loops[0] is the outer boundary. |
Face
Used by: Mesh.
// 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.
*/
uvTransform?: number[],
/**
* intent — by name.
*/
material?: string,
/**
* intent — by name.
*/
layer?: string,
/**
* intent
*/
attributes?: Record<string, unknown>, };| field | type | optional | class | doc |
|---|---|---|---|---|
loops | Array<Array<number>> | no | geometry | geometry — edge ids; loops[0] is the outer boundary, the rest are holes; planar. |
uvTransform | number[] | yes | intent | intent — 4x4 column-major Matrix4, world -> (u, v), z dropped. |
material | string | yes | intent | intent — by name. |
layer | string | yes | intent | intent — by name. |
attributes | Record<string, unknown> | yes | intent | intent |
MeshEdge
Used by: Mesh.
// 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>, };| field | type | optional | class | doc |
|---|---|---|---|---|
start | number | no | geometry | geometry — vertex id. |
end | number | no | geometry | geometry — vertex id, never start. |
smooth | boolean | no | intent | intent — not drawn, shading interpolated across it. |
material | string | yes | intent | intent — by name. |
layer | string | yes | intent | intent — by name. |
attributes | Record<string, unknown> | yes | intent | intent |
MeshVertex
Used by: Mesh.
// 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>, };| field | type | optional | class | doc |
|---|---|---|---|---|
position | [number, number, number] | no | geometry | geometry — mm, Z-up. |
attributes | Record<string, unknown> | yes | intent | intent |
📖 1 min read