@luma.gl/test-utils 9.0.0-beta.6 → 9.0.0-beta.7
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.d.ts +5 -5
- package/dist/create-test-device.d.ts.map +1 -1
- package/dist/create-test-device.js +24 -21
- package/dist/index.cjs +548 -17
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/null-device/null-canvas-context.d.ts +24 -0
- package/dist/null-device/null-canvas-context.d.ts.map +1 -0
- package/dist/null-device/null-canvas-context.js +47 -0
- package/dist/null-device/null-device-features.d.ts +30 -0
- package/dist/null-device/null-device-features.d.ts.map +1 -0
- package/dist/null-device/null-device-features.js +32 -0
- package/dist/null-device/null-device-info.d.ts +3 -0
- package/dist/null-device/null-device-info.d.ts.map +1 -0
- package/dist/null-device/null-device-info.js +14 -0
- package/dist/null-device/null-device.d.ts +62 -0
- package/dist/null-device/null-device.d.ts.map +1 -0
- package/dist/null-device/null-device.js +134 -0
- package/dist/null-device/resources/null-buffer.d.ts +12 -0
- package/dist/null-device/resources/null-buffer.d.ts.map +1 -0
- package/dist/null-device/resources/null-buffer.js +30 -0
- package/dist/null-device/resources/null-command-buffer.d.ts +17 -0
- package/dist/null-device/resources/null-command-buffer.d.ts.map +1 -0
- package/dist/null-device/resources/null-command-buffer.js +20 -0
- package/dist/null-device/resources/null-framebuffer.d.ts +8 -0
- package/dist/null-device/resources/null-framebuffer.d.ts.map +1 -0
- package/dist/null-device/resources/null-framebuffer.js +11 -0
- package/dist/null-device/resources/null-query-set.d.ts +7 -0
- package/dist/null-device/resources/null-query-set.d.ts.map +1 -0
- package/dist/null-device/resources/null-query-set.js +11 -0
- package/dist/null-device/resources/null-render-pass.d.ts +14 -0
- package/dist/null-device/resources/null-render-pass.d.ts.map +1 -0
- package/dist/null-device/resources/null-render-pass.js +18 -0
- package/dist/null-device/resources/null-render-pipeline.d.ts +23 -0
- package/dist/null-device/resources/null-render-pipeline.d.ts.map +1 -0
- package/dist/null-device/resources/null-render-pipeline.js +38 -0
- package/dist/null-device/resources/null-sampler.d.ts +7 -0
- package/dist/null-device/resources/null-sampler.d.ts.map +1 -0
- package/dist/null-device/resources/null-sampler.js +11 -0
- package/dist/null-device/resources/null-shader.d.ts +8 -0
- package/dist/null-device/resources/null-shader.d.ts.map +1 -0
- package/dist/null-device/resources/null-shader.js +14 -0
- package/dist/null-device/resources/null-texture-view.d.ts +12 -0
- package/dist/null-device/resources/null-texture-view.d.ts.map +1 -0
- package/dist/null-device/resources/null-texture-view.js +13 -0
- package/dist/null-device/resources/null-texture.d.ts +33 -0
- package/dist/null-device/resources/null-texture.d.ts.map +1 -0
- package/dist/null-device/resources/null-texture.js +91 -0
- package/dist/null-device/resources/null-transform-feedback.d.ts +15 -0
- package/dist/null-device/resources/null-transform-feedback.d.ts.map +1 -0
- package/dist/null-device/resources/null-transform-feedback.js +32 -0
- package/dist/null-device/resources/null-vertex-array.d.ts +14 -0
- package/dist/null-device/resources/null-vertex-array.d.ts.map +1 -0
- package/dist/null-device/resources/null-vertex-array.js +26 -0
- package/package.json +6 -6
- package/src/create-test-device.ts +24 -22
- package/src/index.ts +2 -1
- package/src/null-device/null-canvas-context.ts +58 -0
- package/src/null-device/null-device-features.ts +34 -0
- package/src/null-device/null-device-info.ts +17 -0
- package/src/null-device/null-device.ts +194 -0
- package/src/null-device/resources/null-buffer.ts +42 -0
- package/src/null-device/resources/null-command-buffer.ts +38 -0
- package/src/null-device/resources/null-framebuffer.ts +16 -0
- package/src/null-device/resources/null-query-set.ts +15 -0
- package/src/null-device/resources/null-render-pass.ts +26 -0
- package/src/null-device/resources/null-render-pipeline.ts +62 -0
- package/src/null-device/resources/null-sampler.ts +15 -0
- package/src/null-device/resources/null-shader.ts +19 -0
- package/src/null-device/resources/null-texture-view.ts +21 -0
- package/src/null-device/resources/null-texture.ts +121 -0
- package/src/null-device/resources/null-transform-feedback.ts +46 -0
- package/src/null-device/resources/null-vertex-array.ts +37 -0
- package/dist/check-type.d.ts +0 -6
- package/dist/check-type.d.ts.map +0 -1
- package/dist/check-type.js +0 -5
- package/dist/utils.d.ts +0 -7
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -10
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Device, CanvasContext, uid, DeviceFeatures } from '@luma.gl/core';
|
|
5
|
+
import { NullDeviceInfo } from "./null-device-info.js";
|
|
6
|
+
import { NullDeviceLimits } from "./null-device-features.js";
|
|
7
|
+
import { NullCanvasContext } from "./null-canvas-context.js";
|
|
8
|
+
import { NullBuffer } from "./resources/null-buffer.js";
|
|
9
|
+
import { NullFramebuffer } from "./resources/null-framebuffer.js";
|
|
10
|
+
import { NullShader } from "./resources/null-shader.js";
|
|
11
|
+
import { NullCommandEncoder } from "./resources/null-command-buffer.js";
|
|
12
|
+
import { NullSampler } from "./resources/null-sampler.js";
|
|
13
|
+
import { NullTexture } from "./resources/null-texture.js";
|
|
14
|
+
import { NullRenderPass } from "./resources/null-render-pass.js";
|
|
15
|
+
import { NullRenderPipeline } from "./resources/null-render-pipeline.js";
|
|
16
|
+
import { NullVertexArray } from "./resources/null-vertex-array.js";
|
|
17
|
+
import { NullTransformFeedback } from "./resources/null-transform-feedback.js";
|
|
18
|
+
import { NullQuerySet } from "./resources/null-query-set.js";
|
|
19
|
+
/** Do-nothing device implementation for testing */
|
|
20
|
+
export class NullDevice extends Device {
|
|
21
|
+
static isSupported() {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
static type = 'unknown';
|
|
25
|
+
type = 'unknown';
|
|
26
|
+
features = new DeviceFeatures([], this.props.disabledFeatures);
|
|
27
|
+
limits = new NullDeviceLimits();
|
|
28
|
+
info = NullDeviceInfo;
|
|
29
|
+
canvasContext;
|
|
30
|
+
lost;
|
|
31
|
+
static async create(props = {}) {
|
|
32
|
+
// Wait for page to load: if canvas is a string we need to query the DOM for the canvas element.
|
|
33
|
+
// We only wait when props.canvas is string to avoids setting the global page onload callback unless necessary.
|
|
34
|
+
if (typeof props.canvas === 'string') {
|
|
35
|
+
await CanvasContext.pageLoaded;
|
|
36
|
+
}
|
|
37
|
+
return new NullDevice(props);
|
|
38
|
+
}
|
|
39
|
+
constructor(props) {
|
|
40
|
+
super({ ...props, id: props.id || uid('dummy-device') });
|
|
41
|
+
this.canvasContext = new NullCanvasContext(this, props);
|
|
42
|
+
this.lost = new Promise(resolve => { });
|
|
43
|
+
this.canvasContext.resize();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Destroys the context
|
|
47
|
+
* @note Has no effect for WebGL browser contexts, there is no browser API for destroying contexts
|
|
48
|
+
*/
|
|
49
|
+
destroy() { }
|
|
50
|
+
get isLost() {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
getSize() {
|
|
54
|
+
return [this.canvasContext.width, this.canvasContext.height];
|
|
55
|
+
}
|
|
56
|
+
isTextureFormatSupported(format) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
isTextureFormatFilterable(format) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
isTextureFormatRenderable(format) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
// IMPLEMENTATION OF ABSTRACT DEVICE
|
|
66
|
+
createCanvasContext(props) {
|
|
67
|
+
return new NullCanvasContext(this, props);
|
|
68
|
+
}
|
|
69
|
+
createBuffer(props) {
|
|
70
|
+
const newProps = this._getBufferProps(props);
|
|
71
|
+
return new NullBuffer(this, newProps);
|
|
72
|
+
}
|
|
73
|
+
getDefaultRenderPass() {
|
|
74
|
+
return new NullRenderPass(this, {});
|
|
75
|
+
}
|
|
76
|
+
_createTexture(props) {
|
|
77
|
+
return new NullTexture(this, props);
|
|
78
|
+
}
|
|
79
|
+
createExternalTexture(props) {
|
|
80
|
+
throw new Error('createExternalTexture() not implemented'); // return new Program(props);
|
|
81
|
+
}
|
|
82
|
+
createSampler(props) {
|
|
83
|
+
return new NullSampler(this, props);
|
|
84
|
+
}
|
|
85
|
+
createShader(props) {
|
|
86
|
+
return new NullShader(this, props);
|
|
87
|
+
}
|
|
88
|
+
createFramebuffer(props) {
|
|
89
|
+
return new NullFramebuffer(this, props);
|
|
90
|
+
}
|
|
91
|
+
createVertexArray(props) {
|
|
92
|
+
return new NullVertexArray(this, props);
|
|
93
|
+
}
|
|
94
|
+
createTransformFeedback(props) {
|
|
95
|
+
return new NullTransformFeedback(this, props);
|
|
96
|
+
}
|
|
97
|
+
createQuerySet(props) {
|
|
98
|
+
return new NullQuerySet(this, props);
|
|
99
|
+
}
|
|
100
|
+
createRenderPipeline(props) {
|
|
101
|
+
return new NullRenderPipeline(this, props);
|
|
102
|
+
}
|
|
103
|
+
beginRenderPass(props) {
|
|
104
|
+
return new NullRenderPass(this, props);
|
|
105
|
+
}
|
|
106
|
+
createComputePipeline(props) {
|
|
107
|
+
throw new Error('ComputePipeline not supported in WebGL');
|
|
108
|
+
}
|
|
109
|
+
beginComputePass(props) {
|
|
110
|
+
throw new Error('ComputePass not supported in WebGL');
|
|
111
|
+
}
|
|
112
|
+
createCommandEncoder(props = {}) {
|
|
113
|
+
return new NullCommandEncoder(this, props);
|
|
114
|
+
}
|
|
115
|
+
submit() { }
|
|
116
|
+
setParametersWebGL(parameters) { }
|
|
117
|
+
getParametersWebGL(parameters) { }
|
|
118
|
+
withParametersWebGL(parameters, func) {
|
|
119
|
+
const { nocatch = true } = parameters;
|
|
120
|
+
let value;
|
|
121
|
+
if (nocatch) {
|
|
122
|
+
// Avoid try catch to minimize stack size impact for safe execution paths
|
|
123
|
+
return func();
|
|
124
|
+
}
|
|
125
|
+
// Wrap in a try-catch to ensure that parameters are restored on exceptions
|
|
126
|
+
try {
|
|
127
|
+
value = func();
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
// ignore
|
|
131
|
+
}
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BufferProps } from '@luma.gl/core';
|
|
2
|
+
import { Buffer } from '@luma.gl/core';
|
|
3
|
+
import type { NullDevice } from "../null-device.js";
|
|
4
|
+
export declare class NullBuffer extends Buffer {
|
|
5
|
+
device: NullDevice;
|
|
6
|
+
byteLength: number;
|
|
7
|
+
constructor(device: NullDevice, props?: BufferProps);
|
|
8
|
+
destroy(): void;
|
|
9
|
+
readAsync(byteOffset?: number, byteLength?: number): Promise<Uint8Array>;
|
|
10
|
+
write(data: ArrayBufferView, byteOffset?: number): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=null-buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-buffer.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-buffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,MAAM,EAAS,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAE/C,qBAAa,UAAW,SAAQ,MAAM;IACpC,MAAM,EAAE,UAAU,CAAC;IAEnB,UAAU,EAAE,MAAM,CAAC;gBAEP,MAAM,EAAE,UAAU,EAAE,KAAK,GAAE,WAAgB;IAa9C,OAAO,IAAI,IAAI;IAOlB,SAAS,CAAC,UAAU,SAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAKzE,KAAK,CAAC,IAAI,EAAE,eAAe,EAAE,UAAU,GAAE,MAAU,GAAG,IAAI;CAG3D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Buffer, assert } from '@luma.gl/core';
|
|
5
|
+
export class NullBuffer extends Buffer {
|
|
6
|
+
device;
|
|
7
|
+
byteLength;
|
|
8
|
+
constructor(device, props = {}) {
|
|
9
|
+
super(device, props);
|
|
10
|
+
this.device = device;
|
|
11
|
+
const byteOffset = props.byteOffset || 0;
|
|
12
|
+
const byteLength = props.byteLength ?? (props.data ? props.data.byteLength + byteOffset : 0);
|
|
13
|
+
assert(byteLength >= 0);
|
|
14
|
+
this.byteLength = byteLength;
|
|
15
|
+
this.trackAllocatedMemory(byteLength);
|
|
16
|
+
}
|
|
17
|
+
destroy() {
|
|
18
|
+
if (!this.destroyed) {
|
|
19
|
+
super.destroy();
|
|
20
|
+
this.trackDeallocatedMemory();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async readAsync(byteOffset = 0, byteLength) {
|
|
24
|
+
byteLength = byteLength ?? this.byteLength - byteOffset;
|
|
25
|
+
return new Uint8Array(byteLength);
|
|
26
|
+
}
|
|
27
|
+
write(data, byteOffset = 0) {
|
|
28
|
+
assert(data.byteLength + byteOffset <= this.byteLength);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CommandEncoder, CommandEncoderProps } from '@luma.gl/core';
|
|
2
|
+
import type { CopyBufferToBufferOptions, CopyBufferToTextureOptions, CopyTextureToBufferOptions, CopyTextureToTextureOptions, QuerySet } from '@luma.gl/core';
|
|
3
|
+
import type { NullDevice } from "../null-device.js";
|
|
4
|
+
export declare class NullCommandEncoder extends CommandEncoder {
|
|
5
|
+
device: NullDevice;
|
|
6
|
+
constructor(device: NullDevice, props: CommandEncoderProps);
|
|
7
|
+
finish(): void;
|
|
8
|
+
copyBufferToBuffer(options: CopyBufferToBufferOptions): void;
|
|
9
|
+
copyBufferToTexture(options: CopyBufferToTextureOptions): void;
|
|
10
|
+
copyTextureToBuffer(options: CopyTextureToBufferOptions): void;
|
|
11
|
+
copyTextureToTexture(options: CopyTextureToTextureOptions): void;
|
|
12
|
+
pushDebugGroup(groupLabel: string): void;
|
|
13
|
+
popDebugGroup(): void;
|
|
14
|
+
insertDebugMarker(markerLabel: string): void;
|
|
15
|
+
resolveQuerySet(querySet: QuerySet): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=null-command-buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-command-buffer.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-command-buffer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAE/C,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,MAAM,EAAE,UAAU,CAAC;gBAEP,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB;IAK1D,MAAM,IAAI,IAAI;IAEd,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAE5D,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;IAEvD,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI;IAE9D,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,IAAI;IAEhE,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IACxC,aAAa;IAEb,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAC5C,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAC1C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { CommandEncoder } from '@luma.gl/core';
|
|
5
|
+
export class NullCommandEncoder extends CommandEncoder {
|
|
6
|
+
device;
|
|
7
|
+
constructor(device, props) {
|
|
8
|
+
super(device, props);
|
|
9
|
+
this.device = device;
|
|
10
|
+
}
|
|
11
|
+
finish() { }
|
|
12
|
+
copyBufferToBuffer(options) { }
|
|
13
|
+
copyBufferToTexture(options) { }
|
|
14
|
+
copyTextureToBuffer(options) { }
|
|
15
|
+
copyTextureToTexture(options) { }
|
|
16
|
+
pushDebugGroup(groupLabel) { }
|
|
17
|
+
popDebugGroup() { }
|
|
18
|
+
insertDebugMarker(markerLabel) { }
|
|
19
|
+
resolveQuerySet(querySet) { }
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FramebufferProps } from '@luma.gl/core';
|
|
2
|
+
import { Framebuffer } from '@luma.gl/core';
|
|
3
|
+
import type { NullDevice } from "../null-device.js";
|
|
4
|
+
export declare class NullFramebuffer extends Framebuffer {
|
|
5
|
+
device: NullDevice;
|
|
6
|
+
constructor(device: NullDevice, props: FramebufferProps);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=null-framebuffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-framebuffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAE/C,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,MAAM,EAAE,UAAU,CAAC;gBAEP,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB;CAIxD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Framebuffer } from '@luma.gl/core';
|
|
5
|
+
export class NullFramebuffer extends Framebuffer {
|
|
6
|
+
device;
|
|
7
|
+
constructor(device, props) {
|
|
8
|
+
super(device, props);
|
|
9
|
+
this.device = device;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { QuerySet, QuerySetProps } from '@luma.gl/core';
|
|
2
|
+
import { NullDevice } from "../null-device.js";
|
|
3
|
+
export declare class NullQuerySet extends QuerySet {
|
|
4
|
+
device: NullDevice;
|
|
5
|
+
constructor(device: NullDevice, props: QuerySetProps);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=null-query-set.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-query-set.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-query-set.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,UAAU,EAAC,0BAAuB;AAE1C,qBAAa,YAAa,SAAQ,QAAQ;IACxC,MAAM,EAAE,UAAU,CAAC;gBAEP,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa;CAIrD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { QuerySet } from '@luma.gl/core';
|
|
5
|
+
export class NullQuerySet extends QuerySet {
|
|
6
|
+
device;
|
|
7
|
+
constructor(device, props) {
|
|
8
|
+
super(device, props);
|
|
9
|
+
this.device = device;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RenderPass, RenderPassProps, RenderPassParameters } from '@luma.gl/core';
|
|
2
|
+
import { NullDevice } from "../null-device.js";
|
|
3
|
+
export declare class NullRenderPass extends RenderPass {
|
|
4
|
+
readonly device: NullDevice;
|
|
5
|
+
constructor(device: NullDevice, props: RenderPassProps);
|
|
6
|
+
end(): void;
|
|
7
|
+
pushDebugGroup(groupLabel: string): void;
|
|
8
|
+
popDebugGroup(): void;
|
|
9
|
+
insertDebugMarker(markerLabel: string): void;
|
|
10
|
+
setParameters(parameters?: RenderPassParameters): void;
|
|
11
|
+
beginOcclusionQuery(queryIndex: number): void;
|
|
12
|
+
endOcclusionQuery(): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=null-render-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-render-pass.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-render-pass.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,0BAAuB;AAE1C,qBAAa,cAAe,SAAQ,UAAU;IAC5C,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;gBAEhB,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe;IAKtD,GAAG,IAAI,IAAI;IAEX,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IACxC,aAAa,IAAI,IAAI;IACrB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAE5C,aAAa,CAAC,UAAU,GAAE,oBAAyB,GAAG,IAAI;IAE1D,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAC7C,iBAAiB,IAAI,IAAI;CAC1B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { RenderPass } from '@luma.gl/core';
|
|
5
|
+
export class NullRenderPass extends RenderPass {
|
|
6
|
+
device;
|
|
7
|
+
constructor(device, props) {
|
|
8
|
+
super(device, props);
|
|
9
|
+
this.device = device;
|
|
10
|
+
}
|
|
11
|
+
end() { }
|
|
12
|
+
pushDebugGroup(groupLabel) { }
|
|
13
|
+
popDebugGroup() { }
|
|
14
|
+
insertDebugMarker(markerLabel) { }
|
|
15
|
+
setParameters(parameters = {}) { }
|
|
16
|
+
beginOcclusionQuery(queryIndex) { }
|
|
17
|
+
endOcclusionQuery() { }
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { UniformValue, RenderPipelineProps, Binding } from '@luma.gl/core';
|
|
2
|
+
import type { RenderPass, VertexArray } from '@luma.gl/core';
|
|
3
|
+
import { RenderPipeline } from '@luma.gl/core';
|
|
4
|
+
import type { NullDevice } from "../null-device.js";
|
|
5
|
+
import { NullShader } from "./null-shader.js";
|
|
6
|
+
/** Creates a new render pipeline */
|
|
7
|
+
export declare class NullRenderPipeline extends RenderPipeline {
|
|
8
|
+
device: NullDevice;
|
|
9
|
+
vs: NullShader;
|
|
10
|
+
fs: NullShader;
|
|
11
|
+
uniforms: Record<string, UniformValue>;
|
|
12
|
+
bindings: Record<string, Binding>;
|
|
13
|
+
constructor(device: NullDevice, props: RenderPipelineProps);
|
|
14
|
+
setBindings(bindings: Record<string, Binding>): void;
|
|
15
|
+
setUniformsWebGL(uniforms: Record<string, UniformValue>): void;
|
|
16
|
+
draw(options: {
|
|
17
|
+
renderPass: RenderPass;
|
|
18
|
+
vertexArray: VertexArray;
|
|
19
|
+
vertexCount?: number;
|
|
20
|
+
instanceCount?: number;
|
|
21
|
+
}): boolean;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=null-render-pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-render-pipeline.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-render-pipeline.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,YAAY,EAAE,mBAAmB,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,KAAK,EAAC,UAAU,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,cAAc,EAAO,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAC/C,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC,oCAAoC;AACpC,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,MAAM,EAAE,UAAU,CAAC;IACnB,EAAE,EAAE,UAAU,CAAC;IACf,EAAE,EAAE,UAAU,CAAC;IAEf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAM;IAC5C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;gBAE3B,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB;IAc1D,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAI3C,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,IAAI;IAIvE,IAAI,CAAC,OAAO,EAAE;QACZ,UAAU,EAAE,UAAU,CAAC;QACvB,WAAW,EAAE,WAAW,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO;CAcZ"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { RenderPipeline, cast } from '@luma.gl/core';
|
|
5
|
+
/** Creates a new render pipeline */
|
|
6
|
+
export class NullRenderPipeline extends RenderPipeline {
|
|
7
|
+
device;
|
|
8
|
+
vs;
|
|
9
|
+
fs;
|
|
10
|
+
uniforms = {};
|
|
11
|
+
bindings = {};
|
|
12
|
+
constructor(device, props) {
|
|
13
|
+
super(device, props);
|
|
14
|
+
this.device = device;
|
|
15
|
+
this.vs = cast(props.vs);
|
|
16
|
+
this.fs = cast(props.fs);
|
|
17
|
+
this.shaderLayout = props.shaderLayout || {
|
|
18
|
+
attributes: [],
|
|
19
|
+
bindings: [],
|
|
20
|
+
uniforms: []
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
setBindings(bindings) {
|
|
24
|
+
Object.assign(this.bindings, bindings);
|
|
25
|
+
}
|
|
26
|
+
setUniformsWebGL(uniforms) {
|
|
27
|
+
Object.assign(this.uniforms, uniforms);
|
|
28
|
+
}
|
|
29
|
+
draw(options) {
|
|
30
|
+
const { renderPass, vertexArray } = options;
|
|
31
|
+
// const isIndexed: boolean = Boolean(vertexArray.indexBuffer);
|
|
32
|
+
// const isInstanced: boolean = Number(instanceCount) > 0;
|
|
33
|
+
vertexArray.bindBeforeRender(renderPass);
|
|
34
|
+
// TODO - verify buffer size
|
|
35
|
+
vertexArray.unbindAfterRender(renderPass);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Sampler, SamplerProps } from '@luma.gl/core';
|
|
2
|
+
import type { NullDevice } from "../null-device.js";
|
|
3
|
+
export declare class NullSampler extends Sampler {
|
|
4
|
+
readonly device: NullDevice;
|
|
5
|
+
constructor(device: NullDevice, props: SamplerProps);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=null-sampler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-sampler.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-sampler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,OAAO,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAE/C,qBAAa,WAAY,SAAQ,OAAO;IACtC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;gBAEhB,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY;CAIpD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Sampler } from '@luma.gl/core';
|
|
5
|
+
export class NullSampler extends Sampler {
|
|
6
|
+
device;
|
|
7
|
+
constructor(device, props) {
|
|
8
|
+
super(device, props);
|
|
9
|
+
this.device = device;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Shader, ShaderProps, CompilerMessage } from '@luma.gl/core';
|
|
2
|
+
import { NullDevice } from "../null-device.js";
|
|
3
|
+
export declare class NullShader extends Shader {
|
|
4
|
+
readonly device: NullDevice;
|
|
5
|
+
constructor(device: NullDevice, props: ShaderProps);
|
|
6
|
+
getCompilationInfo(): Promise<readonly CompilerMessage[]>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=null-shader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-shader.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-shader.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,MAAM,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AACnE,OAAO,EAAC,UAAU,EAAC,0BAAuB;AAE1C,qBAAa,UAAW,SAAQ,MAAM;IACpC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;gBAEhB,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW;IAK5C,kBAAkB,IAAI,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC;CAGhE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Shader } from '@luma.gl/core';
|
|
5
|
+
export class NullShader extends Shader {
|
|
6
|
+
device;
|
|
7
|
+
constructor(device, props) {
|
|
8
|
+
super(device, props);
|
|
9
|
+
this.device = device;
|
|
10
|
+
}
|
|
11
|
+
async getCompilationInfo() {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TextureViewProps } from '@luma.gl/core';
|
|
2
|
+
import { TextureView } from '@luma.gl/core';
|
|
3
|
+
import type { NullDevice } from "../null-device.js";
|
|
4
|
+
import type { NullTexture } from "./null-texture.js";
|
|
5
|
+
export declare class NullTextureView extends TextureView {
|
|
6
|
+
readonly device: NullDevice;
|
|
7
|
+
readonly texture: NullTexture;
|
|
8
|
+
constructor(device: NullDevice, props: TextureViewProps & {
|
|
9
|
+
texture: NullTexture;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=null-texture-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-texture-view.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-texture-view.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,WAAW,EAAU,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAC/C,OAAO,KAAK,EAAC,WAAW,EAAC,0BAAuB;AAEhD,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;gBAElB,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,GAAG;QAAC,OAAO,EAAE,WAAW,CAAA;KAAC;CAMjF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { TextureView, Texture } from '@luma.gl/core';
|
|
5
|
+
export class NullTextureView extends TextureView {
|
|
6
|
+
device;
|
|
7
|
+
texture;
|
|
8
|
+
constructor(device, props) {
|
|
9
|
+
super(device, { ...Texture.defaultProps, ...props });
|
|
10
|
+
this.device = device;
|
|
11
|
+
this.texture = props.texture;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TextureProps, Sampler, SamplerProps, TextureViewProps } from '@luma.gl/core';
|
|
2
|
+
import { Texture } from '@luma.gl/core';
|
|
3
|
+
import { NullDevice } from "../null-device.js";
|
|
4
|
+
import { NullSampler } from "./null-sampler.js";
|
|
5
|
+
import { NullTextureView } from "./null-texture-view.js";
|
|
6
|
+
export declare class NullTexture extends Texture<TextureProps> {
|
|
7
|
+
readonly device: NullDevice;
|
|
8
|
+
sampler: NullSampler;
|
|
9
|
+
view: NullTextureView;
|
|
10
|
+
constructor(device: NullDevice, props: TextureProps);
|
|
11
|
+
destroy(): void;
|
|
12
|
+
createView(props: TextureViewProps): NullTextureView;
|
|
13
|
+
initialize(props?: TextureProps): this;
|
|
14
|
+
setSampler(sampler?: Sampler | SamplerProps): this;
|
|
15
|
+
resize(options: {
|
|
16
|
+
height: number;
|
|
17
|
+
width: number;
|
|
18
|
+
mipmaps?: boolean;
|
|
19
|
+
}): this;
|
|
20
|
+
setImageData(options: {
|
|
21
|
+
data?: any;
|
|
22
|
+
width?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
}): this;
|
|
25
|
+
setSubImageData(options: {
|
|
26
|
+
data: any;
|
|
27
|
+
width?: number;
|
|
28
|
+
height?: number;
|
|
29
|
+
x?: number;
|
|
30
|
+
y?: number;
|
|
31
|
+
}): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=null-texture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-texture.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-texture.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,OAAO,EAAoB,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,0BAAuB;AAC1C,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAC3C,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,qBAAa,WAAY,SAAQ,OAAO,CAAC,YAAY,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B,OAAO,EAAG,WAAW,CAAC;IACtB,IAAI,EAAG,eAAe,CAAC;gBAEX,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY;IAe1C,OAAO,IAAI,IAAI;IAOxB,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,eAAe;IAIpD,UAAU,CAAC,KAAK,GAAE,YAAiB,GAAG,IAAI;IA6B1C,UAAU,CAAC,OAAO,GAAE,OAAO,GAAG,YAAiB,GAAG,IAAI;IAUtD,MAAM,CAAC,OAAO,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI;IAYzE,YAAY,CAAC,OAAO,EAAE;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAC;IAqBnE,eAAe,CAAC,OAAO,EAAE;QAAC,IAAI,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAA;KAAC;CAM9F"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Texture, assert, loadImage } from '@luma.gl/core';
|
|
5
|
+
import { NullSampler } from "./null-sampler.js";
|
|
6
|
+
import { NullTextureView } from "./null-texture-view.js";
|
|
7
|
+
export class NullTexture extends Texture {
|
|
8
|
+
device;
|
|
9
|
+
sampler;
|
|
10
|
+
view;
|
|
11
|
+
constructor(device, props) {
|
|
12
|
+
super(device, props);
|
|
13
|
+
this.device = device;
|
|
14
|
+
// Signature: new Texture2D(gl, {data: url})
|
|
15
|
+
if (typeof this.props?.data === 'string') {
|
|
16
|
+
Object.assign(this.props, { data: loadImage(this.props.data) });
|
|
17
|
+
}
|
|
18
|
+
this.initialize(this.props);
|
|
19
|
+
Object.seal(this);
|
|
20
|
+
}
|
|
21
|
+
destroy() {
|
|
22
|
+
if (!this.destroyed) {
|
|
23
|
+
super.destroy();
|
|
24
|
+
this.trackDeallocatedMemory('Texture');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
createView(props) {
|
|
28
|
+
return new NullTextureView(this.device, { ...props, texture: this });
|
|
29
|
+
}
|
|
30
|
+
initialize(props = {}) {
|
|
31
|
+
const data = props.data;
|
|
32
|
+
if (data instanceof Promise) {
|
|
33
|
+
data.then(resolvedImageData => this.initialize(Object.assign({}, props, {
|
|
34
|
+
pixels: resolvedImageData,
|
|
35
|
+
data: resolvedImageData
|
|
36
|
+
})));
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
this.setImageData(props);
|
|
40
|
+
this.setSampler(props.sampler);
|
|
41
|
+
this.view = new NullTextureView(this.device, {
|
|
42
|
+
...props,
|
|
43
|
+
texture: this,
|
|
44
|
+
mipLevelCount: 1,
|
|
45
|
+
arrayLayerCount: 1
|
|
46
|
+
});
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
setSampler(sampler = {}) {
|
|
50
|
+
if (sampler instanceof NullSampler) {
|
|
51
|
+
this.sampler = sampler;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.sampler = new NullSampler(this.device, sampler);
|
|
55
|
+
}
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
resize(options) {
|
|
59
|
+
const { height, width, mipmaps = false } = options;
|
|
60
|
+
if (width !== this.width || height !== this.height) {
|
|
61
|
+
return this.initialize({
|
|
62
|
+
width,
|
|
63
|
+
height,
|
|
64
|
+
mipmaps
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
setImageData(options) {
|
|
70
|
+
this.trackDeallocatedMemory('Texture');
|
|
71
|
+
const { data } = options;
|
|
72
|
+
if (data && data.byteLength) {
|
|
73
|
+
this.trackAllocatedMemory(data.byteLength, 'Texture');
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const bytesPerPixel = 4;
|
|
77
|
+
this.trackAllocatedMemory(this.width * this.height * bytesPerPixel, 'Texture');
|
|
78
|
+
}
|
|
79
|
+
const width = options.width ?? data.width;
|
|
80
|
+
const height = options.height ?? data.height;
|
|
81
|
+
this.width = width;
|
|
82
|
+
this.height = height;
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
setSubImageData(options) {
|
|
86
|
+
const { data, x = 0, y = 0 } = options;
|
|
87
|
+
const width = options.width ?? data.width;
|
|
88
|
+
const height = options.height ?? data.height;
|
|
89
|
+
assert(width + x <= this.width && height + y <= this.height);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PrimitiveTopology, ShaderLayout, TransformFeedbackProps } from '@luma.gl/core';
|
|
2
|
+
import { TransformFeedback, Buffer, BufferRange } from '@luma.gl/core';
|
|
3
|
+
import type { NullDevice } from "../null-device.js";
|
|
4
|
+
export declare class NullTransformFeedback extends TransformFeedback {
|
|
5
|
+
readonly device: NullDevice;
|
|
6
|
+
readonly layout: ShaderLayout;
|
|
7
|
+
buffers: Record<string, Buffer | BufferRange>;
|
|
8
|
+
constructor(device: NullDevice, props: TransformFeedbackProps);
|
|
9
|
+
begin(topology?: PrimitiveTopology): void;
|
|
10
|
+
end(): void;
|
|
11
|
+
setBuffers(buffers: Record<string, Buffer | BufferRange>): void;
|
|
12
|
+
setBuffer(locationOrName: string | number, bufferOrRange: Buffer | BufferRange): void;
|
|
13
|
+
getBuffer(locationOrName: string | number): Buffer | BufferRange | null;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=null-transform-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-transform-feedback.d.ts","sourceRoot":"","sources":["../../../src/null-device/resources/null-transform-feedback.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,YAAY,EAAE,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAC,iBAAiB,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAC,UAAU,EAAC,0BAAuB;AAE/C,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,CAAM;gBAEvC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,sBAAsB;IAY7D,KAAK,CAAC,QAAQ,GAAE,iBAAgC,GAAG,IAAI;IAEvD,GAAG,IAAI,IAAI;IAEX,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG,IAAI;IAQ/D,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAIrF,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI;CAGxE"}
|