2.0 KiB
2.0 KiB
| outline | ||
|---|---|---|
|
ParametricSphere
- 源文件:
packages/sdk/src/parametric/ParametricSphere.ts - 文档位置:
packages/docs/api/parametric/ParametricSphere.md
类:ParametricSphere
- 作用:高精度参数化球体 支持完全自定义的球体生成,包括半径、分段数、起始角度等参数
- 继承/实现:
extends Mesh<BufferGeometry, Material>;implements IParametricGeometry
构造函数
new ParametricSphere(options: ISphereOptions = {})
-
作用:创建参数化球体
-
入参:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
options |
ISphereOptions |
否 | - 球体配置选项 |
- 出参:
ParametricSphere - 返回说明:返回当前类实例。
属性
| 属性名 | 可见性 | 类型 | 作用 |
|---|---|---|---|
options |
public |
Required<ISphereOptions> |
用于保存 options 对应的数据。 |
方法
createGeometry(): SphereGeometry
-
作用:创建球体几何体
-
入参:无
-
出参:
SphereGeometry -
返回说明:返回
SphereGeometry。
updateParameters(options: Partial<ISphereOptions>): void
-
作用:更新球体参数
-
入参:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
options |
Partial<ISphereOptions> |
是 | - 新的球体配置选项 |
- 出参:
void - 返回说明:无返回值。
updateGeometry(): void
-
作用:更新几何体
-
入参:无
-
出参:
void -
返回说明:无返回值。
getParameters(): ISphereOptions
-
作用:获取当前参数
-
入参:无
-
出参:
ISphereOptions -
返回说明:返回
ISphereOptions。
dispose(): void
-
作用:销毁资源
-
入参:无
-
出参:
void -
返回说明:无返回值。
构造示例
- 当前 Demo 中没有直接展示
ParametricSphere的构造调用。
函数示例
- 当前 Demo 中没有直接展示
ParametricSphere的公开方法调用。