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;
}| Member | Description |
|---|---|
PERSPECTIVE | Standard perspective projection; objects appear smaller with distance. |
ORTHOGRAPHIC | Parallel 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;
}| Member | Description |
|---|---|
POINT | Emits light equally in all directions from a point in space. |
DIRECTIONAL | Parallel rays from a conceptually infinite distance (e.g., sunlight). |
SPOT | Cone-shaped light with inner and outer cone angles. |
AREA | Planar emissive surface for soft shadows in PBR pipelines. |
VOLUME | Volumetric 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;
}| Member | Description |
|---|---|
DIFFUSE | Base colour / albedo channel. Most commonly used UV set. |
SPECULAR | Specular colour or reflectivity channel. |
AMBIENT | Ambient light colour override channel. |
EMISSIVE | Self-illumination emission channel. |
NORMAL | Tangent-space normal map channel. |
BUMP | Height-based bump map channel. |
OPACITY | Alpha / transparency channel. |
GLOW | Bloom/glow intensity channel. |
REFLECTION | Environment reflection channel. |
SHADOW | Shadow projection channel. |
SHININESS | Specular exponent / roughness channel. |
DISPLACEMENT | Geometry 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;
}| Member | Description |
|---|---|
ADD | Union: combine the volumes of both operands. |
SUB | Subtraction: remove the second operand’s volume from the first. |
INTERSECT | Intersection: 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;
}| Member | Description |
|---|---|
NORMAL | Surface normal vectors. |
UV | Texture UV coordinates. |
VERTEX_COLOR | Per-vertex RGBA colour. |
TANGENT | Tangent vectors for normal mapping. |
BINORMAL | Binormal (bitangent) vectors. |
SMOOTHING_GROUP | Per-polygon smoothing group integer IDs. |
MATERIAL | Per-polygon material index. |
POLYGON_GROUP | Polygon grouping index. |
VERTEX_CREASE | Subdivision vertex crease weights. |
EDGE_CREASE | Subdivision edge crease weights. |
USER_DATA | Arbitrary user-defined channel. |
VISIBILITY | Per-element visibility flags. |
SPECULAR | Specular colour or intensity layer. |
WEIGHT | Skinning blend weights. |
HOLE | Polygon 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;
}| Member | Description |
|---|---|
CONTROL_POINT | One value per control point (vertex). |
POLYGON_VERTEX | One value per polygon corner (face-vertex). |
POLYGON | One value per polygon. |
EDGE | One value per edge. |
ALL_SAME | A 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;
}| Member | Description |
|---|---|
DIRECT | Sequential access — no index array is used. |
INDEX | A separate index array addresses the data array. |
INDEX_TO_DIRECT | Index array maps each mapping primitive to a position in the data array. |