(passEncoder, firstInstance = 0, requestedCount)
| 338 | }; |
| 339 | |
| 340 | const render: ReferenceLineRenderer['render'] = (passEncoder, firstInstance = 0, requestedCount) => { |
| 341 | assertNotDisposed(); |
| 342 | if (instanceCount === 0 || !instanceBuffer) return; |
| 343 | |
| 344 | const first = Number.isFinite(firstInstance) ? Math.max(0, Math.floor(firstInstance)) : 0; |
| 345 | const available = Math.max(0, instanceCount - first); |
| 346 | const count = |
| 347 | requestedCount == null |
| 348 | ? available |
| 349 | : Number.isFinite(requestedCount) |
| 350 | ? Math.max(0, Math.min(available, Math.floor(requestedCount))) |
| 351 | : available; |
| 352 | if (count === 0) return; |
| 353 | |
| 354 | passEncoder.setPipeline(pipeline); |
| 355 | passEncoder.setBindGroup(0, bindGroup); |
| 356 | passEncoder.setVertexBuffer(0, instanceBuffer); |
| 357 | passEncoder.draw(6, count, 0, first); |
| 358 | }; |
| 359 | |
| 360 | const dispose: ReferenceLineRenderer['dispose'] = () => { |
| 361 | if (disposed) return; |
nothing calls this directly
no test coverage detected