Absulit / Absulit/points

Simplify instancing creation

未關閉
#268 0 則留言 0 個 reaction 已指派 1 人 已被 @Absulit 認領 在 GitHub 檢視
enhancement
主要語言
JavaScript
星號
56
分支
5
平均合併
2 分鐘
30 天內合併 PR
1

描述

- Currently to create instances for particles or any other use, you have to make a large set of steps like:
- calculate the number of particles based on workgroup size and thread size
- pass those values (number of particles, worgroup size per dimension and threads per dimension) as constants to the library
- use those constants in the compute pass to calculate the @workgroup_size
- to indicate the number of instances you have to tell it to the added mesh this way with the `instanceCount`

```
glb_renderpass
.addMesh('lucy', positions, colors, colorSize, uvs, normals, indices)
.instanceCount = NUMPARTICLES;
```

It would be nice to have all of this in one step, like

renderPass.addInstances(meshName, numInstances)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。