Enumerations — Aspose.3D TypeScript API Reference

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

All public enumerations exported by @aspose/3d. Each enumeration is implemented as a class with static singleton members rather than a TypeScript enum, which makes values opaque tokens that cannot be confused with raw strings or numbers.

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

ProjectionType

Camera projection model.

export class ProjectionType {
  static PERSPECTIVE: ProjectionType;
  static ORTHOGRAPHIC: ProjectionType;
}
MemberDescription
PERSPECTIVEStandard perspective projection; objects appear smaller with distance.
ORTHOGRAPHICParallel projection; object scale is constant regardless of depth. Used in CAD and isometric views.

Example

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

Light source category.

export class LightType {
  static POINT: LightType;
  static DIRECTIONAL: LightType;
  static SPOT: LightType;
  static AREA: LightType;
  static VOLUME: LightType;
}
MemberDescription
POINTEmits light equally in all directions from a point in space.
DIRECTIONALParallel rays from a conceptually infinite distance (e.g., sunlight).
SPOTCone-shaped light with inner and outer cone angles.
AREAPlanar emissive surface for soft shadows in PBR pipelines.
VOLUMEVolumetric light source.

Example

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

Identifies the texture channel a UV element is bound to.

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;
}
MemberDescription
DIFFUSEBase colour / albedo channel. Most commonly used UV set.
SPECULARSpecular colour or reflectivity channel.
AMBIENTAmbient light colour override channel.
EMISSIVESelf-illumination emission channel.
NORMALTangent-space normal map channel.
BUMPHeight-based bump map channel.
OPACITYAlpha / transparency channel.
GLOWBloom/glow intensity channel.
REFLECTIONEnvironment reflection channel.
SHADOWShadow projection channel.
SHININESSSpecular exponent / roughness channel.
DISPLACEMENTGeometry displacement channel.

Example

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

Constructive solid geometry (CSG) operation type.

export class BooleanOperation {
  static ADD: BooleanOperation;
  static SUB: BooleanOperation;
  static INTERSECT: BooleanOperation;
}
MemberDescription
ADDUnion: combine the volumes of both operands.
SUBSubtraction: remove the second operand’s volume from the first.
INTERSECTIntersection: retain only the volume shared by both operands.

BooleanOperation is stored as metadata on nodes produced by CSG importers. @aspose/3d does not perform runtime Boolean evaluation; the enum describes intent recorded in the source file.


VertexElementType

Semantic type for a VertexElement data layer.

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;
}
MemberDescription
NORMALSurface normal vectors.
UVTexture UV coordinates.
VERTEX_COLORPer-vertex RGBA colour.
TANGENTTangent vectors for normal mapping.
BINORMALBinormal (bitangent) vectors.
SMOOTHING_GROUPPer-polygon smoothing group integer IDs.
MATERIALPer-polygon material index.
POLYGON_GROUPPolygon grouping index.
VERTEX_CREASESubdivision vertex crease weights.
EDGE_CREASESubdivision edge crease weights.
USER_DATAArbitrary user-defined channel.
VISIBILITYPer-element visibility flags.
SPECULARSpecular colour or intensity layer.
WEIGHTSkinning blend weights.
HOLEPolygon hole flags.

MappingMode

Controls which geometry primitive each vertex element value is associated with.

export class MappingMode {
  static CONTROL_POINT: MappingMode;
  static POLYGON_VERTEX: MappingMode;
  static POLYGON: MappingMode;
  static EDGE: MappingMode;
  static ALL_SAME: MappingMode;
}
MemberDescription
CONTROL_POINTOne value per control point (vertex).
POLYGON_VERTEXOne value per polygon corner (face-vertex).
POLYGONOne value per polygon.
EDGEOne value per edge.
ALL_SAMEA single value applies to the entire mesh.

ReferenceMode

Controls how the vertex element data array is indexed.

export class ReferenceMode {
  static DIRECT: ReferenceMode;
  static INDEX: ReferenceMode;
  static INDEX_TO_DIRECT: ReferenceMode;
}
MemberDescription
DIRECTSequential access — no index array is used.
INDEXA separate index array addresses the data array.
INDEX_TO_DIRECTIndex array maps each mapping primitive to a position in the data array.

See Also