@aics/agave-webclient 1.6.4 → 1.7.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/es/agave.js +25 -0
- package/es/commandbuffer.js +3 -1
- package/es/types/agave.d.ts +13 -0
- package/es/types/commandbuffer.d.ts +2 -0
- package/package.json +1 -1
package/es/agave.js
CHANGED
|
@@ -772,6 +772,31 @@ export var AgaveClient = /*#__PURE__*/function () {
|
|
|
772
772
|
this.cb.addCommand("SHOW_SCALE_BAR", on);
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Flip the volume data on any axis
|
|
777
|
+
* @param x -1 to flip, 1 to not flip
|
|
778
|
+
* @param y -1 to flip, 1 to not flip
|
|
779
|
+
* @param z -1 to flip, 1 to not flip
|
|
780
|
+
*/
|
|
781
|
+
}, {
|
|
782
|
+
key: "setFlipAxis",
|
|
783
|
+
value: function setFlipAxis(x, y, z) {
|
|
784
|
+
// 46
|
|
785
|
+
this.cb.addCommand("SET_FLIP_AXIS", x, y, z);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Turn volume sampling interpolation on or off
|
|
790
|
+
*
|
|
791
|
+
* @param on 0 to turn off, 1 to turn on
|
|
792
|
+
*/
|
|
793
|
+
}, {
|
|
794
|
+
key: "setInterpolation",
|
|
795
|
+
value: function setInterpolation(on) {
|
|
796
|
+
// 47
|
|
797
|
+
this.cb.addCommand("SET_INTERPOLATION", on);
|
|
798
|
+
}
|
|
799
|
+
|
|
775
800
|
// send all data in our current command buffer to the server
|
|
776
801
|
}, {
|
|
777
802
|
key: "flushCommandBuffer",
|
package/es/commandbuffer.js
CHANGED
|
@@ -87,7 +87,9 @@ export var COMMANDS = {
|
|
|
87
87
|
TRACKBALL_CAMERA: [43, "F32", "F32"],
|
|
88
88
|
// path, scene, multiresolution level, t, channel indices, region
|
|
89
89
|
LOAD_DATA: [44, "S", "I32", "I32", "I32", "I32A", "I32A"],
|
|
90
|
-
SHOW_SCALE_BAR: [45, "I32"]
|
|
90
|
+
SHOW_SCALE_BAR: [45, "I32"],
|
|
91
|
+
SET_FLIP_AXIS: [46, "I32", "I32", "I32"],
|
|
92
|
+
SET_INTERPOLATION: [47, "I32"]
|
|
91
93
|
};
|
|
92
94
|
|
|
93
95
|
// strategy: add elements to prebuffer, and then traverse prebuffer to convert
|
package/es/types/agave.d.ts
CHANGED
|
@@ -376,5 +376,18 @@ export declare class AgaveClient {
|
|
|
376
376
|
* @param on 0 to hide scale bar, 1 to show it
|
|
377
377
|
*/
|
|
378
378
|
showScaleBar(on: number): void;
|
|
379
|
+
/**
|
|
380
|
+
* Flip the volume data on any axis
|
|
381
|
+
* @param x -1 to flip, 1 to not flip
|
|
382
|
+
* @param y -1 to flip, 1 to not flip
|
|
383
|
+
* @param z -1 to flip, 1 to not flip
|
|
384
|
+
*/
|
|
385
|
+
setFlipAxis(x: number, y: number, z: number): void;
|
|
386
|
+
/**
|
|
387
|
+
* Turn volume sampling interpolation on or off
|
|
388
|
+
*
|
|
389
|
+
* @param on 0 to turn off, 1 to turn on
|
|
390
|
+
*/
|
|
391
|
+
setInterpolation(on: number): void;
|
|
379
392
|
flushCommandBuffer(): void;
|
|
380
393
|
}
|
|
@@ -46,6 +46,8 @@ export declare const COMMANDS: {
|
|
|
46
46
|
TRACKBALL_CAMERA: (string | number)[];
|
|
47
47
|
LOAD_DATA: (string | number)[];
|
|
48
48
|
SHOW_SCALE_BAR: (string | number)[];
|
|
49
|
+
SET_FLIP_AXIS: (string | number)[];
|
|
50
|
+
SET_INTERPOLATION: (string | number)[];
|
|
49
51
|
};
|
|
50
52
|
export declare class CommandBuffer {
|
|
51
53
|
private prebuffer;
|