soonspacejs 3.0.0-alpha.4 → 3.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/index.esm.js +4047 -3912
- package/package.json +1 -1
- package/types/Entity/EntityRenderer.d.ts +1 -0
- package/types/Viewport/Info.d.ts +1 -0
- package/types/Viewport/render-info-change.d.ts +5 -0
- package/types/index.d.ts +1 -0
package/README.md
CHANGED
|
@@ -12,3 +12,11 @@
|
|
|
12
12
|
`@robotlegsjs/signals` 是 SDK 的运行依赖,通过 npm 或 pnpm 安装 SoonSpace 时会自动安装,无需单独添加。
|
|
13
13
|
|
|
14
14
|
SDK 构建将 signals 保留为外部导入。Vite、Webpack 等构建工具会解析该依赖;直接在浏览器中使用原生 ES modules 时,需要在 import map 中配置 `@robotlegsjs/signals` 对应的 ESM 地址。
|
|
15
|
+
|
|
16
|
+
## 场景 Info 统计
|
|
17
|
+
|
|
18
|
+
开启 `showInfo` 后,左下角 `meshes` 统计每个 Entity 的原始 Mesh 部件及原生 Mesh,不统计生成的合批对象、线段部件或选中覆盖层;切换合批不会改变原始 Mesh 数。
|
|
19
|
+
|
|
20
|
+
`objects` 是实际渲染树节点数;`vertices` 和 `triangles` 按有效几何、实例数及 drawRange 统计,不含 BatchedMesh 预留容量,也不是当前帧经过视锥裁剪或多 pass 后的提交量。仅有 GPU 索引缓冲而没有 CPU 索引数据时,顶点数沿用声明的顶点范围,不进行同步 GPU 回读。
|
|
21
|
+
|
|
22
|
+
统计随结构、几何和 Entity 提交变更缓存更新,静止重绘及相机运动不会为 Info 全量遍历场景。直接修改原生几何或实例数量后,应发送 `ssp.signals.geometryChanged`;共享几何的通知会同时更新其所有使用者。
|