Mesh
构造函数
Mesh
网格构造函数 - 创建新的网格几何图形实例
属性
extent
网格几何图形的三维范围
extent: Extent
类型: Extent
loadError
加载错误对象 - 加载过程中发生错误时返回的错误对象
loadError: Error
类型: Error
loadStatus
加载状态 - 表示加载操作的当前状态
loadStatus: "loaded" | "not-loaded" | "loading" | "failed"
类型: "loaded" | "not-loaded" | "loading" | "failed"
loadWarnings
加载警告列表 - 加载过程中发生的警告信息
loadWarnings: any[]
类型: any[]
origin
网格原点 - 网格的参考原点位置
origin: Point
类型: Point
type
几何图形类型标识符
type: "mesh"
类型: "mesh"
vertexAttributes
顶点属性 - 描述网格每个顶点属性的对象
vertexAttributes: MeshVertexAttributes
访问器
components
An array of mesh components that can be used to apply materials
get components(): MeshComponent[]
返回: MeshComponent An array of mesh components that can be used to apply materials
transform
Additional local transformation of the mesh vertices.
get transform(): MeshTransform
返回: MeshTransform Additional local transformation of the mesh vertices.
vertexSpace
The vertex space of the mesh.
get vertexSpace(): MeshGeoreferencedVertexSpace | MeshLocalVertexSpace
返回: MeshGeoreferencedVertexSpace | MeshLocalVertexSpace The vertex space of the mesh.
set vertexSpace(value: MeshGeoreferencedVertexSpaceProperties & object | MeshLocalVertexSpaceProperties & object): void
参数
- value:
MeshGeoreferencedVertexSpaceProperties&object|MeshLocalVertexSpaceProperties&object
返回: void
方法
addComponent
Adds a component to the mesh.
cancelLoad
Returns
cancelLoad(): void
返回:void
centerAt
Centers the mesh at the specified location without changing its scale.
centerAt(location, parameters?): Mesh
参数
- location:
PointThe location at which to center the mesh. - parameters?:
MeshCenterAtParametersAdditional parameters.
返回:Mesh
clone
创建网格的深度克隆 - 复制网格及其所有属性
clone(): Mesh
返回:Mesh
isFulfilled
isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).
isFulfilled(): boolean
返回:boolean
isRejected
isRejected() may be used to verify if creating an instance of the class is rejected.
isRejected(): boolean
返回:boolean
isResolved
isResolved() may be used to verify if creating an instance of the class is resolved.
isResolved(): boolean
返回:boolean
load
加载网格数据 - 异步加载网格的几何数据和属性
offset
Offsets the mesh geometry by the specified distance in x, y, and z.
offset(dx, dy, dz): Mesh
参数
- dx:
numberThe amount to offset the geometry in the x direction. - dy:
numberThe amount to offset the geometry in the y direction. - dz:
numberThe amount to offset the geometry in the z direction.
返回:Mesh
removeComponent
Removes a component from the mesh.
rotate
Rotates the mesh geometry around its x, y and z axis (in that order).
rotate(angleX, angleY, angleZ, parameters?): Mesh
参数
- angleX:
numberThe angle by which to rotate around the x-axis (in degrees). - angleY:
numberThe angle by which to rotate around the y-axis (in degrees). - angleZ:
numberThe angle by which to rotate around the z-axis (in degrees). - parameters?:
MeshRotateParametersAdditional parameters.
返回:Mesh
scale
Scales the mesh geometry by the specified factor.
scale(factor, parameters?): Mesh
参数
- factor:
numberThe amount to scale the geometry. - parameters?:
MeshScaleParametersAdditional parameters.
返回:Mesh
toBinaryGLTF
Export a mesh to a binary glTF (glb) representation.
vertexAttributesChanged
Notifies that any cached values that depend on vertex attributes need to be recalculated.
vertexAttributesChanged(): void
返回:void
when
when() may be leveraged once an instance of the class is created.
when(callback?, errback?): Promise
参数
- callback?:
FunctionThe function to call when the promise resolves. - errback?:
FunctionThe function to execute when the promise fails.
返回:Promise

BIMFlux AI
