github
4769 of 5426 branches covered (87.89%)
Branch coverage included in aggregate %.
13 of 14 new or added lines in 3 files covered. (92.86%)
6810 existing lines in 148 files now uncovered.47083 of 58727 relevant lines covered (80.17%)
4937.04 hits per line
1 |
// deck.gl
|
1✔ |
2 |
// SPDX-License-Identifier: MIT
|
1✔ |
3 |
// Copyright (c) vis.gl contributors
|
1✔ |
4 |
|
1✔ |
5 |
import type {Device} from '@luma.gl/core'; |
1✔ |
6 |
import {GL} from '@luma.gl/constants'; |
|
7 |
|
1✔ |
8 |
export function createRenderTarget(
|
|
9 |
device: Device, |
11✔ |
10 |
opts: { |
11✔ |
11 |
id: string; |
11✔ |
12 |
float?: boolean;
|
11✔ |
13 |
interpolate?: boolean; |
11✔ |
14 |
} |
11✔ |
15 |
) { |
11✔ |
16 |
return device.createFramebuffer({
|
11✔ |
17 |
id: opts.id,
|
11✔ |
18 |
colorAttachments: [ |
11✔ |
19 |
device.createTexture({ |
11✔ |
20 |
id: opts.id,
|
11✔ |
21 |
...(opts.float && {
|
|
22 |
format: 'rgba32float', |
1✔ |
23 |
type: GL.FLOAT |
1✔ |
24 |
}), |
1✔ |
25 |
mipmaps: false, |
11✔ |
26 |
sampler: |
11✔ |
27 |
opts.interpolate === false
|
|
UNCOV
28
|
? { |
× |
UNCOV
29
|
minFilter: 'nearest', |
× |
UNCOV
30
|
magFilter: 'nearest' |
× |
UNCOV
31
|
} |
× |
32 |
: { |
11✔ |
33 |
minFilter: 'linear', |
11✔ |
34 |
magFilter: 'linear' |
11✔ |
35 |
} |
11✔ |
36 |
}) |
11✔ |
37 |
] |
11✔ |
38 |
}); |
11✔ |
39 |
} |
11✔ |