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 摘要。