(passEncoder, firstInstance = 0, requestedCount)
| 247 | }; |
| 248 | |
| 249 | const render: AnnotationMarkerRenderer['render'] = (passEncoder, firstInstance = 0, requestedCount) => { |
| 250 | assertNotDisposed(); |
| 251 | if (!instanceBuffer || instanceCount === 0) return; |
| 252 | |
| 253 | const first = Number.isFinite(firstInstance) ? Math.max(0, Math.floor(firstInstance)) : 0; |
| 254 | const available = Math.max(0, instanceCount - first); |
| 255 | const count = |
| 256 | requestedCount == null |
| 257 | ? available |
| 258 | : Number.isFinite(requestedCount) |
| 259 | ? Math.max(0, Math.min(available, Math.floor(requestedCount))) |
| 260 | : available; |
| 261 | if (count === 0) return; |
| 262 | |
| 263 | passEncoder.setPipeline(pipeline); |
| 264 | passEncoder.setBindGroup(0, bindGroup); |
| 265 | passEncoder.setVertexBuffer(0, instanceBuffer); |
| 266 | passEncoder.draw(6, count, 0, first); |
| 267 | }; |
| 268 | |
| 269 | const dispose: AnnotationMarkerRenderer['dispose'] = () => { |
| 270 | if (disposed) return; |
nothing calls this directly
no test coverage detected