@aics/agave-webclient 1.7.2 → 1.8.0-rc.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 +31 -0
- package/es/commandbuffer.js +4 -1
- package/es/types/agave.d.ts +19 -0
- package/es/types/commandbuffer.d.ts +2 -0
- package/package.json +2 -2
package/es/agave.js
CHANGED
|
@@ -797,6 +797,37 @@ export var AgaveClient = /*#__PURE__*/function () {
|
|
|
797
797
|
this.cb.addCommand("SET_INTERPOLATION", on);
|
|
798
798
|
}
|
|
799
799
|
|
|
800
|
+
/**
|
|
801
|
+
* Set the clip plane equation. The xyz vector must be normalized.
|
|
802
|
+
*
|
|
803
|
+
* @param x The x component of the normal
|
|
804
|
+
* @param y The y component of the normal
|
|
805
|
+
* @param z The z component of the normal
|
|
806
|
+
* @param d The distance to the origin
|
|
807
|
+
*/
|
|
808
|
+
}, {
|
|
809
|
+
key: "setClipPlane",
|
|
810
|
+
value: function setClipPlane(x, y, z, d) {
|
|
811
|
+
// 48
|
|
812
|
+
this.cb.addCommand("SET_CLIP_PLANE", x, y, z, d);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Set the color ramp for a channel
|
|
817
|
+
*
|
|
818
|
+
* @param channel Which channel index, 0 based.
|
|
819
|
+
* @param name The name of the color ramp
|
|
820
|
+
* @param data An array of values. 5 floats per control point. first is position (0-1),
|
|
821
|
+
* next four are rgba (all 0-1). Currently alpha will be ignored.
|
|
822
|
+
* To guarantee correct behavior, the first control point should be at 0.0 and the last at 1.0.
|
|
823
|
+
*/
|
|
824
|
+
}, {
|
|
825
|
+
key: "setColorRamp",
|
|
826
|
+
value: function setColorRamp(channel, name, data) {
|
|
827
|
+
// 49
|
|
828
|
+
this.cb.addCommand("SET_COLOR_RAMP", channel, name, data);
|
|
829
|
+
}
|
|
830
|
+
|
|
800
831
|
// send all data in our current command buffer to the server
|
|
801
832
|
}, {
|
|
802
833
|
key: "flushCommandBuffer",
|
package/es/commandbuffer.js
CHANGED
|
@@ -89,7 +89,10 @@ export var COMMANDS = {
|
|
|
89
89
|
LOAD_DATA: [44, "S", "I32", "I32", "I32", "I32A", "I32A"],
|
|
90
90
|
SHOW_SCALE_BAR: [45, "I32"],
|
|
91
91
|
SET_FLIP_AXIS: [46, "I32", "I32", "I32"],
|
|
92
|
-
SET_INTERPOLATION: [47, "I32"]
|
|
92
|
+
SET_INTERPOLATION: [47, "I32"],
|
|
93
|
+
SET_CLIP_PLANE: [48, "F32", "F32", "F32", "F32"],
|
|
94
|
+
// channel index, name, array of [stop, r, g, b, a]
|
|
95
|
+
SET_COLOR_RAMP: [49, "I32", "S", "F32A"]
|
|
93
96
|
};
|
|
94
97
|
|
|
95
98
|
// strategy: add elements to prebuffer, and then traverse prebuffer to convert
|
package/es/types/agave.d.ts
CHANGED
|
@@ -389,5 +389,24 @@ export declare class AgaveClient {
|
|
|
389
389
|
* @param on 0 to turn off, 1 to turn on
|
|
390
390
|
*/
|
|
391
391
|
setInterpolation(on: number): void;
|
|
392
|
+
/**
|
|
393
|
+
* Set the clip plane equation. The xyz vector must be normalized.
|
|
394
|
+
*
|
|
395
|
+
* @param x The x component of the normal
|
|
396
|
+
* @param y The y component of the normal
|
|
397
|
+
* @param z The z component of the normal
|
|
398
|
+
* @param d The distance to the origin
|
|
399
|
+
*/
|
|
400
|
+
setClipPlane(x: number, y: number, z: number, d: number): void;
|
|
401
|
+
/**
|
|
402
|
+
* Set the color ramp for a channel
|
|
403
|
+
*
|
|
404
|
+
* @param channel Which channel index, 0 based.
|
|
405
|
+
* @param name The name of the color ramp
|
|
406
|
+
* @param data An array of values. 5 floats per control point. first is position (0-1),
|
|
407
|
+
* next four are rgba (all 0-1). Currently alpha will be ignored.
|
|
408
|
+
* To guarantee correct behavior, the first control point should be at 0.0 and the last at 1.0.
|
|
409
|
+
*/
|
|
410
|
+
setColorRamp(channel: number, name: string, data: number[]): void;
|
|
392
411
|
flushCommandBuffer(): void;
|
|
393
412
|
}
|
|
@@ -48,6 +48,8 @@ export declare const COMMANDS: {
|
|
|
48
48
|
SHOW_SCALE_BAR: (string | number)[];
|
|
49
49
|
SET_FLIP_AXIS: (string | number)[];
|
|
50
50
|
SET_INTERPOLATION: (string | number)[];
|
|
51
|
+
SET_CLIP_PLANE: (string | number)[];
|
|
52
|
+
SET_COLOR_RAMP: (string | number)[];
|
|
51
53
|
};
|
|
52
54
|
export declare class CommandBuffer {
|
|
53
55
|
private prebuffer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aics/agave-webclient",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0-rc.0",
|
|
4
4
|
"description": "client library for using agave as remote rendering server",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"eslint": "^8.43.0",
|
|
52
52
|
"eslint-config-prettier": "^8.8.0",
|
|
53
53
|
"html-webpack-plugin": "^5.5.1",
|
|
54
|
-
"mocha": "10.2
|
|
54
|
+
"mocha": "10.8.2",
|
|
55
55
|
"prettier": "^2.8.8",
|
|
56
56
|
"rimraf": "^5.0.1",
|
|
57
57
|
"three": "^0.153.0",
|