Enumerations

Enumerations — Aspose.3D for TypeScript

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

所有公开的枚举已导出自 @aspose/3d. 每个枚举都实现为一个类,具有静态单例成员,而不是 TypeScript enum,,这使得值成为不透明的令牌,无法与原始字符串或数字混淆。.

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

ProjectionType

相机投影模型。.

export class ProjectionType {
  static PERSPECTIVE: ProjectionType;
  static ORTHOGRAPHIC: ProjectionType;
}
EnumerationDescription
VertexElementTypeSemantic role of a vertex element layer: Normal , UV , VertexColor , Tangent , Binormal , and others.
MappingModeControls which primitive a vertex element value maps to: ControlPoint , PolygonVertex , or Polygon .
ReferenceModeControls how values are indexed: Direct or IndexToDirect .
VertexFieldDataTypeData type of a vertex field in a custom vertex declaration: Float , Double , Int , Vector2 , Vector3 , Vector4 .

Properties

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

光源类别。.

export class LightType {
  static POINT: LightType;
  static DIRECTIONAL: LightType;
  static SPOT: LightType;
  static AREA: LightType;
  static VOLUME: LightType;
}
EnumerationDescription
ApertureModeCamera aperture calculation mode: HorizontalAndVertical , Horizontal , Vertical , FocalLength .
ProjectionTypeCamera projection: Perspective or Orthographic .
LightTypeType of light source: Point , Directional , Spot , Area .

Properties

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

标识 UV 元素绑定的纹理通道。.

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;
}
EnumerationDescription
ExtrapolationTypeHow animation curves extrapolate beyond their key range: Constant , Linear , Cyclic , CyclicRelative , Oscillate .
WeightedModeTangent weight mode for animation keyframes (unweighted, right-side, left-side, or both-sided weights).
StepModeStep interpolation mode for animation keyframes (continuous or next-step).
RotationModeEuler rotation order for node transforms: EulerXYZ , EulerXZY , etc.

Properties

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

构造实体几何(CSG)操作类型。.

export class BooleanOperation {
  static ADD: BooleanOperation;
  static SUB: BooleanOperation;
  static INTERSECT: BooleanOperation;
}
EnumerationDescription
BooleanOperationCSG Boolean operation: Union , Difference , Intersection .
TextureMappingHow a texture is mapped to geometry: Diffuse , Specular , Emissive , Normal , Ambient , and more.

BooleanOperation 存储为由 CSG 导入器生成的节点的元数据。. @aspose/3d 不执行运行时布尔求值;该枚举描述了记录在源文件中的意图。.


VertexElementType

语义类型用于 VertexElement 数据层。.

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

控制每个顶点元素值关联的几何基元。.

export class MappingMode {
  static CONTROL_POINT: MappingMode;
  static POLYGON_VERTEX: MappingMode;
  static POLYGON: MappingMode;
  static EDGE: MappingMode;
  static ALL_SAME: MappingMode;
}

ReferenceMode

控制顶点元素数据数组的索引方式。.

export class ReferenceMode {
  static DIRECT: ReferenceMode;
  static INDEX: ReferenceMode;
  static INDEX_TO_DIRECT: ReferenceMode;
}

另见

 中文