Simplify instancing creation
- Ngôn ngữ chính
- JavaScript
- Star
- 56
- Fork
- 5
- Merge trung bình
- 2 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
- 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)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.