-
new MorphGeometry(params)
-
Morph几何体
Name Type Description params
object optional 创建对象的属性参数。可包含此类的所有属性。
Extends
Members Show Inherited
Name | Type | Default | Description |
---|---|---|---|
isMorphGeometry
|
boolean | true | |
className
|
string | MorphGeometry | |
weights
|
Array.<number> |
morph animation weights |
|
targets
|
Object | null |
like: { vertices: [[], []], normals: [[], []], tangents: [[], []] } |
isGeometry
|
boolean | true | inherited |
vertices
|
GeometryData | null |
inherited
顶点数据 |
uvs
|
GeometryData | null |
inherited
uv 数据 |
uvs1
|
GeometryData | null |
inherited
uv1 数据 |
colors
|
GeometryData | null |
inherited
color 数据 |
indices
|
GeometryData | null |
inherited
顶点索引数据 |
skinIndices
|
GeometryData | null |
inherited
骨骼索引 |
skinWeights
|
GeometryData | null |
inherited
骨骼权重数据 |
mode
|
number | TRIANGLES |
inherited
绘制模式 |
isStatic
|
Boolean | true |
inherited
是否是静态 |
isDirty
|
Boolean | true |
inherited
是否需要更新 |
useAABBRaycast
|
Boolean |
inherited
使用 aabb 碰撞检测 |
|
userData
|
any | null |
inherited
用户数据 |
id
|
string |
inherited
id |
|
normals
|
GeometryData | null |
inherited
法向量数据,如果没有的话会自动生成 |
tangents
|
GeometryData | null |
inherited
切线向量数据,如果没有的话会自动生成 |
tangents1
|
GeometryData | null |
inherited
切线向量数据,如果没有的话会自动生成 |
Methods Show Inherited
-
inherited convertToLinesMode()
-
将三角形模式转换为线框模式,即 Material 中的 wireframe
-
平移
Name Type Default Description x
Number 0 optional y
Number 0 optional z
Number 0 optional Returns:
Type Description Geometry this -
缩放
Name Type Default Description x
Number 1 optional y
Number 1 optional z
Number 1 optional Returns:
Type Description Geometry this -
旋转
Name Type Default Description x
Number 0 optional 旋转角度x
y
Number 0 optional 旋转角度y
z
Number 0 optional 旋转角度z
Returns:
Type Description Geometry this -
Transforms the geometry with a mat4.
Name Type Description mat4
Matrix4 Returns:
Type Description Geometry this -
合并两个 geometry
Name Type Default Description geometry
Geometry matrix
Matrix4 null optional 合并的矩阵
Returns:
Type Description Geometry this -
inherited addPoints(points)
-
添加顶点
Name Type Description points
Array.<number> repeatable 顶点坐标,如 addPoints([x, y, z], [x, y, z])
-
inherited addIndices(indices)
-
添加顶点索引
Name Type Description indices
number repeatable 顶点索引,如 addIndices(0, 1, 2)
-
inherited addLine(p1, p2)
-
添加一条线
Name Type Description p1
Array.<number> 起点坐标,如 [x, y, z]
p2
Array.<number> 终点坐标
-
inherited addFace(p1, p2, p3)
-
添加一个三角形 ABC
Name Type Description p1
Array.<number> 点A,如 [x, y, z]
p2
Array.<number> 点B
p3
Array.<number> 点C
-
inherited addRect(p1, p2, p3, p4)
-
添加一个矩形 ABCD
Name Type Description p1
Array.<number> 点A,如 [x, y, z]
p2
Array.<number> 点B
p3
Array.<number> 点C
p4
Array.<number> 点D
-
inherited setVertexUV(start, uvs)
-
设置顶点对应的uv坐标
Name Type Description start
number 开始的顶点索引
uvs
Array.<Array.<number>> uv坐标数据,如 [[0, 0], [1, 0]]
-
inherited setFaceUV(start, p1, p2, p3)
-
设置三角形ABC的uv
Name Type Description start
number 开始的顶点索引
p1
Array.<number> 点A的uv,如 [0, 0]
p2
Array.<number> 点B的uv
p3
Array.<number> 点C的uv
-
inherited setRectUV(start, p1, p2, p3, p4)
-
设置矩形ABCD的uv
Name Type Description start
number 开始的顶点索引
p1
Array.<number> 点A的uv,如 [0, 0]
p2
Array.<number> 点B的uv
p3
Array.<number> 点C的uv
p4
Array.<number> 点D的uv
-
获取指定matrix变化后的包围盒数据
Name Type Default Description matrix
Matrix4 null optional matrix 需要变换的矩阵
bounds
Bounds null optional 包围盒数据,传入的话会改变他
Returns:
Type Description Bounds 包围盒数据 -
获取本地包围盒
Name Type Default Description force
Boolean false optional 是否强制刷新
Returns:
Type Description Bounds -
获取本地球面包围盒
Name Type Default Description force
Boolean false optional 是否强制刷新
Returns:
Type Description Sphere -
inherited convertToNoIndices(verticesItemLen)
-
将 Geometry 转换成无 indices
Name Type Default Description verticesItemLen
number 3 optional 转换结果的顶点数据的位数(3 or 4),如果为4会补1
-
_raycast,子类可覆盖实现
Name Type Description ray
Ray side
GLenum Returns:
Type Description Array.<Vector3> | null -
raycast
Name Type Default Description ray
Ray side
GLenum sort
Boolean true optional 是否按距离排序
Returns:
Type Description Array.<Vector3> | null -
inherited getSize(){number}
-
获取数据的内存大小,只处理顶点数据,单位为字节
Returns:
Type Description number 内存占用大小