Skip to content
ParaShape

Mesh

A SceneObject whose data is { "type": "mesh", …Mesh } — the tag plus every field of Mesh.

Mesh

Used by: Behavior, PieceData.

// 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>, };
fieldtypeoptionalclassdoc
verticesArray<MeshVertex>nogeometrygeometry — positions the edges index.
edgesArray<MeshEdge>nogeometrygeometry — vertex-id pairs; at most two faces per edge.
facesArray<Face>nogeometrygeometry — 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>, };
fieldtypeoptionalclassdoc
loopsArray<Array<number>>nogeometrygeometry — edge ids; loops[0] is the outer boundary, the rest are holes; planar.
uvTransformnumber[]yesintentintent — 4x4 column-major Matrix4, world -> (u, v), z dropped.
materialstringyesintentintent — by name.
layerstringyesintentintent — by name.
attributesRecord<string, unknown>yesintentintent

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>, };
fieldtypeoptionalclassdoc
startnumbernogeometrygeometry — vertex id.
endnumbernogeometrygeometry — vertex id, never start.
smoothbooleannointentintent — not drawn, shading interpolated across it.
materialstringyesintentintent — by name.
layerstringyesintentintent — by name.
attributesRecord<string, unknown>yesintentintent

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>, };
fieldtypeoptionalclassdoc
position[number, number, number]nogeometrygeometry — mm, Z-up.
attributesRecord<string, unknown>yesintentintent
📖 1 min read