@beeson-group/tycho 0.3.0 → 0.3.1
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/tycho.esm.js +198 -198
- package/dist/tycho.js +198 -198
- package/dist/types/runtime/colormaps.d.ts +1 -1
- package/dist/types/runtime/contexts.d.ts +40 -0
- package/dist/types/runtime/element.d.ts +12 -0
- package/dist/types/runtime/overlay.d.ts +3 -1
- package/dist/types/runtime/paint.d.ts +7 -1
- package/dist/types/runtime/renderer.d.ts +41 -6
- package/dist/types/scene.gen.d.ts +59 -20
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* family members by their continuation parameter. The two single-hue maps are
|
|
4
4
|
* restricted to their brighter half so that the low end stays visible on black.
|
|
5
5
|
*/
|
|
6
|
-
export type ColormapId = 'viridis' | 'plasma' | 'cividis' | 'blues' | 'reds';
|
|
6
|
+
export type ColormapId = 'viridis' | 'plasma' | 'magma' | 'cividis' | 'blues' | 'reds';
|
|
7
7
|
/** The color of the colormap `id` at the position `t`, clamped to [0, 1], as RGB components in [0, 1] written into `out`. */
|
|
8
8
|
export declare function colormap(id: ColormapId, t: number, out?: number[]): number[];
|
|
9
9
|
/** The color of the colormap `id` at the position `t`, clamped to [0, 1], as a CSS `rgb()` string with components from 0 to 255. */
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** A holder of a WebGL context, i.e. the renderer of a viewer. */
|
|
2
|
+
export interface ContextHolder {
|
|
3
|
+
/** Whether it holds a context that is not lost. */
|
|
4
|
+
readonly live: boolean;
|
|
5
|
+
/** Frees its context, which it makes again when it next draws. */
|
|
6
|
+
release(): void;
|
|
7
|
+
/** Asks it to draw again, e.g. when the pool has room for a context that it lost while it was shown. */
|
|
8
|
+
onChange(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare class ContextPool {
|
|
11
|
+
/** The holders, from the one shown least recently to the one shown last, with whether each is shown now. */
|
|
12
|
+
private readonly order;
|
|
13
|
+
/** The number of live contexts that the pool keeps, beyond which it releases the contexts of holders that are not shown. */
|
|
14
|
+
readonly budget: number;
|
|
15
|
+
constructor(budget: number);
|
|
16
|
+
/** Notes that `holder` was shown or hidden, or made a context, just now, and settles the pool. */
|
|
17
|
+
use(holder: ContextHolder, shown: boolean): void;
|
|
18
|
+
/**
|
|
19
|
+
* Releases the contexts of the holders that were shown least recently and are not shown now, until at most `budget` holders hold a
|
|
20
|
+
* live context, and asks every shown holder that lost its context to draw again once there is room. It runs when a holder is shown
|
|
21
|
+
* or hidden, and when the browser takes a context or gives one back.
|
|
22
|
+
*/
|
|
23
|
+
settle(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Whether `holder`, which is shown and lost its context, may make a new one, i.e. whether fewer than `budget` other holders that
|
|
26
|
+
* are shown hold a live context. When more viewers are shown than the browser keeps contexts, each new context would take the
|
|
27
|
+
* context of another shown viewer, which would then take one back at its next draw.
|
|
28
|
+
*/
|
|
29
|
+
room(holder: ContextHolder): boolean;
|
|
30
|
+
/** Forgets `holder`, e.g. the renderer of a viewer that left the page. */
|
|
31
|
+
drop(holder: ContextHolder): void;
|
|
32
|
+
private forget;
|
|
33
|
+
/** Asks every shown holder that lost its context to draw again, once there is room for a new one. */
|
|
34
|
+
private wake;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The pool of the viewers on this page. It keeps half the contexts that Chrome allows, which leaves room for the other WebGL
|
|
38
|
+
* contexts of a page, e.g. those of the slides template.
|
|
39
|
+
*/
|
|
40
|
+
export declare const viewerContexts: ContextPool;
|
|
@@ -103,6 +103,11 @@ export declare class TychoViewerElement extends Base {
|
|
|
103
103
|
/** Whether the animation loop may run, i.e. the element intersects the viewport and the page is visible. */
|
|
104
104
|
private shown;
|
|
105
105
|
private viewObserver;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the viewer made a new WebGL context for one that the browser took after the viewer was last shown. It does so once until
|
|
108
|
+
* it is shown again, so that viewers beyond the browser's limit of contexts do not take them from each other without end.
|
|
109
|
+
*/
|
|
110
|
+
private retook;
|
|
106
111
|
private readonly onVisibility;
|
|
107
112
|
private dirty;
|
|
108
113
|
private anchor;
|
|
@@ -141,6 +146,13 @@ export declare class TychoViewerElement extends Base {
|
|
|
141
146
|
load(sceneText: string, dataBytes: Uint8Array): Promise<void>;
|
|
142
147
|
private start;
|
|
143
148
|
private stop;
|
|
149
|
+
/**
|
|
150
|
+
* Gives the renderer a WebGL context, on a new canvas when it held one before, and shows the error in place of the panels when
|
|
151
|
+
* the browser cannot make one. The renderer of a viewer on the page joins the pool of contexts, which may release it while the
|
|
152
|
+
* viewer is not shown.
|
|
153
|
+
*/
|
|
154
|
+
private connect;
|
|
155
|
+
private dropRenderer;
|
|
144
156
|
/** The computed value of a custom property on the host, or an empty string when it is not set. */
|
|
145
157
|
private hostProperty;
|
|
146
158
|
/** Recolors the controls and a live renderer from the scene's theme, the `theme` attribute, and the custom properties of the host. */
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* What a panel shows over its drawing, as data: its text labels and its colorbars. The renderer
|
|
3
3
|
* computes them, the element writes them as DOM, and the video export draws them on a canvas.
|
|
4
4
|
*/
|
|
5
|
+
import type { TextRun } from './paint.js';
|
|
5
6
|
/**
|
|
6
7
|
* A text label over a panel, centered vertically on (x, y) in CSS pixels from the panel's corner.
|
|
7
8
|
* Its start sits at (x, y) by default, and its center or its end with `align` set to 'center' or
|
|
8
9
|
* 'end'. A rotated label reads upward, turned a quarter turn about (x, y).
|
|
9
10
|
*/
|
|
10
11
|
export interface PanelLabel {
|
|
11
|
-
text
|
|
12
|
+
/** The text, as a string or as runs with subscripts and superscripts. */
|
|
13
|
+
text: string | TextRun[];
|
|
12
14
|
x: number;
|
|
13
15
|
y: number;
|
|
14
16
|
align?: 'start' | 'center' | 'end';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* paints them onto a canvas over the panel area, and a video export onto each of its frames, with the same functions, so that a frame of a
|
|
4
4
|
* video shows what the page shows. Every text is canvas text, never markup (rule `plain-text`).
|
|
5
5
|
*/
|
|
6
|
-
import type { Box, LabelLayer, Marker, Overlay, Readout, Scene, State } from '../scene.js';
|
|
6
|
+
import type { Box, LabelLayer, Marker, Overlay, Readout, Scene, State, StaticText } from '../scene.js';
|
|
7
7
|
import type { PanelAreaRenderer } from './renderer.js';
|
|
8
8
|
import { type Theme } from './colors.js';
|
|
9
9
|
import type { Rect } from './tiles.js';
|
|
@@ -52,6 +52,10 @@ export interface TextRun {
|
|
|
52
52
|
text: string;
|
|
53
53
|
shift?: 'sub' | 'sup';
|
|
54
54
|
}
|
|
55
|
+
/** A subscript or a superscript is set at this fraction of the size, lowered or raised by the fractions below, as mathtext sets them. */
|
|
56
|
+
export declare const SCRIPT_SIZE = 0.7;
|
|
57
|
+
export declare const SUB_DROP = 0.18;
|
|
58
|
+
export declare const SUP_RISE = 0.42;
|
|
55
59
|
/** The plain text of a text of runs. */
|
|
56
60
|
export declare const plainText: (text: string | TextRun[]) => string;
|
|
57
61
|
/** The rectangle a text of possibly several lines covers when drawn at (x, y) in `style`, as [left, top, width, height]. */
|
|
@@ -107,4 +111,6 @@ export declare const gutterColor: (theme: Theme) => string;
|
|
|
107
111
|
export declare function paintPanelArea(g: CanvasRenderingContext2D, renderer: PanelAreaRenderer, scene: Scene, state: State, theme: Theme, q: number, w: number, h: number, text: (pid: string, parts: Readout['parts']) => string[]): void;
|
|
108
112
|
/** The runs of a text from its parts and the text of each part, a `sub` or a `sup` part set as a script (rule `timeline-parts`). */
|
|
109
113
|
export declare function runsOf(parts: Readout['parts'], pieces: string[]): TextRun[];
|
|
114
|
+
/** The runs of a static text, e.g. the label of a legend entry or an axis title of a frame (rule `timeline-parts`). */
|
|
115
|
+
export declare function staticRuns(label: StaticText): TextRun[];
|
|
110
116
|
export {};
|
|
@@ -26,8 +26,9 @@ import type { InsetBoxLayerResult, Vec3 } from '../evaluate/types.js';
|
|
|
26
26
|
import type { Context, Frames } from '../evaluate/frames.js';
|
|
27
27
|
import { type PanelScope } from '../evaluate/resolve.js';
|
|
28
28
|
import type { SetData } from '../evaluate/sets.js';
|
|
29
|
-
import type { ArrowLayer, BodyLayer, Camera, Clock, ColorSpec, LabelLayer, Layout, Marker, MarkLayer, InsetBoxLayer, PointsLayer, Scene, State, TrajectoriesLayer, Panel } from '../scene.js';
|
|
29
|
+
import type { ArrowLayer, BodyLayer, Camera, Clock, ColorSpec, LabelLayer, Layout, Marker, MarkLayer, InsetBoxLayer, PointsLayer, Scene, State, StaticText, TrajectoriesLayer, Panel } from '../scene.js';
|
|
30
30
|
import { type Theme } from './colors.js';
|
|
31
|
+
import type { ContextHolder } from './contexts.js';
|
|
31
32
|
import { type BoxPaint } from './paint.js';
|
|
32
33
|
import { GeometryCache } from './geometry.js';
|
|
33
34
|
import { type Colorbar, type PanelLabel } from './overlay.js';
|
|
@@ -95,6 +96,10 @@ export interface PointsPlan {
|
|
|
95
96
|
layer: PointsLayer;
|
|
96
97
|
/** Null when the set query does not match any trajectory set. */
|
|
97
98
|
set: SetData | null;
|
|
99
|
+
/** The members of rule `members`, in increasing order. */
|
|
100
|
+
members: number[];
|
|
101
|
+
/** The marker's color, where a colormap keyed on a choice is resolved as for a trajectories layer. */
|
|
102
|
+
color: ColorSpec | undefined;
|
|
98
103
|
}
|
|
99
104
|
export interface LabelPlan {
|
|
100
105
|
kind: 'label';
|
|
@@ -181,6 +186,13 @@ export declare function planeView(camera: THREE.OrthographicCamera, cam: Camera
|
|
|
181
186
|
* although their text is set in different fonts.
|
|
182
187
|
*/
|
|
183
188
|
export declare function labelBox(l: PanelLabel): [number, number, number, number];
|
|
189
|
+
/** The title of an axis of a frame, from the axis's static text and the frame's unit, which follows a nonempty title in brackets. */
|
|
190
|
+
export declare function axisTitle(name: StaticText | undefined, unit: string | undefined): PanelLabel['text'];
|
|
191
|
+
/**
|
|
192
|
+
* Writes the text of a label into its span. A sub or a sup run becomes a span at the size of a script, lowered or raised as `drawText` sets it on a
|
|
193
|
+
* canvas. Its offset is relative, hence the line box of the label, and with it the label's place, does not change.
|
|
194
|
+
*/
|
|
195
|
+
export declare function writeLabel(span: HTMLElement, text: PanelLabel['text']): void;
|
|
184
196
|
/** True when the boxes of two labels are overlapping, as `labelBox` estimates them, and false when they are only touching. */
|
|
185
197
|
export declare function labelsOverlap(a: PanelLabel, b: PanelLabel): boolean;
|
|
186
198
|
/**
|
|
@@ -207,7 +219,7 @@ export declare function labelOver(l: PanelLabel, box: [number, number, number, n
|
|
|
207
219
|
* title 10 px above it. The y title sits 10 px from the left edge, and the y tick column is right-aligned
|
|
208
220
|
* clear of it at its widest number. A panel too short or too narrow for a title keeps its ticks.
|
|
209
221
|
*/
|
|
210
|
-
export declare function planeLabels(v: PlaneView, ticks: boolean, titles: [
|
|
222
|
+
export declare function planeLabels(v: PlaneView, ticks: boolean, titles: [PanelLabel['text'], PanelLabel['text']] | null, top?: number): PanelLabel[];
|
|
211
223
|
interface Draw {
|
|
212
224
|
readonly key: string;
|
|
213
225
|
readonly group: THREE.Group;
|
|
@@ -383,11 +395,21 @@ export declare function insetBoxShownPanel(map: InsetBoxLayerResult | null): str
|
|
|
383
395
|
export declare function cameraMoved(camera: THREE.Camera, seen: Float64Array): boolean;
|
|
384
396
|
/** Whether two regions (x, y, width, height) of the underlay share a pixel. A region that was never set, at -1, shares none. */
|
|
385
397
|
export declare function overlaps(a: THREE.Vector4, b: THREE.Vector4): boolean;
|
|
386
|
-
export declare class PanelAreaRenderer {
|
|
387
|
-
|
|
388
|
-
|
|
398
|
+
export declare class PanelAreaRenderer implements ContextHolder {
|
|
399
|
+
/**
|
|
400
|
+
* The canvas drawn on. A canvas keeps its first WebGL context for good, hence a later context is made on a new canvas, which
|
|
401
|
+
* takes this one's place in the page.
|
|
402
|
+
*/
|
|
403
|
+
canvas: HTMLCanvasElement;
|
|
404
|
+
/** Called when the panel area should be drawn again, e.g. when the user moves a camera. */
|
|
389
405
|
onChange: () => void;
|
|
390
|
-
|
|
406
|
+
/** Called when the browser takes the WebGL context, or gives back one that it took. */
|
|
407
|
+
onContext: () => void;
|
|
408
|
+
/** three's renderer on the WebGL context of `canvas`, or null before the first draw and after a release. */
|
|
409
|
+
private gl;
|
|
410
|
+
/** Whether `canvas` was given a WebGL context. */
|
|
411
|
+
private canvasUsed;
|
|
412
|
+
private readonly preserveDrawingBuffer;
|
|
391
413
|
private readonly ctx;
|
|
392
414
|
private readonly panels;
|
|
393
415
|
private lastState;
|
|
@@ -431,6 +453,19 @@ export declare class PanelAreaRenderer {
|
|
|
431
453
|
coarseDrags?: boolean;
|
|
432
454
|
theme?: Theme;
|
|
433
455
|
});
|
|
456
|
+
/** Whether the renderer holds a WebGL context, which may be lost. */
|
|
457
|
+
get connected(): boolean;
|
|
458
|
+
/** Whether the renderer holds a WebGL context that is not lost, i.e. whether a draw reaches the canvas. */
|
|
459
|
+
get live(): boolean;
|
|
460
|
+
/**
|
|
461
|
+
* Makes a WebGL context to draw on, unless the renderer holds one that is not lost. The panels keep their cameras, their controls,
|
|
462
|
+
* and their draws, which three uploads to the new context at the next draw. Throws when the browser cannot make a WebGL context.
|
|
463
|
+
*/
|
|
464
|
+
connect(): void;
|
|
465
|
+
/** Frees the WebGL context, and with it everything the panels hold on the GPU, for `connect` to make a new one. */
|
|
466
|
+
release(): void;
|
|
467
|
+
/** Forgets the underlay and the scratch target, which went with the context, so that the next draw makes them and every panel's static layers again. */
|
|
468
|
+
private dropTargets;
|
|
434
469
|
/** Draws with `theme` from the next frame on. The cameras stay, and the next plan rebuilds only the draws that take a color from the theme. */
|
|
435
470
|
setTheme(theme: Theme): void;
|
|
436
471
|
private panel;
|
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
* Types for scene.tys, generated from spec/scene.schema.json by scripts/gen-types.mjs.
|
|
3
3
|
* Do not edit. Run `npm run gen:types` after changing the schema.
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* A static text is a string, or a list of strings and subscript and superscript parts, which do not change with the state or the time. (rule `timeline-parts`)
|
|
7
|
+
*
|
|
8
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
9
|
+
* via the `definition` "staticText".
|
|
10
|
+
*/
|
|
11
|
+
export type StaticText = string | (string | {
|
|
12
|
+
/**
|
|
13
|
+
* This text is set as a subscript.
|
|
14
|
+
*/
|
|
15
|
+
sub: string;
|
|
16
|
+
} | {
|
|
17
|
+
/**
|
|
18
|
+
* This text is set as a superscript.
|
|
19
|
+
*/
|
|
20
|
+
sup: string;
|
|
21
|
+
})[];
|
|
5
22
|
/**
|
|
6
23
|
* A scalar is a number, an attribute, or a channel, and the field that holds it determines which forms are allowed. (rule `context-number`)
|
|
7
24
|
*
|
|
@@ -511,7 +528,7 @@ export type Layer = {
|
|
|
511
528
|
/**
|
|
512
529
|
* The samples are drawn with this marker, 4 CSS pixels wide in the foreground of the theme by default.
|
|
513
530
|
*/
|
|
514
|
-
marker?:
|
|
531
|
+
marker?: PointsMarker;
|
|
515
532
|
/**
|
|
516
533
|
* With "none", the default, every sample is drawn. With "grow", the samples appear one after another as the clock passes them. (rule `points`)
|
|
517
534
|
*/
|
|
@@ -864,19 +881,9 @@ export type Overlay = {
|
|
|
864
881
|
*/
|
|
865
882
|
entries: {
|
|
866
883
|
/**
|
|
867
|
-
* The label is a
|
|
884
|
+
* The label is a static text.
|
|
868
885
|
*/
|
|
869
|
-
label:
|
|
870
|
-
/**
|
|
871
|
-
* This text is set as a subscript.
|
|
872
|
-
*/
|
|
873
|
-
sub: string;
|
|
874
|
-
} | {
|
|
875
|
-
/**
|
|
876
|
-
* This text is set as a superscript.
|
|
877
|
-
*/
|
|
878
|
-
sup: string;
|
|
879
|
-
})[];
|
|
886
|
+
label: StaticText;
|
|
880
887
|
/**
|
|
881
888
|
* The entry is drawn as a short line.
|
|
882
889
|
*/
|
|
@@ -1022,7 +1029,7 @@ export type MemberRef = 'all' | {
|
|
|
1022
1029
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1023
1030
|
* via the `definition` "colormapName".
|
|
1024
1031
|
*/
|
|
1025
|
-
export type ColormapName = 'viridis' | 'plasma' | 'cividis' | 'blues' | 'reds';
|
|
1032
|
+
export type ColormapName = 'viridis' | 'plasma' | 'magma' | 'cividis' | 'blues' | 'reds';
|
|
1026
1033
|
/**
|
|
1027
1034
|
* A color is a fixed color, a colormap over a parameter or a channel, or a color by thresholds of a channel.
|
|
1028
1035
|
*
|
|
@@ -1046,7 +1053,7 @@ export type ColorSpec = Color | {
|
|
|
1046
1053
|
*/
|
|
1047
1054
|
range?: [number, number];
|
|
1048
1055
|
/**
|
|
1049
|
-
* The part [a, b] of the colormap onto which the range is mapped lies within [0, 1], and it is [0, 1] by default.
|
|
1056
|
+
* The part [a, b] of the colormap onto which the range is mapped lies within [0, 1], and it is [0, 1] by default. With a > b, the colormap is read in reverse.
|
|
1050
1057
|
*
|
|
1051
1058
|
* @minItems 2
|
|
1052
1059
|
* @maxItems 2
|
|
@@ -1069,7 +1076,7 @@ export type ColorSpec = Color | {
|
|
|
1069
1076
|
*/
|
|
1070
1077
|
range?: [number, number];
|
|
1071
1078
|
/**
|
|
1072
|
-
* The part [a, b] of the colormap onto which the range is mapped lies within [0, 1], and it is [0, 1] by default.
|
|
1079
|
+
* The part [a, b] of the colormap onto which the range is mapped lies within [0, 1], and it is [0, 1] by default. With a > b, the colormap is read in reverse.
|
|
1073
1080
|
*
|
|
1074
1081
|
* @minItems 2
|
|
1075
1082
|
* @maxItems 2
|
|
@@ -1483,12 +1490,12 @@ export interface Frame {
|
|
|
1483
1490
|
*/
|
|
1484
1491
|
label?: string;
|
|
1485
1492
|
/**
|
|
1486
|
-
* The three axis
|
|
1493
|
+
* The three axis titles, e.g. ["x", "y", "z"] or ["C", ["x", {"sub": "0"}], "z"], are static texts.
|
|
1487
1494
|
*
|
|
1488
1495
|
* @minItems 3
|
|
1489
1496
|
* @maxItems 3
|
|
1490
1497
|
*/
|
|
1491
|
-
axes?: [
|
|
1498
|
+
axes?: [StaticText, StaticText, StaticText];
|
|
1492
1499
|
/**
|
|
1493
1500
|
* The unit label, e.g. "DU", is appended to the titles of the axes.
|
|
1494
1501
|
*/
|
|
@@ -1979,11 +1986,11 @@ export interface Marker {
|
|
|
1979
1986
|
*/
|
|
1980
1987
|
shape?: 'disc' | 'ring' | 'square' | 'diamond' | 'triangle' | 'star' | 'cross' | 'plus';
|
|
1981
1988
|
/**
|
|
1982
|
-
* The width of the shape is given in CSS pixels, or keyframed. It is
|
|
1989
|
+
* The width of the shape is given in CSS pixels, or keyframed. It is 0.6 times the size of the text for a legend entry by default.
|
|
1983
1990
|
*/
|
|
1984
1991
|
size?: Size;
|
|
1985
1992
|
/**
|
|
1986
|
-
* A filled shape is filled with this color, and a ring, a cross, or a plus is stroked with it. It is the
|
|
1993
|
+
* A filled shape is filled with this color, and a ring, a cross, or a plus is stroked with it. It is the foreground of the theme by default.
|
|
1987
1994
|
*/
|
|
1988
1995
|
color?: Color;
|
|
1989
1996
|
/**
|
|
@@ -1999,6 +2006,38 @@ export interface Marker {
|
|
|
1999
2006
|
*/
|
|
2000
2007
|
opacity?: Opacity;
|
|
2001
2008
|
}
|
|
2009
|
+
/**
|
|
2010
|
+
* The marker of a points layer is written in the form of a marker, and its color may also be any color of a trajectories layer.
|
|
2011
|
+
*
|
|
2012
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
2013
|
+
* via the `definition` "pointsMarker".
|
|
2014
|
+
*/
|
|
2015
|
+
export interface PointsMarker {
|
|
2016
|
+
/**
|
|
2017
|
+
* The shape is "disc", the default, "ring", "square", "diamond", "triangle", "star", "cross", or "plus".
|
|
2018
|
+
*/
|
|
2019
|
+
shape?: 'disc' | 'ring' | 'square' | 'diamond' | 'triangle' | 'star' | 'cross' | 'plus';
|
|
2020
|
+
/**
|
|
2021
|
+
* The width of the shape is given in CSS pixels, or keyframed, and it is 4 by default.
|
|
2022
|
+
*/
|
|
2023
|
+
size?: Size;
|
|
2024
|
+
/**
|
|
2025
|
+
* A filled shape is filled with this color, and a ring, a cross, or a plus is stroked with it. It is the foreground of the theme by default. A colormap over a parameter colors each member, and a colormap over a channel or a color by thresholds of a channel colors each sample.
|
|
2026
|
+
*/
|
|
2027
|
+
color?: ColorSpec;
|
|
2028
|
+
/**
|
|
2029
|
+
* A filled shape is outlined in this color when it is given. With a color per member or per sample, the outline is tinted by that color, hence only a black outline keeps its color.
|
|
2030
|
+
*/
|
|
2031
|
+
edge?: Color;
|
|
2032
|
+
/**
|
|
2033
|
+
* The width of the outline, or of the stroke of a ring, a cross, or a plus, is given in CSS pixels, or keyframed. By default it is 1 for a filled shape with an edge, and a sixth of the size, at least 1, for a ring, a cross, or a plus.
|
|
2034
|
+
*/
|
|
2035
|
+
edge_width?: number | Keyframed;
|
|
2036
|
+
/**
|
|
2037
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
2038
|
+
*/
|
|
2039
|
+
opacity?: Opacity;
|
|
2040
|
+
}
|
|
2002
2041
|
/**
|
|
2003
2042
|
* A box is a rectangle drawn behind a text.
|
|
2004
2043
|
*
|
package/package.json
CHANGED