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

visgl / luma.gl / 16861002932

10 Aug 2025 11:45AM UTC coverage: 51.305% (-22.6%) from 73.868%
16861002932

Pull #2416

github

web-flow
Merge 92c90562d into f90a93cf3
Pull Request #2416: chore: Tests for texture reads

595 of 835 branches covered (71.26%)

Branch coverage included in aggregate %.

66 of 101 new or added lines in 7 files covered. (65.35%)

8541 existing lines in 129 files now uncovered.

18683 of 36740 relevant lines covered (50.85%)

11.74 hits per line

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

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

1✔
5
import type {NumericArray} from '@math.gl/types';
1✔
6

1✔
7
// Uses copyWithin to significantly speed up typed array value filling
1✔
8
export function fillArray(options: {
1✔
UNCOV
9
  target: NumericArray;
×
UNCOV
10
  source: NumericArray;
×
UNCOV
11
  start?: number;
×
UNCOV
12
  count?: number;
×
UNCOV
13
}): NumericArray {
×
UNCOV
14
  const {target, source, start = 0, count = 1} = options;
×
UNCOV
15
  const length = source.length;
×
UNCOV
16
  const total = count * length;
×
UNCOV
17
  let copied = 0;
×
UNCOV
18
  for (let i = start; copied < length; copied++) {
×
UNCOV
19
    target[i++] = source[copied];
×
UNCOV
20
  }
×
UNCOV
21

×
UNCOV
22
  while (copied < total) {
×
UNCOV
23
    // If we have copied less than half, copy everything we got
×
UNCOV
24
    // else copy remaining in one operation
×
UNCOV
25
    if (copied < total - copied) {
×
UNCOV
26
      target.copyWithin(start + copied, start, start + copied);
×
UNCOV
27
      copied *= 2;
×
UNCOV
28
    } else {
×
UNCOV
29
      target.copyWithin(start + copied, start, start + total - copied);
×
UNCOV
30
      copied = total;
×
UNCOV
31
    }
×
UNCOV
32
  }
×
UNCOV
33

×
UNCOV
34
  return options.target;
×
UNCOV
35
}
×
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