Coveralls logob
Coveralls logo
  • Home
  • Features
  • Pricing
  • Docs
  • Sign In

uber / deck.gl / 13340

10 Sep 2019 - 3:13 coverage decreased (-2.6%) to 80.892%
13340

Pull #3552

travis-ci-com

9181eb84f9c35729a3bad740fb7f9d93?size=18&default=identiconweb-flow
[#3548 - Part 4] Modify setup.py to specify that README is markdown
Pull Request #3552: [#3548 - Part 4] Update notebook documentation to include additional pydeck features

3330 of 4491 branches covered (74.15%)

Branch coverage included in aggregate %.

6860 of 8106 relevant lines covered (84.63%)

5923.39 hits per line

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

12.5
/modules/core/src/views/perspective-view.js
1
import View from './view';
5×
2
import Viewport from '../viewports/viewport';
3

4
import * as mat4 from 'gl-matrix/mat4';
5

6
const DEGREES_TO_RADIANS = Math.PI / 180;
1×
7

8
export default class PerspectiveView extends View {
9
  _getViewport(props) {
10
    const {
11
      // viewport arguments
12
      x,
13
      y,
14
      width, // Width of viewport
15
      height, // Height of viewport
16

17
      viewState
UNCOV
18
    } = props;
!
19

20
    const {
21
      // view matrix arguments
22
      eye, // Defines eye position
23
      lookAt = [0, 0, 0], // Which point is camera looking at, default origin
Branches [[0, 0]] missed.
24
      up = [0, 1, 0] // Defines up direction, default positive y axis
Branches [[1, 0]] missed.
UNCOV
25
    } = viewState;
!
26

27
    // Projection matrix arguments
28
    // TODO - Extracting from viewState is deprecated
UNCOV
29
    const fovy = props.fovy || viewState.fovy || 75; // Field of view covered by camera
Branches [[2, 0], [2, 1], [2, 2]] missed. !
UNCOV
30
    const near = props.near || viewState.near || 1; // Distance of near clipping plane
Branches [[3, 0], [3, 1], [3, 2]] missed. !
UNCOV
31
    const far = props.far || viewState.far || 100; // Distance of far clipping plane
Branches [[4, 0], [4, 1], [4, 2]] missed. !
UNCOV
32
    const aspect = Number.isFinite(viewState.aspect) ? viewState.aspect : width / height;
Branches [[5, 0], [5, 1]] missed. !
33

UNCOV
34
    const fovyRadians = fovy * DEGREES_TO_RADIANS;
!
UNCOV
35
    return new Viewport({
!
36
      id: this.id,
37
      x,
38
      y,
39
      width,
40
      height,
41
      viewMatrix: mat4.lookAt([], eye, lookAt, up),
42
      projectionMatrix: mat4.perspective([], fovyRadians, aspect, near, far)
43
    });
44
  }
45
}
46

47
PerspectiveView.displayName = 'PerspectiveView';
1×
Troubleshooting · Open an Issue · Sales · Support · ENTERPRISE · CAREERS · STATUS
BLOG · TWITTER · Legal & Privacy · Supported CI Services · What's a CI service? · Automated Testing

© 2019 Coveralls, LLC