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

visgl / luma.gl / 22964432444

11 Mar 2026 04:58PM UTC coverage: 76.434% (+0.07%) from 76.362%
22964432444

push

github

web-flow
Move WebGL extension cache to gl.luma.extensions (#2498)

2293 of 2977 branches covered (77.02%)

Branch coverage included in aggregate %.

15 of 18 new or added lines in 2 files covered. (83.33%)

28649 of 37505 relevant lines covered (76.39%)

70.17 hits per line

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

88.89
/modules/webgl/src/context/helpers/webgl-context-data.ts
1
// luma.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import type {GLExtensions} from '@luma.gl/constants';
1✔
6

1✔
7
/**
1✔
8
 * Stores luma.gl specific state associated with a context
1✔
9
 */
1✔
10
export interface WebGLContextData {
1✔
11
  _polyfilled: boolean;
1✔
12
  extensions: GLExtensions;
1✔
13
  softwareRenderer?: boolean;
1✔
14
}
1✔
15

1✔
16
/**
1✔
17
 * Gets luma.gl specific state from a context
1✔
18
 * @returns context state
1✔
19
 */
1✔
20
export function getWebGLContextData(gl: WebGL2RenderingContext): WebGLContextData {
1✔
21
  // @ts-expect-error
4✔
22
  const contextData = (gl.luma as WebGLContextData | null) || {
4!
NEW
23
    _polyfilled: false,
×
NEW
24
    extensions: {}
×
NEW
25
  };
×
26
  contextData._polyfilled ??= false;
4✔
27
  contextData.extensions ||= {};
4✔
28

4✔
29
  // @ts-expect-error
4✔
30
  gl.luma = contextData;
4✔
31

4✔
32
  return contextData;
4✔
33
}
4✔
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