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

visgl / loaders.gl / 24139120841

08 Apr 2026 01:53PM UTC coverage: 65.319% (+30.2%) from 35.137%
24139120841

push

github

web-flow
chore: Replace puppeteer with playwright (#3350)

14216 of 18890 branches covered (75.26%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

3248 existing lines in 369 files now uncovered.

73509 of 115413 relevant lines covered (63.69%)

5763.45 hits per line

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

87.93
/modules/obj/src/obj-loader.ts
1
// loaders.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import type {Loader, LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
1✔
6
import type {Mesh} from '@loaders.gl/schema';
1✔
7
import {OBJFormat} from './obj-format';
1✔
8
import {parseOBJ} from './lib/parse-obj';
1✔
9

1✔
UNCOV
10
// __VERSION__ is injected by babel-plugin-version-inline
×
11
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
1✔
12
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
1!
13

1✔
14
export type OBJLoaderOptions = LoaderOptions & {
1✔
15
  obj?: {
1✔
16
    /** Override the URL to the worker bundle (by default loads from unpkg.com) */
1✔
17
    workerUrl?: string;
1✔
18
  };
1✔
19
};
1✔
20

1✔
21
/**
1✔
22
 * Worker loader for the OBJ geometry format
1✔
23
 */
1✔
24
export const OBJWorkerLoader = {
1✔
25
  ...OBJFormat,
1✔
26

1✔
27
  dataType: null as unknown as Mesh,
1✔
28
  batchType: null as never,
1✔
29
  version: VERSION,
1✔
30
  worker: true,
1✔
31
  testText: testOBJFile,
1✔
32
  options: {
1✔
33
    obj: {}
1✔
34
  }
7✔
35
} as const satisfies Loader<Mesh, never, OBJLoaderOptions>;
7✔
36

7✔
37
function testOBJFile(text: string): boolean {
×
38
  // TODO - There could be comment line first
×
39
  return text[0] === 'v';
×
40
}
×
41

1✔
42
// OBJLoader
1✔
43

1✔
44
/**
1✔
45
 * Loader for the OBJ geometry format
1✔
46
 */
1✔
47
export const OBJLoader = {
1✔
48
  ...OBJWorkerLoader,
1✔
49
  parse: async (arrayBuffer: ArrayBuffer, options?: OBJLoaderOptions) =>
1✔
50
    parseOBJ(new TextDecoder().decode(arrayBuffer), options),
1✔
51
  parseTextSync: (text: string, options?: OBJLoaderOptions) => parseOBJ(text, options)
1✔
52
} as const satisfies LoaderWithParser<Mesh, never, OBJLoaderOptions>;
1✔
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