MeshTopology
Represents the topology of a mesh, defining how vertices are connected to form primitives.
| Type | Name | Interface Description |
|---|---|---|
| Enum | LineLoop | • Function: A series of lines where each vertex connects to the next and the last vertex connects back to the first. |
| Enum | Lines | • Function: Each pair of consecutive vertices forms a line segment. |
| Enum | LineStrip | • Function: A series of connected line segments where each vertex (except the first) uses the previous vertex as an endpoint. |
| Enum | Points | • Function: Each vertex is a separate point. |
| Enum | TriangleFan | • Function: A series of triangles where each new vertex (after the first two) forms a triangle with the first vertex and the previous vertex. |
| Enum | Triangles | • Function: Each set of three consecutive vertices forms a triangle. |
| Enum | TriangleStrip | • Function: A series of triangles where each new vertex (after the first two) forms a triangle with the previous two vertices. |
| Enum | Unknown | • Function: The mesh topology is unknown or not specified. |
Examples
LineLoop
let value = APJS.MeshTopology.LineLoop;
Lines
let value = APJS.MeshTopology.Lines;
LineStrip
let value = APJS.MeshTopology.LineStrip;
Points
let value = APJS.MeshTopology.Points;
TriangleFan
let value = APJS.MeshTopology.TriangleFan;
Triangles
let value = APJS.MeshTopology.Triangles;
TriangleStrip
let value = APJS.MeshTopology.TriangleStrip;
Unknown
let value = APJS.MeshTopology.Unknown;
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use MeshTopology here
}
onUpdate(deltaTime: number) {
}
}