Enumerations — Aspose.3D for TypeScript
Package: @aspose/3d (v24.12.0)
Toutes les énumérations publiques exportées par @aspose/3d. Chaque énumération est implémentée comme une classe avec des membres singleton statiques plutôt qu’un TypeScript enum, ce qui rend les valeurs des jetons opaques qui ne peuvent pas être confondus avec des chaînes brutes ou des nombres.
import {
ProjectionType,
LightType,
TextureMapping,
BooleanOperation,
VertexElementType,
MappingMode,
ReferenceMode,
} from '@aspose/3d';ProjectionType
Modèle de projection de la caméra.
export class ProjectionType {
static PERSPECTIVE: ProjectionType;
static ORTHOGRAPHIC: ProjectionType;
}| Enumeration | Description |
|---|---|
VertexElementType | Semantic role of a vertex element layer: Normal , UV , VertexColor , Tangent , Binormal , and others. |
MappingMode | Controls which primitive a vertex element value maps to: ControlPoint , PolygonVertex , or Polygon . |
ReferenceMode | Controls how values are indexed: Direct or IndexToDirect . |
VertexFieldDataType | Data type of a vertex field in a custom vertex declaration: Float , Double , Int , Vector2 , Vector3 , Vector4 . |
ReferenceMode
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
Catégorie de source lumineuse.
export class LightType {
static POINT: LightType;
static DIRECTIONAL: LightType;
static SPOT: LightType;
static AREA: LightType;
static VOLUME: LightType;
}| Enumeration | Description |
|---|---|
ApertureMode | Camera aperture calculation mode: HorizontalAndVertical , Horizontal , Vertical , FocalLength . |
ProjectionType | Camera projection: Perspective or Orthographic . |
LightType | Type of light source: Point , Directional , Spot , Area . |
ReferenceMode
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
Identifie le canal de texture auquel un élément UV est lié.
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;
}| Enumeration | Description |
|---|---|
ExtrapolationType | How animation curves extrapolate beyond their key range: Constant , Linear , Cyclic , CyclicRelative , Oscillate . |
WeightedMode | Tangent weight mode for animation keyframes (unweighted, right-side, left-side, or both-sided weights). |
StepMode | Step interpolation mode for animation keyframes (continuous or next-step). |
RotationMode | Euler rotation order for node transforms: EulerXYZ , EulerXZY , etc. |
ReferenceMode
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
Type d’opération de géométrie solide constructive (CSG).
export class BooleanOperation {
static ADD: BooleanOperation;
static SUB: BooleanOperation;
static INTERSECT: BooleanOperation;
}| Enumeration | Description |
|---|---|
BooleanOperation | CSG Boolean operation: Union , Difference , Intersection . |
TextureMapping | How a texture is mapped to geometry: Diffuse , Specular , Emissive , Normal , Ambient , and more. |
BooleanOperation est stocké comme métadonnée sur les nœuds produits par les importateurs CSG. @aspose/3d ne réalise pas d’évaluation booléenne à l’exécution ; l’énumération décrit l’intention enregistrée dans le fichier source.
VertexElementType
Type sémantique pour un VertexElement couche de données.
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;
}MappingMode
Contrôle le primitive géométrique auquel chaque valeur d’élément de sommet est associée.
export class MappingMode {
static CONTROL_POINT: MappingMode;
static POLYGON_VERTEX: MappingMode;
static POLYGON: MappingMode;
static EDGE: MappingMode;
static ALL_SAME: MappingMode;
}ReferenceMode
Contrôle la façon dont le tableau de données d’élément de sommet est indexé.
export class ReferenceMode {
static DIRECT: ReferenceMode;
static INDEX: ReferenceMode;
static INDEX_TO_DIRECT: ReferenceMode;
}