@idetik/core 0.40.0 → 0.40.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/assets/worker_kernel-CBlE4MBI.js.map +1 -1
- package/dist/index.d.ts +1717 -381
- package/dist/index.js +981 -193
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +32 -32
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/src/core/channel.d.ts +7 -1
- package/dist/types/src/core/channel.d.ts.map +1 -1
- package/dist/types/src/core/image_source_policy.d.ts +4 -4
- package/dist/types/src/core/image_source_policy.d.ts.map +1 -1
- package/dist/types/src/core/layer.d.ts +136 -21
- package/dist/types/src/core/layer.d.ts.map +1 -1
- package/dist/types/src/core/renderable_object.d.ts +108 -3
- package/dist/types/src/core/renderable_object.d.ts.map +1 -1
- package/dist/types/src/core/viewport.d.ts +82 -2
- package/dist/types/src/core/viewport.d.ts.map +1 -1
- package/dist/types/src/data/chunk.d.ts +37 -2
- package/dist/types/src/data/chunk.d.ts.map +1 -1
- package/dist/types/src/data/chunk_manager.d.ts +5 -0
- package/dist/types/src/data/chunk_manager.d.ts.map +1 -1
- package/dist/types/src/data/ome_zarr/image_source.d.ts +56 -13
- package/dist/types/src/data/ome_zarr/image_source.d.ts.map +1 -1
- package/dist/types/src/data/ome_zarr/metadata_loaders.d.ts +4 -4
- package/dist/types/src/data/ome_zarr/metadata_loaders.d.ts.map +1 -1
- package/dist/types/src/idetik.d.ts +129 -59
- package/dist/types/src/idetik.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +29 -8
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/layers/axes_layer.d.ts +30 -5
- package/dist/types/src/layers/axes_layer.d.ts.map +1 -1
- package/dist/types/src/layers/image_layer.d.ts +106 -12
- package/dist/types/src/layers/image_layer.d.ts.map +1 -1
- package/dist/types/src/layers/label_layer.d.ts +106 -5
- package/dist/types/src/layers/label_layer.d.ts.map +1 -1
- package/dist/types/src/layers/point_picking.d.ts +7 -2
- package/dist/types/src/layers/point_picking.d.ts.map +1 -1
- package/dist/types/src/layers/volume_layer.d.ts +87 -5
- package/dist/types/src/layers/volume_layer.d.ts.map +1 -1
- package/dist/types/src/math/axes.d.ts +3 -0
- package/dist/types/src/math/axes.d.ts.map +1 -1
- package/dist/types/src/math/box2.d.ts +34 -4
- package/dist/types/src/math/box2.d.ts.map +1 -1
- package/dist/types/src/math/box3.d.ts +38 -4
- package/dist/types/src/math/box3.d.ts.map +1 -1
- package/dist/types/src/math/color.d.ts +49 -2
- package/dist/types/src/math/color.d.ts.map +1 -1
- package/dist/types/src/math/frustum.d.ts +28 -0
- package/dist/types/src/math/frustum.d.ts.map +1 -1
- package/dist/types/src/math/transforms.d.ts +57 -0
- package/dist/types/src/math/transforms.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/camera.d.ts +55 -0
- package/dist/types/src/objects/cameras/camera.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/controls.d.ts +88 -1
- package/dist/types/src/objects/cameras/controls.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/orbit_controls.d.ts +56 -1
- package/dist/types/src/objects/cameras/orbit_controls.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/orthographic_camera.d.ts +90 -13
- package/dist/types/src/objects/cameras/orthographic_camera.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/perspective_camera.d.ts +65 -3
- package/dist/types/src/objects/cameras/perspective_camera.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/image_renderable.d.ts +48 -3
- package/dist/types/src/objects/renderable/image_renderable.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/label_image_renderable.d.ts +66 -4
- package/dist/types/src/objects/renderable/label_image_renderable.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/points_renderable.d.ts +47 -2
- package/dist/types/src/objects/renderable/points_renderable.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/projected_line_renderable.d.ts +27 -3
- package/dist/types/src/objects/renderable/projected_line_renderable.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/volume_renderable.d.ts +63 -3
- package/dist/types/src/objects/renderable/volume_renderable.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,29 +2,89 @@ import { RenderableObject } from "../../core/renderable_object";
|
|
|
2
2
|
import { ChannelProps } from "../../core/channel";
|
|
3
3
|
import { vec3 } from "gl-matrix";
|
|
4
4
|
import type { Chunk } from "../../data/chunk";
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Initialization properties for constructing a volume renderable.
|
|
7
|
+
*/
|
|
8
|
+
export type VolumeRenderableProps = {
|
|
9
|
+
/** Channel appearance settings. Defaults to `[]`. */
|
|
6
10
|
channelProps?: ChannelProps[];
|
|
7
11
|
};
|
|
8
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* A ray-marched box that draws multi-channel volumetric data.
|
|
14
|
+
*
|
|
15
|
+
* The renderable draws a unit box and ray marches through 3D chunk
|
|
16
|
+
* textures in the fragment shader. Up to 4 channels blend in a single
|
|
17
|
+
* pass and all loaded channels must share one texture data type. Front
|
|
18
|
+
* faces are culled and depth testing is off by default.
|
|
19
|
+
* {@link VolumeLayer} constructs and pools one instance per spatial chunk
|
|
20
|
+
* group, streams chunk textures in with {@link updateVolumeWithChunk},
|
|
21
|
+
* and sizes the box through the transform.
|
|
22
|
+
*
|
|
23
|
+
* @group Renderables
|
|
24
|
+
*/
|
|
9
25
|
export declare class VolumeRenderable extends RenderableObject {
|
|
26
|
+
/**
|
|
27
|
+
* World size of a voxel along each axis. Layers set it from the chunk
|
|
28
|
+
* scale so ray march steps account for anisotropic voxels. Defaults to
|
|
29
|
+
* `[1, 1, 1]`.
|
|
30
|
+
*/
|
|
10
31
|
voxelScale: vec3;
|
|
11
32
|
private channels_;
|
|
12
33
|
private loadedChannels_;
|
|
13
34
|
private readonly channelToTextureIndex_;
|
|
35
|
+
/**
|
|
36
|
+
* Creates an empty volume renderable.
|
|
37
|
+
*
|
|
38
|
+
* @param props - Initialization properties.
|
|
39
|
+
*/
|
|
14
40
|
constructor({ channelProps }?: VolumeRenderableProps);
|
|
41
|
+
/** Identifies the renderable type as `VolumeRenderable`. */
|
|
15
42
|
get type(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Loads or refreshes the texture for the chunk's channel. The channel
|
|
45
|
+
* index comes from the chunk and the texture's data type selects the
|
|
46
|
+
* volume shader, so every channel must share one data type. Chunks
|
|
47
|
+
* without a texture are ignored.
|
|
48
|
+
*
|
|
49
|
+
* @param chunk - The chunk holding the channel texture.
|
|
50
|
+
*/
|
|
16
51
|
updateVolumeWithChunk(chunk: Chunk): void;
|
|
17
52
|
private addChannelTexture;
|
|
18
53
|
private updateChannelTexture;
|
|
54
|
+
/**
|
|
55
|
+
* Marks all channels as not loaded so they stop rendering until the
|
|
56
|
+
* next chunk update. The textures themselves are kept.
|
|
57
|
+
*/
|
|
19
58
|
clearLoadedChannels(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Clears all textures and channel state so the renderable can be
|
|
61
|
+
* pooled and reused for another chunk.
|
|
62
|
+
*/
|
|
20
63
|
reset(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Returns per-channel sampler, color, contrast, opacity, and
|
|
66
|
+
* visibility uniforms for up to 4 loaded channels plus the voxel
|
|
67
|
+
* scale.
|
|
68
|
+
*/
|
|
21
69
|
getUniforms(): Record<string, number[] | number>;
|
|
22
70
|
/**
|
|
23
71
|
* Get an available texture for a channel. If desiredChannelIndex is provided, it will try to return the texture for that channel index. If that texture is not available, or no desiredChannelIndex is passed, return the first available channel texture. This is used to determine which texture to use when updating channel properties, since channel properties can be updated even if the channel's texture hasn't been loaded yet. If no textures are available, it returns null, which signals that default contrast limits should be used when validating the channel properties.
|
|
24
72
|
*/
|
|
25
73
|
private getAvailableChannelTexture;
|
|
74
|
+
/**
|
|
75
|
+
* Replaces the appearance settings for all channels.
|
|
76
|
+
*
|
|
77
|
+
* @param channels - The new channel settings.
|
|
78
|
+
*/
|
|
26
79
|
setChannelProps(channels: ChannelProps[]): void;
|
|
80
|
+
/**
|
|
81
|
+
* Updates one property of the channel at the given index and
|
|
82
|
+
* revalidates it against the channel's texture when available.
|
|
83
|
+
*
|
|
84
|
+
* @param channelIndex - The channel to update.
|
|
85
|
+
* @param property - The property name to set.
|
|
86
|
+
* @param value - The new value.
|
|
87
|
+
*/
|
|
27
88
|
setChannelProperty<K extends keyof ChannelProps>(channelIndex: number, property: K, value: Required<ChannelProps>[K]): void;
|
|
28
89
|
}
|
|
29
|
-
export {};
|
|
30
90
|
//# sourceMappingURL=volume_renderable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volume_renderable.d.ts","sourceRoot":"","sources":["../../../../../src/objects/renderable/volume_renderable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,EAEL,YAAY,EAGb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,
|
|
1
|
+
{"version":3,"file":"volume_renderable.d.ts","sourceRoot":"","sources":["../../../../../src/objects/renderable/volume_renderable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,EAEL,YAAY,EAGb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,qDAAqD;IACrD,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,qBAAa,gBAAiB,SAAQ,gBAAgB;IACpD;;;;OAIG;IACI,UAAU,EA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