137 lines
3.9 KiB
Markdown
137 lines
3.9 KiB
Markdown
---
|
|
outline: [2, 3]
|
|
---
|
|
|
|
# API 总览
|
|
|
|
本文档基于 `packages/sdk/src` 的实际源码结构整理,并参考 `packages/demo/src` 中的调用方式补充了常见入口。每个页面都包含函数入参、出参以及属性作用说明。
|
|
|
|
## 快速使用流程
|
|
|
|
```ts
|
|
import { Tool, Viewer, ViewerEvents } from "@deep/engine";
|
|
|
|
const viewer = new Viewer("viewer", {
|
|
initCameraState: {
|
|
position: { x: 5, y: 5, z: 5 },
|
|
target: { x: 0, y: 0, z: 0 },
|
|
},
|
|
});
|
|
|
|
viewer.emitter.once(ViewerEvents.INIT).then(() => {
|
|
viewer.resources.loadGLTF("/model/demo.glb").then((model) => {
|
|
viewer.scene.add(model);
|
|
Tool.setRenderOrder(viewer.scene, 1, [{ name: "岩样", renderOrder: 2 }]);
|
|
});
|
|
});
|
|
```
|
|
|
|
## 模块导航
|
|
|
|
### 核心
|
|
|
|
- [Viewer](/api/core/Viewer)
|
|
- [ViewerInstances](/api/core/ViewerInstances)
|
|
|
|
### 管理器
|
|
|
|
- [ClippingManager](/api/manager/ClippingManager)
|
|
- [ClippingPlane](/api/manager/ClippingPlane)
|
|
- [CSS2DRendererManager](/api/manager/CSS2DRendererManager)
|
|
- [CSS3DRendererManager](/api/manager/CSS3DRendererManager)
|
|
- [EventManager](/api/manager/EventManager)
|
|
- [IconManager](/api/manager/IconManager)
|
|
- [PanelManager](/api/manager/PanelManager)
|
|
- [ParametricManager](/api/manager/ParametricManager)
|
|
- [PipelineManager](/api/manager/PipelineManager)
|
|
- [RangeCullingManager](/api/manager/RangeCullingManager)
|
|
- [ResourceManager](/api/manager/ResourceManager)
|
|
- [RuptureEventManager](/api/manager/RuptureEventManager)
|
|
- [SelectionManager](/api/manager/SelectionManager)
|
|
|
|
### 网格与面板
|
|
|
|
- [ClippingHelper](/api/mesh/ClippingHelper)
|
|
- [CubePanel](/api/mesh/CubePanel)
|
|
- [FlowLine](/api/mesh/FlowLine)
|
|
- [HtmlPanel](/api/mesh/HtmlPanel)
|
|
- [Icon](/api/mesh/Icon)
|
|
- [SpritePanel](/api/mesh/SpritePanel)
|
|
|
|
### 工具
|
|
|
|
- [CollisionDetector](/api/tool/CollisionDetector)
|
|
- [CSGOperator](/api/tool/CSGOperator)
|
|
- [Tool](/api/tool/Tool)
|
|
|
|
### 材质
|
|
|
|
- [MaterialFactory](/api/materials/MaterialFactory)
|
|
- [Rock1Material](/api/materials/Rock1Material)
|
|
- [Rock2Material](/api/materials/Rock2Material)
|
|
- [Rock3Material](/api/materials/Rock3Material)
|
|
- [Rock4Material](/api/materials/Rock4Material)
|
|
- [Rock5Material](/api/materials/Rock5Material)
|
|
- [Rock6Material](/api/materials/Rock6Material)
|
|
- [Rock7Material](/api/materials/Rock7Material)
|
|
- [Rock8Material](/api/materials/Rock8Material)
|
|
- [RockMaterial](/api/materials/RockMaterial)
|
|
|
|
### 特效
|
|
|
|
- [FaultSlip](/api/effect/FaultSlip)
|
|
- [FlowParticles](/api/effect/FlowParticles)
|
|
- [FractureEffect](/api/effect/FractureEffect)
|
|
- [RockDebris](/api/effect/RockDebris)
|
|
- [SeismicWave](/api/effect/SeismicWave)
|
|
|
|
### 体积与点云
|
|
|
|
- [PointCloud](/api/effect/volume/PointCloud)
|
|
- [PointCloudTool](/api/effect/volume/PointCloudTool)
|
|
- [VolumeMesh](/api/effect/volume/VolumeMesh)
|
|
- [VolumeNode](/api/effect/volume/VolumeNode)
|
|
- [VolumeTool](/api/effect/volume/VolumeTool)
|
|
|
|
### 参数化
|
|
|
|
- [ParametricArch](/api/parametric/ParametricArch)
|
|
- [ParametricBox](/api/parametric/ParametricBox)
|
|
- [ParametricCylinder](/api/parametric/ParametricCylinder)
|
|
- [ParametricGeometryBase](/api/parametric/ParametricGeometryBase)
|
|
- [ParametricPipe](/api/parametric/ParametricPipe)
|
|
- [ParametricRing](/api/parametric/ParametricRing)
|
|
- [ParametricSphere](/api/parametric/ParametricSphere)
|
|
- [ParametricTorus](/api/parametric/ParametricTorus)
|
|
- [ParametricWireframe](/api/parametric/ParametricWireframe)
|
|
- [types](/api/parametric/types)
|
|
|
|
### 后处理
|
|
|
|
- [BloomPass](/api/passes/BloomPass)
|
|
- [OutlinePass](/api/passes/OutlinePass)
|
|
|
|
### 机器人
|
|
|
|
- [DrillingRobot](/api/robot/DrillingRobot)
|
|
- [MiningRobot](/api/robot/MiningRobot)
|
|
|
|
### 枚举与事件
|
|
|
|
- [EventManagerEvents](/api/enums/EventManagerEvents)
|
|
- [SelectionManagerEvents](/api/enums/SelectionManagerEvents)
|
|
- [ViewerEvents](/api/enums/ViewerEvents)
|
|
|
|
### 源码扩展
|
|
|
|
- [DExtrudeGeometry](/api/source/DExtrudeGeometry)
|
|
|
|
### 源码扩展 Core
|
|
|
|
- [Curve](/api/source/core/Curve)
|
|
|
|
### 源码扩展 Curves
|
|
|
|
- [CatmullRomCurve3](/api/source/curves/CatmullRomCurve3)
|
|
|