Enumerations — Aspose.3D TypeScript API Reference

Paket: @aspose/3d (v24.12.0)

Alle öffentlichen Aufzählungen, die exportiert werden von @aspose/3d. Jede Aufzählung wird als Klasse mit statischen Singleton-Mitgliedern implementiert, anstatt als TypeScript enum, was Werte zu undurchsichtigen Tokens macht, die nicht mit rohen Zeichenketten oder Zahlen verwechselt werden können.

import {
  ProjectionType,
  LightType,
  TextureMapping,
  BooleanOperation,
  VertexElementType,
  MappingMode,
  ReferenceMode,
} from '@aspose/3d';

ProjectionType

Kameraprojektionsmodell.

export class ProjectionType {
  static PERSPECTIVE: ProjectionType;
  static ORTHOGRAPHIC: ProjectionType;
}
EnumerationsEnumerations
PERSPECTIVEStandard-Perspektivprojektion; Objekte erscheinen mit zunehmender Entfernung kleiner.
ORTHOGRAPHICParallelprojektion; die Skalierung von Objekten bleibt unabhängig von der Tiefe konstant. Wird in CAD und isometrischen Ansichten verwendet.

Enumerations

import { Scene, Camera, ProjectionType } from '@aspose/3d';

const scene = new Scene();
const cam = new Camera();
cam.projectionType = ProjectionType.ORTHOGRAPHIC;
scene.rootNode.createChildNode('cam', cam);

LightType

Kategorie der Lichtquelle.

export class LightType {
  static POINT: LightType;
  static DIRECTIONAL: LightType;
  static SPOT: LightType;
  static AREA: LightType;
  static VOLUME: LightType;
}
EnumerationsEnumerations
POINTEmittiert Licht gleichmäßig in alle Richtungen von einem Punkt im Raum.
DIRECTIONALParallele Strahlen aus einer konzeptionell unendlichen Entfernung (z. B. Sonnenlicht).
SPOTKegelförmiges Licht mit inneren und äußeren Kegelwinkeln.
AREAPlanare emittierende Oberfläche für weiche Schatten in PBR-Pipelines.
VOLUMEVolumetrische Lichtquelle.

Enumerations

import { Scene, Light, LightType } from '@aspose/3d';

const scene = new Scene();
const sun = new Light();
sun.lightType = LightType.DIRECTIONAL;
scene.rootNode.createChildNode('sun', sun);

TextureMapping

Identifiziert den Texturkanal, an den ein UV‑Element gebunden ist.

export class TextureMapping {
  static DIFFUSE: TextureMapping;
  static SPECULAR: TextureMapping;
  static AMBIENT: TextureMapping;
  static EMISSIVE: TextureMapping;
  static NORMAL: TextureMapping;
  static BUMP: TextureMapping;
  static OPACITY: TextureMapping;
  static GLOW: TextureMapping;
  static REFLECTION: TextureMapping;
  static SHADOW: TextureMapping;
  static SHININESS: TextureMapping;
  static DISPLACEMENT: TextureMapping;
}
EnumerationsEnumerations
DIFFUSEBasisfarbe / Albedo-Kanal. Am häufigsten verwendetes UV-Set.
SPECULARSpecularfarbe- oder Reflexionskanal.
AMBIENTUmgebungslichtfarb‑Überschreibungs‑Kanal.
EMISSIVESelbstbeleuchtungs‑Emissionskanal.
NORMALTangentialraum‑Normalen‑Map‑Kanal.
BUMPHöhenbasierter Bump‑Map‑Kanal.
OPACITYAlpha‑ / Transparenzkanal.
GLOWBloom‑/Glüheintensitätskanal.
REFLECTIONUmgebungsreflexionskanal.
SHADOWSchattenprojektionskanal.
SHININESSSpecular-Exponent / Rauheitskanal.
DISPLACEMENTGeometrie-Displacementskanal.

Enumerations

import { Mesh, TextureMapping, MappingMode, ReferenceMode } from '@aspose/3d';

const mesh = new Mesh();
// ... add control points and polygons ...
const uv = mesh.createElementUV(TextureMapping.DIFFUSE, MappingMode.CONTROL_POINT, ReferenceMode.DIRECT);

BooleanOperation

Typ der konstruktiven Festkörpergeometrie‑Operation (CSG).

export class BooleanOperation {
  static ADD: BooleanOperation;
  static SUB: BooleanOperation;
  static INTERSECT: BooleanOperation;
}
EnumerationsEnumerations
ADDUnion: Kombiniere die Volumina beider Operanden.
SUBSubtraction: Entferne das Volumen des zweiten Operanden vom ersten.
INTERSECTIntersection: Behalte nur das von beiden Operanden geteilte Volumen.

BooleanOperation wird als Metadaten auf Knoten gespeichert, die von CSG-Importeuren erzeugt werden. @aspose/3d führt keine Laufzeit-Boolean-Auswertung durch; das Enum beschreibt die im Quellfile festgehaltene Absicht.


VertexElementType

Semantischer Typ für ein VertexElement Datenlayer.

export class VertexElementType {
  static BINORMAL: VertexElementType;
  static NORMAL: VertexElementType;
  static TANGENT: VertexElementType;
  static MATERIAL: VertexElementType;
  static POLYGON_GROUP: VertexElementType;
  static UV: VertexElementType;
  static VERTEX_COLOR: VertexElementType;
  static SMOOTHING_GROUP: VertexElementType;
  static VERTEX_CREASE: VertexElementType;
  static EDGE_CREASE: VertexElementType;
  static USER_DATA: VertexElementType;
  static VISIBILITY: VertexElementType;
  static SPECULAR: VertexElementType;
  static WEIGHT: VertexElementType;
  static HOLE: VertexElementType;
}
EnumerationsEnumerations
NORMALOberflächen-Normalenvektoren.
UVTextur-UV-Koordinaten.
VERTEX_COLORRGBA-Farbe pro Scheitelpunkt.
TANGENTTangentialvektoren für Normal Mapping.
BINORMALBinormale (Bitangente) Vektoren.
SMOOTHING_GROUPGlättungsgruppen-Integer-IDs pro Polygon.
MATERIALMaterialindex pro Polygon.
POLYGON_GROUPPolygon-Gruppierungsindex.
VERTEX_CREASEKnickgewichte für Unterteilungs‑Scheitelpunkte.
EDGE_CREASEKnickgewichte für Unterteilungs‑Kanten.
USER_DATABeliebiger benutzerdefinierter Kanal.
VISIBILITYSichtbarkeitsflags pro Element.
SPECULARSpecularfarbe oder Intensitätsschicht.
WEIGHTSkinning-Mischgewichte.
HOLEPolygon-Löcher-Flags.

MappingMode

Steuert, welchem Geometrie‑Primitive jeder Vertex‑Element‑Wert zugeordnet ist.

export class MappingMode {
  static CONTROL_POINT: MappingMode;
  static POLYGON_VERTEX: MappingMode;
  static POLYGON: MappingMode;
  static EDGE: MappingMode;
  static ALL_SAME: MappingMode;
}
EnumerationsEnumerations
CONTROL_POINTEin Wert pro Kontrollpunkt (Vertex).
POLYGON_VERTEXEin Wert pro Polygon-Ecke (Face-Vertex).
POLYGONEin Wert pro Polygon.
EDGEEin Wert pro Kante.
ALL_SAMEEin einzelner Wert gilt für das gesamte Mesh.

ReferenceMode

Steuert, wie das Datenarray des Vertex‑Elements indiziert wird.

export class ReferenceMode {
  static DIRECT: ReferenceMode;
  static INDEX: ReferenceMode;
  static INDEX_TO_DIRECT: ReferenceMode;
}
EnumerationsEnumerations
DIRECTSequentieller Zugriff — es wird kein Index-Array verwendet.
INDEXEin separates Index-Array adressiert das Daten-Array.
INDEX_TO_DIRECTDas Index-Array ordnet jedes Mapping-Primitive einer Position im Daten-Array zu.

Siehe auch

 Deutsch