@luma.gl/test-utils 9.2.6 → 9.3.0-alpha.2
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/create-test-device.js +2 -4
- package/dist/create-test-device.js.map +1 -1
- package/dist/index.cjs +52 -34
- package/dist/index.cjs.map +4 -4
- package/dist/null-device/null-canvas-context.d.ts +2 -2
- package/dist/null-device/null-canvas-context.d.ts.map +1 -1
- package/dist/null-device/null-canvas-context.js +3 -3
- package/dist/null-device/null-canvas-context.js.map +1 -1
- package/dist/null-device/null-device.d.ts +2 -1
- package/dist/null-device/null-device.d.ts.map +1 -1
- package/dist/null-device/null-device.js +4 -3
- package/dist/null-device/null-device.js.map +1 -1
- package/dist/null-device/resources/null-fence.d.ts +12 -0
- package/dist/null-device/resources/null-fence.d.ts.map +1 -0
- package/dist/null-device/resources/null-fence.js +19 -0
- package/dist/null-device/resources/null-fence.js.map +1 -0
- package/dist/null-device/resources/null-texture.d.ts +5 -3
- package/dist/null-device/resources/null-texture.d.ts.map +1 -1
- package/dist/null-device/resources/null-texture.js +12 -7
- package/dist/null-device/resources/null-texture.js.map +1 -1
- package/package.json +7 -7
- package/src/create-test-device.ts +2 -4
- package/src/null-device/null-canvas-context.ts +3 -3
- package/src/null-device/null-device.ts +5 -4
- package/src/null-device/resources/null-fence.ts +24 -0
- package/src/null-device/resources/null-texture.ts +26 -19
|
@@ -70,8 +70,7 @@ async function makeWebGLTestDevice() {
|
|
|
70
70
|
type: 'webgl',
|
|
71
71
|
adapters: [webgl2Adapter],
|
|
72
72
|
createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,
|
|
73
|
-
debug: true
|
|
74
|
-
debugWebGL: true
|
|
73
|
+
debug: true
|
|
75
74
|
}));
|
|
76
75
|
webglDeviceResolvers.resolve(webglDevice);
|
|
77
76
|
}
|
|
@@ -91,8 +90,7 @@ async function makeNullTestDevice() {
|
|
|
91
90
|
type: 'null',
|
|
92
91
|
adapters: [nullAdapter],
|
|
93
92
|
createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,
|
|
94
|
-
debug: true
|
|
95
|
-
debugWebGL: true
|
|
93
|
+
debug: true
|
|
96
94
|
}));
|
|
97
95
|
nullDeviceResolvers.resolve(nullDevice);
|
|
98
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-test-device.js","sourceRoot":"","sources":["../src/create-test-device.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,IAAI,EAAE,GAAG,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAAC,aAAa,EAAc,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAe,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAC,sCAAmC;AAGvD,MAAM,4BAA4B,GAAuB,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC;AAE/E,qGAAqG;AACrG,IAAI,iBAAiB,GAAG,kBAAkB,EAAE,CAAC;AAC7C,2FAA2F;AAC3F,MAAM,kBAAkB,GAAG,mBAAmB,EAAE,CAAC;AACjD,wGAAwG;AACxG,MAAM,mBAAmB,GAAG,oBAAoB,EAAE,CAAC;AAEnD,0CAA0C;AAC1C,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,QAA+D,CAAC,OAAO,EAAE,QAAQ,CAAC;IAElF,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,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AAI,OAAO,CAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE;QACnD,OAAO,GAAG,QAAQ,CAAC;QACnB,MAAM,GAAG,OAAO,CAAC;IACnB,CAAC,CAAC,CAAC;IACH,mCAAmC;IACnC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAC,CAAC;AACpC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -46,15 +46,15 @@ var import_webgpu = require("@luma.gl/webgpu");
|
|
|
46
46
|
import_core.luma.registerAdapters([import_webgl.webgl2Adapter, import_webgpu.webgpuAdapter]);
|
|
47
47
|
|
|
48
48
|
// dist/create-test-device.js
|
|
49
|
-
var
|
|
49
|
+
var import_core20 = require("@luma.gl/core");
|
|
50
50
|
var import_webgl2 = require("@luma.gl/webgl");
|
|
51
51
|
var import_webgpu2 = require("@luma.gl/webgpu");
|
|
52
52
|
|
|
53
53
|
// dist/null-device/null-adapter.js
|
|
54
|
-
var
|
|
54
|
+
var import_core19 = require("@luma.gl/core");
|
|
55
55
|
|
|
56
56
|
// dist/null-device/null-device.js
|
|
57
|
-
var
|
|
57
|
+
var import_core18 = require("@luma.gl/core");
|
|
58
58
|
|
|
59
59
|
// dist/null-device/null-device-info.js
|
|
60
60
|
var NullDeviceInfo = {
|
|
@@ -131,13 +131,13 @@ var NullCanvasContext = class extends import_core4.CanvasContext {
|
|
|
131
131
|
super(props);
|
|
132
132
|
this.device = device;
|
|
133
133
|
this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);
|
|
134
|
-
this.
|
|
134
|
+
this._configureDevice();
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
_getCurrentFramebuffer() {
|
|
137
137
|
this._framebuffer = this._framebuffer || new NullFramebuffer(this.device, { handle: null });
|
|
138
138
|
return this._framebuffer;
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
_configureDevice() {
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
|
|
@@ -368,21 +368,24 @@ var NullTexture = class extends import_core12.Texture {
|
|
|
368
368
|
}
|
|
369
369
|
copyExternalImage(options) {
|
|
370
370
|
this.trackDeallocatedMemory("Texture");
|
|
371
|
-
const { image: data } = options;
|
|
372
371
|
const bytesPerPixel = 4;
|
|
373
372
|
this.trackAllocatedMemory(this.width * this.height * bytesPerPixel, "Texture");
|
|
374
|
-
|
|
375
|
-
const height = options.height ?? data.height;
|
|
376
|
-
this.width = width;
|
|
377
|
-
this.height = height;
|
|
378
|
-
return { width, height };
|
|
373
|
+
return { width: this.width, height: this.height };
|
|
379
374
|
}
|
|
380
375
|
setSampler(sampler) {
|
|
381
376
|
}
|
|
382
377
|
copyImageData(options) {
|
|
383
378
|
throw new Error("copyImageData not implemented");
|
|
384
379
|
}
|
|
385
|
-
|
|
380
|
+
readBuffer(options = {}, buffer) {
|
|
381
|
+
return this.device.createBuffer({});
|
|
382
|
+
}
|
|
383
|
+
async readDataAsync(options = {}) {
|
|
384
|
+
return new ArrayBuffer(0);
|
|
385
|
+
}
|
|
386
|
+
writeBuffer(buffer, options = {}) {
|
|
387
|
+
}
|
|
388
|
+
writeData(data, options = {}) {
|
|
386
389
|
}
|
|
387
390
|
};
|
|
388
391
|
|
|
@@ -491,8 +494,25 @@ var NullQuerySet = class extends import_core16.QuerySet {
|
|
|
491
494
|
}
|
|
492
495
|
};
|
|
493
496
|
|
|
497
|
+
// dist/null-device/resources/null-fence.js
|
|
498
|
+
var import_core17 = require("@luma.gl/core");
|
|
499
|
+
var NullFence = class extends import_core17.Fence {
|
|
500
|
+
device;
|
|
501
|
+
handle = null;
|
|
502
|
+
signaled = Promise.resolve();
|
|
503
|
+
constructor(device, props = {}) {
|
|
504
|
+
super(device, props);
|
|
505
|
+
this.device = device;
|
|
506
|
+
}
|
|
507
|
+
destroy() {
|
|
508
|
+
}
|
|
509
|
+
isSignaled() {
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
|
|
494
514
|
// dist/null-device/null-device.js
|
|
495
|
-
var NullDevice = class extends
|
|
515
|
+
var NullDevice = class extends import_core18.Device {
|
|
496
516
|
static isSupported() {
|
|
497
517
|
return true;
|
|
498
518
|
}
|
|
@@ -500,7 +520,7 @@ var NullDevice = class extends import_core17.Device {
|
|
|
500
520
|
handle = null;
|
|
501
521
|
preferredColorFormat = "rgba8unorm";
|
|
502
522
|
preferredDepthFormat = "depth24plus";
|
|
503
|
-
features = new
|
|
523
|
+
features = new import_core18.DeviceFeatures([], this.props._disabledFeatures);
|
|
504
524
|
limits = new NullDeviceLimits();
|
|
505
525
|
info = NullDeviceInfo;
|
|
506
526
|
canvasContext;
|
|
@@ -508,7 +528,7 @@ var NullDevice = class extends import_core17.Device {
|
|
|
508
528
|
lost;
|
|
509
529
|
constructor(props) {
|
|
510
530
|
super({ ...props, id: props.id || "null-device" });
|
|
511
|
-
const canvasContextProps =
|
|
531
|
+
const canvasContextProps = import_core18.Device._getCanvasContextProps(props);
|
|
512
532
|
this.canvasContext = new NullCanvasContext(this, canvasContextProps);
|
|
513
533
|
this.lost = new Promise((resolve) => {
|
|
514
534
|
});
|
|
@@ -524,9 +544,6 @@ var NullDevice = class extends import_core17.Device {
|
|
|
524
544
|
return false;
|
|
525
545
|
}
|
|
526
546
|
// IMPLEMENTATION OF ABSTRACT DEVICE
|
|
527
|
-
getTextureByteAlignment() {
|
|
528
|
-
return 1;
|
|
529
|
-
}
|
|
530
547
|
createCanvasContext(props) {
|
|
531
548
|
return new NullCanvasContext(this, props);
|
|
532
549
|
}
|
|
@@ -561,6 +578,9 @@ var NullDevice = class extends import_core17.Device {
|
|
|
561
578
|
createQuerySet(props) {
|
|
562
579
|
return new NullQuerySet(this, props);
|
|
563
580
|
}
|
|
581
|
+
createFence() {
|
|
582
|
+
return new NullFence(this);
|
|
583
|
+
}
|
|
564
584
|
createRenderPipeline(props) {
|
|
565
585
|
return new NullRenderPipeline(this, props);
|
|
566
586
|
}
|
|
@@ -594,7 +614,7 @@ var NullDevice = class extends import_core17.Device {
|
|
|
594
614
|
};
|
|
595
615
|
|
|
596
616
|
// dist/null-device/null-adapter.js
|
|
597
|
-
var NullAdapter = class extends
|
|
617
|
+
var NullAdapter = class extends import_core19.Adapter {
|
|
598
618
|
/** type of device's created by this adapter */
|
|
599
619
|
type = "null";
|
|
600
620
|
constructor() {
|
|
@@ -650,7 +670,7 @@ async function getNullTestDevice() {
|
|
|
650
670
|
async function makeWebGPUTestDevice() {
|
|
651
671
|
const webgpuDeviceResolvers = withResolvers();
|
|
652
672
|
try {
|
|
653
|
-
const webgpuDevice = await
|
|
673
|
+
const webgpuDevice = await import_core20.luma.createDevice({
|
|
654
674
|
id: "webgpu-test-device",
|
|
655
675
|
type: "webgpu",
|
|
656
676
|
adapters: [import_webgpu2.webgpuAdapter],
|
|
@@ -659,7 +679,7 @@ async function makeWebGPUTestDevice() {
|
|
|
659
679
|
});
|
|
660
680
|
webgpuDeviceResolvers.resolve(webgpuDevice);
|
|
661
681
|
} catch (error) {
|
|
662
|
-
|
|
682
|
+
import_core20.log.error(String(error))();
|
|
663
683
|
webgpuDeviceResolvers.resolve(null);
|
|
664
684
|
}
|
|
665
685
|
return webgpuDeviceResolvers.promise;
|
|
@@ -667,17 +687,16 @@ async function makeWebGPUTestDevice() {
|
|
|
667
687
|
async function makeWebGLTestDevice() {
|
|
668
688
|
const webglDeviceResolvers = withResolvers();
|
|
669
689
|
try {
|
|
670
|
-
const webglDevice3 = await
|
|
690
|
+
const webglDevice3 = await import_core20.luma.createDevice({
|
|
671
691
|
id: "webgl-test-device",
|
|
672
692
|
type: "webgl",
|
|
673
693
|
adapters: [import_webgl2.webgl2Adapter],
|
|
674
694
|
createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,
|
|
675
|
-
debug: true
|
|
676
|
-
debugWebGL: true
|
|
695
|
+
debug: true
|
|
677
696
|
});
|
|
678
697
|
webglDeviceResolvers.resolve(webglDevice3);
|
|
679
698
|
} catch (error) {
|
|
680
|
-
|
|
699
|
+
import_core20.log.error(String(error))();
|
|
681
700
|
webglDeviceResolvers.resolve(null);
|
|
682
701
|
}
|
|
683
702
|
return webglDeviceResolvers.promise;
|
|
@@ -685,17 +704,16 @@ async function makeWebGLTestDevice() {
|
|
|
685
704
|
async function makeNullTestDevice() {
|
|
686
705
|
const nullDeviceResolvers = withResolvers();
|
|
687
706
|
try {
|
|
688
|
-
const nullDevice = await
|
|
707
|
+
const nullDevice = await import_core20.luma.createDevice({
|
|
689
708
|
id: "null-test-device",
|
|
690
709
|
type: "null",
|
|
691
710
|
adapters: [nullAdapter],
|
|
692
711
|
createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,
|
|
693
|
-
debug: true
|
|
694
|
-
debugWebGL: true
|
|
712
|
+
debug: true
|
|
695
713
|
});
|
|
696
714
|
nullDeviceResolvers.resolve(nullDevice);
|
|
697
715
|
} catch (error) {
|
|
698
|
-
|
|
716
|
+
import_core20.log.error(String(error))();
|
|
699
717
|
nullDevicePromise = Promise.resolve(null);
|
|
700
718
|
}
|
|
701
719
|
return nullDeviceResolvers.promise;
|
|
@@ -711,7 +729,7 @@ function withResolvers() {
|
|
|
711
729
|
}
|
|
712
730
|
|
|
713
731
|
// dist/deprecated/classic-animation-loop.js
|
|
714
|
-
var
|
|
732
|
+
var import_core21 = require("@luma.gl/core");
|
|
715
733
|
var import_engine = require("@luma.gl/engine");
|
|
716
734
|
var import_env = require("@probe.gl/env");
|
|
717
735
|
var import_webgl3 = require("@luma.gl/webgl");
|
|
@@ -721,7 +739,7 @@ function getHTMLCanvasElement(canvas) {
|
|
|
721
739
|
}
|
|
722
740
|
var statIdCounter = 0;
|
|
723
741
|
var DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS = {
|
|
724
|
-
onCreateDevice: (props) =>
|
|
742
|
+
onCreateDevice: (props) => import_core21.luma.createDevice({ ...props, debug: true }),
|
|
725
743
|
onCreateContext: void 0,
|
|
726
744
|
onAddHTML: void 0,
|
|
727
745
|
onInitialize: () => ({}),
|
|
@@ -737,7 +755,7 @@ var DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS = {
|
|
|
737
755
|
useDevicePixels: true,
|
|
738
756
|
autoResizeViewport: true,
|
|
739
757
|
autoResizeDrawingBuffer: true,
|
|
740
|
-
stats:
|
|
758
|
+
stats: import_core21.luma.stats.get(`animation-loop-${statIdCounter++}`),
|
|
741
759
|
// deprecated
|
|
742
760
|
// onCreateContext: (opts) => createGLContext(opts),
|
|
743
761
|
gl: void 0,
|
|
@@ -774,7 +792,7 @@ var ClassicAnimationLoop = class {
|
|
|
774
792
|
props = this.props;
|
|
775
793
|
let { useDevicePixels = true } = this.props;
|
|
776
794
|
if ("useDevicePixelRatio" in props) {
|
|
777
|
-
|
|
795
|
+
import_core21.log.deprecated("useDevicePixelRatio", "useDevicePixels")();
|
|
778
796
|
useDevicePixels = props.useDevicePixelRatio;
|
|
779
797
|
}
|
|
780
798
|
this.device = props.device;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts", "../src/register-devices.ts", "../src/create-test-device.ts", "../src/null-device/null-adapter.ts", "../src/null-device/null-device.ts", "../src/null-device/null-device-info.ts", "../src/null-device/null-device-features.ts", "../src/null-device/null-canvas-context.ts", "../src/null-device/resources/null-framebuffer.ts", "../src/null-device/resources/null-buffer.ts", "../src/null-device/resources/null-shader.ts", "../src/null-device/resources/null-command-encoder.ts", "../src/null-device/resources/null-command-buffer.ts", "../src/null-device/resources/null-render-pass.ts", "../src/null-device/resources/null-sampler.ts", "../src/null-device/resources/null-texture.ts", "../src/null-device/resources/null-texture-view.ts", "../src/null-device/resources/null-render-pipeline.ts", "../src/null-device/resources/null-vertex-array.ts", "../src/null-device/resources/null-transform-feedback.ts", "../src/null-device/resources/null-query-set.ts", "../src/deprecated/classic-animation-loop.ts", "../src/test-runner.ts", "../src/utils/get-bounding-box.ts", "../src/snapshot-test-runner.ts", "../src/performance-test-runner.ts", "../src/utils/check-type.ts", "../src/utils/deep-copy.ts", "../src/utils/resource-tracker.ts", "../src/deprecated/sync-test-device.ts"],
|
|
4
|
-
"sourcesContent": ["import './register-devices';\n\n// TEST RUNNERS\nexport type {TestRunnerTestCase} from './test-runner';\nexport type {SnapshotTestRunnerTestCase} from './snapshot-test-runner';\n\nexport {SnapshotTestRunner} from './snapshot-test-runner';\nexport {PerformanceTestRunner} from './performance-test-runner';\n\n// TEST DEVICES\nexport {\n getTestDevices,\n getTestDevice,\n getWebGLTestDevice,\n getWebGPUTestDevice,\n getNullTestDevice\n} from './create-test-device';\n\n// Null device\nexport {nullAdapter, NullAdapter} from './null-device/null-adapter';\nexport {NullDevice} from './null-device/null-device';\n\n// UTILS\nexport {checkType} from './utils/check-type';\nexport {deepCopy} from './utils/deep-copy';\nexport {getResourceCounts, getLeakedResources} from './utils/resource-tracker';\n\n// DEPRECATED\nexport {createTestDevice, webglDevice} from './deprecated/sync-test-device';\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {luma} from '@luma.gl/core';\nimport {webgl2Adapter} from '@luma.gl/webgl';\nimport {webgpuAdapter} from '@luma.gl/webgpu';\n\nluma.registerAdapters([webgl2Adapter, webgpuAdapter]);\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {Device, CanvasContextProps} from '@luma.gl/core';\nimport {luma, log} from '@luma.gl/core';\nimport {webgl2Adapter, WebGLDevice} from '@luma.gl/webgl';\nimport {webgpuAdapter, WebGPUDevice} from '@luma.gl/webgpu';\nimport {nullAdapter} from './null-device/null-adapter';\nimport {NullDevice} from './null-device/null-device';\n\nconst DEFAULT_CANVAS_CONTEXT_PROPS: CanvasContextProps = {width: 1, height: 1};\n\n/** A null device intended for testing - @note Only available after getTestDevices() has completed */\nlet nullDevicePromise = makeNullTestDevice();\n/** This WebGL Device can be used directly but will not have WebGL debugging initialized */\nconst webglDevicePromise = makeWebGLTestDevice();\n/** A WebGL 2 Device intended for testing - @note Only available after getTestDevices() has completed */\nconst webgpuDevicePromise = makeWebGPUTestDevice();\n\n/** Includes WebGPU device if available */\nexport async function getTestDevices(\n types: Readonly<('webgl' | 'webgpu' | 'null' | 'unknown')[]> = ['webgl', 'webgpu']\n): Promise<Device[]> {\n const promises = types.map(type => getTestDevice(type));\n const devices = await Promise.all(promises);\n return devices.filter(device => device !== null);\n}\n\nexport async function getTestDevice(\n type: 'webgl' | 'webgpu' | 'null' | 'unknown'\n): Promise<Device | null> {\n switch (type) {\n case 'webgl':\n return webglDevicePromise;\n case 'webgpu':\n return webgpuDevicePromise;\n case 'null':\n return nullDevicePromise;\n case 'unknown':\n return null;\n }\n}\n\n/** returns WebGPU device promise, if available */\nexport function getWebGPUTestDevice(): Promise<WebGPUDevice | null> {\n return webgpuDevicePromise;\n}\n\n/** returns WebGL device promise, if available */\nexport async function getWebGLTestDevice(): Promise<WebGLDevice> {\n return webglDevicePromise;\n}\n\n/** returns null device promise, if available */\nexport async function getNullTestDevice(): Promise<NullDevice> {\n return nullDevicePromise;\n}\n\nasync function makeWebGPUTestDevice(): Promise<WebGPUDevice | null> {\n const webgpuDeviceResolvers = withResolvers<WebGPUDevice | null>();\n try {\n const webgpuDevice = (await luma.createDevice({\n id: 'webgpu-test-device',\n type: 'webgpu',\n adapters: [webgpuAdapter],\n createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n debug: true\n })) as unknown as WebGPUDevice;\n webgpuDeviceResolvers.resolve(webgpuDevice);\n } catch (error) {\n log.error(String(error))();\n // @ts-ignore TODO\n webgpuDeviceResolvers.resolve(null);\n }\n return webgpuDeviceResolvers.promise;\n}\n\n/** returns WebGL device promise, if available */\nasync function makeWebGLTestDevice(): Promise<WebGLDevice> {\n const webglDeviceResolvers = withResolvers<WebGLDevice>();\n try {\n const webglDevice = (await luma.createDevice({\n id: 'webgl-test-device',\n type: 'webgl',\n adapters: [webgl2Adapter],\n createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n debug: true,\n debugWebGL: true\n })) as unknown as WebGLDevice;\n webglDeviceResolvers.resolve(webglDevice);\n } catch (error) {\n log.error(String(error))();\n // @ts-ignore TODO\n webglDeviceResolvers.resolve(null);\n }\n return webglDeviceResolvers.promise;\n}\n\n/** returns null device promise, if available */\nasync function makeNullTestDevice(): Promise<NullDevice> {\n const nullDeviceResolvers = withResolvers<NullDevice>();\n try {\n const nullDevice = (await luma.createDevice({\n id: 'null-test-device',\n type: 'null',\n adapters: [nullAdapter],\n createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n debug: true,\n debugWebGL: true\n })) as unknown as NullDevice;\n nullDeviceResolvers.resolve(nullDevice);\n } catch (error) {\n log.error(String(error))();\n // @ts-ignore TODO\n nullDevicePromise = Promise.resolve(null);\n }\n return nullDeviceResolvers.promise;\n}\n\n// HELPERS\n\n// TODO - replace with Promise.withResolvers once we upgrade TS baseline\nfunction withResolvers<T>(): {\n promise: Promise<T>;\n resolve: (t: T) => void;\n reject: (error: Error) => void;\n} {\n let resolve;\n let reject;\n const promise = new Promise<T>((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n // @ts-ignore Assigned in callback.\n return {promise, resolve, reject};\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Adapter, DeviceProps} from '@luma.gl/core';\nimport {NullDevice} from './null-device';\n\nexport class NullAdapter extends Adapter {\n /** type of device's created by this adapter */\n readonly type: NullDevice['type'] = 'null';\n\n constructor() {\n super();\n // @ts-ignore DEPRECATED For backwards compatibility luma.registerDevices\n NullDevice.adapter = this;\n }\n\n isSupported(): boolean {\n return true;\n }\n\n isDeviceHandle(handle: any): boolean {\n return handle === null;\n }\n\n async attach(handle: null): Promise<NullDevice> {\n return new NullDevice({});\n }\n\n async create(props: DeviceProps = {}): Promise<NullDevice> {\n return new NullDevice(props);\n }\n}\n\nexport const nullAdapter = new NullAdapter();\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n DeviceProps,\n CanvasContextProps,\n VertexArray,\n VertexArrayProps,\n BufferProps,\n ShaderProps,\n SamplerProps,\n TextureProps,\n ExternalTexture,\n ExternalTextureProps,\n FramebufferProps,\n RenderPipelineProps,\n ComputePipeline,\n ComputePipelineProps,\n CommandEncoderProps,\n TransformFeedbackProps,\n QuerySetProps\n} from '@luma.gl/core';\nimport {Device, DeviceFeatures} from '@luma.gl/core';\n\nimport {NullDeviceInfo} from './null-device-info';\nimport {NullDeviceLimits} from './null-device-features';\nimport {NullCanvasContext} from './null-canvas-context';\nimport {NullBuffer} from './resources/null-buffer';\nimport {NullFramebuffer} from './resources/null-framebuffer';\nimport {NullShader} from './resources/null-shader';\nimport {NullCommandEncoder} from './resources/null-command-encoder';\nimport {NullSampler} from './resources/null-sampler';\nimport {NullTexture} from './resources/null-texture';\nimport {NullRenderPass} from './resources/null-render-pass';\nimport {NullRenderPipeline} from './resources/null-render-pipeline';\nimport {NullVertexArray} from './resources/null-vertex-array';\nimport {NullTransformFeedback} from './resources/null-transform-feedback';\nimport {NullQuerySet} from './resources/null-query-set';\n\n/** Do-nothing device implementation for testing */\nexport class NullDevice extends Device {\n static isSupported(): boolean {\n return true;\n }\n readonly type = 'null';\n readonly handle = null;\n\n readonly preferredColorFormat = 'rgba8unorm';\n readonly preferredDepthFormat = 'depth24plus';\n\n features: DeviceFeatures = new DeviceFeatures([], this.props._disabledFeatures);\n limits: NullDeviceLimits = new NullDeviceLimits();\n readonly info = NullDeviceInfo;\n\n readonly canvasContext: NullCanvasContext;\n override commandEncoder: NullCommandEncoder;\n\n readonly lost: Promise<{reason: 'destroyed'; message: string}>;\n\n constructor(props: DeviceProps) {\n super({...props, id: props.id || 'null-device'});\n\n const canvasContextProps = Device._getCanvasContextProps(props);\n this.canvasContext = new NullCanvasContext(this, canvasContextProps);\n this.lost = new Promise(resolve => {});\n this.commandEncoder = new NullCommandEncoder(this, {id: 'null-command-encoder'});\n }\n\n /**\n * Destroys the context\n * @note Has no effect for null contexts\n */\n destroy(): void {}\n\n get isLost(): boolean {\n return false;\n }\n\n // IMPLEMENTATION OF ABSTRACT DEVICE\n\n getTextureByteAlignment(): number {\n return 1;\n }\n\n createCanvasContext(props: CanvasContextProps): NullCanvasContext {\n return new NullCanvasContext(this, props);\n }\n\n createBuffer(props: BufferProps | ArrayBuffer | ArrayBufferView): NullBuffer {\n const newProps = this._normalizeBufferProps(props);\n return new NullBuffer(this, newProps);\n }\n\n getDefaultRenderPass(): NullRenderPass {\n return new NullRenderPass(this, {});\n }\n\n createTexture(props: TextureProps): NullTexture {\n return new NullTexture(this, props);\n }\n\n createExternalTexture(props: ExternalTextureProps): ExternalTexture {\n throw new Error('createExternalTexture() not implemented'); // return new Program(props);\n }\n\n createSampler(props: SamplerProps): NullSampler {\n return new NullSampler(this, props);\n }\n\n createShader(props: ShaderProps): NullShader {\n return new NullShader(this, props);\n }\n\n createFramebuffer(props: FramebufferProps): NullFramebuffer {\n return new NullFramebuffer(this, props);\n }\n\n createVertexArray(props: VertexArrayProps): VertexArray {\n return new NullVertexArray(this, props);\n }\n\n createTransformFeedback(props: TransformFeedbackProps): NullTransformFeedback {\n return new NullTransformFeedback(this, props);\n }\n\n createQuerySet(props: QuerySetProps): NullQuerySet {\n return new NullQuerySet(this, props);\n }\n\n createRenderPipeline(props: RenderPipelineProps): NullRenderPipeline {\n return new NullRenderPipeline(this, props);\n }\n\n createComputePipeline(props?: ComputePipelineProps): ComputePipeline {\n throw new Error('ComputePipeline not supported in WebGL');\n }\n\n override createCommandEncoder(props: CommandEncoderProps = {}): NullCommandEncoder {\n return new NullCommandEncoder(this, props);\n }\n\n submit(): void {}\n\n override setParametersWebGL(parameters: any): void {}\n\n override getParametersWebGL(parameters: any): any {}\n\n override withParametersWebGL(parameters: any, func: any): any {\n const {nocatch = true} = parameters;\n let value: any;\n if (nocatch) {\n // Avoid try catch to minimize stack size impact for safe execution paths\n return func();\n }\n // Wrap in a try-catch to ensure that parameters are restored on exceptions\n try {\n value = func();\n } catch {\n // ignore\n }\n return value;\n }\n\n override _getDeviceSpecificTextureFormatCapabilities(format: any): any {\n return format;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {DeviceInfo} from '@luma.gl/core';\n\nexport const NullDeviceInfo = {\n type: 'unknown',\n gpu: 'software',\n gpuType: 'unknown',\n gpuBackend: 'unknown',\n vendor: 'no one',\n renderer: 'none',\n version: '1.0',\n shadingLanguage: 'glsl',\n shadingLanguageVersion: 300\n} as const satisfies DeviceInfo;\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {DeviceLimits} from '@luma.gl/core';\n\nexport class NullDeviceLimits extends DeviceLimits {\n maxTextureDimension1D = 0;\n maxTextureDimension2D = 2048;\n maxTextureDimension3D = 256;\n maxTextureArrayLayers = 256;\n maxBindGroups = 0;\n maxDynamicUniformBuffersPerPipelineLayout = 0;\n maxDynamicStorageBuffersPerPipelineLayout = 0;\n maxSampledTexturesPerShaderStage = 8;\n maxSamplersPerShaderStage = 16;\n maxStorageBuffersPerShaderStage = 0;\n maxStorageTexturesPerShaderStage = 0;\n maxUniformBuffersPerShaderStage = 20;\n maxUniformBufferBindingSize = 16384;\n maxStorageBufferBindingSize = 0;\n minUniformBufferOffsetAlignment = 0;\n minStorageBufferOffsetAlignment = 0;\n maxVertexBuffers = 16;\n maxVertexAttributes = 16;\n maxVertexBufferArrayStride = 2048;\n maxInterStageShaderVariables = 60;\n maxComputeWorkgroupStorageSize = 0;\n maxComputeInvocationsPerWorkgroup = 0;\n maxComputeWorkgroupSizeX = 0;\n maxComputeWorkgroupSizeY = 0;\n maxComputeWorkgroupSizeZ = 0;\n maxComputeWorkgroupsPerDimension = 0;\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {CanvasContextProps} from '@luma.gl/core';\nimport {CanvasContext} from '@luma.gl/core';\nimport type {NullDevice} from './null-device';\nimport {NullFramebuffer} from './resources/null-framebuffer';\n\n/**\n * A WebGL Canvas Context which manages the canvas and handles drawing buffer resizing etc\n */\nexport class NullCanvasContext extends CanvasContext {\n readonly device: NullDevice;\n readonly handle = null;\n\n presentationSize: [number, number] = [1, 1];\n private _framebuffer: NullFramebuffer | null = null;\n\n get [Symbol.toStringTag]() {\n return 'NullCanvasContext';\n }\n\n constructor(device: NullDevice, props?: CanvasContextProps) {\n // Note: Base class creates / looks up the canvas (unless under Node.js)\n super(props);\n this.device = device;\n\n // Base class constructor cannot access derived methods/fields, so we need to call these functions in the subclass constructor\n this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);\n this._updateDevice();\n }\n\n getCurrentFramebuffer(): NullFramebuffer {\n // Setting handle to null returns a reference to the default framebuffer\n this._framebuffer = this._framebuffer || new NullFramebuffer(this.device, {handle: null});\n return this._framebuffer;\n }\n\n _updateDevice() {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {FramebufferProps} from '@luma.gl/core';\nimport {Framebuffer} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\nimport type {NullTextureView} from './null-texture-view';\n\nexport class NullFramebuffer extends Framebuffer {\n device: NullDevice;\n readonly handle = null;\n\n colorAttachments: NullTextureView[] = [];\n depthStencilAttachment: NullTextureView | null = null;\n\n constructor(device: NullDevice, props: FramebufferProps) {\n super(device, props);\n this.device = device;\n }\n\n protected override updateAttachments(): void {\n // Null framebuffers are JS only objects, nothing to\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Buffer, type BufferProps, type BufferMapCallback} from '@luma.gl/core';\nimport {type NullDevice} from '../null-device';\n\nexport class NullBuffer extends Buffer {\n device: NullDevice;\n readonly handle: 'null' | null = 'null';\n\n byteLength: number;\n private _storage: ArrayBuffer;\n\n constructor(device: NullDevice, props: BufferProps = {}) {\n super(device, props);\n this.device = device;\n\n const byteOffset = props.byteOffset || 0;\n const byteLength = props.byteLength ?? (props.data ? props.data.byteLength + byteOffset : 0);\n\n this.byteLength = byteLength;\n this._storage = new ArrayBuffer(byteLength);\n\n // If initial data is provided, copy it in\n if (props.data) {\n this.write(props.data, byteOffset);\n }\n\n this.trackAllocatedMemory(byteLength);\n }\n\n override destroy(): void {\n if (!this.destroyed) {\n super.destroy();\n this.trackDeallocatedMemory();\n // @ts-expect-error\n this.handle = null;\n // Clear internal storage\n this._storage = new ArrayBuffer(0);\n }\n }\n\n write(data: ArrayBufferLike | ArrayBufferView, byteOffset: number = 0): void {\n const source = ArrayBuffer.isView(data)\n ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n : new Uint8Array(data);\n const target = new Uint8Array(this._storage, byteOffset, source.byteLength);\n\n if (byteOffset + source.byteLength > this.byteLength) {\n throw new RangeError(`NullBuffer.write(): write would overflow buffer`);\n }\n\n target.set(source);\n this._setDebugData(data, byteOffset, source.byteLength);\n }\n\n async mapAndWriteAsync(\n callback: BufferMapCallback<void>,\n byteOffset = 0,\n byteLength = this.byteLength - byteOffset\n ): Promise<void> {\n const view = new Uint8Array(this._storage, byteOffset, byteLength);\n const tempBuffer = new Uint8Array(view.length); // safe scratch copy\n callback(tempBuffer.buffer, 'copied');\n view.set(tempBuffer);\n this._setDebugData(view, byteOffset, byteLength);\n }\n\n async readAsync(byteOffset = 0, byteLength?: number): Promise<Uint8Array> {\n byteLength = byteLength ?? this.byteLength - byteOffset;\n\n if (byteOffset + byteLength > this.byteLength) {\n throw new RangeError(`NullBuffer.readAsync(): read would overflow buffer`);\n }\n\n const view = new Uint8Array(this._storage, byteOffset, byteLength);\n return new Uint8Array(view); // return a copy\n }\n\n async mapAndReadAsync<T>(\n callback: BufferMapCallback<T>,\n byteOffset = 0,\n byteLength = this.byteLength - byteOffset\n ): Promise<T> {\n const view = new Uint8Array(this._storage, byteOffset, byteLength);\n const copy = new Uint8Array(view); // copy to protect memory\n return callback(copy.buffer, 'copied');\n }\n\n readSyncWebGL(): Uint8Array {\n throw new Error('NullBuffer.readSyncWebGL() not implemented');\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Shader, ShaderProps, CompilerMessage} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullShader extends Shader {\n readonly device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: ShaderProps) {\n super(device, props);\n this.device = device;\n }\n\n get asyncCompilationStatus(): Promise<any> {\n return this.getCompilationInfo().then(() => 'success');\n }\n\n async getCompilationInfo(): Promise<readonly CompilerMessage[]> {\n return [];\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {CommandEncoder, CommandEncoderProps} from '@luma.gl/core';\nimport type {\n CommandBufferProps,\n RenderPassProps,\n ComputePass,\n ComputePassProps,\n QuerySet,\n CopyBufferToBufferOptions,\n CopyBufferToTextureOptions,\n CopyTextureToBufferOptions,\n CopyTextureToTextureOptions\n} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\nimport {NullCommandBuffer} from './null-command-buffer';\nimport {NullRenderPass} from './null-render-pass';\n\nexport class NullCommandEncoder extends CommandEncoder {\n readonly device: NullDevice;\n readonly handle: null = null;\n\n constructor(device: NullDevice, props: CommandEncoderProps) {\n super(device, props);\n this.device = device;\n }\n\n finish(props: CommandBufferProps): NullCommandBuffer {\n return new NullCommandBuffer(this.device, props);\n }\n\n beginRenderPass(props: RenderPassProps): NullRenderPass {\n return new NullRenderPass(this.device, props);\n }\n\n beginComputePass(props: ComputePassProps): ComputePass {\n throw new Error('ComputePass not supported in WebGL');\n }\n\n copyBufferToBuffer(options: CopyBufferToBufferOptions): void {}\n\n copyBufferToTexture(options: CopyBufferToTextureOptions) {}\n\n copyTextureToBuffer(options: CopyTextureToBufferOptions): void {}\n\n copyTextureToTexture(options: CopyTextureToTextureOptions): void {}\n\n resolveQuerySet(querySet: QuerySet): void {}\n\n pushDebugGroup(groupLabel: string): void {}\n popDebugGroup() {}\n insertDebugMarker(markerLabel: string): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n CommandBufferProps,\n CopyBufferToBufferOptions,\n CopyBufferToTextureOptions,\n CopyTextureToBufferOptions,\n CopyTextureToTextureOptions,\n QuerySet\n} from '@luma.gl/core';\nimport {CommandBuffer} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullCommandBuffer extends CommandBuffer {\n device: NullDevice;\n handle: null = null;\n\n constructor(device: NullDevice, props: CommandBufferProps) {\n super(device, props);\n this.device = device;\n }\n\n copyBufferToBuffer(options: CopyBufferToBufferOptions): void {}\n\n copyBufferToTexture(options: CopyBufferToTextureOptions) {}\n\n copyTextureToBuffer(options: CopyTextureToBufferOptions): void {}\n\n copyTextureToTexture(options: CopyTextureToTextureOptions): void {}\n\n pushDebugGroup(groupLabel: string): void {}\n popDebugGroup() {}\n\n insertDebugMarker(markerLabel: string): void {}\n resolveQuerySet(querySet: QuerySet): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {RenderPass, RenderPassProps, RenderPassParameters} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullRenderPass extends RenderPass {\n readonly device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: RenderPassProps) {\n super(device, props);\n this.device = device;\n }\n\n end(): void {}\n\n pushDebugGroup(groupLabel: string): void {}\n popDebugGroup(): void {}\n insertDebugMarker(markerLabel: string): void {}\n\n setParameters(parameters: RenderPassParameters = {}): void {}\n\n beginOcclusionQuery(queryIndex: number): void {}\n endOcclusionQuery(): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Sampler, SamplerProps} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullSampler extends Sampler {\n readonly device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: SamplerProps) {\n super(device, props);\n this.device = device;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n TextureProps,\n TextureViewProps,\n CopyExternalImageOptions,\n CopyImageDataOptions,\n Sampler,\n SamplerProps\n} from '@luma.gl/core';\n\nimport {Texture} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\nimport {NullSampler} from './null-sampler';\nimport {NullTextureView} from './null-texture-view';\n\nexport class NullTexture extends Texture {\n readonly device: NullDevice;\n readonly handle = null;\n\n sampler: NullSampler;\n view: NullTextureView;\n\n constructor(device: NullDevice, props: TextureProps) {\n super(device, props);\n\n this.device = device;\n\n // const data = props.data;\n // this.setImageData(props);\n\n if (props.sampler) {\n this.setSampler(props.sampler);\n }\n\n this.sampler = new NullSampler(this.device, this.props.sampler);\n\n this.view = new NullTextureView(this.device, {\n ...props,\n texture: this,\n mipLevelCount: 1,\n arrayLayerCount: 1\n });\n\n Object.seal(this);\n }\n\n override destroy(): void {\n if (!this.destroyed) {\n super.destroy();\n this.trackDeallocatedMemory('Texture');\n }\n }\n\n createView(props: TextureViewProps): NullTextureView {\n return new NullTextureView(this.device, {...props, texture: this});\n }\n\n copyExternalImage(options: CopyExternalImageOptions): {width: number; height: number} {\n this.trackDeallocatedMemory('Texture');\n\n const {image: data} = options;\n\n // if (data && data.byteLength) {\n // this.trackAllocatedMemory(data.byteLength, 'Texture');\n // } else {\n const bytesPerPixel = 4;\n this.trackAllocatedMemory(this.width * this.height * bytesPerPixel, 'Texture');\n // }\n\n const width = options.width ?? (data as ImageBitmap).width;\n const height = options.height ?? (data as ImageBitmap).height;\n\n this.width = width;\n this.height = height;\n\n return {width, height};\n }\n\n override setSampler(sampler?: Sampler | SamplerProps): void {\n // ignore\n }\n\n copyImageData(options: CopyImageDataOptions): void {\n throw new Error('copyImageData not implemented');\n }\n\n generateMipmapsWebGL(): void {\n // ignore\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {TextureViewProps} from '@luma.gl/core';\nimport {TextureView, Texture} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\nimport type {NullTexture} from './null-texture';\n\nexport class NullTextureView extends TextureView {\n readonly device: NullDevice;\n readonly handle = null;\n\n readonly texture: NullTexture;\n\n constructor(device: NullDevice, props: TextureViewProps & {texture: NullTexture}) {\n super(device, {...Texture.defaultProps, ...props});\n\n this.device = device;\n this.texture = props.texture;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n UniformValue,\n RenderPipelineProps,\n Binding,\n RenderPass,\n VertexArray\n} from '@luma.gl/core';\nimport {RenderPipeline} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\nimport {NullShader} from './null-shader';\n\n/** Creates a new render pipeline */\nexport class NullRenderPipeline extends RenderPipeline {\n device: NullDevice;\n readonly handle = null;\n\n vs: NullShader;\n fs: NullShader;\n\n uniforms: Record<string, UniformValue> = {};\n bindings: Record<string, Binding> = {};\n\n constructor(device: NullDevice, props: RenderPipelineProps) {\n super(device, props);\n this.device = device;\n\n this.vs = props.vs as NullShader;\n this.fs = props.fs as NullShader;\n\n this.shaderLayout = props.shaderLayout || {\n attributes: [],\n bindings: [],\n uniforms: []\n };\n }\n\n setBindings(bindings: Record<string, Binding>): void {\n Object.assign(this.bindings, bindings);\n }\n\n draw(options: {\n renderPass: RenderPass;\n vertexArray: VertexArray;\n vertexCount?: number;\n instanceCount?: number;\n }): boolean {\n const {renderPass, vertexArray} = options;\n vertexArray.bindBeforeRender(renderPass);\n vertexArray.unbindAfterRender(renderPass);\n return true;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {TypedArray} from '@math.gl/types';\nimport type {Buffer, VertexArrayProps} from '@luma.gl/core';\nimport {VertexArray} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\n\nexport class NullVertexArray extends VertexArray {\n device: NullDevice;\n readonly handle = null;\n\n // Create a VertexArray\n constructor(device: NullDevice, props: VertexArrayProps) {\n super(device, props);\n this.device = device;\n }\n\n setIndexBuffer(indexBuffer: Buffer | null): void {\n this.indexBuffer = indexBuffer;\n }\n\n /** Set a location in vertex attributes array to a buffer, enables the location, sets divisor */\n setBuffer(location: number, attributeBuffer: Buffer): void {\n const attributeInfo = this.attributeInfos[location];\n if (!attributeInfo) {\n throw new Error(`Unknown attribute location ${location}`);\n }\n this.attributes[location] = attributeBuffer;\n }\n\n bindBeforeRender(): void {}\n\n unbindAfterRender(): void {}\n\n override setConstantWebGL(location: number, value: TypedArray | null): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {PrimitiveTopology, ShaderLayout, TransformFeedbackProps} from '@luma.gl/core';\nimport {TransformFeedback, Buffer, BufferRange} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullTransformFeedback extends TransformFeedback {\n readonly device: NullDevice;\n readonly handle = null;\n\n readonly layout: ShaderLayout;\n buffers: Record<string, Buffer | BufferRange> = {};\n\n constructor(device: NullDevice, props: TransformFeedbackProps) {\n super(device, props);\n this.device = device;\n this.layout = this.props.layout;\n\n if (props.buffers) {\n this.setBuffers(props.buffers);\n }\n\n Object.seal(this);\n }\n\n begin(topology: PrimitiveTopology = 'point-list'): void {}\n\n end(): void {}\n\n setBuffers(buffers: Record<string, Buffer | BufferRange>): void {\n this.buffers = {};\n\n for (const bufferName in buffers) {\n this.setBuffer(bufferName, buffers[bufferName]);\n }\n }\n\n setBuffer(locationOrName: string | number, bufferOrRange: Buffer | BufferRange): void {\n this.buffers[locationOrName] = bufferOrRange;\n }\n\n getBuffer(locationOrName: string | number): Buffer | BufferRange | null {\n return this.buffers[locationOrName] || null;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {QuerySet, QuerySetProps} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullQuerySet extends QuerySet {\n device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: QuerySetProps) {\n super(device, props);\n this.device = device;\n }\n}\n", "// luma.gl\n// SPDX-License\n// Copyright (c) vis.gl contributors\n\n// @ts-nocheck This should be replaced with model animation loop\n\n// TODO - replace createGLContext, instrumentGLContext, resizeGLContext?\n// TODO - remove dependency on framebuffer (bundle size impact)\nimport {luma, Device, DeviceProps, log} from '@luma.gl/core';\nimport {\n requestAnimationFramePolyfill,\n cancelAnimationFramePolyfill,\n Timeline,\n AnimationProps\n} from '@luma.gl/engine';\nimport {Stats, Stat} from '@probe.gl/stats';\nimport {isBrowser} from '@probe.gl/env';\n\nimport {resetGLParameters} from '@luma.gl/webgl';\n// import {default as Query} from '../classic/query';\n// import {ClassicFramebuffer} from '../classic/framebuffer';\n\ntype ContextProps = DeviceProps;\n\nconst isPage = isBrowser() && typeof document !== 'undefined';\nfunction getHTMLCanvasElement(\n canvas: HTMLCanvasElement | OffscreenCanvas\n): HTMLCanvasElement | null {\n return typeof HTMLCanvasElement !== 'undefined' && canvas instanceof HTMLCanvasElement\n ? canvas\n : null;\n}\n\nlet statIdCounter = 0;\n\n/**\n * Classic Animation Props.\n * Contain a number of deprecated fields\n * @deprecated Use new AnimationLoop in `@luma.gl/engine`\n */\nexport type ClassicAnimationProps = AnimationProps & {\n animationLoop: ClassicAnimationLoop;\n\n /** @deprecated Use .device */\n stop: () => ClassicAnimationLoop;\n\n /** @deprecated Use .device */\n gl: WebGL2RenderingContext;\n /** @deprecated Will be removed */\n framebuffer: unknown;\n\n /** @deprecated Use .timeline */\n _timeline: Timeline;\n /** @deprecated Use .animationLoop */\n _loop: ClassicAnimationLoop;\n /** @deprecated Use .animationLoop */\n _animationLoop: ClassicAnimationLoop;\n};\n\n/** ClassicAnimationLoop properties */\nexport type ClassicAnimationLoopProps = {\n onCreateDevice?: (props: DeviceProps) => Promise<Device>;\n onCreateContext?: (props: ContextProps) => WebGL2RenderingContext; // TODO: signature from createGLContext\n onAddHTML?: (div: HTMLDivElement) => string; // innerHTML\n onInitialize?: (animationProps: ClassicAnimationProps) => {} | void | Promise<{} | void>;\n onRender?: (animationProps: ClassicAnimationProps) => void;\n onFinalize?: (animationProps: ClassicAnimationProps) => void;\n onError?: (reason: any) => void;\n\n stats?: Stats;\n\n device?: Device;\n glOptions?: ContextProps; // createGLContext options\n // debug?: boolean;\n\n // view parameters\n autoResizeViewport?: boolean;\n autoResizeDrawingBuffer?: boolean;\n useDevicePixels?: number | boolean;\n\n /** @deprecated Use .device */\n gl?: WebGL2RenderingContext | null;\n /** @deprecated Will be removed */\n createFramebuffer?: boolean;\n};\n\nconst DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS: Required<ClassicAnimationLoopProps> = {\n onCreateDevice: (props: DeviceProps) => luma.createDevice({...props, debug: true}),\n onCreateContext: undefined,\n onAddHTML: undefined,\n onInitialize: () => ({}),\n onRender: () => {},\n onFinalize: () => {},\n onError: error => console.error(error), // eslint-disable-line no-console\n\n device: null,\n // debug: true,\n\n // view parameters\n useDevicePixels: true,\n autoResizeViewport: true,\n autoResizeDrawingBuffer: true,\n stats: luma.stats.get(`animation-loop-${statIdCounter++}`),\n\n // deprecated\n // onCreateContext: (opts) => createGLContext(opts),\n gl: undefined,\n glOptions: {},\n createFramebuffer: false\n};\n\n/**\n * Convenient animation loop\n * @deprecated Use `@luma.gl/engine` AnimationLoop\n */\nexport class ClassicAnimationLoop {\n device: Device;\n canvas?: HTMLCanvasElement | OffscreenCanvas;\n\n props: Required<ClassicAnimationLoopProps>;\n animationProps: ClassicAnimationProps;\n // framebuffer: ClassicFramebuffer = null;\n timeline: Timeline = null;\n stats: Stats;\n cpuTime: Stat;\n gpuTime: Stat;\n frameRate: Stat;\n\n display: any;\n\n needsRedraw: string | null = 'initialized';\n\n _initialized: boolean = false;\n _running: boolean = false;\n _animationFrameId: any = null;\n _pageLoadPromise: Promise<{}> | null = null;\n _nextFramePromise: Promise<ClassicAnimationLoop> | null = null;\n _resolveNextFrame: ((loop: ClassicAnimationLoop) => void) | null = null;\n _cpuStartTime: number = 0;\n\n // _gpuTimeQuery: Query | null = null;\n\n /** @deprecated */\n gl: WebGL2RenderingContext;\n\n /*\n */\n constructor(props: ClassicAnimationLoopProps = {}) {\n this.props = {...DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS, ...props};\n props = this.props;\n\n let {useDevicePixels = true} = this.props;\n\n if ('useDevicePixelRatio' in props) {\n log.deprecated('useDevicePixelRatio', 'useDevicePixels')();\n // @ts-expect-error\n useDevicePixels = props.useDevicePixelRatio;\n }\n\n // state\n this.device = props.device;\n // @ts-expect-error\n this.gl = (this.device && this.device.gl) || props.gl;\n\n this.stats = props.stats;\n this.cpuTime = this.stats.get('CPU Time');\n this.gpuTime = this.stats.get('GPU Time');\n this.frameRate = this.stats.get('Frame Rate');\n\n this.setProps({\n autoResizeViewport: props.autoResizeViewport,\n autoResizeDrawingBuffer: props.autoResizeDrawingBuffer,\n useDevicePixels\n });\n\n // Bind methods\n this.start = this.start.bind(this);\n this.stop = this.stop.bind(this);\n\n this._onMousemove = this._onMousemove.bind(this);\n this._onMouseleave = this._onMouseleave.bind(this);\n }\n\n destroy(): void {\n this.stop();\n this._setDisplay(null);\n }\n\n /** @deprecated Use .destroy() */\n delete(): void {\n this.destroy();\n }\n\n setNeedsRedraw(reason: string): this {\n this.needsRedraw = this.needsRedraw || reason;\n return this;\n }\n\n setProps(props: ClassicAnimationLoopProps): this {\n if ('autoResizeViewport' in props) {\n this.props.autoResizeViewport = props.autoResizeViewport;\n }\n if ('autoResizeDrawingBuffer' in props) {\n this.props.autoResizeDrawingBuffer = props.autoResizeDrawingBuffer;\n }\n if ('useDevicePixels' in props) {\n this.props.useDevicePixels = props.useDevicePixels;\n }\n return this;\n }\n\n start(opts = {}) {\n this._start(opts);\n return this;\n }\n\n /** Starts a render loop if not already running */\n async _start(props) {\n if (this._running) {\n return this;\n }\n this._running = true;\n\n // console.debug(`Starting ${this.constructor.name}`);\n // Wait for start promise before rendering frame\n try {\n await this._getPageLoadPromise();\n\n // check that we haven't been stopped\n if (!this._running) {\n return null;\n }\n\n let appContext;\n if (!this._initialized) {\n this._initialized = true;\n // Create the WebGL context\n await this._createDevice(props);\n this._initialize(props);\n\n // Note: onIntialize can return a promise (in case app needs to load resources)\n // eslint-disable-next-line @typescript-eslint/await-thenable\n appContext = await this.onInitialize(this.animationProps);\n this._addCallbackData(appContext || {});\n }\n\n // check that we haven't been stopped\n if (!this._running) {\n return null;\n }\n\n // Start the loop\n if (appContext !== false) {\n // cancel any pending renders to ensure only one loop can ever run\n this._cancelAnimationFrame();\n this._requestAnimationFrame();\n }\n\n return this;\n } catch (error) {\n this.props.onError(error);\n // this._running = false; // TODO\n return null;\n }\n }\n\n /** Explicitly draw a frame */\n redraw(): this {\n if (this.isContextLost()) {\n return this;\n }\n\n this._beginTimers();\n\n this._setupFrame();\n this._updateCallbackData();\n\n this._renderFrame(this.animationProps);\n\n // clear needsRedraw flag\n this._clearNeedsRedraw();\n\n if (this._resolveNextFrame) {\n this._resolveNextFrame(this);\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n }\n\n this._endTimers();\n\n return this;\n }\n\n // Stops a render loop if already running, finalizing\n stop() {\n // console.debug(`Stopping ${this.constructor.name}`);\n if (this._running) {\n this._finalizeCallbackData();\n this._cancelAnimationFrame();\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n this._running = false;\n }\n return this;\n }\n\n attachTimeline(timeline: Timeline): Timeline {\n this.timeline = timeline;\n return this.timeline;\n }\n\n detachTimeline(): void {\n this.timeline = null;\n }\n\n waitForRender(): Promise<ClassicAnimationLoop> {\n this.setNeedsRedraw('waitForRender');\n\n if (!this._nextFramePromise) {\n this._nextFramePromise = new Promise(resolve => {\n this._resolveNextFrame = resolve;\n });\n }\n return this._nextFramePromise;\n }\n\n async toDataURL() {\n this.setNeedsRedraw('toDataURL');\n\n await this.waitForRender();\n\n return getHTMLCanvasElement(this.gl.canvas)?.toDataURL();\n }\n\n isContextLost(): boolean {\n return this.gl.isContextLost();\n }\n\n onCreateDevice(deviceProps: DeviceProps): Promise<Device> {\n const {onCreateDevice} = this.props;\n return onCreateDevice(deviceProps);\n }\n\n onInitialize(animationProps: ClassicAnimationProps): {} | void {\n const {onInitialize} = this.props;\n return onInitialize(animationProps);\n }\n\n onRender(animationProps: ClassicAnimationProps) {\n const {onRender} = this.props;\n return onRender(animationProps);\n }\n\n onFinalize(animationProps: ClassicAnimationProps) {\n const {onFinalize} = this.props;\n return onFinalize(animationProps);\n }\n\n // DEPRECATED/REMOVED METHODS\n\n /** @deprecated Use .onCreateDevice() */\n onCreateContext(props: ContextProps) {\n const {onCreateContext} = this.props;\n return onCreateContext(props);\n }\n\n /** @deprecated */\n getHTMLControlValue(id, defaultValue = 1) {\n const element = document.getElementById(id);\n // @ts-expect-error Not all html elements have value\n return element ? Number(element.value) : defaultValue;\n }\n\n // PRIVATE METHODS\n\n _initialize(props: ClassicAnimationLoopProps) {\n this._createFramebuffer();\n this._startEventHandling();\n\n // Initialize the callback data\n this._initializeCallbackData();\n this._updateCallbackData();\n\n // Default viewport setup, in case onInitialize wants to render\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n\n // this._gpuTimeQuery = Query.isSupported(this.gl, ['timers']) ? new Query(this.gl) : null;\n }\n\n _getPageLoadPromise() {\n if (!this._pageLoadPromise) {\n this._pageLoadPromise = isPage\n ? new Promise((resolve, reject) => {\n if (isPage && document.readyState === 'complete') {\n resolve(document);\n return;\n }\n window.addEventListener('load', () => {\n resolve(document);\n });\n })\n : Promise.resolve({});\n }\n return this._pageLoadPromise;\n }\n\n _setDisplay(display: any) {\n if (this.display) {\n this.display.destroy();\n this.display.animationLoop = null;\n }\n\n // store animation loop on the display\n if (display) {\n display.animationLoop = this;\n }\n\n this.display = display;\n }\n\n _requestAnimationFrame() {\n if (!this._running) {\n return;\n }\n\n // VR display has a separate animation frame to sync with headset\n // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n // if (this.display && this.display.requestAnimationFrame) {\n // this._animationFrameId = this.display.requestAnimationFrame(this._animationFrame.bind(this));\n // }\n this._animationFrameId = requestAnimationFramePolyfill(this._animationFrame.bind(this));\n }\n\n _cancelAnimationFrame() {\n if (this._animationFrameId !== null) {\n return;\n }\n\n // VR display has a separate animation frame to sync with headset\n // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n // if (this.display && this.display.cancelAnimationFrame) {\n // this.display.cancelAnimationFrame(this._animationFrameId);\n // }\n cancelAnimationFramePolyfill(this._animationFrameId);\n this._animationFrameId = null;\n }\n\n _animationFrame() {\n if (!this._running) {\n return;\n }\n this.redraw();\n this._requestAnimationFrame();\n }\n\n // Called on each frame, can be overridden to call onRender multiple times\n // to support e.g. stereoscopic rendering\n _renderFrame(props: ClassicAnimationProps) {\n // Allow e.g. VR display to render multiple frames.\n if (this.display) {\n this.display._renderFrame(props);\n return;\n }\n\n // call callback\n this.onRender(props);\n // end callback\n }\n\n _clearNeedsRedraw() {\n this.needsRedraw = null;\n }\n\n _setupFrame() {\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n this._resizeFramebuffer();\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Initialize the object that will be passed to app callbacks\n _initializeCallbackData() {\n this.animationProps = {\n device: this.device,\n gl: this.gl,\n\n stop: this.stop,\n canvas: this.gl.canvas,\n\n // Initial values\n useDevicePixels: this.props.useDevicePixels,\n needsRedraw: null,\n\n // Animation props\n startTime: Date.now(),\n engineTime: 0,\n tick: 0,\n tock: 0,\n\n timeline: this.timeline,\n // @ts-ignore\n animationLoop: this,\n\n // Timeline time for back compatibility\n time: 0,\n\n // Experimental\n _mousePosition: null, // Event props\n\n /** @deprecated */\n // framebuffer: this.framebuffer,\n /** @deprecated */\n _timeline: this.timeline,\n /** @deprecated */\n _loop: this,\n /** @deprecated */\n _animationLoop: this\n };\n }\n\n // Update the context object that will be passed to app callbacks\n _updateCallbackData() {\n const {width, height, aspect} = this._getSizeAndAspect();\n if (width !== this.animationProps.width || height !== this.animationProps.height) {\n this.setNeedsRedraw('drawing buffer resized');\n }\n if (aspect !== this.animationProps.aspect) {\n this.setNeedsRedraw('drawing buffer aspect changed');\n }\n\n this.animationProps.width = width;\n this.animationProps.height = height;\n this.animationProps.aspect = aspect;\n\n this.animationProps.needsRedraw = this.needsRedraw;\n\n // Update time properties\n this.animationProps.engineTime = Date.now() - this.animationProps.startTime;\n\n if (this.timeline) {\n this.timeline.update(this.animationProps.engineTime);\n }\n\n this.animationProps.tick = Math.floor((this.animationProps.time / 1000) * 60);\n this.animationProps.tock++;\n\n // For back compatibility\n this.animationProps.time = this.timeline\n ? this.timeline.getTime()\n : this.animationProps.engineTime;\n }\n\n _finalizeCallbackData() {\n // call callback\n this.onFinalize(this.animationProps);\n // end callback\n }\n\n /** Add application's data to the app context object */\n _addCallbackData(appContext) {\n if (typeof appContext === 'object' && appContext !== null) {\n this.animationProps = Object.assign({}, this.animationProps, appContext);\n }\n }\n\n /** Either uses supplied or existing context, or calls provided callback to create one */\n async _createDevice(props: DeviceProps) {\n const deviceProps = {...this.props, ...props, ...this.props.glOptions};\n\n // TODO - support this.onCreateContext\n // Create the WebGL context if necessary\n // this.gl = this.props.gl ? instrumentGLContext(this.props.gl, deviceProps) : this.onCreateContext(deviceProps);\n\n this.device = await this.onCreateDevice(deviceProps);\n // @ts-expect-error\n this.gl = this.device.gl;\n\n // Reset the WebGL context.\n resetGLParameters(this.gl);\n\n this._createInfoDiv();\n }\n\n _createInfoDiv() {\n const canvas = getHTMLCanvasElement(this.gl.canvas);\n if (canvas && this.props.onAddHTML) {\n const wrapperDiv = document.createElement('div');\n document.body.appendChild(wrapperDiv);\n wrapperDiv.style.position = 'relative';\n const div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '10px';\n div.style.bottom = '10px';\n div.style.width = '300px';\n div.style.background = 'white';\n if (canvas) {\n wrapperDiv.appendChild(canvas);\n }\n wrapperDiv.appendChild(div);\n const html = this.props.onAddHTML(div);\n if (html) {\n div.innerHTML = html;\n }\n }\n }\n\n _getSizeAndAspect() {\n // https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html\n const width = this.gl.drawingBufferWidth;\n const height = this.gl.drawingBufferHeight;\n\n // https://webglfundamentals.org/webgl/lessons/webgl-anti-patterns.html\n let aspect = 1;\n\n const canvas = getHTMLCanvasElement(this.gl.canvas);\n if (canvas && canvas.clientHeight) {\n aspect = canvas.clientWidth / canvas.clientHeight;\n } else if (width > 0 && height > 0) {\n aspect = width / height;\n }\n\n return {width, height, aspect};\n }\n\n /** Default viewport setup */\n _resizeViewport() {\n if (this.props.autoResizeViewport) {\n this.gl.viewport(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight);\n }\n }\n\n /**\n * Resize the render buffer of the canvas to match canvas client size\n * Optionally multiplying with devicePixel ratio\n */\n _resizeCanvasDrawingBuffer() {\n if (this.props.autoResizeDrawingBuffer) {\n this.device.getDefaultCanvasContext().resize({useDevicePixels: this.props.useDevicePixels});\n }\n }\n\n _beginTimers() {\n this.frameRate.timeEnd();\n this.frameRate.timeStart();\n\n // Check if timer for last frame has completed.\n // GPU timer results are never available in the same\n // frame they are captured.\n // if (\n // this._gpuTimeQuery &&\n // this._gpuTimeQuery.isResultAvailable() &&\n // !this._gpuTimeQuery.isTimerDisjoint()\n // ) {\n // this.stats.get('GPU Time').addTime(this._gpuTimeQuery.getTimerMilliseconds());\n // }\n\n // if (this._gpuTimeQuery) {\n // // GPU time query start\n // this._gpuTimeQuery.beginTimeElapsedQuery();\n // }\n\n this.cpuTime.timeStart();\n }\n\n _endTimers() {\n this.cpuTime.timeEnd();\n\n // if (this._gpuTimeQuery) {\n // // GPU time query end. Results will be available on next frame.\n // this._gpuTimeQuery.end();\n // }\n }\n\n // Event handling\n\n _startEventHandling() {\n const {canvas} = this.gl;\n if (canvas) {\n canvas.addEventListener('mousemove', this._onMousemove);\n canvas.addEventListener('mouseleave', this._onMouseleave);\n }\n }\n\n _onMousemove(e) {\n this.animationProps._mousePosition = [e.offsetX, e.offsetY];\n }\n _onMouseleave(e) {\n this.animationProps._mousePosition = null;\n }\n\n // Deprecated\n\n /** @deprecated */\n _createFramebuffer() {\n // Setup default framebuffer\n if (this.props.createFramebuffer) {\n // this.framebuffer = new ClassicFramebuffer(this.gl);\n }\n }\n\n /** @deprecated */\n _resizeFramebuffer() {\n // if (this.framebuffer) {\n // this.framebuffer.resize({\n // width: this.gl.drawingBufferWidth,\n // height: this.gl.drawingBufferHeight\n // });\n // }\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// @ts-nocheck\n/* eslint-disable */\n\nimport {AnimationProps} from '@luma.gl/engine';\nimport {getWebGLTestDevice} from './create-test-device';\n\n// TODO - Replace with new AnimationLoop from `@luma.gl/engine`\nimport {ClassicAnimationLoop as AnimationLoop} from './deprecated/classic-animation-loop';\n\n/** Describes a test case */\nexport type TestRunnerTestCase = {\n /** Name of the test case (for logging) */\n name: string;\n /** Initialize the test case. Can return a promise */\n onInitialize: (props: AnimationProps) => Promise<void | {}>;\n /** Perform rendering */\n onRender: (props: AnimationProps & {done}) => void;\n /** Clean up after the test case */\n onFinalize: (props: AnimationProps) => void;\n animationLoop?: AnimationLoop;\n};\n\nconst DEFAULT_TEST_CASE: TestRunnerTestCase = {\n name: 'Unnamed test',\n onInitialize: async () => {},\n onRender: ({done}) => done(),\n onFinalize: () => {}\n};\n\n/** Options for a TestRunner */\nexport type TestRunnerProps = {\n width?: number;\n height?: number;\n // test lifecycle callback\n onTestStart?: (testCase: TestRunnerTestCase) => void;\n onTestPass?: (testCase: TestRunnerTestCase, result?: unknown) => void;\n onTestFail?: (testCase: TestRunnerTestCase, error?: unknown) => void;\n /** milliseconds to wait for each test case before aborting */\n timeout?: number;\n maxFramesToRender?: number;\n // HACK - this is for the snapshot test runner\n imageDiffOptions?: any;\n};\n\nconst DEFAULT_TEST_PROPS: Required<TestRunnerProps> = {\n width: undefined,\n height: undefined,\n\n // test lifecycle callback\n onTestStart: (testCase: TestRunnerTestCase) => console.log(`# ${testCase.name}`),\n onTestPass: (testCase: TestRunnerTestCase, result?: unknown) =>\n console.log(`ok ${testCase.name} passed`),\n onTestFail: (testCase: TestRunnerTestCase, error?: unknown) =>\n console.log(`not ok ${testCase.name} failed`),\n\n // milliseconds to wait for each test case before aborting\n timeout: 2000,\n maxFramesToRender: undefined,\n imageDiffOptions: undefined\n};\n\n/** Runs an array of test cases */\nexport class TestRunner {\n device = webglDevice;\n props: Record<string, any>;\n isRunning: boolean = false;\n testOptions: Required<TestRunnerProps> = {...DEFAULT_TEST_PROPS};\n readonly _animationProps?: AnimationProps;\n private _animationLoop: AnimationLoop | null;\n private _testCases: TestRunnerTestCase[] = [];\n private _testCaseData: any = null;\n private _currentTestCase: TestRunnerTestCase | null;\n private _currentTestCaseStartTime: number;\n private _currentTestCaseStartTick: number;\n\n // should be defined in snapshot-test-runner\n isDiffing: boolean = false;\n\n // @ts-expect-error\n isHeadless: boolean = Boolean(window.browserTestDriver_isHeadless);\n\n /**\n * props\n * AnimationLoop props\n */\n constructor(props: Record<string, any> = {}) {\n this.props = props;\n }\n\n /**\n * Add testCase(s)\n */\n add(testCases: TestRunnerTestCase[]): this {\n if (!Array.isArray(testCases)) {\n testCases = [testCases];\n }\n for (const testCase of testCases) {\n this._testCases.push(testCase);\n }\n return this;\n }\n\n /**\n * Returns a promise that resolves when all the test cases are done\n */\n async run(options: object = {}): Promise<void> {\n this.testOptions = {...this.testOptions, ...options};\n\n const device = await getWebGLTestDevice();\n\n return new Promise<void>((resolve, reject) => {\n this._animationLoop = new AnimationLoop({\n ...this.props,\n device: this.device,\n onRender: this._onRender.bind(this),\n onFinalize: () => {\n this.isRunning = false;\n resolve();\n }\n });\n this._animationLoop.start(this.props);\n\n this.isRunning = true;\n this.isDiffing = false;\n this._currentTestCase = null;\n }).catch(error => {\n this._fail({error: error.message});\n // reject(error);\n });\n }\n\n /* Lifecycle methods for subclassing */\n\n initTestCase(testCase: TestRunnerTestCase) {\n const {animationLoop} = testCase;\n if (animationLoop) {\n testCase.onInitialize = animationLoop.props.onInitialize.bind(animationLoop);\n testCase.onRender = animationLoop.props.onRender.bind(animationLoop);\n testCase.onFinalize = animationLoop.props.onFinalize.bind(animationLoop);\n }\n for (const key in DEFAULT_TEST_CASE) {\n testCase[key] = testCase[key] || DEFAULT_TEST_CASE[key];\n }\n }\n\n shouldRender(animationProps): boolean {\n return true;\n }\n\n assert(testCase: TestRunnerTestCase): void {\n this._pass(testCase);\n this._next();\n }\n\n /* Utilities */\n\n _pass(result: unknown): void {\n this.testOptions.onTestPass(this._currentTestCase, result);\n // this._animationLoop?.stop();\n }\n\n _fail(result: unknown): void {\n this.testOptions.onTestFail(this._currentTestCase, result);\n // this._animationLoop?.stop();\n }\n\n _next(): void {\n this._nextTestCase();\n }\n\n /* Private methods */\n\n _onRender(animationProps): void {\n this._animationProps = animationProps;\n\n const testCase = this._currentTestCase || this._nextTestCase();\n if (!testCase) {\n // all test cases are done\n this._animationLoop.stop();\n return;\n }\n\n let isDone = false;\n const testCaseAnimationProps: AnimationProps = {\n ...animationProps,\n ...this._testCaseData,\n // tick/time starts from 0 for each test case\n startTime: this._currentTestCaseStartTime,\n time: animationProps.time - this._currentTestCaseStartTime,\n tick: animationProps.tick - this._currentTestCaseStartTick,\n // called by the test case when it is done rendering and ready for capture and diff\n done: () => {\n isDone = true;\n }\n };\n\n if (this._testCaseData && this.shouldRender(testCaseAnimationProps)) {\n // try {\n // test case is initialized, render frame\n testCase.onRender(testCaseAnimationProps);\n // } catch {\n // isDone = true;\n // }\n }\n\n const timeout = testCase.timeout || this.testOptions.timeout;\n if (timeout && testCaseAnimationProps.time > timeout) {\n isDone = true;\n }\n\n if (isDone) {\n this.assert(testCase);\n }\n }\n\n _nextTestCase(): Promise<TestRunnerTestCase> {\n const animationProps = this._animationProps;\n\n // finalize the current test case\n if (this._testCaseData) {\n for (const key in this._testCaseData) {\n const value = this._testCaseData[key];\n if (value && value.delete) {\n value.destroy();\n }\n }\n this._currentTestCase.onFinalize(Object.assign({}, animationProps, this._testCaseData));\n\n // reset WebGL context\n this.device.popState();\n\n this._currentTestCase = null;\n this._testCaseData = null;\n }\n\n // get the next test case\n const testCase = this._testCases.shift();\n if (testCase) {\n // start new test case\n this._currentTestCase = testCase;\n this._currentTestCaseStartTime = animationProps.time;\n this._currentTestCaseStartTick = animationProps.tick;\n this.initTestCase(testCase);\n\n // initialize test case\n\n // save WebGL context\n this.device.pushState();\n\n // aligned with the behavior of AnimationLoop.onInitialized\n // onInitialized could return a plain object or a promise\n const initProps = {\n ...animationProps,\n // tick/time starts from 0 for each test case\n startTime: animationProps.time,\n time: 0,\n tick: 0\n };\n\n // aligned with the behavior of AnimationLoop.onInitialized\n // onInitialized could return a plain object or a promise\n Promise.resolve(testCase.onInitialize(initProps)).then(userData => {\n this._testCaseData = userData || {};\n });\n\n // invoke user callback\n this.testOptions.onTestStart(testCase);\n }\n return testCase;\n }\n}\n", "// Get the bounding box of a DOMElement relative to the page\nexport function getBoundingBoxInPage(domElement: HTMLElement): {\n x: number;\n y: number;\n width: number;\n height: number;\n} {\n const bbox = domElement.getBoundingClientRect();\n return {\n x: window.scrollX + bbox.x,\n y: window.scrollY + bbox.y,\n width: bbox.width,\n height: bbox.height\n };\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {TestRunner, TestRunnerProps, TestRunnerTestCase} from './test-runner';\nimport {getBoundingBoxInPage} from './utils/get-bounding-box';\n\n/** A snapshot test case */\nexport type SnapshotTestRunnerTestCase = TestRunnerTestCase & {\n /** URL to golden image */\n goldenImage: string;\n /** Diff options */\n imageDiffOptions?: {[key: string]: any};\n};\n\nexport type SnapshotTestRunnerProps = TestRunnerProps;\n\nexport class SnapshotTestRunner extends TestRunner {\n // should be defined here but hack access in TestRunner\n // private isDiffing: boolean = false;\n\n constructor(props: SnapshotTestRunnerProps) {\n super(props);\n this.testOptions.imageDiffOptions = {};\n }\n\n override initTestCase(testCase: SnapshotTestRunnerTestCase): void {\n super.initTestCase(testCase);\n if (!testCase.goldenImage) {\n throw new Error(`Test case ${testCase.name} does not have golden image`);\n }\n }\n\n override shouldRender(): boolean {\n // wait for the current diffing to finish\n return !this.isDiffing;\n }\n\n override async assert(testCase: SnapshotTestRunnerTestCase): Promise<void> {\n if (this.isDiffing) {\n // Already performing diffing\n return;\n }\n this.isDiffing = true;\n\n const canvas = this._animationProps?.canvas;\n if (!(canvas instanceof HTMLCanvasElement)) {\n throw new Error('canvas');\n }\n\n const diffOptions = {\n ...this.testOptions.imageDiffOptions,\n ...testCase.imageDiffOptions,\n goldenImage: testCase.goldenImage,\n region: getBoundingBoxInPage(canvas)\n };\n\n // Take screenshot and compare\n // @ts-ignore implicit any\n const result = await globalThis.browserTestDriver_captureAndDiffScreen(diffOptions);\n\n // invoke user callback\n if (result.success) {\n this._pass(result);\n } else {\n this._fail(result);\n }\n\n this.isDiffing = false;\n this._next();\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Stats, Stat} from '@probe.gl/stats';\nimport {TestRunner, TestRunnerProps, TestRunnerTestCase} from './test-runner';\n\nexport type PerformanceTestRunnerProps = TestRunnerProps;\n\nexport class PerformanceTestRunner extends TestRunner {\n private _stats: Stats | null = null;\n private _fps: Stat | null = null;\n\n constructor(props: PerformanceTestRunnerProps) {\n super(props);\n\n Object.assign(this.testOptions, {\n maxFramesToRender: 60,\n targetFPS: 50\n });\n }\n\n override initTestCase(testCase: TestRunnerTestCase): void {\n super.initTestCase(testCase);\n this._stats = new Stats({id: testCase.name});\n this._fps = this._stats.get('fps');\n }\n\n override shouldRender(animationProps: Record<string, any>): boolean {\n this._fps?.timeEnd();\n this._fps?.timeStart();\n\n // @ts-ignore TODO\n if (this._fps.count > this.testOptions.maxFramesToRender) {\n animationProps['done']();\n }\n\n return true;\n }\n\n override assert(testCase: TestRunnerTestCase): void {\n // @ts-expect-error\n const targetFPS = testCase.targetFPS || this.testOptions.targetFPS;\n const count = this._fps?.count;\n const fps = this._fps?.getHz() || 0;\n\n if (fps >= targetFPS) {\n this._pass({fps, framesRendered: count});\n } else {\n this._fail({fps, framesRendered: count});\n }\n this._next();\n }\n}\n", "/**\n * Tests that an argument matches the type.\n * @note fails during typescript type check, not during runtime.\n */\nexport function checkType<T>(value: T): void {}\n", "/** Recursively copies objects */\nexport function deepCopy(object: any): any {\n if (Array.isArray(object)) {\n return object.map(element => deepCopy(element));\n }\n\n if (object !== null && typeof object === 'object') {\n const newObject: Record<string, any> = {};\n for (const key in object) {\n newObject[key] = deepCopy(object[key]);\n }\n return newObject;\n }\n\n return object;\n}\n", "/* global luma */\nexport function getResourceCounts() {\n // @ts-ignore\n const resourceStats = luma.stats.get('Resource Counts');\n return {\n Texture2D: resourceStats.get('Texture2Ds Active').count,\n Buffer: resourceStats.get('Buffers Active').count\n };\n}\n\nexport function getLeakedResources(\n startCounts: Record<string, number>,\n endCounts: Record<string, number>\n): number | null {\n let leakedResources = null;\n const info = 'leaking: ';\n for (const resourceName in endCounts) {\n const leakCount = endCounts[resourceName] - startCounts[resourceName];\n if (leakCount !== 0) {\n leakedResources = Object.assign({}, leakedResources, {\n [resourceName]: leakCount,\n info: `${info} ${resourceName}: ${leakCount}, `\n });\n }\n }\n return leakedResources;\n}\n", "// luma.gl\n// SPDX-License\n// Copyright (c) vis.gl contributors\n\nimport type {CanvasContextProps} from '@luma.gl/core';\nimport {WebGLDevice} from '@luma.gl/webgl';\n\nconst DEFAULT_CANVAS_CONTEXT_PROPS: CanvasContextProps = {\n width: 1,\n height: 1\n};\n\n/**\n * Create a test WebGLDevice\n * @note This WebGL Device is create synchronously and can be used directly but will not have WebGL debugging initialized\n * @deprecated Use getWebGLTestDevice().\n */\nexport function createTestDevice(): WebGLDevice | null {\n try {\n // TODO - We do not use luma.createDevice since createTestDevice currently expect WebGL context to be created synchronously\n return new WebGLDevice({createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS});\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`Failed to created device: ${(error as Error).message}`);\n debugger; // eslint-disable-line no-debugger\n return null;\n }\n}\n\n/**\n * A pre-created WebGLDevice\n * @note This WebGL Device is create synchronously and can be used directly but will not have WebGL debugging initialized\n * @deprecated Use getWebGLTestDevice().\n */\nexport const webglDevice = createTestDevice();\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;qBAAAA;;AAAA;;;ACIA,kBAAmB;AACnB,mBAA4B;AAC5B,oBAA4B;AAE5B,iBAAK,iBAAiB,CAAC,4BAAe,2BAAa,CAAC;;;ACHpD,IAAAC,gBAAwB;AACxB,IAAAC,gBAAyC;AACzC,IAAAC,iBAA0C;;;ACH1C,IAAAC,gBAAmC;;;ACmBnC,IAAAC,gBAAqC;;;ACjB9B,IAAM,iBAAiB;EAC5B,MAAM;EACN,KAAK;EACL,SAAS;EACT,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,SAAS;EACT,iBAAiB;EACjB,wBAAwB;;;;ACX1B,IAAAC,eAA2B;AAErB,IAAO,mBAAP,cAAgC,0BAAY;EAChD,wBAAwB;EACxB,wBAAwB;EACxB,wBAAwB;EACxB,wBAAwB;EACxB,gBAAgB;EAChB,4CAA4C;EAC5C,4CAA4C;EAC5C,mCAAmC;EACnC,4BAA4B;EAC5B,kCAAkC;EAClC,mCAAmC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Z;;;;AChDI,SAAU,UAAa,OAAQ;AAAS;;;ACHxC,SAAU,SAAS,QAAW;AAClC,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,OAAO,IAAI,aAAW,SAAS,OAAO,CAAC;EAChD;AAEA,MAAI,WAAW,QAAQ,OAAO,WAAW,UAAU;AACjD,UAAM,YAAiC,CAAA;AACvC,eAAW,OAAO,QAAQ;AACxB,gBAAU,GAAG,IAAI,SAAS,OAAO,GAAG,CAAC;IACvC;AACA,WAAO;EACT;AAEA,SAAO;AACT;;;ACdM,SAAU,oBAAiB;AAE/B,QAAM,gBAAgB,KAAK,MAAM,IAAI,iBAAiB;AACtD,SAAO;IACL,WAAW,cAAc,IAAI,mBAAmB,EAAE;IAClD,QAAQ,cAAc,IAAI,gBAAgB,EAAE;;AAEhD;AAEM,SAAU,mBACd,aACA,WAAiC;AAEjC,MAAI,kBAAkB;AACtB,QAAM,OAAO;AACb,aAAW,gBAAgB,WAAW;AACpC,UAAM,YAAY,UAAU,YAAY,IAAI,YAAY,YAAY;AACpE,QAAI,cAAc,GAAG;AACnB,wBAAkB,OAAO,OAAO,CAAA,GAAI,iBAAiB;QACnD,CAAC,YAAY,GAAG;QAChB,MAAM,GAAG,QAAQ,iBAAiB;OACnC;IACH;EACF;AACA,SAAO;AACT;;;ACrBA,IAAAC,gBAA0B;AAE1B,IAAMC,gCAAmD;EACvD,OAAO;EACP,QAAQ;;AAQJ,SAAU,mBAAgB;AAC9B,MAAI;AAEF,WAAO,IAAI,0BAAY,EAAC,qBAAqBA,8BAA4B,CAAC;EAC5E,SAAS,OAAP;AAEA,YAAQ,MAAM,6BAA8B,MAAgB,SAAS;AACrE;AACA,WAAO;EACT;AACF;AAOO,IAAMC,eAAc,iBAAgB;",
|
|
6
|
-
"names": ["webglDevice", "import_core", "import_webgl", "import_webgpu", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "webglDevice", "import_core", "import_webgl", "import_webgl", "DEFAULT_CANVAS_CONTEXT_PROPS", "webglDevice"]
|
|
3
|
+
"sources": ["../src/index.ts", "../src/register-devices.ts", "../src/create-test-device.ts", "../src/null-device/null-adapter.ts", "../src/null-device/null-device.ts", "../src/null-device/null-device-info.ts", "../src/null-device/null-device-features.ts", "../src/null-device/null-canvas-context.ts", "../src/null-device/resources/null-framebuffer.ts", "../src/null-device/resources/null-buffer.ts", "../src/null-device/resources/null-shader.ts", "../src/null-device/resources/null-command-encoder.ts", "../src/null-device/resources/null-command-buffer.ts", "../src/null-device/resources/null-render-pass.ts", "../src/null-device/resources/null-sampler.ts", "../src/null-device/resources/null-texture.ts", "../src/null-device/resources/null-texture-view.ts", "../src/null-device/resources/null-render-pipeline.ts", "../src/null-device/resources/null-vertex-array.ts", "../src/null-device/resources/null-transform-feedback.ts", "../src/null-device/resources/null-query-set.ts", "../src/null-device/resources/null-fence.ts", "../src/deprecated/classic-animation-loop.ts", "../src/test-runner.ts", "../src/utils/get-bounding-box.ts", "../src/snapshot-test-runner.ts", "../src/performance-test-runner.ts", "../src/utils/check-type.ts", "../src/utils/deep-copy.ts", "../src/utils/resource-tracker.ts", "../src/deprecated/sync-test-device.ts"],
|
|
4
|
+
"sourcesContent": ["import './register-devices';\n\n// TEST RUNNERS\nexport type {TestRunnerTestCase} from './test-runner';\nexport type {SnapshotTestRunnerTestCase} from './snapshot-test-runner';\n\nexport {SnapshotTestRunner} from './snapshot-test-runner';\nexport {PerformanceTestRunner} from './performance-test-runner';\n\n// TEST DEVICES\nexport {\n getTestDevices,\n getTestDevice,\n getWebGLTestDevice,\n getWebGPUTestDevice,\n getNullTestDevice\n} from './create-test-device';\n\n// Null device\nexport {nullAdapter, NullAdapter} from './null-device/null-adapter';\nexport {NullDevice} from './null-device/null-device';\n\n// UTILS\nexport {checkType} from './utils/check-type';\nexport {deepCopy} from './utils/deep-copy';\nexport {getResourceCounts, getLeakedResources} from './utils/resource-tracker';\n\n// DEPRECATED\nexport {createTestDevice, webglDevice} from './deprecated/sync-test-device';\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {luma} from '@luma.gl/core';\nimport {webgl2Adapter} from '@luma.gl/webgl';\nimport {webgpuAdapter} from '@luma.gl/webgpu';\n\nluma.registerAdapters([webgl2Adapter, webgpuAdapter]);\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {Device, CanvasContextProps} from '@luma.gl/core';\nimport {luma, log} from '@luma.gl/core';\nimport {webgl2Adapter, WebGLDevice} from '@luma.gl/webgl';\nimport {webgpuAdapter, WebGPUDevice} from '@luma.gl/webgpu';\nimport {nullAdapter} from './null-device/null-adapter';\nimport {NullDevice} from './null-device/null-device';\n\nconst DEFAULT_CANVAS_CONTEXT_PROPS: CanvasContextProps = {width: 1, height: 1};\n\n/** A null device intended for testing - @note Only available after getTestDevices() has completed */\nlet nullDevicePromise = makeNullTestDevice();\n/** This WebGL Device can be used directly but will not have WebGL debugging initialized */\nconst webglDevicePromise = makeWebGLTestDevice();\n/** A WebGL 2 Device intended for testing - @note Only available after getTestDevices() has completed */\nconst webgpuDevicePromise = makeWebGPUTestDevice();\n\n/** Includes WebGPU device if available */\nexport async function getTestDevices(\n types: Readonly<('webgl' | 'webgpu' | 'null' | 'unknown')[]> = ['webgl', 'webgpu']\n): Promise<Device[]> {\n const promises = types.map(type => getTestDevice(type));\n const devices = await Promise.all(promises);\n return devices.filter(device => device !== null);\n}\n\nexport async function getTestDevice(\n type: 'webgl' | 'webgpu' | 'null' | 'unknown'\n): Promise<Device | null> {\n switch (type) {\n case 'webgl':\n return webglDevicePromise;\n case 'webgpu':\n return webgpuDevicePromise;\n case 'null':\n return nullDevicePromise;\n case 'unknown':\n return null;\n }\n}\n\n/** returns WebGPU device promise, if available */\nexport function getWebGPUTestDevice(): Promise<WebGPUDevice | null> {\n return webgpuDevicePromise;\n}\n\n/** returns WebGL device promise, if available */\nexport async function getWebGLTestDevice(): Promise<WebGLDevice> {\n return webglDevicePromise;\n}\n\n/** returns null device promise, if available */\nexport async function getNullTestDevice(): Promise<NullDevice> {\n return nullDevicePromise;\n}\n\nasync function makeWebGPUTestDevice(): Promise<WebGPUDevice | null> {\n const webgpuDeviceResolvers = withResolvers<WebGPUDevice | null>();\n try {\n const webgpuDevice = (await luma.createDevice({\n id: 'webgpu-test-device',\n type: 'webgpu',\n adapters: [webgpuAdapter],\n createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n debug: true\n })) as unknown as WebGPUDevice;\n webgpuDeviceResolvers.resolve(webgpuDevice);\n } catch (error) {\n log.error(String(error))();\n // @ts-ignore TODO\n webgpuDeviceResolvers.resolve(null);\n }\n return webgpuDeviceResolvers.promise;\n}\n\n/** returns WebGL device promise, if available */\nasync function makeWebGLTestDevice(): Promise<WebGLDevice> {\n const webglDeviceResolvers = withResolvers<WebGLDevice>();\n try {\n const webglDevice = (await luma.createDevice({\n id: 'webgl-test-device',\n type: 'webgl',\n adapters: [webgl2Adapter],\n createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n debug: true\n })) as unknown as WebGLDevice;\n webglDeviceResolvers.resolve(webglDevice);\n } catch (error) {\n log.error(String(error))();\n // @ts-ignore TODO\n webglDeviceResolvers.resolve(null);\n }\n return webglDeviceResolvers.promise;\n}\n\n/** returns null device promise, if available */\nasync function makeNullTestDevice(): Promise<NullDevice> {\n const nullDeviceResolvers = withResolvers<NullDevice>();\n try {\n const nullDevice = (await luma.createDevice({\n id: 'null-test-device',\n type: 'null',\n adapters: [nullAdapter],\n createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n debug: true\n })) as unknown as NullDevice;\n nullDeviceResolvers.resolve(nullDevice);\n } catch (error) {\n log.error(String(error))();\n // @ts-ignore TODO\n nullDevicePromise = Promise.resolve(null);\n }\n return nullDeviceResolvers.promise;\n}\n\n// HELPERS\n\n// TODO - replace with Promise.withResolvers once we upgrade TS baseline\nfunction withResolvers<T>(): {\n promise: Promise<T>;\n resolve: (t: T) => void;\n reject: (error: Error) => void;\n} {\n let resolve;\n let reject;\n const promise = new Promise<T>((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n // @ts-ignore Assigned in callback.\n return {promise, resolve, reject};\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Adapter, DeviceProps} from '@luma.gl/core';\nimport {NullDevice} from './null-device';\n\nexport class NullAdapter extends Adapter {\n /** type of device's created by this adapter */\n readonly type: NullDevice['type'] = 'null';\n\n constructor() {\n super();\n // @ts-ignore DEPRECATED For backwards compatibility luma.registerDevices\n NullDevice.adapter = this;\n }\n\n isSupported(): boolean {\n return true;\n }\n\n isDeviceHandle(handle: any): boolean {\n return handle === null;\n }\n\n async attach(handle: null): Promise<NullDevice> {\n return new NullDevice({});\n }\n\n async create(props: DeviceProps = {}): Promise<NullDevice> {\n return new NullDevice(props);\n }\n}\n\nexport const nullAdapter = new NullAdapter();\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n DeviceProps,\n CanvasContextProps,\n VertexArray,\n VertexArrayProps,\n BufferProps,\n ShaderProps,\n SamplerProps,\n TextureProps,\n ExternalTexture,\n ExternalTextureProps,\n FramebufferProps,\n RenderPipelineProps,\n ComputePipeline,\n ComputePipelineProps,\n CommandEncoderProps,\n TransformFeedbackProps,\n QuerySetProps\n} from '@luma.gl/core';\nimport {Device, DeviceFeatures} from '@luma.gl/core';\n\nimport {NullDeviceInfo} from './null-device-info';\nimport {NullDeviceLimits} from './null-device-features';\nimport {NullCanvasContext} from './null-canvas-context';\nimport {NullBuffer} from './resources/null-buffer';\nimport {NullFramebuffer} from './resources/null-framebuffer';\nimport {NullShader} from './resources/null-shader';\nimport {NullCommandEncoder} from './resources/null-command-encoder';\nimport {NullSampler} from './resources/null-sampler';\nimport {NullTexture} from './resources/null-texture';\nimport {NullRenderPass} from './resources/null-render-pass';\nimport {NullRenderPipeline} from './resources/null-render-pipeline';\nimport {NullVertexArray} from './resources/null-vertex-array';\nimport {NullTransformFeedback} from './resources/null-transform-feedback';\nimport {NullQuerySet} from './resources/null-query-set';\nimport {NullFence} from './resources/null-fence';\n\n/** Do-nothing device implementation for testing */\nexport class NullDevice extends Device {\n static isSupported(): boolean {\n return true;\n }\n readonly type = 'null';\n readonly handle = null;\n\n readonly preferredColorFormat = 'rgba8unorm';\n readonly preferredDepthFormat = 'depth24plus';\n\n features: DeviceFeatures = new DeviceFeatures([], this.props._disabledFeatures);\n limits: NullDeviceLimits = new NullDeviceLimits();\n readonly info = NullDeviceInfo;\n\n readonly canvasContext: NullCanvasContext;\n override commandEncoder: NullCommandEncoder;\n\n readonly lost: Promise<{reason: 'destroyed'; message: string}>;\n\n constructor(props: DeviceProps) {\n super({...props, id: props.id || 'null-device'});\n\n const canvasContextProps = Device._getCanvasContextProps(props);\n this.canvasContext = new NullCanvasContext(this, canvasContextProps);\n this.lost = new Promise(resolve => {});\n this.commandEncoder = new NullCommandEncoder(this, {id: 'null-command-encoder'});\n }\n\n /**\n * Destroys the context\n * @note Has no effect for null contexts\n */\n destroy(): void {}\n\n get isLost(): boolean {\n return false;\n }\n\n // IMPLEMENTATION OF ABSTRACT DEVICE\n\n createCanvasContext(props: CanvasContextProps): NullCanvasContext {\n return new NullCanvasContext(this, props);\n }\n\n createBuffer(props: BufferProps | ArrayBuffer | ArrayBufferView): NullBuffer {\n const newProps = this._normalizeBufferProps(props);\n return new NullBuffer(this, newProps);\n }\n\n getDefaultRenderPass(): NullRenderPass {\n return new NullRenderPass(this, {});\n }\n\n createTexture(props: TextureProps): NullTexture {\n return new NullTexture(this, props);\n }\n\n createExternalTexture(props: ExternalTextureProps): ExternalTexture {\n throw new Error('createExternalTexture() not implemented'); // return new Program(props);\n }\n\n createSampler(props: SamplerProps): NullSampler {\n return new NullSampler(this, props);\n }\n\n createShader(props: ShaderProps): NullShader {\n return new NullShader(this, props);\n }\n\n createFramebuffer(props: FramebufferProps): NullFramebuffer {\n return new NullFramebuffer(this, props);\n }\n\n createVertexArray(props: VertexArrayProps): VertexArray {\n return new NullVertexArray(this, props);\n }\n\n createTransformFeedback(props: TransformFeedbackProps): NullTransformFeedback {\n return new NullTransformFeedback(this, props);\n }\n\n createQuerySet(props: QuerySetProps): NullQuerySet {\n return new NullQuerySet(this, props);\n }\n\n override createFence(): NullFence {\n return new NullFence(this);\n }\n\n createRenderPipeline(props: RenderPipelineProps): NullRenderPipeline {\n return new NullRenderPipeline(this, props);\n }\n\n createComputePipeline(props?: ComputePipelineProps): ComputePipeline {\n throw new Error('ComputePipeline not supported in WebGL');\n }\n\n override createCommandEncoder(props: CommandEncoderProps = {}): NullCommandEncoder {\n return new NullCommandEncoder(this, props);\n }\n\n submit(): void {}\n\n override setParametersWebGL(parameters: any): void {}\n\n override getParametersWebGL(parameters: any): any {}\n\n override withParametersWebGL(parameters: any, func: any): any {\n const {nocatch = true} = parameters;\n let value: any;\n if (nocatch) {\n // Avoid try catch to minimize stack size impact for safe execution paths\n return func();\n }\n // Wrap in a try-catch to ensure that parameters are restored on exceptions\n try {\n value = func();\n } catch {\n // ignore\n }\n return value;\n }\n\n override _getDeviceSpecificTextureFormatCapabilities(format: any): any {\n return format;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {DeviceInfo} from '@luma.gl/core';\n\nexport const NullDeviceInfo = {\n type: 'unknown',\n gpu: 'software',\n gpuType: 'unknown',\n gpuBackend: 'unknown',\n vendor: 'no one',\n renderer: 'none',\n version: '1.0',\n shadingLanguage: 'glsl',\n shadingLanguageVersion: 300\n} as const satisfies DeviceInfo;\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {DeviceLimits} from '@luma.gl/core';\n\nexport class NullDeviceLimits extends DeviceLimits {\n maxTextureDimension1D = 0;\n maxTextureDimension2D = 2048;\n maxTextureDimension3D = 256;\n maxTextureArrayLayers = 256;\n maxBindGroups = 0;\n maxDynamicUniformBuffersPerPipelineLayout = 0;\n maxDynamicStorageBuffersPerPipelineLayout = 0;\n maxSampledTexturesPerShaderStage = 8;\n maxSamplersPerShaderStage = 16;\n maxStorageBuffersPerShaderStage = 0;\n maxStorageTexturesPerShaderStage = 0;\n maxUniformBuffersPerShaderStage = 20;\n maxUniformBufferBindingSize = 16384;\n maxStorageBufferBindingSize = 0;\n minUniformBufferOffsetAlignment = 0;\n minStorageBufferOffsetAlignment = 0;\n maxVertexBuffers = 16;\n maxVertexAttributes = 16;\n maxVertexBufferArrayStride = 2048;\n maxInterStageShaderVariables = 60;\n maxComputeWorkgroupStorageSize = 0;\n maxComputeInvocationsPerWorkgroup = 0;\n maxComputeWorkgroupSizeX = 0;\n maxComputeWorkgroupSizeY = 0;\n maxComputeWorkgroupSizeZ = 0;\n maxComputeWorkgroupsPerDimension = 0;\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {CanvasContextProps} from '@luma.gl/core';\nimport {CanvasContext} from '@luma.gl/core';\nimport type {NullDevice} from './null-device';\nimport {NullFramebuffer} from './resources/null-framebuffer';\n\n/**\n * A WebGL Canvas Context which manages the canvas and handles drawing buffer resizing etc\n */\nexport class NullCanvasContext extends CanvasContext {\n readonly device: NullDevice;\n readonly handle = null;\n\n presentationSize: [number, number] = [1, 1];\n private _framebuffer: NullFramebuffer | null = null;\n\n get [Symbol.toStringTag]() {\n return 'NullCanvasContext';\n }\n\n constructor(device: NullDevice, props?: CanvasContextProps) {\n // Note: Base class creates / looks up the canvas (unless under Node.js)\n super(props);\n this.device = device;\n\n // Base class constructor cannot access derived methods/fields, so we need to call these functions in the subclass constructor\n this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);\n this._configureDevice();\n }\n\n _getCurrentFramebuffer(): NullFramebuffer {\n // Setting handle to null returns a reference to the default framebuffer\n this._framebuffer = this._framebuffer || new NullFramebuffer(this.device, {handle: null});\n return this._framebuffer;\n }\n\n _configureDevice() {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {FramebufferProps} from '@luma.gl/core';\nimport {Framebuffer} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\nimport type {NullTextureView} from './null-texture-view';\n\nexport class NullFramebuffer extends Framebuffer {\n device: NullDevice;\n readonly handle = null;\n\n colorAttachments: NullTextureView[] = [];\n depthStencilAttachment: NullTextureView | null = null;\n\n constructor(device: NullDevice, props: FramebufferProps) {\n super(device, props);\n this.device = device;\n }\n\n protected override updateAttachments(): void {\n // Null framebuffers are JS only objects, nothing to\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Buffer, type BufferProps, type BufferMapCallback} from '@luma.gl/core';\nimport {type NullDevice} from '../null-device';\n\nexport class NullBuffer extends Buffer {\n device: NullDevice;\n readonly handle: 'null' | null = 'null';\n\n byteLength: number;\n private _storage: ArrayBuffer;\n\n constructor(device: NullDevice, props: BufferProps = {}) {\n super(device, props);\n this.device = device;\n\n const byteOffset = props.byteOffset || 0;\n const byteLength = props.byteLength ?? (props.data ? props.data.byteLength + byteOffset : 0);\n\n this.byteLength = byteLength;\n this._storage = new ArrayBuffer(byteLength);\n\n // If initial data is provided, copy it in\n if (props.data) {\n this.write(props.data, byteOffset);\n }\n\n this.trackAllocatedMemory(byteLength);\n }\n\n override destroy(): void {\n if (!this.destroyed) {\n super.destroy();\n this.trackDeallocatedMemory();\n // @ts-expect-error\n this.handle = null;\n // Clear internal storage\n this._storage = new ArrayBuffer(0);\n }\n }\n\n write(data: ArrayBufferLike | ArrayBufferView, byteOffset: number = 0): void {\n const source = ArrayBuffer.isView(data)\n ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n : new Uint8Array(data);\n const target = new Uint8Array(this._storage, byteOffset, source.byteLength);\n\n if (byteOffset + source.byteLength > this.byteLength) {\n throw new RangeError(`NullBuffer.write(): write would overflow buffer`);\n }\n\n target.set(source);\n this._setDebugData(data, byteOffset, source.byteLength);\n }\n\n async mapAndWriteAsync(\n callback: BufferMapCallback<void>,\n byteOffset = 0,\n byteLength = this.byteLength - byteOffset\n ): Promise<void> {\n const view = new Uint8Array(this._storage, byteOffset, byteLength);\n const tempBuffer = new Uint8Array(view.length); // safe scratch copy\n callback(tempBuffer.buffer, 'copied');\n view.set(tempBuffer);\n this._setDebugData(view, byteOffset, byteLength);\n }\n\n async readAsync(byteOffset = 0, byteLength?: number): Promise<Uint8Array> {\n byteLength = byteLength ?? this.byteLength - byteOffset;\n\n if (byteOffset + byteLength > this.byteLength) {\n throw new RangeError(`NullBuffer.readAsync(): read would overflow buffer`);\n }\n\n const view = new Uint8Array(this._storage, byteOffset, byteLength);\n return new Uint8Array(view); // return a copy\n }\n\n async mapAndReadAsync<T>(\n callback: BufferMapCallback<T>,\n byteOffset = 0,\n byteLength = this.byteLength - byteOffset\n ): Promise<T> {\n const view = new Uint8Array(this._storage, byteOffset, byteLength);\n const copy = new Uint8Array(view); // copy to protect memory\n return callback(copy.buffer, 'copied');\n }\n\n readSyncWebGL(): Uint8Array {\n throw new Error('NullBuffer.readSyncWebGL() not implemented');\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Shader, ShaderProps, CompilerMessage} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullShader extends Shader {\n readonly device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: ShaderProps) {\n super(device, props);\n this.device = device;\n }\n\n get asyncCompilationStatus(): Promise<any> {\n return this.getCompilationInfo().then(() => 'success');\n }\n\n async getCompilationInfo(): Promise<readonly CompilerMessage[]> {\n return [];\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {CommandEncoder, CommandEncoderProps} from '@luma.gl/core';\nimport type {\n CommandBufferProps,\n RenderPassProps,\n ComputePass,\n ComputePassProps,\n QuerySet,\n CopyBufferToBufferOptions,\n CopyBufferToTextureOptions,\n CopyTextureToBufferOptions,\n CopyTextureToTextureOptions\n} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\nimport {NullCommandBuffer} from './null-command-buffer';\nimport {NullRenderPass} from './null-render-pass';\n\nexport class NullCommandEncoder extends CommandEncoder {\n readonly device: NullDevice;\n readonly handle: null = null;\n\n constructor(device: NullDevice, props: CommandEncoderProps) {\n super(device, props);\n this.device = device;\n }\n\n finish(props: CommandBufferProps): NullCommandBuffer {\n return new NullCommandBuffer(this.device, props);\n }\n\n beginRenderPass(props: RenderPassProps): NullRenderPass {\n return new NullRenderPass(this.device, props);\n }\n\n beginComputePass(props: ComputePassProps): ComputePass {\n throw new Error('ComputePass not supported in WebGL');\n }\n\n copyBufferToBuffer(options: CopyBufferToBufferOptions): void {}\n\n copyBufferToTexture(options: CopyBufferToTextureOptions) {}\n\n copyTextureToBuffer(options: CopyTextureToBufferOptions): void {}\n\n copyTextureToTexture(options: CopyTextureToTextureOptions): void {}\n\n resolveQuerySet(querySet: QuerySet): void {}\n\n pushDebugGroup(groupLabel: string): void {}\n popDebugGroup() {}\n insertDebugMarker(markerLabel: string): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n CommandBufferProps,\n CopyBufferToBufferOptions,\n CopyBufferToTextureOptions,\n CopyTextureToBufferOptions,\n CopyTextureToTextureOptions,\n QuerySet\n} from '@luma.gl/core';\nimport {CommandBuffer} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullCommandBuffer extends CommandBuffer {\n device: NullDevice;\n handle: null = null;\n\n constructor(device: NullDevice, props: CommandBufferProps) {\n super(device, props);\n this.device = device;\n }\n\n copyBufferToBuffer(options: CopyBufferToBufferOptions): void {}\n\n copyBufferToTexture(options: CopyBufferToTextureOptions) {}\n\n copyTextureToBuffer(options: CopyTextureToBufferOptions): void {}\n\n copyTextureToTexture(options: CopyTextureToTextureOptions): void {}\n\n pushDebugGroup(groupLabel: string): void {}\n popDebugGroup() {}\n\n insertDebugMarker(markerLabel: string): void {}\n resolveQuerySet(querySet: QuerySet): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {RenderPass, RenderPassProps, RenderPassParameters} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullRenderPass extends RenderPass {\n readonly device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: RenderPassProps) {\n super(device, props);\n this.device = device;\n }\n\n end(): void {}\n\n pushDebugGroup(groupLabel: string): void {}\n popDebugGroup(): void {}\n insertDebugMarker(markerLabel: string): void {}\n\n setParameters(parameters: RenderPassParameters = {}): void {}\n\n beginOcclusionQuery(queryIndex: number): void {}\n endOcclusionQuery(): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Sampler, SamplerProps} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullSampler extends Sampler {\n readonly device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: SamplerProps) {\n super(device, props);\n this.device = device;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n type TextureProps,\n type TextureViewProps,\n type CopyExternalImageOptions,\n type CopyImageDataOptions,\n type TextureReadOptions,\n type TextureWriteOptions,\n type Sampler,\n type SamplerProps,\n Buffer,\n Texture\n} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\nimport {NullSampler} from './null-sampler';\nimport {NullTextureView} from './null-texture-view';\n\nexport class NullTexture extends Texture {\n readonly device: NullDevice;\n readonly handle = null;\n\n sampler: NullSampler;\n view: NullTextureView;\n\n constructor(device: NullDevice, props: TextureProps) {\n super(device, props);\n\n this.device = device;\n\n // const data = props.data;\n // this.setImageData(props);\n\n if (props.sampler) {\n this.setSampler(props.sampler);\n }\n\n this.sampler = new NullSampler(this.device, this.props.sampler);\n\n this.view = new NullTextureView(this.device, {\n ...props,\n texture: this,\n mipLevelCount: 1,\n arrayLayerCount: 1\n });\n\n Object.seal(this);\n }\n\n override destroy(): void {\n if (!this.destroyed) {\n super.destroy();\n this.trackDeallocatedMemory('Texture');\n }\n }\n\n createView(props: TextureViewProps): NullTextureView {\n return new NullTextureView(this.device, {...props, texture: this});\n }\n\n copyExternalImage(options: CopyExternalImageOptions): {width: number; height: number} {\n this.trackDeallocatedMemory('Texture');\n\n // const {image: data} = options;\n // if (data && data.byteLength) {\n // this.trackAllocatedMemory(data.byteLength, 'Texture');\n // } else {\n const bytesPerPixel = 4;\n this.trackAllocatedMemory(this.width * this.height * bytesPerPixel, 'Texture');\n // }\n\n return {width: this.width, height: this.height};\n }\n\n override setSampler(sampler?: Sampler | SamplerProps): void {\n // ignore\n }\n\n copyImageData(options: CopyImageDataOptions): void {\n throw new Error('copyImageData not implemented');\n }\n\n override readBuffer(options: TextureReadOptions = {}, buffer?: Buffer): Buffer {\n return this.device.createBuffer({});\n }\n\n override async readDataAsync(options: TextureReadOptions = {}): Promise<ArrayBuffer> {\n return new ArrayBuffer(0);\n }\n\n override writeBuffer(buffer: Buffer, options: TextureWriteOptions = {}) {\n // ignore\n }\n\n override writeData(data: ArrayBuffer | ArrayBufferView, options: TextureWriteOptions = {}): void {\n // ignore\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {TextureViewProps} from '@luma.gl/core';\nimport {TextureView, Texture} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\nimport type {NullTexture} from './null-texture';\n\nexport class NullTextureView extends TextureView {\n readonly device: NullDevice;\n readonly handle = null;\n\n readonly texture: NullTexture;\n\n constructor(device: NullDevice, props: TextureViewProps & {texture: NullTexture}) {\n super(device, {...Texture.defaultProps, ...props});\n\n this.device = device;\n this.texture = props.texture;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n UniformValue,\n RenderPipelineProps,\n Binding,\n RenderPass,\n VertexArray\n} from '@luma.gl/core';\nimport {RenderPipeline} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\nimport {NullShader} from './null-shader';\n\n/** Creates a new render pipeline */\nexport class NullRenderPipeline extends RenderPipeline {\n device: NullDevice;\n readonly handle = null;\n\n vs: NullShader;\n fs: NullShader;\n\n uniforms: Record<string, UniformValue> = {};\n bindings: Record<string, Binding> = {};\n\n constructor(device: NullDevice, props: RenderPipelineProps) {\n super(device, props);\n this.device = device;\n\n this.vs = props.vs as NullShader;\n this.fs = props.fs as NullShader;\n\n this.shaderLayout = props.shaderLayout || {\n attributes: [],\n bindings: [],\n uniforms: []\n };\n }\n\n setBindings(bindings: Record<string, Binding>): void {\n Object.assign(this.bindings, bindings);\n }\n\n draw(options: {\n renderPass: RenderPass;\n vertexArray: VertexArray;\n vertexCount?: number;\n instanceCount?: number;\n }): boolean {\n const {renderPass, vertexArray} = options;\n vertexArray.bindBeforeRender(renderPass);\n vertexArray.unbindAfterRender(renderPass);\n return true;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {TypedArray} from '@math.gl/types';\nimport type {Buffer, VertexArrayProps} from '@luma.gl/core';\nimport {VertexArray} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\n\nexport class NullVertexArray extends VertexArray {\n device: NullDevice;\n readonly handle = null;\n\n // Create a VertexArray\n constructor(device: NullDevice, props: VertexArrayProps) {\n super(device, props);\n this.device = device;\n }\n\n setIndexBuffer(indexBuffer: Buffer | null): void {\n this.indexBuffer = indexBuffer;\n }\n\n /** Set a location in vertex attributes array to a buffer, enables the location, sets divisor */\n setBuffer(location: number, attributeBuffer: Buffer): void {\n const attributeInfo = this.attributeInfos[location];\n if (!attributeInfo) {\n throw new Error(`Unknown attribute location ${location}`);\n }\n this.attributes[location] = attributeBuffer;\n }\n\n bindBeforeRender(): void {}\n\n unbindAfterRender(): void {}\n\n override setConstantWebGL(location: number, value: TypedArray | null): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {PrimitiveTopology, ShaderLayout, TransformFeedbackProps} from '@luma.gl/core';\nimport {TransformFeedback, Buffer, BufferRange} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullTransformFeedback extends TransformFeedback {\n readonly device: NullDevice;\n readonly handle = null;\n\n readonly layout: ShaderLayout;\n buffers: Record<string, Buffer | BufferRange> = {};\n\n constructor(device: NullDevice, props: TransformFeedbackProps) {\n super(device, props);\n this.device = device;\n this.layout = this.props.layout;\n\n if (props.buffers) {\n this.setBuffers(props.buffers);\n }\n\n Object.seal(this);\n }\n\n begin(topology: PrimitiveTopology = 'point-list'): void {}\n\n end(): void {}\n\n setBuffers(buffers: Record<string, Buffer | BufferRange>): void {\n this.buffers = {};\n\n for (const bufferName in buffers) {\n this.setBuffer(bufferName, buffers[bufferName]);\n }\n }\n\n setBuffer(locationOrName: string | number, bufferOrRange: Buffer | BufferRange): void {\n this.buffers[locationOrName] = bufferOrRange;\n }\n\n getBuffer(locationOrName: string | number): Buffer | BufferRange | null {\n return this.buffers[locationOrName] || null;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {QuerySet, QuerySetProps} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullQuerySet extends QuerySet {\n device: NullDevice;\n readonly handle = null;\n\n constructor(device: NullDevice, props: QuerySetProps) {\n super(device, props);\n this.device = device;\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Fence, type FenceProps} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\n/** Null fence that is always signaled */\nexport class NullFence extends Fence {\n readonly device: NullDevice;\n readonly handle = null;\n readonly signaled: Promise<void> = Promise.resolve();\n\n constructor(device: NullDevice, props: FenceProps = {}) {\n super(device, props);\n this.device = device;\n }\n\n override destroy(): void {}\n\n isSignaled(): boolean {\n return true;\n }\n}\n", "// luma.gl\n// SPDX-License\n// Copyright (c) vis.gl contributors\n\n// @ts-nocheck This should be replaced with model animation loop\n\n// TODO - replace createGLContext, instrumentGLContext, resizeGLContext?\n// TODO - remove dependency on framebuffer (bundle size impact)\nimport {luma, Device, DeviceProps, log} from '@luma.gl/core';\nimport {\n requestAnimationFramePolyfill,\n cancelAnimationFramePolyfill,\n Timeline,\n AnimationProps\n} from '@luma.gl/engine';\nimport {Stats, Stat} from '@probe.gl/stats';\nimport {isBrowser} from '@probe.gl/env';\n\nimport {resetGLParameters} from '@luma.gl/webgl';\n// import {default as Query} from '../classic/query';\n// import {ClassicFramebuffer} from '../classic/framebuffer';\n\ntype ContextProps = DeviceProps;\n\nconst isPage = isBrowser() && typeof document !== 'undefined';\nfunction getHTMLCanvasElement(\n canvas: HTMLCanvasElement | OffscreenCanvas\n): HTMLCanvasElement | null {\n return typeof HTMLCanvasElement !== 'undefined' && canvas instanceof HTMLCanvasElement\n ? canvas\n : null;\n}\n\nlet statIdCounter = 0;\n\n/**\n * Classic Animation Props.\n * Contain a number of deprecated fields\n * @deprecated Use new AnimationLoop in `@luma.gl/engine`\n */\nexport type ClassicAnimationProps = AnimationProps & {\n animationLoop: ClassicAnimationLoop;\n\n /** @deprecated Use .device */\n stop: () => ClassicAnimationLoop;\n\n /** @deprecated Use .device */\n gl: WebGL2RenderingContext;\n /** @deprecated Will be removed */\n framebuffer: unknown;\n\n /** @deprecated Use .timeline */\n _timeline: Timeline;\n /** @deprecated Use .animationLoop */\n _loop: ClassicAnimationLoop;\n /** @deprecated Use .animationLoop */\n _animationLoop: ClassicAnimationLoop;\n};\n\n/** ClassicAnimationLoop properties */\nexport type ClassicAnimationLoopProps = {\n onCreateDevice?: (props: DeviceProps) => Promise<Device>;\n onCreateContext?: (props: ContextProps) => WebGL2RenderingContext; // TODO: signature from createGLContext\n onAddHTML?: (div: HTMLDivElement) => string; // innerHTML\n onInitialize?: (animationProps: ClassicAnimationProps) => {} | void | Promise<{} | void>;\n onRender?: (animationProps: ClassicAnimationProps) => void;\n onFinalize?: (animationProps: ClassicAnimationProps) => void;\n onError?: (reason: any) => void;\n\n stats?: Stats;\n\n device?: Device;\n glOptions?: ContextProps; // createGLContext options\n // debug?: boolean;\n\n // view parameters\n autoResizeViewport?: boolean;\n autoResizeDrawingBuffer?: boolean;\n useDevicePixels?: number | boolean;\n\n /** @deprecated Use .device */\n gl?: WebGL2RenderingContext | null;\n /** @deprecated Will be removed */\n createFramebuffer?: boolean;\n};\n\nconst DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS: Required<ClassicAnimationLoopProps> = {\n onCreateDevice: (props: DeviceProps) => luma.createDevice({...props, debug: true}),\n onCreateContext: undefined,\n onAddHTML: undefined,\n onInitialize: () => ({}),\n onRender: () => {},\n onFinalize: () => {},\n onError: error => console.error(error), // eslint-disable-line no-console\n\n device: null,\n // debug: true,\n\n // view parameters\n useDevicePixels: true,\n autoResizeViewport: true,\n autoResizeDrawingBuffer: true,\n stats: luma.stats.get(`animation-loop-${statIdCounter++}`),\n\n // deprecated\n // onCreateContext: (opts) => createGLContext(opts),\n gl: undefined,\n glOptions: {},\n createFramebuffer: false\n};\n\n/**\n * Convenient animation loop\n * @deprecated Use `@luma.gl/engine` AnimationLoop\n */\nexport class ClassicAnimationLoop {\n device: Device;\n canvas?: HTMLCanvasElement | OffscreenCanvas;\n\n props: Required<ClassicAnimationLoopProps>;\n animationProps: ClassicAnimationProps;\n // framebuffer: ClassicFramebuffer = null;\n timeline: Timeline = null;\n stats: Stats;\n cpuTime: Stat;\n gpuTime: Stat;\n frameRate: Stat;\n\n display: any;\n\n needsRedraw: string | null = 'initialized';\n\n _initialized: boolean = false;\n _running: boolean = false;\n _animationFrameId: any = null;\n _pageLoadPromise: Promise<{}> | null = null;\n _nextFramePromise: Promise<ClassicAnimationLoop> | null = null;\n _resolveNextFrame: ((loop: ClassicAnimationLoop) => void) | null = null;\n _cpuStartTime: number = 0;\n\n // _gpuTimeQuery: Query | null = null;\n\n /** @deprecated */\n gl: WebGL2RenderingContext;\n\n /*\n */\n constructor(props: ClassicAnimationLoopProps = {}) {\n this.props = {...DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS, ...props};\n props = this.props;\n\n let {useDevicePixels = true} = this.props;\n\n if ('useDevicePixelRatio' in props) {\n log.deprecated('useDevicePixelRatio', 'useDevicePixels')();\n // @ts-expect-error\n useDevicePixels = props.useDevicePixelRatio;\n }\n\n // state\n this.device = props.device;\n // @ts-expect-error\n this.gl = (this.device && this.device.gl) || props.gl;\n\n this.stats = props.stats;\n this.cpuTime = this.stats.get('CPU Time');\n this.gpuTime = this.stats.get('GPU Time');\n this.frameRate = this.stats.get('Frame Rate');\n\n this.setProps({\n autoResizeViewport: props.autoResizeViewport,\n autoResizeDrawingBuffer: props.autoResizeDrawingBuffer,\n useDevicePixels\n });\n\n // Bind methods\n this.start = this.start.bind(this);\n this.stop = this.stop.bind(this);\n\n this._onMousemove = this._onMousemove.bind(this);\n this._onMouseleave = this._onMouseleave.bind(this);\n }\n\n destroy(): void {\n this.stop();\n this._setDisplay(null);\n }\n\n /** @deprecated Use .destroy() */\n delete(): void {\n this.destroy();\n }\n\n setNeedsRedraw(reason: string): this {\n this.needsRedraw = this.needsRedraw || reason;\n return this;\n }\n\n setProps(props: ClassicAnimationLoopProps): this {\n if ('autoResizeViewport' in props) {\n this.props.autoResizeViewport = props.autoResizeViewport;\n }\n if ('autoResizeDrawingBuffer' in props) {\n this.props.autoResizeDrawingBuffer = props.autoResizeDrawingBuffer;\n }\n if ('useDevicePixels' in props) {\n this.props.useDevicePixels = props.useDevicePixels;\n }\n return this;\n }\n\n start(opts = {}) {\n this._start(opts);\n return this;\n }\n\n /** Starts a render loop if not already running */\n async _start(props) {\n if (this._running) {\n return this;\n }\n this._running = true;\n\n // console.debug(`Starting ${this.constructor.name}`);\n // Wait for start promise before rendering frame\n try {\n await this._getPageLoadPromise();\n\n // check that we haven't been stopped\n if (!this._running) {\n return null;\n }\n\n let appContext;\n if (!this._initialized) {\n this._initialized = true;\n // Create the WebGL context\n await this._createDevice(props);\n this._initialize(props);\n\n // Note: onIntialize can return a promise (in case app needs to load resources)\n // eslint-disable-next-line @typescript-eslint/await-thenable\n appContext = await this.onInitialize(this.animationProps);\n this._addCallbackData(appContext || {});\n }\n\n // check that we haven't been stopped\n if (!this._running) {\n return null;\n }\n\n // Start the loop\n if (appContext !== false) {\n // cancel any pending renders to ensure only one loop can ever run\n this._cancelAnimationFrame();\n this._requestAnimationFrame();\n }\n\n return this;\n } catch (error) {\n this.props.onError(error);\n // this._running = false; // TODO\n return null;\n }\n }\n\n /** Explicitly draw a frame */\n redraw(): this {\n if (this.isContextLost()) {\n return this;\n }\n\n this._beginTimers();\n\n this._setupFrame();\n this._updateCallbackData();\n\n this._renderFrame(this.animationProps);\n\n // clear needsRedraw flag\n this._clearNeedsRedraw();\n\n if (this._resolveNextFrame) {\n this._resolveNextFrame(this);\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n }\n\n this._endTimers();\n\n return this;\n }\n\n // Stops a render loop if already running, finalizing\n stop() {\n // console.debug(`Stopping ${this.constructor.name}`);\n if (this._running) {\n this._finalizeCallbackData();\n this._cancelAnimationFrame();\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n this._running = false;\n }\n return this;\n }\n\n attachTimeline(timeline: Timeline): Timeline {\n this.timeline = timeline;\n return this.timeline;\n }\n\n detachTimeline(): void {\n this.timeline = null;\n }\n\n waitForRender(): Promise<ClassicAnimationLoop> {\n this.setNeedsRedraw('waitForRender');\n\n if (!this._nextFramePromise) {\n this._nextFramePromise = new Promise(resolve => {\n this._resolveNextFrame = resolve;\n });\n }\n return this._nextFramePromise;\n }\n\n async toDataURL() {\n this.setNeedsRedraw('toDataURL');\n\n await this.waitForRender();\n\n return getHTMLCanvasElement(this.gl.canvas)?.toDataURL();\n }\n\n isContextLost(): boolean {\n return this.gl.isContextLost();\n }\n\n onCreateDevice(deviceProps: DeviceProps): Promise<Device> {\n const {onCreateDevice} = this.props;\n return onCreateDevice(deviceProps);\n }\n\n onInitialize(animationProps: ClassicAnimationProps): {} | void {\n const {onInitialize} = this.props;\n return onInitialize(animationProps);\n }\n\n onRender(animationProps: ClassicAnimationProps) {\n const {onRender} = this.props;\n return onRender(animationProps);\n }\n\n onFinalize(animationProps: ClassicAnimationProps) {\n const {onFinalize} = this.props;\n return onFinalize(animationProps);\n }\n\n // DEPRECATED/REMOVED METHODS\n\n /** @deprecated Use .onCreateDevice() */\n onCreateContext(props: ContextProps) {\n const {onCreateContext} = this.props;\n return onCreateContext(props);\n }\n\n /** @deprecated */\n getHTMLControlValue(id, defaultValue = 1) {\n const element = document.getElementById(id);\n // @ts-expect-error Not all html elements have value\n return element ? Number(element.value) : defaultValue;\n }\n\n // PRIVATE METHODS\n\n _initialize(props: ClassicAnimationLoopProps) {\n this._createFramebuffer();\n this._startEventHandling();\n\n // Initialize the callback data\n this._initializeCallbackData();\n this._updateCallbackData();\n\n // Default viewport setup, in case onInitialize wants to render\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n\n // this._gpuTimeQuery = Query.isSupported(this.gl, ['timers']) ? new Query(this.gl) : null;\n }\n\n _getPageLoadPromise() {\n if (!this._pageLoadPromise) {\n this._pageLoadPromise = isPage\n ? new Promise((resolve, reject) => {\n if (isPage && document.readyState === 'complete') {\n resolve(document);\n return;\n }\n window.addEventListener('load', () => {\n resolve(document);\n });\n })\n : Promise.resolve({});\n }\n return this._pageLoadPromise;\n }\n\n _setDisplay(display: any) {\n if (this.display) {\n this.display.destroy();\n this.display.animationLoop = null;\n }\n\n // store animation loop on the display\n if (display) {\n display.animationLoop = this;\n }\n\n this.display = display;\n }\n\n _requestAnimationFrame() {\n if (!this._running) {\n return;\n }\n\n // VR display has a separate animation frame to sync with headset\n // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n // if (this.display && this.display.requestAnimationFrame) {\n // this._animationFrameId = this.display.requestAnimationFrame(this._animationFrame.bind(this));\n // }\n this._animationFrameId = requestAnimationFramePolyfill(this._animationFrame.bind(this));\n }\n\n _cancelAnimationFrame() {\n if (this._animationFrameId !== null) {\n return;\n }\n\n // VR display has a separate animation frame to sync with headset\n // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n // if (this.display && this.display.cancelAnimationFrame) {\n // this.display.cancelAnimationFrame(this._animationFrameId);\n // }\n cancelAnimationFramePolyfill(this._animationFrameId);\n this._animationFrameId = null;\n }\n\n _animationFrame() {\n if (!this._running) {\n return;\n }\n this.redraw();\n this._requestAnimationFrame();\n }\n\n // Called on each frame, can be overridden to call onRender multiple times\n // to support e.g. stereoscopic rendering\n _renderFrame(props: ClassicAnimationProps) {\n // Allow e.g. VR display to render multiple frames.\n if (this.display) {\n this.display._renderFrame(props);\n return;\n }\n\n // call callback\n this.onRender(props);\n // end callback\n }\n\n _clearNeedsRedraw() {\n this.needsRedraw = null;\n }\n\n _setupFrame() {\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n this._resizeFramebuffer();\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Initialize the object that will be passed to app callbacks\n _initializeCallbackData() {\n this.animationProps = {\n device: this.device,\n gl: this.gl,\n\n stop: this.stop,\n canvas: this.gl.canvas,\n\n // Initial values\n useDevicePixels: this.props.useDevicePixels,\n needsRedraw: null,\n\n // Animation props\n startTime: Date.now(),\n engineTime: 0,\n tick: 0,\n tock: 0,\n\n timeline: this.timeline,\n // @ts-ignore\n animationLoop: this,\n\n // Timeline time for back compatibility\n time: 0,\n\n // Experimental\n _mousePosition: null, // Event props\n\n /** @deprecated */\n // framebuffer: this.framebuffer,\n /** @deprecated */\n _timeline: this.timeline,\n /** @deprecated */\n _loop: this,\n /** @deprecated */\n _animationLoop: this\n };\n }\n\n // Update the context object that will be passed to app callbacks\n _updateCallbackData() {\n const {width, height, aspect} = this._getSizeAndAspect();\n if (width !== this.animationProps.width || height !== this.animationProps.height) {\n this.setNeedsRedraw('drawing buffer resized');\n }\n if (aspect !== this.animationProps.aspect) {\n this.setNeedsRedraw('drawing buffer aspect changed');\n }\n\n this.animationProps.width = width;\n this.animationProps.height = height;\n this.animationProps.aspect = aspect;\n\n this.animationProps.needsRedraw = this.needsRedraw;\n\n // Update time properties\n this.animationProps.engineTime = Date.now() - this.animationProps.startTime;\n\n if (this.timeline) {\n this.timeline.update(this.animationProps.engineTime);\n }\n\n this.animationProps.tick = Math.floor((this.animationProps.time / 1000) * 60);\n this.animationProps.tock++;\n\n // For back compatibility\n this.animationProps.time = this.timeline\n ? this.timeline.getTime()\n : this.animationProps.engineTime;\n }\n\n _finalizeCallbackData() {\n // call callback\n this.onFinalize(this.animationProps);\n // end callback\n }\n\n /** Add application's data to the app context object */\n _addCallbackData(appContext) {\n if (typeof appContext === 'object' && appContext !== null) {\n this.animationProps = Object.assign({}, this.animationProps, appContext);\n }\n }\n\n /** Either uses supplied or existing context, or calls provided callback to create one */\n async _createDevice(props: DeviceProps) {\n const deviceProps = {...this.props, ...props, ...this.props.glOptions};\n\n // TODO - support this.onCreateContext\n // Create the WebGL context if necessary\n // this.gl = this.props.gl ? instrumentGLContext(this.props.gl, deviceProps) : this.onCreateContext(deviceProps);\n\n this.device = await this.onCreateDevice(deviceProps);\n // @ts-expect-error\n this.gl = this.device.gl;\n\n // Reset the WebGL context.\n resetGLParameters(this.gl);\n\n this._createInfoDiv();\n }\n\n _createInfoDiv() {\n const canvas = getHTMLCanvasElement(this.gl.canvas);\n if (canvas && this.props.onAddHTML) {\n const wrapperDiv = document.createElement('div');\n document.body.appendChild(wrapperDiv);\n wrapperDiv.style.position = 'relative';\n const div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '10px';\n div.style.bottom = '10px';\n div.style.width = '300px';\n div.style.background = 'white';\n if (canvas) {\n wrapperDiv.appendChild(canvas);\n }\n wrapperDiv.appendChild(div);\n const html = this.props.onAddHTML(div);\n if (html) {\n div.innerHTML = html;\n }\n }\n }\n\n _getSizeAndAspect() {\n // https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html\n const width = this.gl.drawingBufferWidth;\n const height = this.gl.drawingBufferHeight;\n\n // https://webglfundamentals.org/webgl/lessons/webgl-anti-patterns.html\n let aspect = 1;\n\n const canvas = getHTMLCanvasElement(this.gl.canvas);\n if (canvas && canvas.clientHeight) {\n aspect = canvas.clientWidth / canvas.clientHeight;\n } else if (width > 0 && height > 0) {\n aspect = width / height;\n }\n\n return {width, height, aspect};\n }\n\n /** Default viewport setup */\n _resizeViewport() {\n if (this.props.autoResizeViewport) {\n this.gl.viewport(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight);\n }\n }\n\n /**\n * Resize the render buffer of the canvas to match canvas client size\n * Optionally multiplying with devicePixel ratio\n */\n _resizeCanvasDrawingBuffer() {\n if (this.props.autoResizeDrawingBuffer) {\n this.device.getDefaultCanvasContext().resize({useDevicePixels: this.props.useDevicePixels});\n }\n }\n\n _beginTimers() {\n this.frameRate.timeEnd();\n this.frameRate.timeStart();\n\n // Check if timer for last frame has completed.\n // GPU timer results are never available in the same\n // frame they are captured.\n // if (\n // this._gpuTimeQuery &&\n // this._gpuTimeQuery.isResultAvailable() &&\n // !this._gpuTimeQuery.isTimerDisjoint()\n // ) {\n // this.stats.get('GPU Time').addTime(this._gpuTimeQuery.getTimerMilliseconds());\n // }\n\n // if (this._gpuTimeQuery) {\n // // GPU time query start\n // this._gpuTimeQuery.beginTimeElapsedQuery();\n // }\n\n this.cpuTime.timeStart();\n }\n\n _endTimers() {\n this.cpuTime.timeEnd();\n\n // if (this._gpuTimeQuery) {\n // // GPU time query end. Results will be available on next frame.\n // this._gpuTimeQuery.end();\n // }\n }\n\n // Event handling\n\n _startEventHandling() {\n const {canvas} = this.gl;\n if (canvas) {\n canvas.addEventListener('mousemove', this._onMousemove);\n canvas.addEventListener('mouseleave', this._onMouseleave);\n }\n }\n\n _onMousemove(e) {\n this.animationProps._mousePosition = [e.offsetX, e.offsetY];\n }\n _onMouseleave(e) {\n this.animationProps._mousePosition = null;\n }\n\n // Deprecated\n\n /** @deprecated */\n _createFramebuffer() {\n // Setup default framebuffer\n if (this.props.createFramebuffer) {\n // this.framebuffer = new ClassicFramebuffer(this.gl);\n }\n }\n\n /** @deprecated */\n _resizeFramebuffer() {\n // if (this.framebuffer) {\n // this.framebuffer.resize({\n // width: this.gl.drawingBufferWidth,\n // height: this.gl.drawingBufferHeight\n // });\n // }\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// @ts-nocheck\n/* eslint-disable */\n\nimport {AnimationProps} from '@luma.gl/engine';\nimport {getWebGLTestDevice} from './create-test-device';\n\n// TODO - Replace with new AnimationLoop from `@luma.gl/engine`\nimport {ClassicAnimationLoop as AnimationLoop} from './deprecated/classic-animation-loop';\n\n/** Describes a test case */\nexport type TestRunnerTestCase = {\n /** Name of the test case (for logging) */\n name: string;\n /** Initialize the test case. Can return a promise */\n onInitialize: (props: AnimationProps) => Promise<void | {}>;\n /** Perform rendering */\n onRender: (props: AnimationProps & {done}) => void;\n /** Clean up after the test case */\n onFinalize: (props: AnimationProps) => void;\n animationLoop?: AnimationLoop;\n};\n\nconst DEFAULT_TEST_CASE: TestRunnerTestCase = {\n name: 'Unnamed test',\n onInitialize: async () => {},\n onRender: ({done}) => done(),\n onFinalize: () => {}\n};\n\n/** Options for a TestRunner */\nexport type TestRunnerProps = {\n width?: number;\n height?: number;\n // test lifecycle callback\n onTestStart?: (testCase: TestRunnerTestCase) => void;\n onTestPass?: (testCase: TestRunnerTestCase, result?: unknown) => void;\n onTestFail?: (testCase: TestRunnerTestCase, error?: unknown) => void;\n /** milliseconds to wait for each test case before aborting */\n timeout?: number;\n maxFramesToRender?: number;\n // HACK - this is for the snapshot test runner\n imageDiffOptions?: any;\n};\n\nconst DEFAULT_TEST_PROPS: Required<TestRunnerProps> = {\n width: undefined,\n height: undefined,\n\n // test lifecycle callback\n onTestStart: (testCase: TestRunnerTestCase) => console.log(`# ${testCase.name}`),\n onTestPass: (testCase: TestRunnerTestCase, result?: unknown) =>\n console.log(`ok ${testCase.name} passed`),\n onTestFail: (testCase: TestRunnerTestCase, error?: unknown) =>\n console.log(`not ok ${testCase.name} failed`),\n\n // milliseconds to wait for each test case before aborting\n timeout: 2000,\n maxFramesToRender: undefined,\n imageDiffOptions: undefined\n};\n\n/** Runs an array of test cases */\nexport class TestRunner {\n device = webglDevice;\n props: Record<string, any>;\n isRunning: boolean = false;\n testOptions: Required<TestRunnerProps> = {...DEFAULT_TEST_PROPS};\n readonly _animationProps?: AnimationProps;\n private _animationLoop: AnimationLoop | null;\n private _testCases: TestRunnerTestCase[] = [];\n private _testCaseData: any = null;\n private _currentTestCase: TestRunnerTestCase | null;\n private _currentTestCaseStartTime: number;\n private _currentTestCaseStartTick: number;\n\n // should be defined in snapshot-test-runner\n isDiffing: boolean = false;\n\n // @ts-expect-error\n isHeadless: boolean = Boolean(window.browserTestDriver_isHeadless);\n\n /**\n * props\n * AnimationLoop props\n */\n constructor(props: Record<string, any> = {}) {\n this.props = props;\n }\n\n /**\n * Add testCase(s)\n */\n add(testCases: TestRunnerTestCase[]): this {\n if (!Array.isArray(testCases)) {\n testCases = [testCases];\n }\n for (const testCase of testCases) {\n this._testCases.push(testCase);\n }\n return this;\n }\n\n /**\n * Returns a promise that resolves when all the test cases are done\n */\n async run(options: object = {}): Promise<void> {\n this.testOptions = {...this.testOptions, ...options};\n\n const device = await getWebGLTestDevice();\n\n return new Promise<void>((resolve, reject) => {\n this._animationLoop = new AnimationLoop({\n ...this.props,\n device: this.device,\n onRender: this._onRender.bind(this),\n onFinalize: () => {\n this.isRunning = false;\n resolve();\n }\n });\n this._animationLoop.start(this.props);\n\n this.isRunning = true;\n this.isDiffing = false;\n this._currentTestCase = null;\n }).catch(error => {\n this._fail({error: error.message});\n // reject(error);\n });\n }\n\n /* Lifecycle methods for subclassing */\n\n initTestCase(testCase: TestRunnerTestCase) {\n const {animationLoop} = testCase;\n if (animationLoop) {\n testCase.onInitialize = animationLoop.props.onInitialize.bind(animationLoop);\n testCase.onRender = animationLoop.props.onRender.bind(animationLoop);\n testCase.onFinalize = animationLoop.props.onFinalize.bind(animationLoop);\n }\n for (const key in DEFAULT_TEST_CASE) {\n testCase[key] = testCase[key] || DEFAULT_TEST_CASE[key];\n }\n }\n\n shouldRender(animationProps): boolean {\n return true;\n }\n\n assert(testCase: TestRunnerTestCase): void {\n this._pass(testCase);\n this._next();\n }\n\n /* Utilities */\n\n _pass(result: unknown): void {\n this.testOptions.onTestPass(this._currentTestCase, result);\n // this._animationLoop?.stop();\n }\n\n _fail(result: unknown): void {\n this.testOptions.onTestFail(this._currentTestCase, result);\n // this._animationLoop?.stop();\n }\n\n _next(): void {\n this._nextTestCase();\n }\n\n /* Private methods */\n\n _onRender(animationProps): void {\n this._animationProps = animationProps;\n\n const testCase = this._currentTestCase || this._nextTestCase();\n if (!testCase) {\n // all test cases are done\n this._animationLoop.stop();\n return;\n }\n\n let isDone = false;\n const testCaseAnimationProps: AnimationProps = {\n ...animationProps,\n ...this._testCaseData,\n // tick/time starts from 0 for each test case\n startTime: this._currentTestCaseStartTime,\n time: animationProps.time - this._currentTestCaseStartTime,\n tick: animationProps.tick - this._currentTestCaseStartTick,\n // called by the test case when it is done rendering and ready for capture and diff\n done: () => {\n isDone = true;\n }\n };\n\n if (this._testCaseData && this.shouldRender(testCaseAnimationProps)) {\n // try {\n // test case is initialized, render frame\n testCase.onRender(testCaseAnimationProps);\n // } catch {\n // isDone = true;\n // }\n }\n\n const timeout = testCase.timeout || this.testOptions.timeout;\n if (timeout && testCaseAnimationProps.time > timeout) {\n isDone = true;\n }\n\n if (isDone) {\n this.assert(testCase);\n }\n }\n\n _nextTestCase(): Promise<TestRunnerTestCase> {\n const animationProps = this._animationProps;\n\n // finalize the current test case\n if (this._testCaseData) {\n for (const key in this._testCaseData) {\n const value = this._testCaseData[key];\n if (value && value.delete) {\n value.destroy();\n }\n }\n this._currentTestCase.onFinalize(Object.assign({}, animationProps, this._testCaseData));\n\n // reset WebGL context\n this.device.popState();\n\n this._currentTestCase = null;\n this._testCaseData = null;\n }\n\n // get the next test case\n const testCase = this._testCases.shift();\n if (testCase) {\n // start new test case\n this._currentTestCase = testCase;\n this._currentTestCaseStartTime = animationProps.time;\n this._currentTestCaseStartTick = animationProps.tick;\n this.initTestCase(testCase);\n\n // initialize test case\n\n // save WebGL context\n this.device.pushState();\n\n // aligned with the behavior of AnimationLoop.onInitialized\n // onInitialized could return a plain object or a promise\n const initProps = {\n ...animationProps,\n // tick/time starts from 0 for each test case\n startTime: animationProps.time,\n time: 0,\n tick: 0\n };\n\n // aligned with the behavior of AnimationLoop.onInitialized\n // onInitialized could return a plain object or a promise\n Promise.resolve(testCase.onInitialize(initProps)).then(userData => {\n this._testCaseData = userData || {};\n });\n\n // invoke user callback\n this.testOptions.onTestStart(testCase);\n }\n return testCase;\n }\n}\n", "// Get the bounding box of a DOMElement relative to the page\nexport function getBoundingBoxInPage(domElement: HTMLElement): {\n x: number;\n y: number;\n width: number;\n height: number;\n} {\n const bbox = domElement.getBoundingClientRect();\n return {\n x: window.scrollX + bbox.x,\n y: window.scrollY + bbox.y,\n width: bbox.width,\n height: bbox.height\n };\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {TestRunner, TestRunnerProps, TestRunnerTestCase} from './test-runner';\nimport {getBoundingBoxInPage} from './utils/get-bounding-box';\n\n/** A snapshot test case */\nexport type SnapshotTestRunnerTestCase = TestRunnerTestCase & {\n /** URL to golden image */\n goldenImage: string;\n /** Diff options */\n imageDiffOptions?: {[key: string]: any};\n};\n\nexport type SnapshotTestRunnerProps = TestRunnerProps;\n\nexport class SnapshotTestRunner extends TestRunner {\n // should be defined here but hack access in TestRunner\n // private isDiffing: boolean = false;\n\n constructor(props: SnapshotTestRunnerProps) {\n super(props);\n this.testOptions.imageDiffOptions = {};\n }\n\n override initTestCase(testCase: SnapshotTestRunnerTestCase): void {\n super.initTestCase(testCase);\n if (!testCase.goldenImage) {\n throw new Error(`Test case ${testCase.name} does not have golden image`);\n }\n }\n\n override shouldRender(): boolean {\n // wait for the current diffing to finish\n return !this.isDiffing;\n }\n\n override async assert(testCase: SnapshotTestRunnerTestCase): Promise<void> {\n if (this.isDiffing) {\n // Already performing diffing\n return;\n }\n this.isDiffing = true;\n\n const canvas = this._animationProps?.canvas;\n if (!(canvas instanceof HTMLCanvasElement)) {\n throw new Error('canvas');\n }\n\n const diffOptions = {\n ...this.testOptions.imageDiffOptions,\n ...testCase.imageDiffOptions,\n goldenImage: testCase.goldenImage,\n region: getBoundingBoxInPage(canvas)\n };\n\n // Take screenshot and compare\n // @ts-ignore implicit any\n const result = await globalThis.browserTestDriver_captureAndDiffScreen(diffOptions);\n\n // invoke user callback\n if (result.success) {\n this._pass(result);\n } else {\n this._fail(result);\n }\n\n this.isDiffing = false;\n this._next();\n }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Stats, Stat} from '@probe.gl/stats';\nimport {TestRunner, TestRunnerProps, TestRunnerTestCase} from './test-runner';\n\nexport type PerformanceTestRunnerProps = TestRunnerProps;\n\nexport class PerformanceTestRunner extends TestRunner {\n private _stats: Stats | null = null;\n private _fps: Stat | null = null;\n\n constructor(props: PerformanceTestRunnerProps) {\n super(props);\n\n Object.assign(this.testOptions, {\n maxFramesToRender: 60,\n targetFPS: 50\n });\n }\n\n override initTestCase(testCase: TestRunnerTestCase): void {\n super.initTestCase(testCase);\n this._stats = new Stats({id: testCase.name});\n this._fps = this._stats.get('fps');\n }\n\n override shouldRender(animationProps: Record<string, any>): boolean {\n this._fps?.timeEnd();\n this._fps?.timeStart();\n\n // @ts-ignore TODO\n if (this._fps.count > this.testOptions.maxFramesToRender) {\n animationProps['done']();\n }\n\n return true;\n }\n\n override assert(testCase: TestRunnerTestCase): void {\n // @ts-expect-error\n const targetFPS = testCase.targetFPS || this.testOptions.targetFPS;\n const count = this._fps?.count;\n const fps = this._fps?.getHz() || 0;\n\n if (fps >= targetFPS) {\n this._pass({fps, framesRendered: count});\n } else {\n this._fail({fps, framesRendered: count});\n }\n this._next();\n }\n}\n", "/**\n * Tests that an argument matches the type.\n * @note fails during typescript type check, not during runtime.\n */\nexport function checkType<T>(value: T): void {}\n", "/** Recursively copies objects */\nexport function deepCopy(object: any): any {\n if (Array.isArray(object)) {\n return object.map(element => deepCopy(element));\n }\n\n if (object !== null && typeof object === 'object') {\n const newObject: Record<string, any> = {};\n for (const key in object) {\n newObject[key] = deepCopy(object[key]);\n }\n return newObject;\n }\n\n return object;\n}\n", "/* global luma */\nexport function getResourceCounts() {\n // @ts-ignore\n const resourceStats = luma.stats.get('Resource Counts');\n return {\n Texture2D: resourceStats.get('Texture2Ds Active').count,\n Buffer: resourceStats.get('Buffers Active').count\n };\n}\n\nexport function getLeakedResources(\n startCounts: Record<string, number>,\n endCounts: Record<string, number>\n): number | null {\n let leakedResources = null;\n const info = 'leaking: ';\n for (const resourceName in endCounts) {\n const leakCount = endCounts[resourceName] - startCounts[resourceName];\n if (leakCount !== 0) {\n leakedResources = Object.assign({}, leakedResources, {\n [resourceName]: leakCount,\n info: `${info} ${resourceName}: ${leakCount}, `\n });\n }\n }\n return leakedResources;\n}\n", "// luma.gl\n// SPDX-License\n// Copyright (c) vis.gl contributors\n\nimport type {CanvasContextProps} from '@luma.gl/core';\nimport {WebGLDevice} from '@luma.gl/webgl';\n\nconst DEFAULT_CANVAS_CONTEXT_PROPS: CanvasContextProps = {\n width: 1,\n height: 1\n};\n\n/**\n * Create a test WebGLDevice\n * @note This WebGL Device is create synchronously and can be used directly but will not have WebGL debugging initialized\n * @deprecated Use getWebGLTestDevice().\n */\nexport function createTestDevice(): WebGLDevice | null {\n try {\n // TODO - We do not use luma.createDevice since createTestDevice currently expect WebGL context to be created synchronously\n return new WebGLDevice({createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS});\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`Failed to created device: ${(error as Error).message}`);\n debugger; // eslint-disable-line no-debugger\n return null;\n }\n}\n\n/**\n * A pre-created WebGLDevice\n * @note This WebGL Device is create synchronously and can be used directly but will not have WebGL debugging initialized\n * @deprecated Use getWebGLTestDevice().\n */\nexport const webglDevice = createTestDevice();\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;qBAAAA;;AAAA;;;ACIA,kBAAmB;AACnB,mBAA4B;AAC5B,oBAA4B;AAE5B,iBAAK,iBAAiB,CAAC,4BAAe,2BAAa,CAAC;;;ACHpD,IAAAC,gBAAwB;AACxB,IAAAC,gBAAyC;AACzC,IAAAC,iBAA0C;;;ACH1C,IAAAC,gBAAmC;;;ACmBnC,IAAAC,gBAAqC;;;ACjB9B,IAAM,iBAAiB;EAC5B,MAAM;EACN,KAAK;EACL,SAAS;EACT,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,SAAS;EACT,iBAAiB;EACjB,wBAAwB;;;;ACX1B,IAAAC,eAA2B;AAErB,IAAO,mBAAP,cAAgC,0BAAY;EAChD,wBAAwB;EACxB,wBAAwB;EACxB,wBAAwB;EACxB,wBAAwB;EACxB,gBAAgB;EAChB,4CAA4C;EAC5C,4CAA4C;EAC5C,mCAAmC;EACnC,4BAA4B;EAC5B,kCAAkC;EAClC,mCAAmC;EACnC,kCAAkC;EAClC,8BAA8B;EAC9B,8BAA8B;EAC9B,kCAA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,8BAA4B,CAAC;EAC5E,SAAS,OAAP;AAEA,YAAQ,MAAM,6BAA8B,MAAgB,SAAS;AACrE;AACA,WAAO;EACT;AACF;AAOO,IAAMC,eAAc,iBAAgB;",
|
|
6
|
+
"names": ["webglDevice", "import_core", "import_webgl", "import_webgpu", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "webglDevice", "import_core", "import_webgl", "import_webgl", "DEFAULT_CANVAS_CONTEXT_PROPS", "webglDevice"]
|
|
7
7
|
}
|
|
@@ -12,7 +12,7 @@ export declare class NullCanvasContext extends CanvasContext {
|
|
|
12
12
|
private _framebuffer;
|
|
13
13
|
get [Symbol.toStringTag](): string;
|
|
14
14
|
constructor(device: NullDevice, props?: CanvasContextProps);
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
_getCurrentFramebuffer(): NullFramebuffer;
|
|
16
|
+
_configureDevice(): void;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=null-canvas-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"null-canvas-context.d.ts","sourceRoot":"","sources":["../../src/null-device/null-canvas-context.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAC,UAAU,EAAC,yBAAsB;AAC9C,OAAO,EAAC,eAAe,EAAC,wCAAqC;AAE7D;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IAClD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,OAAQ;IAEvB,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAU;IAC5C,OAAO,CAAC,YAAY,CAAgC;IAEpD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAEvB;gBAEW,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,kBAAkB;IAU1D,
|
|
1
|
+
{"version":3,"file":"null-canvas-context.d.ts","sourceRoot":"","sources":["../../src/null-device/null-canvas-context.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAC,UAAU,EAAC,yBAAsB;AAC9C,OAAO,EAAC,eAAe,EAAC,wCAAqC;AAE7D;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IAClD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,OAAQ;IAEvB,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAU;IAC5C,OAAO,CAAC,YAAY,CAAgC;IAEpD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAEvB;gBAEW,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,kBAAkB;IAU1D,sBAAsB,IAAI,eAAe;IAMzC,gBAAgB;CACjB"}
|
|
@@ -20,13 +20,13 @@ export class NullCanvasContext extends CanvasContext {
|
|
|
20
20
|
this.device = device;
|
|
21
21
|
// Base class constructor cannot access derived methods/fields, so we need to call these functions in the subclass constructor
|
|
22
22
|
this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);
|
|
23
|
-
this.
|
|
23
|
+
this._configureDevice();
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
_getCurrentFramebuffer() {
|
|
26
26
|
// Setting handle to null returns a reference to the default framebuffer
|
|
27
27
|
this._framebuffer = this._framebuffer || new NullFramebuffer(this.device, { handle: null });
|
|
28
28
|
return this._framebuffer;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
_configureDevice() { }
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=null-canvas-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"null-canvas-context.js","sourceRoot":"","sources":["../../src/null-device/null-canvas-context.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAC,wCAAqC;AAE7D;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,aAAa;IACzC,MAAM,CAAa;IACnB,MAAM,GAAG,IAAI,CAAC;IAEvB,gBAAgB,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,YAAY,GAA2B,IAAI,CAAC;IAEpD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IAED,YAAY,MAAkB,EAAE,KAA0B;QACxD,wEAAwE;QACxE,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,8HAA8H;QAC9H,IAAI,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;QACzD,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"null-canvas-context.js","sourceRoot":"","sources":["../../src/null-device/null-canvas-context.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAC,wCAAqC;AAE7D;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,aAAa;IACzC,MAAM,CAAa;IACnB,MAAM,GAAG,IAAI,CAAC;IAEvB,gBAAgB,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,YAAY,GAA2B,IAAI,CAAC;IAEpD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IAED,YAAY,MAAkB,EAAE,KAA0B;QACxD,wEAAwE;QACxE,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,8HAA8H;QAC9H,IAAI,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;QACzD,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAED,sBAAsB;QACpB,wEAAwE;QACxE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;QAC1F,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,gBAAgB,KAAI,CAAC;CACtB"}
|
|
@@ -12,6 +12,7 @@ import { NullRenderPass } from "./resources/null-render-pass.js";
|
|
|
12
12
|
import { NullRenderPipeline } from "./resources/null-render-pipeline.js";
|
|
13
13
|
import { NullTransformFeedback } from "./resources/null-transform-feedback.js";
|
|
14
14
|
import { NullQuerySet } from "./resources/null-query-set.js";
|
|
15
|
+
import { NullFence } from "./resources/null-fence.js";
|
|
15
16
|
/** Do-nothing device implementation for testing */
|
|
16
17
|
export declare class NullDevice extends Device {
|
|
17
18
|
static isSupported(): boolean;
|
|
@@ -45,7 +46,6 @@ export declare class NullDevice extends Device {
|
|
|
45
46
|
*/
|
|
46
47
|
destroy(): void;
|
|
47
48
|
get isLost(): boolean;
|
|
48
|
-
getTextureByteAlignment(): number;
|
|
49
49
|
createCanvasContext(props: CanvasContextProps): NullCanvasContext;
|
|
50
50
|
createBuffer(props: BufferProps | ArrayBuffer | ArrayBufferView): NullBuffer;
|
|
51
51
|
getDefaultRenderPass(): NullRenderPass;
|
|
@@ -57,6 +57,7 @@ export declare class NullDevice extends Device {
|
|
|
57
57
|
createVertexArray(props: VertexArrayProps): VertexArray;
|
|
58
58
|
createTransformFeedback(props: TransformFeedbackProps): NullTransformFeedback;
|
|
59
59
|
createQuerySet(props: QuerySetProps): NullQuerySet;
|
|
60
|
+
createFence(): NullFence;
|
|
60
61
|
createRenderPipeline(props: RenderPipelineProps): NullRenderPipeline;
|
|
61
62
|
createComputePipeline(props?: ComputePipelineProps): ComputePipeline;
|
|
62
63
|
createCommandEncoder(props?: CommandEncoderProps): NullCommandEncoder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"null-device.d.ts","sourceRoot":"","sources":["../../src/null-device/null-device.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAC,gBAAgB,EAAC,kCAA+B;AACxD,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,OAAO,EAAC,UAAU,EAAC,mCAAgC;AACnD,OAAO,EAAC,eAAe,EAAC,wCAAqC;AAC7D,OAAO,EAAC,UAAU,EAAC,mCAAgC;AACnD,OAAO,EAAC,kBAAkB,EAAC,4CAAyC;AACpE,OAAO,EAAC,WAAW,EAAC,oCAAiC;AACrD,OAAO,EAAC,WAAW,EAAC,oCAAiC;AACrD,OAAO,EAAC,cAAc,EAAC,wCAAqC;AAC5D,OAAO,EAAC,kBAAkB,EAAC,4CAAyC;AAEpE,OAAO,EAAC,qBAAqB,EAAC,+CAA4C;AAC1E,OAAO,EAAC,YAAY,EAAC,sCAAmC;
|
|
1
|
+
{"version":3,"file":"null-device.d.ts","sourceRoot":"","sources":["../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AAG,GAAG;IAgBpD,2CAA2C,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;CAGvE"}
|
|
@@ -16,6 +16,7 @@ import { NullRenderPipeline } from "./resources/null-render-pipeline.js";
|
|
|
16
16
|
import { NullVertexArray } from "./resources/null-vertex-array.js";
|
|
17
17
|
import { NullTransformFeedback } from "./resources/null-transform-feedback.js";
|
|
18
18
|
import { NullQuerySet } from "./resources/null-query-set.js";
|
|
19
|
+
import { NullFence } from "./resources/null-fence.js";
|
|
19
20
|
/** Do-nothing device implementation for testing */
|
|
20
21
|
export class NullDevice extends Device {
|
|
21
22
|
static isSupported() {
|
|
@@ -47,9 +48,6 @@ export class NullDevice extends Device {
|
|
|
47
48
|
return false;
|
|
48
49
|
}
|
|
49
50
|
// IMPLEMENTATION OF ABSTRACT DEVICE
|
|
50
|
-
getTextureByteAlignment() {
|
|
51
|
-
return 1;
|
|
52
|
-
}
|
|
53
51
|
createCanvasContext(props) {
|
|
54
52
|
return new NullCanvasContext(this, props);
|
|
55
53
|
}
|
|
@@ -84,6 +82,9 @@ export class NullDevice extends Device {
|
|
|
84
82
|
createQuerySet(props) {
|
|
85
83
|
return new NullQuerySet(this, props);
|
|
86
84
|
}
|
|
85
|
+
createFence() {
|
|
86
|
+
return new NullFence(this);
|
|
87
|
+
}
|
|
87
88
|
createRenderPipeline(props) {
|
|
88
89
|
return new NullRenderPipeline(this, props);
|
|
89
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"null-device.js","sourceRoot":"","sources":["../../src/null-device/null-device.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAqBpC,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AAErD,OAAO,EAAC,cAAc,EAAC,8BAA2B;AAClD,OAAO,EAAC,gBAAgB,EAAC,kCAA+B;AACxD,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,OAAO,EAAC,UAAU,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6B,EAAE;QAC3D,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,KAAU,CAAC;IAER,kBAAkB,CAAC,UAAe,IAAS,CAAC;IAE5C,kBAAkB,CAAC,UAAe,IAAQ,CAAC;IAE3C,mBAAmB,CAAC,UAAe,EAAE,IAAS;QACrD,MAAM,EAAC,OAAO,GAAG,IAAI,EAAC,GAAG,UAAU,CAAC;QACpC,IAAI,KAAU,CAAC;QACf,IAAI,OAAO,EAAE,CAAC;YACZ,yEAAyE;YACzE,OAAO,IAAI,EAAE,CAAC;QAChB,CAAC;QACD,2EAA2E;QAC3E,IAAI,CAAC;YACH,KAAK,GAAG,IAAI,EAAE,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEQ,2CAA2C,CAAC,MAAW;QAC9D,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Fence, type FenceProps } from '@luma.gl/core';
|
|
2
|
+
import type { NullDevice } from "../null-device.js";
|
|
3
|
+
/** Null fence that is always signaled */
|
|
4
|
+
export declare class NullFence extends Fence {
|
|
5
|
+
readonly device: NullDevice;
|
|
6
|
+
readonly handle: null;
|
|
7
|
+
readonly signaled: Promise<void>;
|
|
8
|
+
constructor(device: NullDevice, props?: FenceProps);
|
|
9
|
+
destroy(): void;
|
|
10
|
+
isSignaled(): boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=null-fence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-fence.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-fence.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAE/C,yCAAyC;AACzC,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,OAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAqB;gBAEzC,MAAM,EAAE,UAAU,EAAE,KAAK,GAAE,UAAe;IAK7C,OAAO,IAAI,IAAI;IAExB,UAAU,IAAI,OAAO;CAGtB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Fence } from '@luma.gl/core';
|
|
5
|
+
/** Null fence that is always signaled */
|
|
6
|
+
export class NullFence extends Fence {
|
|
7
|
+
device;
|
|
8
|
+
handle = null;
|
|
9
|
+
signaled = Promise.resolve();
|
|
10
|
+
constructor(device, props = {}) {
|
|
11
|
+
super(device, props);
|
|
12
|
+
this.device = device;
|
|
13
|
+
}
|
|
14
|
+
destroy() { }
|
|
15
|
+
isSignaled() {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=null-fence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-fence.js","sourceRoot":"","sources":["../../../src/null-device/resources/null-fence.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,KAAK,EAAkB,MAAM,eAAe,CAAC;AAGrD,yCAAyC;AACzC,MAAM,OAAO,SAAU,SAAQ,KAAK;IACzB,MAAM,CAAa;IACnB,MAAM,GAAG,IAAI,CAAC;IACd,QAAQ,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IAErD,YAAY,MAAkB,EAAE,QAAoB,EAAE;QACpD,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEQ,OAAO,KAAU,CAAC;IAE3B,UAAU;QACR,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { Texture } from '@luma.gl/core';
|
|
1
|
+
import { type TextureProps, type TextureViewProps, type CopyExternalImageOptions, type CopyImageDataOptions, type TextureReadOptions, type TextureWriteOptions, type Sampler, type SamplerProps, Buffer, Texture } from '@luma.gl/core';
|
|
3
2
|
import { NullDevice } from "../null-device.js";
|
|
4
3
|
import { NullSampler } from "./null-sampler.js";
|
|
5
4
|
import { NullTextureView } from "./null-texture-view.js";
|
|
@@ -17,6 +16,9 @@ export declare class NullTexture extends Texture {
|
|
|
17
16
|
};
|
|
18
17
|
setSampler(sampler?: Sampler | SamplerProps): void;
|
|
19
18
|
copyImageData(options: CopyImageDataOptions): void;
|
|
20
|
-
|
|
19
|
+
readBuffer(options?: TextureReadOptions, buffer?: Buffer): Buffer;
|
|
20
|
+
readDataAsync(options?: TextureReadOptions): Promise<ArrayBuffer>;
|
|
21
|
+
writeBuffer(buffer: Buffer, options?: TextureWriteOptions): void;
|
|
22
|
+
writeData(data: ArrayBuffer | ArrayBufferView, options?: TextureWriteOptions): void;
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=null-texture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"null-texture.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-texture.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"null-texture.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-texture.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,MAAM,EACN,OAAO,EACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,UAAU,EAAC,0BAAuB;AAC1C,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAC3C,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,qBAAa,WAAY,SAAQ,OAAO;IACtC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,OAAQ;IAEvB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,eAAe,CAAC;gBAEV,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY;IAwB1C,OAAO,IAAI,IAAI;IAOxB,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,eAAe;IAIpD,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC;IAc5E,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI;IAI3D,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAIzC,UAAU,CAAC,OAAO,GAAE,kBAAuB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAI/D,aAAa,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC;IAI3E,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB;IAI7D,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,EAAE,OAAO,GAAE,mBAAwB,GAAG,IAAI;CAGjG"}
|
|
@@ -37,18 +37,14 @@ export class NullTexture extends Texture {
|
|
|
37
37
|
}
|
|
38
38
|
copyExternalImage(options) {
|
|
39
39
|
this.trackDeallocatedMemory('Texture');
|
|
40
|
-
const {
|
|
40
|
+
// const {image: data} = options;
|
|
41
41
|
// if (data && data.byteLength) {
|
|
42
42
|
// this.trackAllocatedMemory(data.byteLength, 'Texture');
|
|
43
43
|
// } else {
|
|
44
44
|
const bytesPerPixel = 4;
|
|
45
45
|
this.trackAllocatedMemory(this.width * this.height * bytesPerPixel, 'Texture');
|
|
46
46
|
// }
|
|
47
|
-
|
|
48
|
-
const height = options.height ?? data.height;
|
|
49
|
-
this.width = width;
|
|
50
|
-
this.height = height;
|
|
51
|
-
return { width, height };
|
|
47
|
+
return { width: this.width, height: this.height };
|
|
52
48
|
}
|
|
53
49
|
setSampler(sampler) {
|
|
54
50
|
// ignore
|
|
@@ -56,7 +52,16 @@ export class NullTexture extends Texture {
|
|
|
56
52
|
copyImageData(options) {
|
|
57
53
|
throw new Error('copyImageData not implemented');
|
|
58
54
|
}
|
|
59
|
-
|
|
55
|
+
readBuffer(options = {}, buffer) {
|
|
56
|
+
return this.device.createBuffer({});
|
|
57
|
+
}
|
|
58
|
+
async readDataAsync(options = {}) {
|
|
59
|
+
return new ArrayBuffer(0);
|
|
60
|
+
}
|
|
61
|
+
writeBuffer(buffer, options = {}) {
|
|
62
|
+
// ignore
|
|
63
|
+
}
|
|
64
|
+
writeData(data, options = {}) {
|
|
60
65
|
// ignore
|
|
61
66
|
}
|
|
62
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"null-texture.js","sourceRoot":"","sources":["../../../src/null-device/resources/null-texture.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"null-texture.js","sourceRoot":"","sources":["../../../src/null-device/resources/null-texture.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAUL,OAAO,EACR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAC3C,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC7B,MAAM,CAAa;IACnB,MAAM,GAAG,IAAI,CAA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G,aAAa,EAAE,SAAS,CAAC,CAAC;QAC/E,IAAI;QAEJ,OAAO,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC;IAClD,CAAC;IAEQ,UAAU,CAAC,OAAgC;QAClD,SAAS;IACX,CAAC;IAED,aAAa,CAAC,OAA6B;QACzC,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAEQ,UAAU,CAAC,UAA8B,EAAE,EAAE,MAAe;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IAEQ,KAAK,CAAC,aAAa,CAAC,UAA8B,EAAE;QAC3D,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAEQ,WAAW,CAAC,MAAc,EAAE,UAA+B,EAAE;QACpE,SAAS;IACX,CAAC;IAEQ,SAAS,CAAC,IAAmC,EAAE,UAA+B,EAAE;QACvF,SAAS;IACX,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luma.gl/test-utils",
|
|
3
|
-
"version": "9.2
|
|
3
|
+
"version": "9.3.0-alpha.2",
|
|
4
4
|
"description": "Automated WebGL testing utilities with Puppeteer and image diffing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"pre-build": "echo test utils has no bundle"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@luma.gl/core": "
|
|
40
|
-
"@luma.gl/engine": "
|
|
41
|
-
"@luma.gl/shadertools": "
|
|
42
|
-
"@luma.gl/webgl": "
|
|
43
|
-
"@luma.gl/webgpu": "
|
|
39
|
+
"@luma.gl/core": "9.2.0-alpha.6",
|
|
40
|
+
"@luma.gl/engine": "9.2.0-alpha.6",
|
|
41
|
+
"@luma.gl/shadertools": "9.2.0-alpha.6",
|
|
42
|
+
"@luma.gl/webgl": "9.2.0-alpha.6",
|
|
43
|
+
"@luma.gl/webgpu": "9.2.0-alpha.6"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@probe.gl/env": "^4.0.8",
|
|
47
47
|
"@probe.gl/stats": "^4.0.8"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "7fedf8d8902f58490a4ffca9a873daee3c732f24"
|
|
50
50
|
}
|
|
@@ -85,8 +85,7 @@ async function makeWebGLTestDevice(): Promise<WebGLDevice> {
|
|
|
85
85
|
type: 'webgl',
|
|
86
86
|
adapters: [webgl2Adapter],
|
|
87
87
|
createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,
|
|
88
|
-
debug: true
|
|
89
|
-
debugWebGL: true
|
|
88
|
+
debug: true
|
|
90
89
|
})) as unknown as WebGLDevice;
|
|
91
90
|
webglDeviceResolvers.resolve(webglDevice);
|
|
92
91
|
} catch (error) {
|
|
@@ -106,8 +105,7 @@ async function makeNullTestDevice(): Promise<NullDevice> {
|
|
|
106
105
|
type: 'null',
|
|
107
106
|
adapters: [nullAdapter],
|
|
108
107
|
createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,
|
|
109
|
-
debug: true
|
|
110
|
-
debugWebGL: true
|
|
108
|
+
debug: true
|
|
111
109
|
})) as unknown as NullDevice;
|
|
112
110
|
nullDeviceResolvers.resolve(nullDevice);
|
|
113
111
|
} catch (error) {
|
|
@@ -28,14 +28,14 @@ export class NullCanvasContext extends CanvasContext {
|
|
|
28
28
|
|
|
29
29
|
// Base class constructor cannot access derived methods/fields, so we need to call these functions in the subclass constructor
|
|
30
30
|
this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);
|
|
31
|
-
this.
|
|
31
|
+
this._configureDevice();
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
_getCurrentFramebuffer(): NullFramebuffer {
|
|
35
35
|
// Setting handle to null returns a reference to the default framebuffer
|
|
36
36
|
this._framebuffer = this._framebuffer || new NullFramebuffer(this.device, {handle: null});
|
|
37
37
|
return this._framebuffer;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
_configureDevice() {}
|
|
41
41
|
}
|
|
@@ -37,6 +37,7 @@ import {NullRenderPipeline} from './resources/null-render-pipeline';
|
|
|
37
37
|
import {NullVertexArray} from './resources/null-vertex-array';
|
|
38
38
|
import {NullTransformFeedback} from './resources/null-transform-feedback';
|
|
39
39
|
import {NullQuerySet} from './resources/null-query-set';
|
|
40
|
+
import {NullFence} from './resources/null-fence';
|
|
40
41
|
|
|
41
42
|
/** Do-nothing device implementation for testing */
|
|
42
43
|
export class NullDevice extends Device {
|
|
@@ -79,10 +80,6 @@ export class NullDevice extends Device {
|
|
|
79
80
|
|
|
80
81
|
// IMPLEMENTATION OF ABSTRACT DEVICE
|
|
81
82
|
|
|
82
|
-
getTextureByteAlignment(): number {
|
|
83
|
-
return 1;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
83
|
createCanvasContext(props: CanvasContextProps): NullCanvasContext {
|
|
87
84
|
return new NullCanvasContext(this, props);
|
|
88
85
|
}
|
|
@@ -128,6 +125,10 @@ export class NullDevice extends Device {
|
|
|
128
125
|
return new NullQuerySet(this, props);
|
|
129
126
|
}
|
|
130
127
|
|
|
128
|
+
override createFence(): NullFence {
|
|
129
|
+
return new NullFence(this);
|
|
130
|
+
}
|
|
131
|
+
|
|
131
132
|
createRenderPipeline(props: RenderPipelineProps): NullRenderPipeline {
|
|
132
133
|
return new NullRenderPipeline(this, props);
|
|
133
134
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import {Fence, type FenceProps} from '@luma.gl/core';
|
|
6
|
+
import type {NullDevice} from '../null-device';
|
|
7
|
+
|
|
8
|
+
/** Null fence that is always signaled */
|
|
9
|
+
export class NullFence extends Fence {
|
|
10
|
+
readonly device: NullDevice;
|
|
11
|
+
readonly handle = null;
|
|
12
|
+
readonly signaled: Promise<void> = Promise.resolve();
|
|
13
|
+
|
|
14
|
+
constructor(device: NullDevice, props: FenceProps = {}) {
|
|
15
|
+
super(device, props);
|
|
16
|
+
this.device = device;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
override destroy(): void {}
|
|
20
|
+
|
|
21
|
+
isSignaled(): boolean {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
TextureProps,
|
|
7
|
-
TextureViewProps,
|
|
8
|
-
CopyExternalImageOptions,
|
|
9
|
-
CopyImageDataOptions,
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import {
|
|
6
|
+
type TextureProps,
|
|
7
|
+
type TextureViewProps,
|
|
8
|
+
type CopyExternalImageOptions,
|
|
9
|
+
type CopyImageDataOptions,
|
|
10
|
+
type TextureReadOptions,
|
|
11
|
+
type TextureWriteOptions,
|
|
12
|
+
type Sampler,
|
|
13
|
+
type SamplerProps,
|
|
14
|
+
Buffer,
|
|
15
|
+
Texture
|
|
12
16
|
} from '@luma.gl/core';
|
|
13
|
-
|
|
14
|
-
import {Texture} from '@luma.gl/core';
|
|
15
17
|
import {NullDevice} from '../null-device';
|
|
16
18
|
import {NullSampler} from './null-sampler';
|
|
17
19
|
import {NullTextureView} from './null-texture-view';
|
|
@@ -61,8 +63,7 @@ export class NullTexture extends Texture {
|
|
|
61
63
|
copyExternalImage(options: CopyExternalImageOptions): {width: number; height: number} {
|
|
62
64
|
this.trackDeallocatedMemory('Texture');
|
|
63
65
|
|
|
64
|
-
const {image: data} = options;
|
|
65
|
-
|
|
66
|
+
// const {image: data} = options;
|
|
66
67
|
// if (data && data.byteLength) {
|
|
67
68
|
// this.trackAllocatedMemory(data.byteLength, 'Texture');
|
|
68
69
|
// } else {
|
|
@@ -70,13 +71,7 @@ export class NullTexture extends Texture {
|
|
|
70
71
|
this.trackAllocatedMemory(this.width * this.height * bytesPerPixel, 'Texture');
|
|
71
72
|
// }
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
const height = options.height ?? (data as ImageBitmap).height;
|
|
75
|
-
|
|
76
|
-
this.width = width;
|
|
77
|
-
this.height = height;
|
|
78
|
-
|
|
79
|
-
return {width, height};
|
|
74
|
+
return {width: this.width, height: this.height};
|
|
80
75
|
}
|
|
81
76
|
|
|
82
77
|
override setSampler(sampler?: Sampler | SamplerProps): void {
|
|
@@ -87,7 +82,19 @@ export class NullTexture extends Texture {
|
|
|
87
82
|
throw new Error('copyImageData not implemented');
|
|
88
83
|
}
|
|
89
84
|
|
|
90
|
-
|
|
85
|
+
override readBuffer(options: TextureReadOptions = {}, buffer?: Buffer): Buffer {
|
|
86
|
+
return this.device.createBuffer({});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
override async readDataAsync(options: TextureReadOptions = {}): Promise<ArrayBuffer> {
|
|
90
|
+
return new ArrayBuffer(0);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
override writeBuffer(buffer: Buffer, options: TextureWriteOptions = {}) {
|
|
94
|
+
// ignore
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
override writeData(data: ArrayBuffer | ArrayBufferView, options: TextureWriteOptions = {}): void {
|
|
91
98
|
// ignore
|
|
92
99
|
}
|
|
93
100
|
}
|