Absulit / Absulit/points

Simplify instancing creation

Open
#268 0 comments 0 reactions 1 assignee Claimed by @Absulit View on GitHub
enhancement
Dominant language
JavaScript
Stars
56
Forks
5
Avg merge
2m
Merged PRs (30d)
1

Description

- 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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.