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

visgl / luma.gl / 23355601514

20 Mar 2026 05:50PM UTC coverage: 52.166% (-25.8%) from 77.934%
23355601514

push

github

web-flow
chore: Migrate to vitest (#2554)

4188 of 11561 branches covered (36.23%)

Branch coverage included in aggregate %.

613 of 632 new or added lines in 22 files covered. (96.99%)

343 existing lines in 28 files now uncovered.

7757 of 11337 relevant lines covered (68.42%)

394.31 hits per line

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

0.0
/modules/engine/src/debug/debug-shader-layout.ts
1
// luma.gl
2
// SPDX-License-Identifier: MIT
3
// Copyright (c) vis.gl contributors
4

5
import type {ShaderLayout} from '@luma.gl/core';
6

7
/**
8
 * Extracts a table suitable for `console.table()` from a shader layout to assist in debugging.
9
 * @param layout shader layout
10
 * @param name app should provide the most meaningful name, usually the model or pipeline name / id.
11
 * @returns
12
 */
13
export function getDebugTableForShaderLayout(
14
  layout: ShaderLayout,
15
  name: string
16
): Record<string, Record<string, string>> {
UNCOV
17
  const table: Record<string, Record<string, string>> = {};
×
18

UNCOV
19
  const header = 'Values'; // '`Shader Layout for ${name}`;
×
20

UNCOV
21
  if (layout.attributes.length === 0 && !layout.varyings?.length) {
×
22
    return {'No attributes or varyings': {[header]: 'N/A'}};
×
23
  }
24

UNCOV
25
  for (const attributeDeclaration of layout.attributes) {
×
UNCOV
26
    if (attributeDeclaration) {
×
UNCOV
27
      const glslDeclaration = `${attributeDeclaration.location} ${attributeDeclaration.name}: ${attributeDeclaration.type}`;
×
UNCOV
28
      table[`in ${glslDeclaration}`] = {[header]: attributeDeclaration.stepMode || 'vertex'};
×
29
    }
30
  }
31

UNCOV
32
  for (const varyingDeclaration of layout.varyings || []) {
×
33
    const glslDeclaration = `${varyingDeclaration.location} ${varyingDeclaration.name}`;
×
34
    table[`out ${glslDeclaration}`] = {[header]: JSON.stringify(varyingDeclaration)};
×
35
  }
36

UNCOV
37
  return table;
×
38
}
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