@luma.gl/core 9.1.0-alpha.9 → 9.1.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/adapter.d.ts +1 -1
- package/dist/adapter/adapter.d.ts.map +1 -1
- package/dist/adapter/adapter.js +2 -1
- package/dist/adapter/adapter.js.map +1 -0
- package/dist/adapter/canvas-context.d.ts +13 -19
- package/dist/adapter/canvas-context.d.ts.map +1 -1
- package/dist/adapter/canvas-context.js +33 -52
- package/dist/adapter/canvas-context.js.map +1 -0
- package/dist/adapter/device.d.ts +86 -36
- package/dist/adapter/device.d.ts.map +1 -1
- package/dist/adapter/device.js +73 -43
- package/dist/adapter/device.js.map +1 -0
- package/dist/adapter/luma.d.ts +17 -5
- package/dist/adapter/luma.d.ts.map +1 -1
- package/dist/adapter/luma.js +34 -6
- package/dist/adapter/luma.js.map +1 -0
- package/dist/adapter/resources/buffer.d.ts +8 -1
- package/dist/adapter/resources/buffer.d.ts.map +1 -1
- package/dist/adapter/resources/buffer.js +12 -2
- package/dist/adapter/resources/buffer.js.map +1 -0
- package/dist/adapter/resources/command-buffer.js +1 -0
- package/dist/adapter/resources/command-buffer.js.map +1 -0
- package/dist/adapter/resources/command-encoder.d.ts +18 -26
- package/dist/adapter/resources/command-encoder.d.ts.map +1 -1
- package/dist/adapter/resources/command-encoder.js +1 -0
- package/dist/adapter/resources/command-encoder.js.map +1 -0
- package/dist/adapter/resources/compute-pass.js +1 -0
- package/dist/adapter/resources/compute-pass.js.map +1 -0
- package/dist/adapter/resources/compute-pipeline.js +1 -0
- package/dist/adapter/resources/compute-pipeline.js.map +1 -0
- package/dist/adapter/resources/external-texture.js +1 -0
- package/dist/adapter/resources/external-texture.js.map +1 -0
- package/dist/adapter/resources/framebuffer.d.ts +12 -1
- package/dist/adapter/resources/framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/framebuffer.js +26 -11
- package/dist/adapter/resources/framebuffer.js.map +1 -0
- package/dist/adapter/resources/query-set.js +1 -0
- package/dist/adapter/resources/query-set.js.map +1 -0
- package/dist/adapter/resources/render-pass.d.ts +16 -7
- package/dist/adapter/resources/render-pass.d.ts.map +1 -1
- package/dist/adapter/resources/render-pass.js +29 -3
- package/dist/adapter/resources/render-pass.js.map +1 -0
- package/dist/adapter/resources/render-pipeline.js +1 -0
- package/dist/adapter/resources/render-pipeline.js.map +1 -0
- package/dist/adapter/resources/resource.d.ts +1 -1
- package/dist/adapter/resources/resource.d.ts.map +1 -1
- package/dist/adapter/resources/resource.js +4 -3
- package/dist/adapter/resources/resource.js.map +1 -0
- package/dist/adapter/resources/sampler.d.ts +2 -1
- package/dist/adapter/resources/sampler.d.ts.map +1 -1
- package/dist/adapter/resources/sampler.js +8 -1
- package/dist/adapter/resources/sampler.js.map +1 -0
- package/dist/adapter/resources/shader.d.ts +4 -3
- package/dist/adapter/resources/shader.d.ts.map +1 -1
- package/dist/adapter/resources/shader.js +6 -3
- package/dist/adapter/resources/shader.js.map +1 -0
- package/dist/adapter/resources/texture-view.js +1 -0
- package/dist/adapter/resources/texture-view.js.map +1 -0
- package/dist/adapter/resources/texture.d.ts +81 -19
- package/dist/adapter/resources/texture.d.ts.map +1 -1
- package/dist/adapter/resources/texture.js +109 -34
- package/dist/adapter/resources/texture.js.map +1 -0
- package/dist/adapter/resources/transform-feedback.js +1 -0
- package/dist/adapter/resources/transform-feedback.js.map +1 -0
- package/dist/adapter/resources/vertex-array.js +1 -0
- package/dist/adapter/resources/vertex-array.js.map +1 -0
- package/dist/adapter/types/attachments.d.ts +0 -3
- package/dist/adapter/types/attachments.d.ts.map +1 -1
- package/dist/adapter/types/attachments.js +1 -0
- package/dist/adapter/types/attachments.js.map +1 -0
- package/dist/adapter/types/buffer-layout.js +1 -0
- package/dist/adapter/types/buffer-layout.js.map +1 -0
- package/dist/adapter/types/compiler-message.js +1 -0
- package/dist/adapter/types/compiler-message.js.map +1 -0
- package/dist/adapter/types/parameters.d.ts +4 -3
- package/dist/adapter/types/parameters.d.ts.map +1 -1
- package/dist/adapter/types/parameters.js +1 -0
- package/dist/adapter/types/parameters.js.map +1 -0
- package/dist/adapter/types/shader-layout.d.ts +28 -1
- package/dist/adapter/types/shader-layout.d.ts.map +1 -1
- package/dist/adapter/types/shader-layout.js +1 -0
- package/dist/adapter/types/shader-layout.js.map +1 -0
- package/dist/adapter/types/uniforms.d.ts +2 -2
- package/dist/adapter/types/uniforms.d.ts.map +1 -1
- package/dist/adapter/types/uniforms.js +1 -0
- package/dist/adapter/types/uniforms.js.map +1 -0
- package/dist/adapter-utils/buffer-layout-helper.d.ts +11 -0
- package/dist/adapter-utils/buffer-layout-helper.d.ts.map +1 -0
- package/dist/adapter-utils/buffer-layout-helper.js +33 -0
- package/dist/adapter-utils/buffer-layout-helper.js.map +1 -0
- package/dist/adapter-utils/format-compiler-log.js +3 -1
- package/dist/adapter-utils/format-compiler-log.js.map +1 -0
- package/dist/adapter-utils/get-attribute-from-layouts.js +1 -0
- package/dist/adapter-utils/get-attribute-from-layouts.js.map +1 -0
- package/dist/adapter-utils/is-uniform-value.js +1 -0
- package/dist/adapter-utils/is-uniform-value.js.map +1 -0
- package/dist/dist.dev.js +640 -268
- package/dist/dist.min.js +7 -7
- package/dist/gpu-type-utils/decode-attribute-type.js +1 -0
- package/dist/gpu-type-utils/decode-attribute-type.js.map +1 -0
- package/dist/gpu-type-utils/decode-data-type.js +1 -0
- package/dist/gpu-type-utils/decode-data-type.js.map +1 -0
- package/dist/gpu-type-utils/decode-shader-types.js +1 -0
- package/dist/gpu-type-utils/decode-shader-types.js.map +1 -0
- package/dist/gpu-type-utils/decode-texture-format.d.ts +5 -37
- package/dist/gpu-type-utils/decode-texture-format.d.ts.map +1 -1
- package/dist/gpu-type-utils/decode-texture-format.js +86 -76
- package/dist/gpu-type-utils/decode-texture-format.js.map +1 -0
- package/dist/gpu-type-utils/decode-vertex-format.js +1 -0
- package/dist/gpu-type-utils/decode-vertex-format.js.map +1 -0
- package/dist/gpu-type-utils/shader-types.js +1 -0
- package/dist/gpu-type-utils/shader-types.js.map +1 -0
- package/dist/gpu-type-utils/texture-features.d.ts +6 -0
- package/dist/gpu-type-utils/texture-features.d.ts.map +1 -0
- package/dist/gpu-type-utils/texture-features.js +5 -0
- package/dist/gpu-type-utils/texture-features.js.map +1 -0
- package/dist/gpu-type-utils/texture-format-capabilities.d.ts +21 -0
- package/dist/gpu-type-utils/texture-format-capabilities.d.ts.map +1 -0
- package/dist/gpu-type-utils/texture-format-capabilities.js +27 -0
- package/dist/gpu-type-utils/texture-format-capabilities.js.map +1 -0
- package/dist/gpu-type-utils/texture-format-info.d.ts +38 -0
- package/dist/gpu-type-utils/texture-format-info.d.ts.map +1 -0
- package/dist/gpu-type-utils/texture-format-info.js +5 -0
- package/dist/gpu-type-utils/texture-format-info.js.map +1 -0
- package/dist/gpu-type-utils/texture-format-table.d.ts +28 -0
- package/dist/gpu-type-utils/texture-format-table.d.ts.map +1 -0
- package/dist/gpu-type-utils/texture-format-table.js +174 -0
- package/dist/gpu-type-utils/texture-format-table.js.map +1 -0
- package/dist/gpu-type-utils/texture-formats.d.ts +3 -2
- package/dist/gpu-type-utils/texture-formats.d.ts.map +1 -1
- package/dist/gpu-type-utils/texture-formats.js +1 -0
- package/dist/gpu-type-utils/texture-formats.js.map +1 -0
- package/dist/gpu-type-utils/vertex-format-from-attribute.d.ts.map +1 -1
- package/dist/gpu-type-utils/vertex-format-from-attribute.js +8 -0
- package/dist/gpu-type-utils/vertex-format-from-attribute.js.map +1 -0
- package/dist/gpu-type-utils/vertex-formats.js +1 -0
- package/dist/gpu-type-utils/vertex-formats.js.map +1 -0
- package/dist/gpu-type-utils/wgsl-utils.js +1 -0
- package/dist/gpu-type-utils/wgsl-utils.js.map +1 -0
- package/dist/index.cjs +614 -226
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -0
- package/dist/portable/uniform-block.js +2 -1
- package/dist/portable/uniform-block.js.map +1 -0
- package/dist/portable/uniform-buffer-layout.js +1 -0
- package/dist/portable/uniform-buffer-layout.js.map +1 -0
- package/dist/portable/uniform-store.d.ts +0 -5
- package/dist/portable/uniform-store.d.ts.map +1 -1
- package/dist/portable/uniform-store.js +3 -2
- package/dist/portable/uniform-store.js.map +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/array-equal.js +1 -0
- package/dist/utils/array-equal.js.map +1 -0
- package/dist/utils/array-utils-flat.js +1 -0
- package/dist/utils/array-utils-flat.js.map +1 -0
- package/dist/utils/is-array.js +1 -0
- package/dist/utils/is-array.js.map +1 -0
- package/dist/utils/log.js +1 -0
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/stats-manager.js +1 -0
- package/dist/utils/stats-manager.js.map +1 -0
- package/dist/utils/uid.js +1 -0
- package/dist/utils/uid.js.map +1 -0
- package/package.json +3 -3
- package/src/adapter/adapter.ts +2 -1
- package/src/adapter/canvas-context.ts +49 -70
- package/src/adapter/device.ts +164 -95
- package/src/adapter/luma.ts +47 -12
- package/src/adapter/resources/buffer.ts +16 -2
- package/src/adapter/resources/command-encoder.ts +45 -40
- package/src/adapter/resources/framebuffer.ts +36 -11
- package/src/adapter/resources/render-pass.ts +42 -23
- package/src/adapter/resources/resource.ts +4 -4
- package/src/adapter/resources/sampler.ts +10 -2
- package/src/adapter/resources/shader.ts +9 -5
- package/src/adapter/resources/texture.ts +172 -51
- package/src/adapter/types/attachments.ts +0 -4
- package/src/adapter/types/parameters.ts +4 -3
- package/src/adapter/types/shader-layout.ts +30 -3
- package/src/adapter/types/uniforms.ts +2 -2
- package/src/adapter-utils/buffer-layout-helper.ts +41 -0
- package/src/adapter-utils/format-compiler-log.ts +2 -1
- package/src/gpu-type-utils/decode-texture-format.ts +103 -117
- package/src/gpu-type-utils/texture-features.ts +23 -0
- package/src/gpu-type-utils/texture-format-capabilities.ts +53 -0
- package/src/gpu-type-utils/texture-format-info.ts +42 -0
- package/src/gpu-type-utils/texture-format-table.ts +238 -0
- package/src/gpu-type-utils/texture-formats.ts +6 -2
- package/src/gpu-type-utils/vertex-format-from-attribute.ts +8 -0
- package/src/index.ts +23 -6
- package/src/portable/uniform-block.ts +1 -1
- package/src/portable/uniform-store.ts +2 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Device, DeviceProps } from "./device.js";
|
|
2
2
|
/**
|
|
3
|
-
* Create and attach devices for a specific backend.
|
|
3
|
+
* Create and attach devices for a specific backend.
|
|
4
4
|
*/
|
|
5
5
|
export declare abstract class Adapter {
|
|
6
6
|
abstract type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,oBAAiB;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,oBAAiB;AAE7C;;GAEG;AACH,8BAAsB,OAAO;IAE3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,IAAI,OAAO;IAC/B,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IACpD,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;CACnD"}
|
package/dist/adapter/adapter.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
/**
|
|
5
|
-
* Create and attach devices for a specific backend.
|
|
5
|
+
* Create and attach devices for a specific backend.
|
|
6
6
|
*/
|
|
7
7
|
export class Adapter {
|
|
8
8
|
}
|
|
9
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/adapter/adapter.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAIpC;;GAEG;AACH,MAAM,OAAgB,OAAO;CAM5B"}
|
|
@@ -3,24 +3,24 @@ import type { Framebuffer } from "./resources/framebuffer.js";
|
|
|
3
3
|
import type { TextureFormat } from "../gpu-type-utils/texture-formats.js";
|
|
4
4
|
/** Properties for a CanvasContext */
|
|
5
5
|
export type CanvasContextProps = {
|
|
6
|
-
/** If canvas not supplied, will be created and added to the DOM. If string, will be looked up in the DOM */
|
|
6
|
+
/** If a canvas not supplied, one will be created and added to the DOM. If a string, a canvas with that id will be looked up in the DOM */
|
|
7
7
|
canvas?: HTMLCanvasElement | OffscreenCanvas | string | null;
|
|
8
|
-
/** If new canvas is created, it will be created in the specified container, otherwise appended
|
|
8
|
+
/** If new canvas is created, it will be created in the specified container, otherwise is appended as a child of document.body */
|
|
9
9
|
container?: HTMLElement | string | null;
|
|
10
|
-
/** Width in pixels of the canvas */
|
|
10
|
+
/** Width in pixels of the canvas - used when creating a new canvas */
|
|
11
11
|
width?: number;
|
|
12
|
-
/** Height in pixels of the canvas */
|
|
12
|
+
/** Height in pixels of the canvas - used when creating a new canvas */
|
|
13
13
|
height?: number;
|
|
14
|
+
/** Visibility (only used if new canvas is created). */
|
|
15
|
+
visible?: boolean;
|
|
14
16
|
/** Whether to apply a device pixels scale factor (`true` uses browser DPI) */
|
|
15
17
|
useDevicePixels?: boolean | number;
|
|
16
|
-
/** Whether to track resizes
|
|
18
|
+
/** Whether to track window resizes */
|
|
17
19
|
autoResize?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
visible?: boolean;
|
|
20
|
-
/** WebGPU only https://www.w3.org/TR/webgpu/#canvas-configuration */
|
|
21
|
-
colorSpace?: 'srgb';
|
|
22
|
-
/** WebGPU only https://www.w3.org/TR/webgpu/#canvas-configuration */
|
|
20
|
+
/** https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/configure#alphamode */
|
|
23
21
|
alphaMode?: 'opaque' | 'premultiplied';
|
|
22
|
+
/** https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/configure#colorspace */
|
|
23
|
+
colorSpace?: 'srgb';
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Manages a canvas. Supports both HTML or offscreen canvas
|
|
@@ -30,6 +30,7 @@ export type CanvasContextProps = {
|
|
|
30
30
|
* @todo transferControlToOffscreen: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen
|
|
31
31
|
*/
|
|
32
32
|
export declare abstract class CanvasContext {
|
|
33
|
+
static defaultProps: Required<CanvasContextProps>;
|
|
33
34
|
abstract readonly device: Device;
|
|
34
35
|
readonly id: string;
|
|
35
36
|
readonly props: Required<CanvasContextProps>;
|
|
@@ -50,15 +51,8 @@ export declare abstract class CanvasContext {
|
|
|
50
51
|
clientHeight: number;
|
|
51
52
|
devicePixelRatio: number;
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Get a 'lazy' promise that resolves when the DOM is loaded.
|
|
57
|
-
* @note Since there may be limitations on number of `load` event listeners,
|
|
58
|
-
* it is recommended avoid calling this function until actually needed.
|
|
59
|
-
* I.e. don't call it until you know that you will be looking up a string in the DOM.
|
|
60
|
-
*/
|
|
61
|
-
static pageLoaded: Promise<void>;
|
|
54
|
+
abstract get [Symbol.toStringTag](): string;
|
|
55
|
+
toString(): string;
|
|
62
56
|
constructor(props?: CanvasContextProps);
|
|
63
57
|
/** Returns a framebuffer with properly resized current 'swap chain' textures */
|
|
64
58
|
abstract getCurrentFramebuffer(): Framebuffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-context.d.ts","sourceRoot":"","sources":["../../src/adapter/canvas-context.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,MAAM,EAAC,oBAAiB;AACrC,OAAO,KAAK,EAAC,WAAW,EAAC,mCAAgC;
|
|
1
|
+
{"version":3,"file":"canvas-context.d.ts","sourceRoot":"","sources":["../../src/adapter/canvas-context.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,MAAM,EAAC,oBAAiB;AACrC,OAAO,KAAK,EAAC,WAAW,EAAC,mCAAgC;AAGzD,OAAO,KAAK,EAAC,aAAa,EAAC,6CAA0C;AAErE,qCAAqC;AACrC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0IAA0I;IAC1I,MAAM,CAAC,EAAE,iBAAiB,GAAG,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;IAC7D,iIAAiI;IACjI,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACnC,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;IACvC,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,8BAAsB,aAAa;IACjC,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAU/C;IAEF,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC7C,QAAQ,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EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAM,GAC9C,IAAI;IA4DP,0GAA0G;IAC1G,oBAAoB,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAUxC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KACpC,GAAG,IAAI;IAER,0DAA0D;IAC1D,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI;IAEjC;;;OAGG;IACH,SAAS,CAAC,uBAAuB,CAAC,EAAE,EAAE,MAAM;CAK7C"}
|
|
@@ -3,19 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import { isBrowser } from '@probe.gl/env';
|
|
5
5
|
import { log } from "../utils/log.js";
|
|
6
|
-
|
|
7
|
-
const isPageLoaded = () => isPage && document.readyState === 'complete';
|
|
8
|
-
const DEFAULT_CANVAS_CONTEXT_PROPS = {
|
|
9
|
-
canvas: null,
|
|
10
|
-
width: 800, // width are height are only used by headless gl
|
|
11
|
-
height: 600,
|
|
12
|
-
useDevicePixels: true,
|
|
13
|
-
autoResize: true,
|
|
14
|
-
container: null,
|
|
15
|
-
visible: true,
|
|
16
|
-
colorSpace: 'srgb',
|
|
17
|
-
alphaMode: 'opaque'
|
|
18
|
-
};
|
|
6
|
+
import { uid } from "../utils/uid.js";
|
|
19
7
|
/**
|
|
20
8
|
* Manages a canvas. Supports both HTML or offscreen canvas
|
|
21
9
|
* - Creates a new canvas or looks up a canvas from the DOM
|
|
@@ -24,6 +12,17 @@ const DEFAULT_CANVAS_CONTEXT_PROPS = {
|
|
|
24
12
|
* @todo transferControlToOffscreen: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen
|
|
25
13
|
*/
|
|
26
14
|
export class CanvasContext {
|
|
15
|
+
static defaultProps = {
|
|
16
|
+
canvas: null,
|
|
17
|
+
width: 800, // width are height are only used by headless gl
|
|
18
|
+
height: 600,
|
|
19
|
+
useDevicePixels: true,
|
|
20
|
+
autoResize: true,
|
|
21
|
+
container: null,
|
|
22
|
+
visible: true,
|
|
23
|
+
alphaMode: 'opaque',
|
|
24
|
+
colorSpace: 'srgb'
|
|
25
|
+
};
|
|
27
26
|
id;
|
|
28
27
|
props;
|
|
29
28
|
canvas;
|
|
@@ -35,19 +34,11 @@ export class CanvasContext {
|
|
|
35
34
|
resizeObserver;
|
|
36
35
|
/** State used by luma.gl classes: TODO - move to canvasContext*/
|
|
37
36
|
_canvasSizeInfo = { clientWidth: 0, clientHeight: 0, devicePixelRatio: 1 };
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return isPageLoaded();
|
|
37
|
+
toString() {
|
|
38
|
+
return `${this[Symbol.toStringTag]}(${this.id})`;
|
|
41
39
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Get a 'lazy' promise that resolves when the DOM is loaded.
|
|
44
|
-
* @note Since there may be limitations on number of `load` event listeners,
|
|
45
|
-
* it is recommended avoid calling this function until actually needed.
|
|
46
|
-
* I.e. don't call it until you know that you will be looking up a string in the DOM.
|
|
47
|
-
*/
|
|
48
|
-
static pageLoaded = getPageLoadPromise();
|
|
49
40
|
constructor(props) {
|
|
50
|
-
this.props = { ...
|
|
41
|
+
this.props = { ...CanvasContext.defaultProps, ...props };
|
|
51
42
|
props = this.props;
|
|
52
43
|
if (!isBrowser()) {
|
|
53
44
|
this.id = 'node-canvas-context';
|
|
@@ -192,19 +183,23 @@ export class CanvasContext {
|
|
|
192
183
|
const canvasHeight = Math.floor(clientHeight * clampedPixelRatio);
|
|
193
184
|
this.htmlCanvas.width = canvasWidth;
|
|
194
185
|
this.htmlCanvas.height = canvasHeight;
|
|
195
|
-
//
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
186
|
+
// @ts-expect-error This only works for WebGL
|
|
187
|
+
const gl = this.device.gl;
|
|
188
|
+
if (gl) {
|
|
189
|
+
// Note: when devicePixelRatio is too high, it is possible we might hit system limit for
|
|
190
|
+
// drawing buffer width and hight, in those cases they get clamped and resulting aspect ration may not be maintained
|
|
191
|
+
// for those cases, reduce devicePixelRatio.
|
|
192
|
+
const [drawingBufferWidth, drawingBufferHeight] = this.getDrawingBufferSize();
|
|
193
|
+
if (drawingBufferWidth !== canvasWidth || drawingBufferHeight !== canvasHeight) {
|
|
194
|
+
clampedPixelRatio = Math.min(drawingBufferWidth / clientWidth, drawingBufferHeight / clientHeight);
|
|
195
|
+
this.htmlCanvas.width = Math.floor(clientWidth * clampedPixelRatio);
|
|
196
|
+
this.htmlCanvas.height = Math.floor(clientHeight * clampedPixelRatio);
|
|
197
|
+
log.warn('Device pixel ratio clamped')();
|
|
198
|
+
}
|
|
199
|
+
this._canvasSizeInfo.clientWidth = clientWidth;
|
|
200
|
+
this._canvasSizeInfo.clientHeight = clientHeight;
|
|
201
|
+
this._canvasSizeInfo.devicePixelRatio = devicePixelRatio;
|
|
204
202
|
}
|
|
205
|
-
this._canvasSizeInfo.clientWidth = clientWidth;
|
|
206
|
-
this._canvasSizeInfo.clientHeight = clientHeight;
|
|
207
|
-
this._canvasSizeInfo.devicePixelRatio = devicePixelRatio;
|
|
208
203
|
}
|
|
209
204
|
}
|
|
210
205
|
// PRIVATE
|
|
@@ -229,21 +224,9 @@ export class CanvasContext {
|
|
|
229
224
|
}
|
|
230
225
|
}
|
|
231
226
|
// HELPER FUNCTIONS
|
|
232
|
-
/** Returns a promise that resolves when the page is loaded */
|
|
233
|
-
function getPageLoadPromise() {
|
|
234
|
-
if (isPageLoaded() || typeof window === 'undefined') {
|
|
235
|
-
return Promise.resolve();
|
|
236
|
-
}
|
|
237
|
-
return new Promise(resolve => {
|
|
238
|
-
window.addEventListener('load', () => resolve());
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
227
|
function getContainer(container) {
|
|
242
228
|
if (typeof container === 'string') {
|
|
243
229
|
const element = document.getElementById(container);
|
|
244
|
-
if (!element && !isPageLoaded()) {
|
|
245
|
-
throw new Error(`Accessing '${container}' before page was loaded`);
|
|
246
|
-
}
|
|
247
230
|
if (!element) {
|
|
248
231
|
throw new Error(`${container} is not an HTML element`);
|
|
249
232
|
}
|
|
@@ -257,9 +240,6 @@ function getContainer(container) {
|
|
|
257
240
|
/** Get a Canvas element from DOM id */
|
|
258
241
|
function getCanvasFromDOM(canvasId) {
|
|
259
242
|
const canvas = document.getElementById(canvasId);
|
|
260
|
-
if (!canvas && !isPageLoaded()) {
|
|
261
|
-
throw new Error(`Accessing '${canvasId}' before page was loaded`);
|
|
262
|
-
}
|
|
263
243
|
if (!(canvas instanceof HTMLCanvasElement)) {
|
|
264
244
|
throw new Error('Object is not a canvas element');
|
|
265
245
|
}
|
|
@@ -269,7 +249,7 @@ function getCanvasFromDOM(canvasId) {
|
|
|
269
249
|
function createCanvas(props) {
|
|
270
250
|
const { width, height } = props;
|
|
271
251
|
const targetCanvas = document.createElement('canvas');
|
|
272
|
-
targetCanvas.id = 'lumagl-auto-created-canvas';
|
|
252
|
+
targetCanvas.id = uid('lumagl-auto-created-canvas');
|
|
273
253
|
targetCanvas.width = width || 1;
|
|
274
254
|
targetCanvas.height = height || 1;
|
|
275
255
|
targetCanvas.style.width = Number.isFinite(width) ? `${width}px` : '100%';
|
|
@@ -326,3 +306,4 @@ function scaleY(y, ratio, height, yInvert) {
|
|
|
326
306
|
? Math.max(0, height - 1 - Math.round(y * ratio))
|
|
327
307
|
: Math.min(Math.round(y * ratio), height - 1);
|
|
328
308
|
}
|
|
309
|
+
//# sourceMappingURL=canvas-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-context.js","sourceRoot":"","sources":["../../src/adapter/canvas-context.ts"],"names":[],"mappings":"AAAA,UAAU;A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GED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StatsManager } from "../utils/stats-manager.js";
|
|
2
|
-
import type { TextureFormat } from "../gpu-type-utils
|
|
2
|
+
import type { TextureFormat } from "../gpu-type-utils/texture-formats.js";
|
|
3
|
+
import type { TextureFormatCapabilities } from "../gpu-type-utils/texture-format-capabilities.js";
|
|
3
4
|
import type { CanvasContext, CanvasContextProps } from "./canvas-context.js";
|
|
4
5
|
import type { BufferProps } from "./resources/buffer.js";
|
|
5
6
|
import { Buffer } from "./resources/buffer.js";
|
|
@@ -112,36 +113,75 @@ export declare class DeviceFeatures {
|
|
|
112
113
|
/** Device feature names */
|
|
113
114
|
export type DeviceFeature = WebGPUDeviceFeature | WebGLDeviceFeature | WebGLCompressedTextureFeatures;
|
|
114
115
|
export type WebGPUDeviceFeature = 'depth-clip-control' | 'indirect-first-instance' | 'timestamp-query' | 'shader-f16' | 'depth32float-stencil8' | 'rg11b10ufloat-renderable' | 'float32-filterable' | 'bgra8unorm-storage' | 'texture-compression-bc' | 'texture-compression-etc2' | 'texture-compression-astc';
|
|
115
|
-
export type WebGLDeviceFeature = 'timer-query-webgl' | 'compilation-status-async-webgl' | 'provoking-vertex-webgl' | 'polygon-mode-webgl' | 'shader-noperspective-interpolation-webgl' | 'shader-conservative-depth-webgl' | 'shader-clip-cull-distance-webgl' | 'float32-renderable-webgl' | 'float16-renderable-webgl' | '
|
|
116
|
+
export type WebGLDeviceFeature = 'timer-query-webgl' | 'compilation-status-async-webgl' | 'provoking-vertex-webgl' | 'polygon-mode-webgl' | 'shader-noperspective-interpolation-webgl' | 'shader-conservative-depth-webgl' | 'shader-clip-cull-distance-webgl' | 'float32-renderable-webgl' | 'float16-renderable-webgl' | 'rgb9e5ufloat-renderable-webgl' | 'snorm8-renderable-webgl' | 'norm16-renderable-webgl' | 'snorm16-renderable-webgl' | 'float16-filterable-webgl' | 'texture-filterable-anisotropic-webgl' | 'bgra8unorm-storage' | 'texture-blend-float-webgl';
|
|
116
117
|
type WebGLCompressedTextureFeatures = 'texture-compression-bc5-webgl' | 'texture-compression-bc7-webgl' | 'texture-compression-etc1-webgl' | 'texture-compression-pvrtc-webgl' | 'texture-compression-atc-webgl';
|
|
118
|
+
/** Texture format capabilities that have been checked against a specific device */
|
|
119
|
+
export type DeviceTextureFormatCapabilities = {
|
|
120
|
+
format: TextureFormat;
|
|
121
|
+
/** Can the format be created */
|
|
122
|
+
create: boolean;
|
|
123
|
+
/** If a feature string, the specified device feature determines if format is renderable. */
|
|
124
|
+
render: boolean;
|
|
125
|
+
/** If a feature string, the specified device feature determines if format is filterable. */
|
|
126
|
+
filter: boolean;
|
|
127
|
+
/** If a feature string, the specified device feature determines if format is blendable. */
|
|
128
|
+
blend: boolean;
|
|
129
|
+
/** If a feature string, the specified device feature determines if format is storeable. */
|
|
130
|
+
store: boolean;
|
|
131
|
+
};
|
|
117
132
|
/** Device properties */
|
|
118
133
|
export type DeviceProps = {
|
|
134
|
+
/** string id for debugging. Stored on the object, used in logging and set on underlying GPU objects when feasible. */
|
|
119
135
|
id?: string;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
|
|
136
|
+
/** Properties for creating a default canvas context */
|
|
137
|
+
createCanvasContext?: CanvasContextProps | true;
|
|
138
|
+
/** Control which type of GPU is preferred on systems with both integrated and discrete GPU. Defaults to "high-performance" / discrete GPU. */
|
|
139
|
+
powerPreference?: 'default' | 'high-performance' | 'low-power';
|
|
140
|
+
/** Hints that device creation should fail if no hardware GPU is available (if the system performance is "low"). */
|
|
141
|
+
failIfMajorPerformanceCaveat?: boolean;
|
|
126
142
|
/** Error handling */
|
|
127
143
|
onError?: (error: Error) => unknown;
|
|
128
|
-
|
|
129
|
-
|
|
144
|
+
/** WebGL specific: Properties passed through to WebGL2RenderingContext creation: `canvas.getContext('webgl2', props.webgl)` */
|
|
145
|
+
webgl?: WebGLContextProps;
|
|
146
|
+
/** Turn on implementation defined checks that slow down execution but help break where errors occur */
|
|
130
147
|
debug?: boolean;
|
|
131
|
-
/**
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
|
|
148
|
+
/** Show shader source in browser? The default is`'error'`, meaning that logs are shown when shader compilation has errors */
|
|
149
|
+
debugShaders?: 'never' | 'errors' | 'warnings' | 'always';
|
|
150
|
+
/** Renders a small version of updated Framebuffers into the primary canvas context. Can be set in console luma.log.set('debug-framebuffers', true) */
|
|
151
|
+
debugFramebuffers?: boolean;
|
|
152
|
+
/** WebGL specific - Trace WebGL calls (instruments WebGL2RenderingContext at the expense of performance). Can be set in console luma.log.set('debug-webgl', true) */
|
|
153
|
+
debugWebGL?: boolean;
|
|
154
|
+
/** WebGL specific - Initialize the SpectorJS WebGL debugger. Can be set in console luma.log.set('debug-spectorjs', true) */
|
|
155
|
+
debugSpectorJS?: boolean;
|
|
156
|
+
/** WebGL specific - SpectorJS URL. Override if CDN is down or different SpectorJS version is desired. */
|
|
157
|
+
debugSpectorJSUrl?: string;
|
|
158
|
+
/** WebGPU specific - Request a Device with the highest limits supported by platform. On WebGPU devices can be created with minimal limits. */
|
|
159
|
+
_requestMaxLimits?: boolean;
|
|
141
160
|
/** Disable specific features */
|
|
142
|
-
|
|
161
|
+
_disabledFeatures?: Partial<Record<DeviceFeature, boolean>>;
|
|
162
|
+
/** WebGL specific - Initialize all features on startup */
|
|
163
|
+
_initializeFeatures?: boolean;
|
|
143
164
|
/** Never destroy cached shaders and pipelines */
|
|
144
165
|
_factoryDestroyPolicy?: 'unused' | 'never';
|
|
166
|
+
/** Resource default overrides */
|
|
167
|
+
_resourceDefaults?: {
|
|
168
|
+
texture?: Partial<TextureProps>;
|
|
169
|
+
sampler?: Partial<SamplerProps>;
|
|
170
|
+
renderPass?: Partial<RenderPassProps>;
|
|
171
|
+
};
|
|
172
|
+
/** @deprecated Internal, Do not use directly! Use `luma.attachDevice()` to attach to pre-created contexts/devices. */
|
|
173
|
+
_handle?: unknown;
|
|
174
|
+
};
|
|
175
|
+
/** WebGL independent copy of WebGLContextAttributes */
|
|
176
|
+
type WebGLContextProps = {
|
|
177
|
+
alpha?: boolean;
|
|
178
|
+
desynchronized?: boolean;
|
|
179
|
+
antialias?: boolean;
|
|
180
|
+
depth?: boolean;
|
|
181
|
+
failIfMajorPerformanceCaveat?: boolean;
|
|
182
|
+
powerPreference?: 'default' | 'high-performance' | 'low-power';
|
|
183
|
+
premultipliedAlpha?: boolean;
|
|
184
|
+
preserveDrawingBuffer?: boolean;
|
|
145
185
|
};
|
|
146
186
|
/**
|
|
147
187
|
* Create and attach devices for a specific backend. Currently static methods on each device
|
|
@@ -171,6 +211,8 @@ export declare abstract class Device {
|
|
|
171
211
|
};
|
|
172
212
|
/** stats */
|
|
173
213
|
readonly statsManager: StatsManager;
|
|
214
|
+
/** An abstract timestamp used for change tracking */
|
|
215
|
+
timestamp: number;
|
|
174
216
|
/** Used by other luma.gl modules to store data on the device */
|
|
175
217
|
_lumaData: {
|
|
176
218
|
[key: string]: unknown;
|
|
@@ -182,12 +224,14 @@ export declare abstract class Device {
|
|
|
182
224
|
abstract features: DeviceFeatures;
|
|
183
225
|
/** WebGPU style device limits */
|
|
184
226
|
abstract get limits(): DeviceLimits;
|
|
227
|
+
/** Determines what operations are supported on a texture format, checking against supported device features */
|
|
228
|
+
getTextureFormatCapabilities(format: TextureFormat): DeviceTextureFormatCapabilities;
|
|
185
229
|
/** Check if device supports a specific texture format (creation and `nearest` sampling) */
|
|
186
|
-
|
|
230
|
+
isTextureFormatSupported(format: TextureFormat, capabilities: Partial<TextureFormatCapabilities>): boolean;
|
|
187
231
|
/** Check if linear filtering (sampler interpolation) is supported for a specific texture format */
|
|
188
|
-
|
|
189
|
-
/** Check if device supports rendering to a specific texture format */
|
|
190
|
-
|
|
232
|
+
isTextureFormatFilterable(format: TextureFormat): boolean;
|
|
233
|
+
/** Check if device supports rendering to a framebuffer color attachment of a specific texture format */
|
|
234
|
+
isTextureFormatRenderable(format: TextureFormat): boolean;
|
|
191
235
|
/** Check if a specific texture format is GPU compressed */
|
|
192
236
|
isTextureFormatCompressed(format: TextureFormat): boolean;
|
|
193
237
|
/** `true` if device is already lost */
|
|
@@ -203,12 +247,12 @@ export declare abstract class Device {
|
|
|
203
247
|
* @note primarily intended for testing how application reacts to device loss
|
|
204
248
|
*/
|
|
205
249
|
loseDevice(): boolean;
|
|
206
|
-
/** Report error (normally for unhandled device errors) */
|
|
207
|
-
|
|
250
|
+
/** Report error (normally called for unhandled device errors) */
|
|
251
|
+
reportError(error: Error): void;
|
|
208
252
|
/** Default / primary canvas context. Can be null as WebGPU devices can be created without a CanvasContext */
|
|
209
253
|
abstract canvasContext: CanvasContext | null;
|
|
210
254
|
/** Returns the default / primary canvas context. Throws an error if no canvas context is available (a WebGPU compute device) */
|
|
211
|
-
|
|
255
|
+
getDefaultCanvasContext(): CanvasContext;
|
|
212
256
|
/** Creates a new CanvasContext (WebGPU only) */
|
|
213
257
|
abstract createCanvasContext(props?: CanvasContextProps): CanvasContext;
|
|
214
258
|
/** Call after rendering a frame (necessary e.g. on WebGL OffscreenCanvas) */
|
|
@@ -216,8 +260,7 @@ export declare abstract class Device {
|
|
|
216
260
|
/** Create a buffer */
|
|
217
261
|
abstract createBuffer(props: BufferProps | ArrayBuffer | ArrayBufferView): Buffer;
|
|
218
262
|
/** Create a texture */
|
|
219
|
-
abstract
|
|
220
|
-
createTexture(props: TextureProps): Texture;
|
|
263
|
+
abstract createTexture(props: TextureProps): Texture;
|
|
221
264
|
/** Create a temporary texture view of a video source */
|
|
222
265
|
abstract createExternalTexture(props: ExternalTextureProps): ExternalTexture;
|
|
223
266
|
/** Create a sampler */
|
|
@@ -240,6 +283,12 @@ export declare abstract class Device {
|
|
|
240
283
|
abstract createTransformFeedback(props: TransformFeedbackProps): TransformFeedback;
|
|
241
284
|
abstract createQuerySet(props: QuerySetProps): QuerySet;
|
|
242
285
|
createCommandEncoder(props?: CommandEncoderProps): CommandEncoder;
|
|
286
|
+
/** A monotonic counter for tracking buffer and texture updates */
|
|
287
|
+
incrementTimestamp(): number;
|
|
288
|
+
/** Report unhandled device errors */
|
|
289
|
+
onError(error: Error): void;
|
|
290
|
+
/** @deprecated Use getDefaultCanvasContext() */
|
|
291
|
+
getCanvasContext(): CanvasContext;
|
|
243
292
|
/** @deprecated - will be removed - should use command encoder */
|
|
244
293
|
readPixelsToArrayWebGL(source: Framebuffer | Texture, options?: {
|
|
245
294
|
sourceX?: number;
|
|
@@ -277,12 +326,13 @@ export declare abstract class Device {
|
|
|
277
326
|
}): void;
|
|
278
327
|
/** @deprecated - will be removed - should use for debugging only */
|
|
279
328
|
resetWebGL(): void;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
329
|
+
/**
|
|
330
|
+
* Determines what operations are supported on a texture format, checking against supported device features
|
|
331
|
+
* Subclasses override to apply additional checks
|
|
332
|
+
*/
|
|
333
|
+
protected abstract _getDeviceSpecificTextureFormatCapabilities(format: DeviceTextureFormatCapabilities): DeviceTextureFormatCapabilities;
|
|
334
|
+
/** Subclasses use this to support .createBuffer() overloads */
|
|
335
|
+
protected _normalizeBufferProps(props: BufferProps | ArrayBuffer | ArrayBufferView): BufferProps;
|
|
286
336
|
}
|
|
287
337
|
export {};
|
|
288
338
|
//# sourceMappingURL=device.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/adapter/device.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAY,kCAA+B;AAG/D,OAAO,KAAK,EAAC,aAAa,EAAC,
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/adapter/device.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAY,kCAA+B;AAG/D,OAAO,KAA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