agargaro / instanced-mesh

Enhanced InstancedMesh with frustum culling, fast raycasting (using BVH), sorting, visibility management, LOD and more.
MIT License
132 stars 9 forks source link

Optional renderer parameter #17

Closed agargaro closed 1 month ago

agargaro commented 1 month ago

The renderer in the constructor is needed in order to create an GLBufferAttribute which is needed because BufferAttribute cannot be updated in the onBeforerRender callback (changes are seen in the next frame).

The renderer in the constructor is now optional. In case it is not specified, a temporary BufferAttribute is created, which is replaced when the renderer is accessed with the onAfterRender callback.

🚨⚠️ In case the renderer is not specified in the constructor, the first render will not be executed. ⚠️🚨

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud