• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / luma.gl / 23968233624

04 Apr 2026 01:19AM UTC coverage: 73.637% (+0.1%) from 73.502%
23968233624

Pull #2586

github

web-flow
Merge 66ff4fb33 into 5cc1167fd
Pull Request #2586: fix(webgpu): BufferMap support

4851 of 7478 branches covered (64.87%)

Branch coverage included in aggregate %.

104 of 108 new or added lines in 9 files covered. (96.3%)

4 existing lines in 2 files now uncovered.

10975 of 14014 relevant lines covered (78.31%)

651.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

36.36
/modules/test-utils/src/null-device/resources/null-vertex-array.ts
1
// luma.gl
2
// SPDX-License-Identifier: MIT
3
// Copyright (c) vis.gl contributors
4

5
import type {TypedArray} from '@math.gl/types';
6
import type {Buffer, VertexArrayProps} from '@luma.gl/core';
7
import {VertexArray} from '@luma.gl/core';
8

9
import type {NullDevice} from '../null-device';
10

11
export class NullVertexArray extends VertexArray {
12
  device: NullDevice;
13
  readonly handle = null;
2✔
14

15
  /**
16
   * Creates a null-device vertex array used by tests and non-rendering code paths.
17
   * @param device The device that owns the vertex array.
18
   * @param props Vertex-array initialization properties.
19
   */
20
  constructor(device: NullDevice, props: VertexArrayProps) {
21
    super(device, props);
2✔
22
    this.device = device;
2✔
23
  }
24

25
  setIndexBuffer(indexBuffer: Buffer | null): void {
26
    this.indexBuffer = indexBuffer;
2✔
27
  }
28

29
  /**
30
   * Stores a buffer in one logical slot for testing purposes.
31
   * @param location Buffer slot or attribute location.
32
   * @param attributeBuffer Buffer supplying the test data.
33
   */
34
  setBuffer(location: number, attributeBuffer: Buffer): void {
NEW
35
    if (location < 0 || location >= this.maxVertexAttributes) {
×
36
      throw new Error(`Unknown attribute location ${location}`);
×
37
    }
38
    this.attributes[location] = attributeBuffer;
×
39
  }
40

41
  /** No-op for the null device. */
42
  bindBeforeRender(): void {}
43

44
  /** No-op for the null device. */
45
  unbindAfterRender(): void {}
46

47
  /** No-op for the null device. */
48
  override setConstantWebGL(location: number, value: TypedArray | null): void {}
49
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc