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

visgl / luma.gl / 17192022436

24 Aug 2025 06:02PM UTC coverage: 62.079% (-13.2%) from 75.234%
17192022436

Pull #2437

github

web-flow
Merge 562c391b0 into 8314ecefa
Pull Request #2437: test(engine): add ShaderPassRenderer test

956 of 1559 branches covered (61.32%)

Branch coverage included in aggregate %.

491 of 666 new or added lines in 7 files covered. (73.72%)

5291 existing lines in 117 files now uncovered.

23238 of 37414 relevant lines covered (62.11%)

3.53 hits per line

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

28.57
/modules/engine/src/scenegraph/model-node.ts
1
// luma.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import {RenderPass} from '@luma.gl/core';
1✔
6
import {ScenegraphNode, ScenegraphNodeProps} from './scenegraph-node';
1✔
7
import {Model} from '../model/model';
1✔
8

1✔
9
export type ModelNodeProps = ScenegraphNodeProps & {
1✔
10
  model: Model;
1✔
11
  managedResources?: any[];
1✔
12
  bounds?: [number[], number[]];
1✔
13
};
1✔
14

1✔
15
export class ModelNode extends ScenegraphNode {
1!
UNCOV
16
  readonly model: Model;
×
UNCOV
17
  bounds: [number[], number[]] | null = null;
×
UNCOV
18
  managedResources: any[];
×
UNCOV
19

×
UNCOV
20
  // TODO - is this used? override callbacks to make sure we call them with this
×
UNCOV
21
  // onBeforeRender = null;
×
UNCOV
22
  // onAfterRender = null;
×
UNCOV
23
  // AfterRender = null;
×
UNCOV
24

×
UNCOV
25
  constructor(props: ModelNodeProps) {
×
UNCOV
26
    super(props);
×
UNCOV
27

×
UNCOV
28
    // Create new Model or used supplied Model
×
UNCOV
29
    this.model = props.model;
×
UNCOV
30
    this.managedResources = props.managedResources || [];
×
UNCOV
31
    this.bounds = props.bounds || null;
×
UNCOV
32
    this.setProps(props);
×
UNCOV
33
  }
×
UNCOV
34

×
UNCOV
35
  override destroy(): void {
×
36
    if (this.model) {
×
37
      this.model.destroy();
×
38
      // @ts-expect-error
×
39
      this.model = null;
×
40
    }
×
41
    this.managedResources.forEach(resource => resource.destroy());
×
42
    this.managedResources = [];
×
43
  }
×
UNCOV
44

×
UNCOV
45
  override getBounds(): [number[], number[]] | null {
×
UNCOV
46
    return this.bounds;
×
UNCOV
47
  }
×
UNCOV
48

×
UNCOV
49
  // Expose model methods
×
UNCOV
50
  draw(renderPass: RenderPass) {
×
51
    // Return value indicates if something was actually drawn
×
52
    return this.model.draw(renderPass);
×
53
  }
×
UNCOV
54
}
×
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