@idetik/core 0.20.3 → 0.21.0
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/assets/worker_kernel-Der8Z2GI.js.map +1 -1
- package/dist/index.d.ts +37 -33
- package/dist/index.js +10156 -3515
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +185 -59
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/src/core/layer.d.ts +3 -3
- package/dist/types/src/core/layer.d.ts.map +1 -1
- package/dist/types/src/core/renderer.d.ts +1 -0
- package/dist/types/src/core/renderer.d.ts.map +1 -1
- package/dist/types/src/data/ome_zarr/0.4/image.d.ts +4 -4
- package/dist/types/src/data/ome_zarr/0.4/plate.d.ts +4 -4
- package/dist/types/src/data/ome_zarr/0.5/image.d.ts +4 -4
- package/dist/types/src/idetik.d.ts +5 -1
- package/dist/types/src/idetik.d.ts.map +1 -1
- package/dist/types/src/objects/textures/texture.d.ts +2 -0
- package/dist/types/src/objects/textures/texture.d.ts.map +1 -1
- package/dist/types/src/renderers/webgpu/webgpu_bindings.d.ts +13 -0
- package/dist/types/src/renderers/webgpu/webgpu_bindings.d.ts.map +1 -0
- package/dist/types/src/renderers/webgpu/webgpu_dynamic_buffer.d.ts +17 -0
- package/dist/types/src/renderers/webgpu/webgpu_dynamic_buffer.d.ts.map +1 -0
- package/dist/types/src/renderers/webgpu/webgpu_geometry_buffers.d.ts +17 -0
- package/dist/types/src/renderers/webgpu/webgpu_geometry_buffers.d.ts.map +1 -0
- package/dist/types/src/renderers/webgpu/webgpu_pipelines.d.ts +42 -0
- package/dist/types/src/renderers/webgpu/webgpu_pipelines.d.ts.map +1 -0
- package/dist/types/src/renderers/webgpu/webgpu_renderer.d.ts +41 -0
- package/dist/types/src/renderers/webgpu/webgpu_renderer.d.ts.map +1 -0
- package/dist/types/src/renderers/webgpu/webgpu_texture_pool.d.ts +12 -0
- package/dist/types/src/renderers/webgpu/webgpu_texture_pool.d.ts.map +1 -0
- package/dist/types/src/utilities/logger.d.ts +1 -1
- package/dist/types/src/utilities/logger.d.ts.map +1 -1
- package/package.json +4 -2
|
@@ -3,12 +3,12 @@ import { RenderableObject } from "./renderable_object";
|
|
|
3
3
|
import { EventContext } from "./event_dispatcher";
|
|
4
4
|
import { Viewport } from "./viewport";
|
|
5
5
|
export type LayerState = "initialized" | "loading" | "ready";
|
|
6
|
-
export type
|
|
6
|
+
export type BlendMode = "none" | "normal" | "additive" | "subtractive" | "multiply" | "premultiplied";
|
|
7
7
|
type StateChangeCallback = (newState: LayerState, prevState?: LayerState) => void;
|
|
8
8
|
export interface LayerOptions {
|
|
9
9
|
transparent?: boolean;
|
|
10
10
|
opacity?: number;
|
|
11
|
-
blendMode?:
|
|
11
|
+
blendMode?: BlendMode;
|
|
12
12
|
}
|
|
13
13
|
export type RenderContext = {
|
|
14
14
|
viewport: Viewport;
|
|
@@ -20,7 +20,7 @@ export declare abstract class Layer {
|
|
|
20
20
|
private readonly callbacks_;
|
|
21
21
|
transparent: boolean;
|
|
22
22
|
private opacity_;
|
|
23
|
-
blendMode:
|
|
23
|
+
blendMode: BlendMode;
|
|
24
24
|
constructor({ transparent, opacity, blendMode, }?: LayerOptions);
|
|
25
25
|
get opacity(): number;
|
|
26
26
|
set opacity(value: number);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../../src/core/layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAC7D,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,UAAU,GACV,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AAiB;IAYpB,IAAW,OAAO,IAIQ,MAAM,CAF/B;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,MAAM,EAQ/B;aAEe,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IAE9C,OAAO,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI;IAMxB,UAAU,CAAC,QAAQ,EAAE,aAAa;IAExC,UAAU,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAEhD,IAAW,OAAO,uBAEjB;IAED,IAAW,KAAK,eAEf;IAEM,sBAAsB,CAAC,QAAQ,EAAE,mBAAmB;IAIpD,yBAAyB,CAAC,QAAQ,EAAE,mBAAmB;IAQvD,eAAe,IAAI,OAAO;IAIjC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU;IAMvC,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,gBAAgB;IAI5C,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,gBAAgB;IAO/C,SAAS,CAAC,YAAY;IAItB;;;OAGG;IACI,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAG9C"}
|
|
@@ -12,6 +12,7 @@ export declare abstract class Renderer {
|
|
|
12
12
|
protected abstract renderObject(layer: Layer, objectIndex: number, camera: Camera): void;
|
|
13
13
|
protected abstract clear(): void;
|
|
14
14
|
constructor(canvas: HTMLCanvasElement);
|
|
15
|
+
beginFrame(): void;
|
|
15
16
|
abstract render(viewport: Viewport): void;
|
|
16
17
|
updateSize(): void;
|
|
17
18
|
private updateRendererSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../src/core/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;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AE,MAAM,GACb,IAAI;IACP,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,IAAI;gBAEpB,MAAM,EAAE,iBAAiB;IAK9B,UAAU,IAAI,IAAI;aAET,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAEzC,UAAU,IAAI,IAAI;IAKzB,OAAO,CAAC,kBAAkB;IAQ1B,SAAS,KAAK,MAAM,sBAEnB;IAED,IAAW,KAAK,WAEf;IAED,IAAW,MAAM,WAEhB;IAED,IAAW,eAAe,IAAI,KAAK,CAElC;IAED,IAAW,eAAe,WAEzB;IAED,IAAW,eAAe,CAAC,KAAK,EAAE,SAAS,EAE1C;CACF"}
|
|
@@ -23,18 +23,18 @@ export declare const Image: z.ZodObject<{
|
|
|
23
23
|
coordinateTransformations: any[];
|
|
24
24
|
}[];
|
|
25
25
|
axes: any[];
|
|
26
|
+
version?: "0.4" | undefined;
|
|
26
27
|
name?: string | undefined;
|
|
27
28
|
coordinateTransformations?: any[] | undefined;
|
|
28
|
-
version?: "0.4" | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
datasets: {
|
|
31
31
|
path: string;
|
|
32
32
|
coordinateTransformations: any[];
|
|
33
33
|
}[];
|
|
34
34
|
axes: any[];
|
|
35
|
+
version?: "0.4" | undefined;
|
|
35
36
|
name?: string | undefined;
|
|
36
37
|
coordinateTransformations?: any[] | undefined;
|
|
37
|
-
version?: "0.4" | undefined;
|
|
38
38
|
}>, "many">;
|
|
39
39
|
omero: z.ZodOptional<z.ZodObject<{
|
|
40
40
|
channels: z.ZodArray<z.ZodObject<{
|
|
@@ -143,9 +143,9 @@ export declare const Image: z.ZodObject<{
|
|
|
143
143
|
coordinateTransformations: any[];
|
|
144
144
|
}[];
|
|
145
145
|
axes: any[];
|
|
146
|
+
version?: "0.4" | undefined;
|
|
146
147
|
name?: string | undefined;
|
|
147
148
|
coordinateTransformations?: any[] | undefined;
|
|
148
|
-
version?: "0.4" | undefined;
|
|
149
149
|
}[];
|
|
150
150
|
omero?: {
|
|
151
151
|
channels: {
|
|
@@ -174,9 +174,9 @@ export declare const Image: z.ZodObject<{
|
|
|
174
174
|
coordinateTransformations: any[];
|
|
175
175
|
}[];
|
|
176
176
|
axes: any[];
|
|
177
|
+
version?: "0.4" | undefined;
|
|
177
178
|
name?: string | undefined;
|
|
178
179
|
coordinateTransformations?: any[] | undefined;
|
|
179
|
-
version?: "0.4" | undefined;
|
|
180
180
|
}[];
|
|
181
181
|
omero?: {
|
|
182
182
|
channels: {
|
|
@@ -84,8 +84,8 @@ export declare const Plate: z.ZodObject<{
|
|
|
84
84
|
rowIndex: number;
|
|
85
85
|
columnIndex: number;
|
|
86
86
|
}[];
|
|
87
|
-
name?: string | undefined;
|
|
88
87
|
version?: "0.4" | undefined;
|
|
88
|
+
name?: string | undefined;
|
|
89
89
|
acquisitions?: {
|
|
90
90
|
id: number;
|
|
91
91
|
name?: string | undefined;
|
|
@@ -107,8 +107,8 @@ export declare const Plate: z.ZodObject<{
|
|
|
107
107
|
rowIndex: number;
|
|
108
108
|
columnIndex: number;
|
|
109
109
|
}[];
|
|
110
|
-
name?: string | undefined;
|
|
111
110
|
version?: "0.4" | undefined;
|
|
111
|
+
name?: string | undefined;
|
|
112
112
|
acquisitions?: {
|
|
113
113
|
id: number;
|
|
114
114
|
name?: string | undefined;
|
|
@@ -132,8 +132,8 @@ export declare const Plate: z.ZodObject<{
|
|
|
132
132
|
rowIndex: number;
|
|
133
133
|
columnIndex: number;
|
|
134
134
|
}[];
|
|
135
|
-
name?: string | undefined;
|
|
136
135
|
version?: "0.4" | undefined;
|
|
136
|
+
name?: string | undefined;
|
|
137
137
|
acquisitions?: {
|
|
138
138
|
id: number;
|
|
139
139
|
name?: string | undefined;
|
|
@@ -157,8 +157,8 @@ export declare const Plate: z.ZodObject<{
|
|
|
157
157
|
rowIndex: number;
|
|
158
158
|
columnIndex: number;
|
|
159
159
|
}[];
|
|
160
|
-
name?: string | undefined;
|
|
161
160
|
version?: "0.4" | undefined;
|
|
161
|
+
name?: string | undefined;
|
|
162
162
|
acquisitions?: {
|
|
163
163
|
id: number;
|
|
164
164
|
name?: string | undefined;
|
|
@@ -138,6 +138,7 @@ export declare const Image: z.ZodObject<{
|
|
|
138
138
|
/**The version of the OME-Zarr Metadata*/
|
|
139
139
|
version: z.ZodLiteral<"0.5">;
|
|
140
140
|
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
version: "0.5";
|
|
141
142
|
multiscales: {
|
|
142
143
|
datasets: {
|
|
143
144
|
path: string;
|
|
@@ -147,7 +148,6 @@ export declare const Image: z.ZodObject<{
|
|
|
147
148
|
name?: string | undefined;
|
|
148
149
|
coordinateTransformations?: any[] | undefined;
|
|
149
150
|
}[];
|
|
150
|
-
version: "0.5";
|
|
151
151
|
omero?: {
|
|
152
152
|
channels: {
|
|
153
153
|
color?: string | undefined;
|
|
@@ -169,6 +169,7 @@ export declare const Image: z.ZodObject<{
|
|
|
169
169
|
} | undefined;
|
|
170
170
|
} | undefined;
|
|
171
171
|
}, {
|
|
172
|
+
version: "0.5";
|
|
172
173
|
multiscales: {
|
|
173
174
|
datasets: {
|
|
174
175
|
path: string;
|
|
@@ -178,7 +179,6 @@ export declare const Image: z.ZodObject<{
|
|
|
178
179
|
name?: string | undefined;
|
|
179
180
|
coordinateTransformations?: any[] | undefined;
|
|
180
181
|
}[];
|
|
181
|
-
version: "0.5";
|
|
182
182
|
omero?: {
|
|
183
183
|
channels: {
|
|
184
184
|
color?: string | undefined;
|
|
@@ -202,6 +202,7 @@ export declare const Image: z.ZodObject<{
|
|
|
202
202
|
}>;
|
|
203
203
|
}, "strip", z.ZodTypeAny, {
|
|
204
204
|
ome: {
|
|
205
|
+
version: "0.5";
|
|
205
206
|
multiscales: {
|
|
206
207
|
datasets: {
|
|
207
208
|
path: string;
|
|
@@ -211,7 +212,6 @@ export declare const Image: z.ZodObject<{
|
|
|
211
212
|
name?: string | undefined;
|
|
212
213
|
coordinateTransformations?: any[] | undefined;
|
|
213
214
|
}[];
|
|
214
|
-
version: "0.5";
|
|
215
215
|
omero?: {
|
|
216
216
|
channels: {
|
|
217
217
|
color?: string | undefined;
|
|
@@ -235,6 +235,7 @@ export declare const Image: z.ZodObject<{
|
|
|
235
235
|
};
|
|
236
236
|
}, {
|
|
237
237
|
ome: {
|
|
238
|
+
version: "0.5";
|
|
238
239
|
multiscales: {
|
|
239
240
|
datasets: {
|
|
240
241
|
path: string;
|
|
@@ -244,7 +245,6 @@ export declare const Image: z.ZodObject<{
|
|
|
244
245
|
name?: string | undefined;
|
|
245
246
|
coordinateTransformations?: any[] | undefined;
|
|
246
247
|
}[];
|
|
247
|
-
version: "0.5";
|
|
248
248
|
omero?: {
|
|
249
249
|
channels: {
|
|
250
250
|
color?: string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChunkManager } from "./core/chunk_manager";
|
|
2
|
+
import { Renderer } from "./core/renderer";
|
|
2
3
|
import { Viewport, ViewportConfig } from "./core/viewport";
|
|
3
4
|
export type Overlay = {
|
|
4
5
|
update(idetik: Idetik): void;
|
|
@@ -70,7 +71,10 @@ export declare class Idetik {
|
|
|
70
71
|
*
|
|
71
72
|
* @throws {Error} If viewports have duplicate IDs or shared elements
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
static create(params: IdetikParams & {
|
|
75
|
+
renderer?: "webgl" | "webgpu-experimental";
|
|
76
|
+
}): Promise<Idetik>;
|
|
77
|
+
constructor(params: IdetikParams, renderer?: Renderer);
|
|
74
78
|
get chunkQueueStats(): import(".").QueueStats;
|
|
75
79
|
get renderedObjects(): number;
|
|
76
80
|
get width(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idetik.d.ts","sourceRoot":"","sources":["../../../src/idetik.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"idetik.d.ts","sourceRoot":"","sources":["../../../src/idetik.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,sBA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,eAAe,WAEzB;IAED,IAAW,KAAK,WAEf;IAED,IAAW,MAAM,WAEhB;IAED,IAAW,SAAS,IAAI,SAAS,QAAQ,EAAE,CAE1C;IAED,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAI7C,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,QAAQ;IAqB7C,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAuB3C,KAAK;IAkBZ,OAAO,CAAC,OAAO;IA0BR,IAAI;CAcZ"}
|
|
@@ -7,6 +7,8 @@ export type TextureUnpackRowAlignment = 1 | 2 | 4 | 8;
|
|
|
7
7
|
export type DataTextureTypedArray = Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Float32Array;
|
|
8
8
|
export declare function isTextureUnpackRowAlignment(value: number): value is TextureUnpackRowAlignment;
|
|
9
9
|
export declare function bufferToDataType(buffer: DataTextureTypedArray): TextureDataType;
|
|
10
|
+
export declare function textureChannelCount(texture: Texture): 1 | 3 | 4;
|
|
11
|
+
export declare function textureBytesPerChannel(texture: Texture): 1 | 2 | 4;
|
|
10
12
|
export declare function textureDefaultValueRange(texture: Texture): [number, number];
|
|
11
13
|
export declare abstract class Texture extends Node {
|
|
12
14
|
dataFormat: TextureDataFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texture.d.ts","sourceRoot":"","sources":["../../../../../src/objects/textures/texture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,eAAe,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,eAAe,GACvB,MAAM,GACN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,eAAe,GAAG,IAAI,CAAC;IACpE,aAAoB,IAAI,CAAC,IAAI,EAAE,qBAAqB,EAAE;IAEtD,IAAW,IAAI,WAEd;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WebGPUPipeline } from "./webgpu_pipelines";
|
|
2
|
+
export default class WebGPUBindings {
|
|
3
|
+
private readonly device_;
|
|
4
|
+
private readonly uniformBindings_;
|
|
5
|
+
private readonly textureBindings_;
|
|
6
|
+
constructor(device: GPUDevice);
|
|
7
|
+
clearUniformBindings(): void;
|
|
8
|
+
setUniforms(pass: GPURenderPassEncoder, pipeline: WebGPUPipeline): void;
|
|
9
|
+
setTexture(pass: GPURenderPassEncoder, pipeline: WebGPUPipeline, texture: GPUTexture): void;
|
|
10
|
+
private createUniformsBindGroup;
|
|
11
|
+
private createTexturesBindGroup;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=webgpu_bindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgpu_bindings.d.ts","sourceRoot":"","sources":["../../../../../src/renderers/webgpu/webgpu_bindings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAkBpD,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwB;IACzD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwB;gBAE7C,MAAM,EAAE,SAAS;IAItB,oBAAoB;IAMpB,WAAW,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,cAAc;IAgChE,UAAU,CACf,IAAI,EAAE,oBAAoB,EAC1B,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,UAAU;IAoBrB,OAAO,CAAC,uBAAuB;IAmB/B,OAAO,CAAC,uBAAuB;CAchC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default class WebGPUDynamicBuffer {
|
|
2
|
+
private readonly device_;
|
|
3
|
+
private readonly slotSize_;
|
|
4
|
+
private buffer_;
|
|
5
|
+
private capacity_;
|
|
6
|
+
private cursor_;
|
|
7
|
+
private version_;
|
|
8
|
+
private readonly clear_;
|
|
9
|
+
constructor(device: GPUDevice, perObjectDataSize: number);
|
|
10
|
+
clear(): void;
|
|
11
|
+
write(target: Float32Array<ArrayBuffer>): number;
|
|
12
|
+
get buffer(): GPUBuffer;
|
|
13
|
+
get version(): number;
|
|
14
|
+
private resize;
|
|
15
|
+
private createBuffer;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=webgpu_dynamic_buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgpu_dynamic_buffer.d.ts","sourceRoot":"","sources":["../../../../../src/renderers/webgpu/webgpu_dynamic_buffer.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAEnC,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAE9B,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM;IAQjD,KAAK;IAML,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,WAAW,CAAC;IAgB9C,IAAW,MAAM,cAEhB;IAED,IAAW,OAAO,WAEjB;IAED,OAAO,CAAC,MAAM;IAoBd,OAAO,CAAC,YAAY;CASrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Geometry } from "@/core/geometry";
|
|
2
|
+
export type WebGPUGeometryBuffer = {
|
|
3
|
+
geometry: Geometry;
|
|
4
|
+
vertexBuffer: GPUBuffer;
|
|
5
|
+
indexBuffer: GPUBuffer | null;
|
|
6
|
+
attributes: GPUVertexAttribute[];
|
|
7
|
+
attributesKey: string;
|
|
8
|
+
};
|
|
9
|
+
export default class WebGPUGeometryBuffers {
|
|
10
|
+
private readonly device_;
|
|
11
|
+
private readonly buffers_;
|
|
12
|
+
constructor(device: GPUDevice);
|
|
13
|
+
get(geometry: Geometry): WebGPUGeometryBuffer;
|
|
14
|
+
dispose(geometry: Geometry): void;
|
|
15
|
+
disposeAll(): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=webgpu_geometry_buffers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgpu_geometry_buffers.d.ts","sourceRoot":"","sources":["../../../../../src/renderers/webgpu/webgpu_geometry_buffers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA0B,MAAM,iBAAiB,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,SAAS,CAAC;IACxB,WAAW,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;gBAEtC,MAAM,EAAE,SAAS;IAKtB,GAAG,CAAC,QAAQ,EAAE,QAAQ;IAuCtB,OAAO,CAAC,QAAQ,EAAE,QAAQ;IAU1B,UAAU;CAOlB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { WebGPUGeometryBuffer } from "./webgpu_geometry_buffers";
|
|
2
|
+
import { BlendMode } from "@/core/layer";
|
|
3
|
+
import { ShaderDataDefinitions, StructuredView } from "webgpu-utils";
|
|
4
|
+
export type ShaderName = "image_scalar_u32" | "image_scalar_i32" | "image_scalar_f32" | "wireframe";
|
|
5
|
+
export type PipelineKey = {
|
|
6
|
+
shaderName: ShaderName;
|
|
7
|
+
depthWrite: boolean;
|
|
8
|
+
depthTest: boolean;
|
|
9
|
+
stencil: boolean;
|
|
10
|
+
blendMode: BlendMode;
|
|
11
|
+
cullMode: GPUCullMode;
|
|
12
|
+
topology: GPUPrimitiveTopology;
|
|
13
|
+
vertexAttributesStr: string;
|
|
14
|
+
};
|
|
15
|
+
export type WebGPUShaderModule = {
|
|
16
|
+
name: ShaderName;
|
|
17
|
+
module: GPUShaderModule;
|
|
18
|
+
defs: ShaderDataDefinitions;
|
|
19
|
+
layouts: {
|
|
20
|
+
uniforms: GPUBindGroupLayout;
|
|
21
|
+
textures?: GPUBindGroupLayout;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type WebGPUPipeline = {
|
|
25
|
+
key: PipelineKey;
|
|
26
|
+
pipeline: GPURenderPipeline;
|
|
27
|
+
uniformsView: StructuredView;
|
|
28
|
+
uniformsData: Float32Array<ArrayBuffer>;
|
|
29
|
+
shaderModule: WebGPUShaderModule;
|
|
30
|
+
};
|
|
31
|
+
export default class WebGPUPipelines {
|
|
32
|
+
private readonly colorFormat_;
|
|
33
|
+
private readonly depthFormat_;
|
|
34
|
+
private readonly device_;
|
|
35
|
+
private readonly pipelines_;
|
|
36
|
+
private readonly shaderModules_;
|
|
37
|
+
constructor(device: GPUDevice, colorFormat: GPUTextureFormat, depthFormat: GPUTextureFormat);
|
|
38
|
+
compileShader(name: ShaderName): Promise<void>;
|
|
39
|
+
get(key: PipelineKey, geometryBuffer: WebGPUGeometryBuffer): WebGPUPipeline;
|
|
40
|
+
private getCachedPipeline;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=webgpu_pipelines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgpu_pipelines.d.ts","sourceRoot":"","sources":["../../../../../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AAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAuB;gBAGpD,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,gBAAgB,EAC7B,WAAW,EAAE,gBAAgB;IASlB,aAAa,CAAC,IAAI,EAAE,UAAU;IA6CpC,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB;IAwFjE,OAAO,CAAC,iBAAiB;CAa1B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Camera } from "@/objects/cameras/camera";
|
|
2
|
+
import { Layer } from "@/core/layer";
|
|
3
|
+
import { Renderer } from "@/core/renderer";
|
|
4
|
+
import { Viewport } from "@/core/viewport";
|
|
5
|
+
export declare function createWebGPURenderer(canvas: HTMLCanvasElement): Promise<WebGPURenderer>;
|
|
6
|
+
declare class WebGPURenderer extends Renderer {
|
|
7
|
+
private readonly bindings_;
|
|
8
|
+
private readonly geometryBuffers_;
|
|
9
|
+
private readonly pipelines_;
|
|
10
|
+
private readonly texturePool_;
|
|
11
|
+
private readonly colorFormat_;
|
|
12
|
+
private readonly context_;
|
|
13
|
+
private readonly depthFormat_;
|
|
14
|
+
private readonly device_;
|
|
15
|
+
private readonly currentProjection_;
|
|
16
|
+
private readonly currentModelView_;
|
|
17
|
+
private colorMSAATexture_;
|
|
18
|
+
private depthStencilTexture_;
|
|
19
|
+
private passEncoder_;
|
|
20
|
+
private renderedObjectsPerFrame_;
|
|
21
|
+
private needsClear_;
|
|
22
|
+
private currentDepthWrite_;
|
|
23
|
+
private currentStencil_;
|
|
24
|
+
private currentBlendMode_;
|
|
25
|
+
private currentOpacity_;
|
|
26
|
+
constructor(canvas: HTMLCanvasElement, device: GPUDevice);
|
|
27
|
+
compileShaders(): Promise<void>;
|
|
28
|
+
beginFrame(): void;
|
|
29
|
+
render(viewport: Viewport): void;
|
|
30
|
+
private renderLayer;
|
|
31
|
+
protected renderObject(layer: Layer, objectIndex: number, camera: Camera): void;
|
|
32
|
+
private renderWireframe;
|
|
33
|
+
protected resize(width: number, height: number): void;
|
|
34
|
+
private beginRenderPass;
|
|
35
|
+
protected clear(): void;
|
|
36
|
+
private setUniformsForObject;
|
|
37
|
+
private setTexturesForObject;
|
|
38
|
+
private updateProjection;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=webgpu_renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgpu_renderer.d.ts","sourceRoot":"","sources":["../../../../../src/renderers/webgpu/webgpu_renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,KAAK,EAAa,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AA0B3C,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,2BAcnE;AAED,cAAM,cAAe,SAAQ,QAAQ;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwB;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkB;IAC7C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IAEjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmB;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IAEpC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAiB;IACpD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAiB;IAEnD,OAAO,CAAC,iBAAiB,CAA2B;IACpD,OAAO,CAAC,oBAAoB,CAA2B;IACvD,OAAO,CAAC,YAAY,CAAqC;IAEzD,OAAO,CAAC,wBAAwB,CAAK;IACrC,OAAO,CAAC,WAAW,CAAQ;IAI3B,OAAO,CAAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,eAAe,CAAO;gBAElB,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,SAAS;IAiC3C,cAAc;IASX,UAAU;IAMV,MAAM,CAAC,QAAQ,EAAE,QAAQ;IAyDzC,OAAO,CAAC,WAAW;cAiDA,YAAY,CAC7B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM;IAmDhB,OAAO,CAAC,eAAe;cA6CJ,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAwBvD,OAAO,CAAC,eAAe;cA8BJ,KAAK;IAKxB,OAAO,CAAC,oBAAoB;IAyB5B,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,gBAAgB;CAOzB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Texture } from "@/objects/textures/texture";
|
|
2
|
+
export default class WebGPUTexturePool {
|
|
3
|
+
private readonly device_;
|
|
4
|
+
private readonly textures_;
|
|
5
|
+
constructor(device: GPUDevice);
|
|
6
|
+
get(entry: Texture): GPUTexture;
|
|
7
|
+
private upload;
|
|
8
|
+
dispose(texture: Texture): void;
|
|
9
|
+
disposeAll(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function textureGPUFormat(texture: Texture): GPUTextureFormat;
|
|
12
|
+
//# sourceMappingURL=webgpu_texture_pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgpu_texture_pool.d.ts","sourceRoot":"","sources":["../../../../../src/renderers/webgpu/webgpu_texture_pool.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAGR,MAAM,4BAA4B,CAAC;AAOpC,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;gBAEhC,MAAM,EAAE,SAAS;IAKtB,GAAG,CAAC,KAAK,EAAE,OAAO;IAsBzB,OAAO,CAAC,MAAM;IAgBP,OAAO,CAAC,OAAO,EAAE,OAAO;IAQxB,UAAU;CAIlB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAwCnE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type LogLevel = "info" | "warn" | "error" | "debug";
|
|
2
|
-
type Module = "Channel" | "Chunk" | "ChunkManager" | "ChunkManagerSource" | "ChunkQueue" | "ChunkStore" | "ChunkStoreView" | "EventDispatcher" | "Idetik" | "ImageLayer" | "LabelLayer" | "Layer" | "OrbitControls" | "PixelSizeObserver" | "RenderablePool" | "Viewport" | "VolumeLayer" | "VolumeRenderable" | "WebGLRenderer" | "WebGLShaderProgram" | "WebGLTexture" | "WireframeGeometry" | "ZarrWorker";
|
|
2
|
+
type Module = "Channel" | "Chunk" | "ChunkManager" | "ChunkManagerSource" | "ChunkQueue" | "ChunkStore" | "ChunkStoreView" | "EventDispatcher" | "Idetik" | "ImageLayer" | "LabelLayer" | "Layer" | "OrbitControls" | "PixelSizeObserver" | "RenderablePool" | "Viewport" | "VolumeLayer" | "VolumeRenderable" | "WebGLRenderer" | "WebGLShaderProgram" | "WebGLTexture" | "WebGPURenderer" | "WebGPUPipelines" | "WireframeGeometry" | "ZarrWorker";
|
|
3
3
|
export declare function getMode(): "production" | "development" | "test";
|
|
4
4
|
export declare class Logger {
|
|
5
5
|
private static logLevel_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/utilities/logger.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAiBpD,KAAK,MAAM,GACP,SAAS,GACT,OAAO,GACP,cAAc,GACd,oBAAoB,GACpB,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,kBAAkB,GAClB,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,mBAAmB,GACnB,YAAY,CAAC;AAEjB,wBAAgB,OAAO,IAAI,YAAY,GAAG,aAAa,GAAG,MAAM,CA2B/D;AACD,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,SAAS,CACwB;WAElC,WAAW,CAAC,KAAK,EAAE,QAAQ;WAI3B,KAAK,CACjB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;WAKR,IAAI,CAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;WAKR,IAAI,CAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;WAKR,KAAK,CACjB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;IAKtB,OAAO,CAAC,MAAM,CAAC,GAAG;CA4BnB"}
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/utilities/logger.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAiBpD,KAAK,MAAM,GACP,SAAS,GACT,OAAO,GACP,cAAc,GACd,oBAAoB,GACpB,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,kBAAkB,GAClB,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,mBAAmB,GACnB,YAAY,CAAC;AAEjB,wBAAgB,OAAO,IAAI,YAAY,GAAG,aAAa,GAAG,MAAM,CA2B/D;AACD,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,SAAS,CACwB;WAElC,WAAW,CAAC,KAAK,EAAE,QAAQ;WAI3B,KAAK,CACjB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;WAKR,IAAI,CAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;WAKR,IAAI,CAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;WAKR,KAAK,CACjB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,MAAM,EAAE,OAAO,EAAE;IAKtB,OAAO,CAAC,MAAM,CAAC,GAAG;CA4BnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idetik/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"gl-matrix": "^3.4.3",
|
|
49
49
|
"zarrita": "^0.7.1",
|
|
50
|
+
"webgpu-utils": "^2.1.0",
|
|
50
51
|
"zod": "^3.24.1"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
@@ -58,11 +59,12 @@
|
|
|
58
59
|
"@typescript-eslint/parser": "^8.1.0",
|
|
59
60
|
"@vitest/browser": "^3.0.9",
|
|
60
61
|
"@vitest/coverage-istanbul": "^3.0.9",
|
|
62
|
+
"@webgpu/types": "^0.1.69",
|
|
61
63
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
62
64
|
"eslint": "^9.9.0",
|
|
63
65
|
"globals": "^15.9.0",
|
|
64
|
-
"json-schema-to-zod": "^2.6.1",
|
|
65
66
|
"jsdom": "^24.1.1",
|
|
67
|
+
"json-schema-to-zod": "^2.6.1",
|
|
66
68
|
"lil-gui": "^0.20.0",
|
|
67
69
|
"playwright": "1.56.1",
|
|
68
70
|
"prettier": "^3.3.2",
|