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

visgl / luma.gl / 14683349798

26 Apr 2025 05:08PM UTC coverage: 74.055% (-0.9%) from 74.913%
14683349798

push

github

web-flow
feat(core): TextureFormat generics (#2377)

2019 of 2652 branches covered (76.13%)

Branch coverage included in aggregate %.

62 of 262 new or added lines in 15 files covered. (23.66%)

196 existing lines in 9 files now uncovered.

26575 of 35960 relevant lines covered (73.9%)

47.35 hits per line

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

60.0
/modules/core/src/utils/array-utils-flat.ts
1
// luma.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import type {TypedArray} from '../types';
1✔
6

1✔
7
let arrayBuffer: ArrayBuffer;
1✔
8

1✔
9
export function getScratchArrayBuffer(byteLength: number): ArrayBuffer {
1✔
UNCOV
10
  if (!arrayBuffer || arrayBuffer.byteLength < byteLength) {
×
UNCOV
11
    arrayBuffer = new ArrayBuffer(byteLength);
×
UNCOV
12
  }
×
UNCOV
13
  return arrayBuffer;
×
UNCOV
14
}
×
15

1✔
16
export function getScratchArray(Type: any, length: number): TypedArray {
1✔
17
  const scratchArrayBuffer = getScratchArrayBuffer(Type.BYTES_PER_ELEMENT * length);
×
18
  return new Type(scratchArrayBuffer, 0, length); // arrayBuffer, byteOffset, length (in elements)
×
19
}
×
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