@beeson-group/tycho 0.2.0 → 0.3.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/AUTHORS +1 -0
- package/NOTICE +1 -1
- package/THIRD_PARTY_NOTICES.md +4 -4
- package/dist/tycho.esm.js +1227 -724
- package/dist/tycho.js +1227 -724
- package/dist/types/container.d.ts +16 -16
- package/dist/types/errors.d.ts +2 -3
- package/dist/types/evaluate/clock.d.ts +21 -15
- package/dist/types/evaluate/frames.d.ts +11 -11
- package/dist/types/evaluate/index.d.ts +9 -2
- package/dist/types/evaluate/layers.d.ts +87 -26
- package/dist/types/evaluate/resolve.d.ts +34 -23
- package/dist/types/evaluate/sets.d.ts +16 -15
- package/dist/types/evaluate/timeline.d.ts +60 -0
- package/dist/types/evaluate/types.d.ts +57 -6
- package/dist/types/index.d.ts +2 -2
- package/dist/types/runtime/colors.d.ts +40 -13
- package/dist/types/runtime/element.d.ts +88 -22
- package/dist/types/runtime/export.d.ts +44 -34
- package/dist/types/runtime/geometry.d.ts +106 -103
- package/dist/types/runtime/icons.d.ts +12 -2
- package/dist/types/runtime/outline.d.ts +29 -0
- package/dist/types/runtime/paint.d.ts +110 -0
- package/dist/types/runtime/raster.d.ts +33 -0
- package/dist/types/runtime/readouts.d.ts +35 -28
- package/dist/types/runtime/renderer.d.ts +306 -58
- package/dist/types/runtime/state.d.ts +27 -29
- package/dist/types/runtime/tiles.d.ts +2 -2
- package/dist/types/scene.d.ts +27 -13
- package/dist/types/scene.gen.d.ts +1791 -198
- package/dist/types/validate.d.ts +1 -1
- package/package.json +4 -4
|
@@ -3,438 +3,2031 @@
|
|
|
3
3
|
* Do not edit. Run `npm run gen:types` after changing the schema.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
+
* 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
|
+
*
|
|
6
8
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
7
|
-
* via the `definition` "
|
|
9
|
+
* via the `definition` "scalar".
|
|
8
10
|
*/
|
|
9
|
-
export type
|
|
11
|
+
export type Scalar = number | Attr | ChannelRef;
|
|
12
|
+
/**
|
|
13
|
+
* An input is a value that the person at the page can change, of kind parameter, choice, or toggle. (rule `input`)
|
|
14
|
+
*
|
|
15
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
16
|
+
* via the `definition` "input".
|
|
17
|
+
*/
|
|
18
|
+
export type Input = {
|
|
19
|
+
/**
|
|
20
|
+
* The kind is "parameter".
|
|
21
|
+
*/
|
|
22
|
+
kind: 'parameter';
|
|
23
|
+
/**
|
|
24
|
+
* The input holds a value of the parameter with this name, or the number of a member with the built-in parameter @index. (rule `index-channel`)
|
|
25
|
+
*/
|
|
26
|
+
parameter: Name;
|
|
27
|
+
/**
|
|
28
|
+
* The value at the start is this finite number.
|
|
29
|
+
*/
|
|
30
|
+
default: number;
|
|
31
|
+
/**
|
|
32
|
+
* With "shared", the default, the input has one value for the whole page, and with "per_panel" it has one value per shown panel. (rule `input-scope`)
|
|
33
|
+
*/
|
|
34
|
+
scope?: 'shared' | 'per_panel';
|
|
35
|
+
} | {
|
|
36
|
+
/**
|
|
37
|
+
* The kind is "choice".
|
|
38
|
+
*/
|
|
39
|
+
kind: 'choice';
|
|
40
|
+
/**
|
|
41
|
+
* The strings that the input may hold are listed here, each once.
|
|
42
|
+
*
|
|
43
|
+
* @minItems 1
|
|
44
|
+
*/
|
|
45
|
+
values: [string, ...string[]];
|
|
46
|
+
/**
|
|
47
|
+
* The text shown for each value is given here, one entry per value. The value itself is shown by default.
|
|
48
|
+
*/
|
|
49
|
+
labels?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* The value at the start is one of the values.
|
|
52
|
+
*/
|
|
53
|
+
default: string;
|
|
54
|
+
/**
|
|
55
|
+
* With "shared", the default, the input has one value for the whole page, and with "per_panel" it has one value per shown panel. (rule `input-scope`)
|
|
56
|
+
*/
|
|
57
|
+
scope?: 'shared' | 'per_panel';
|
|
58
|
+
} | {
|
|
59
|
+
/**
|
|
60
|
+
* The kind is "toggle".
|
|
61
|
+
*/
|
|
62
|
+
kind: 'toggle';
|
|
63
|
+
/**
|
|
64
|
+
* The value at the start is true or false.
|
|
65
|
+
*/
|
|
66
|
+
default: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* With "shared", the default, the input has one value for the whole page, and with "per_panel" it has one value per shown panel. (rule `input-scope`)
|
|
69
|
+
*/
|
|
70
|
+
scope?: 'shared' | 'per_panel';
|
|
71
|
+
};
|
|
10
72
|
/**
|
|
73
|
+
* An identifier consists of ASCII letters, digits, underscores, dots, and hyphens, with at least one character. (rule `identifier`)
|
|
74
|
+
*
|
|
11
75
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
12
76
|
* via the `definition` "id".
|
|
13
77
|
*/
|
|
14
78
|
export type Id = string;
|
|
15
79
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
80
|
+
* A layer is one thing drawn in a panel, and its kind says what.
|
|
81
|
+
*
|
|
82
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
83
|
+
* via the `definition` "layer".
|
|
84
|
+
*/
|
|
85
|
+
export type Layer = {
|
|
86
|
+
/**
|
|
87
|
+
* The kind is "trajectories".
|
|
88
|
+
*/
|
|
89
|
+
kind: 'trajectories';
|
|
90
|
+
/**
|
|
91
|
+
* The trajectories are taken from the set that this query resolves to. (rule `set-query`)
|
|
92
|
+
*/
|
|
93
|
+
sets: SetQuery;
|
|
94
|
+
/**
|
|
95
|
+
* The members of the set that are drawn are selected here. (rule `members`)
|
|
96
|
+
*/
|
|
97
|
+
members: MemberRef;
|
|
98
|
+
/**
|
|
99
|
+
* With "none", the default, the whole trajectory is drawn. With "grow", it grows to the moving point, and with "trail", a trail follows the point. (rule `panel`)
|
|
100
|
+
*/
|
|
101
|
+
reveal?: 'none' | 'grow' | 'trail';
|
|
102
|
+
/**
|
|
103
|
+
* The trail is given here, and it is required when reveal is "trail".
|
|
104
|
+
*/
|
|
105
|
+
trail?: Trail;
|
|
106
|
+
/**
|
|
107
|
+
* With a head, the moving point is drawn as a marker. True gives the default marker, and false or an absent head gives none. (rule `head`)
|
|
108
|
+
*/
|
|
109
|
+
head?: boolean | {
|
|
110
|
+
/**
|
|
111
|
+
* The head is drawn in this color, and in the color of the layer at this point by default.
|
|
112
|
+
*/
|
|
113
|
+
color?: Color;
|
|
114
|
+
/**
|
|
115
|
+
* The width of the head is given in CSS pixels, or keyframed, and it is 9 by default.
|
|
116
|
+
*/
|
|
117
|
+
size?: Size;
|
|
118
|
+
/**
|
|
119
|
+
* The shape is "disc", the default, "ring", "square", "diamond", "triangle", "star", "cross", or "plus".
|
|
120
|
+
*/
|
|
121
|
+
shape?: 'disc' | 'ring' | 'square' | 'diamond' | 'triangle' | 'star' | 'cross' | 'plus';
|
|
122
|
+
/**
|
|
123
|
+
* A filled shape is outlined in this color when it is given.
|
|
124
|
+
*/
|
|
125
|
+
edge?: Color;
|
|
126
|
+
/**
|
|
127
|
+
* The width of the outline, or of the stroke of a ring, a cross, or a plus, is given in CSS pixels. 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.
|
|
128
|
+
*/
|
|
129
|
+
edge_width?: number | Keyframed;
|
|
130
|
+
/**
|
|
131
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
132
|
+
*/
|
|
133
|
+
opacity?: Opacity;
|
|
134
|
+
/**
|
|
135
|
+
* A disc is drawn behind the head while the channel of the member is positive, e.g. the plume of a thruster.
|
|
136
|
+
*/
|
|
137
|
+
glow?: {
|
|
138
|
+
/**
|
|
139
|
+
* The glow is shown while the channel with this name is positive, and the set carries it.
|
|
140
|
+
*/
|
|
141
|
+
channel: Name;
|
|
142
|
+
/**
|
|
143
|
+
* The glow is drawn in this color, and in #d62728 by default.
|
|
144
|
+
*/
|
|
145
|
+
color?: Color;
|
|
146
|
+
/**
|
|
147
|
+
* The diameter of the glow is given in CSS pixels, and it is 2.4 times the size of the head by default.
|
|
148
|
+
*/
|
|
149
|
+
size?: number;
|
|
150
|
+
/**
|
|
151
|
+
* The opacity of the glow is in [0, 1], and it is 0.35 by default.
|
|
152
|
+
*/
|
|
153
|
+
opacity?: number;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* In mode epoch, "clamp", the default, holds a member at its first sample before it starts, and "hidden" hides it. (rule `before-after`)
|
|
158
|
+
*/
|
|
159
|
+
before?: 'clamp' | 'hidden';
|
|
160
|
+
/**
|
|
161
|
+
* In mode epoch, "clamp", the default, holds a member at its last sample after it ends, and "hidden" hides it. (rule `before-after`)
|
|
162
|
+
*/
|
|
163
|
+
after?: 'clamp' | 'hidden';
|
|
164
|
+
/**
|
|
165
|
+
* With "own", the default, each sample is transformed in its own context. With "reference", it is transformed in the context of the reference trajectory. (rule `read-from`)
|
|
166
|
+
*/
|
|
167
|
+
read_from?: 'own' | 'reference';
|
|
168
|
+
/**
|
|
169
|
+
* With false, the layer is drawn but left out of the camera fit. The default is true.
|
|
170
|
+
*/
|
|
171
|
+
fit?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* The color of the layer is the foreground of the theme by default.
|
|
174
|
+
*/
|
|
175
|
+
color?: ColorSpec;
|
|
176
|
+
/**
|
|
177
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
178
|
+
*/
|
|
179
|
+
opacity?: Opacity;
|
|
180
|
+
/**
|
|
181
|
+
* The width of the line is given in CSS pixels, and it is 1 by default.
|
|
182
|
+
*/
|
|
183
|
+
width?: number;
|
|
184
|
+
/**
|
|
185
|
+
* One member is drawn more prominently, the one that an input of kind parameter selects. (rule `members`)
|
|
186
|
+
*/
|
|
187
|
+
highlight?: {
|
|
188
|
+
/**
|
|
189
|
+
* The highlighted member is selected by the input of kind parameter with this id.
|
|
190
|
+
*/
|
|
191
|
+
input: Id;
|
|
192
|
+
/**
|
|
193
|
+
* The width of the highlighted line is given in CSS pixels, and it is the width of the layer by default.
|
|
194
|
+
*/
|
|
195
|
+
width?: number;
|
|
196
|
+
/**
|
|
197
|
+
* The opacity of the highlighted line is in [0, 1], and it is 1 by default.
|
|
198
|
+
*/
|
|
199
|
+
opacity?: number;
|
|
200
|
+
/**
|
|
201
|
+
* The neighbors of the highlighted member are also brightened, with a Gaussian falloff in the parameter.
|
|
202
|
+
*/
|
|
203
|
+
kernel?: {
|
|
204
|
+
/**
|
|
205
|
+
* The width of the kernel is a fraction of the extent of the parameter over the set, in (0, 1].
|
|
206
|
+
*/
|
|
207
|
+
width: number;
|
|
208
|
+
/**
|
|
209
|
+
* The opacity at the center of the kernel is in [0, 1], and the opacity of the layer stays the floor.
|
|
210
|
+
*/
|
|
211
|
+
opacity: number;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
216
|
+
*/
|
|
217
|
+
visible?: InputRef;
|
|
218
|
+
/**
|
|
219
|
+
* With a layer clock, the fractions along are computed by a channel of the layer's own. (rule `layer-clock`)
|
|
220
|
+
*/
|
|
221
|
+
clock?: LayerClock;
|
|
222
|
+
/**
|
|
223
|
+
* With false, only the heads are drawn, e.g. for a cloud of moving points. The default is true.
|
|
224
|
+
*/
|
|
225
|
+
line?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* With true, each pixel that the lines cover is blended once at the opacity of the layer, so that overlaps do not build up. The default is false.
|
|
228
|
+
*/
|
|
229
|
+
group_opacity?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* The line is dashed with dashes of on and gaps of off CSS pixels, given as [on, off].
|
|
232
|
+
*
|
|
233
|
+
* @minItems 2
|
|
234
|
+
* @maxItems 2
|
|
235
|
+
*/
|
|
236
|
+
dash?: [number, number];
|
|
237
|
+
/**
|
|
238
|
+
* Under a 2d camera, the area between the line and a base line is shaded where the line lies above the base.
|
|
239
|
+
*/
|
|
240
|
+
fill?: {
|
|
241
|
+
/**
|
|
242
|
+
* The base line lies at this value of the second axis of the plane, and at 0 by default.
|
|
243
|
+
*/
|
|
244
|
+
base?: number;
|
|
245
|
+
/**
|
|
246
|
+
* The fill is drawn in this color, and by default in the color of the layer when that is fixed, or in the foreground of the theme otherwise.
|
|
247
|
+
*/
|
|
248
|
+
color?: Color;
|
|
249
|
+
/**
|
|
250
|
+
* The opacity of the fill is in [0, 1], and it is 0.25 by default.
|
|
251
|
+
*/
|
|
252
|
+
opacity?: number;
|
|
253
|
+
};
|
|
254
|
+
} | {
|
|
255
|
+
/**
|
|
256
|
+
* The kind is "arrow".
|
|
257
|
+
*/
|
|
258
|
+
kind: 'arrow';
|
|
259
|
+
/**
|
|
260
|
+
* The trajectories are taken from the set that this query resolves to. (rule `set-query`)
|
|
261
|
+
*/
|
|
262
|
+
sets: SetQuery;
|
|
263
|
+
/**
|
|
264
|
+
* The members of the set that are drawn are selected here. (rule `members`)
|
|
265
|
+
*/
|
|
266
|
+
members: MemberRef;
|
|
267
|
+
/**
|
|
268
|
+
* The components of the vector are read from the two or three channels with these names, in the frame of the set. The channel @index is not allowed. (rule `arrow`)
|
|
269
|
+
*
|
|
270
|
+
* @minItems 2
|
|
271
|
+
* @maxItems 3
|
|
272
|
+
*/
|
|
273
|
+
vector: [Name, Name] | [Name, Name, Name];
|
|
274
|
+
/**
|
|
275
|
+
* The arrow is the vector times this constant scalar, in units of the frame. The default is 1. (rule `arrow`)
|
|
276
|
+
*/
|
|
277
|
+
scale?: ConstantScalar;
|
|
278
|
+
/**
|
|
279
|
+
* In mode epoch, "clamp", the default, holds a member at its first sample before it starts, and "hidden" hides it. (rule `before-after`)
|
|
280
|
+
*/
|
|
281
|
+
before?: 'clamp' | 'hidden';
|
|
282
|
+
/**
|
|
283
|
+
* In mode epoch, "clamp", the default, holds a member at its last sample after it ends, and "hidden" hides it. (rule `before-after`)
|
|
284
|
+
*/
|
|
285
|
+
after?: 'clamp' | 'hidden';
|
|
286
|
+
/**
|
|
287
|
+
* The arrow is drawn in this color, and in the foreground of the theme by default.
|
|
288
|
+
*/
|
|
289
|
+
color?: Color;
|
|
290
|
+
/**
|
|
291
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
292
|
+
*/
|
|
293
|
+
opacity?: Opacity;
|
|
294
|
+
/**
|
|
295
|
+
* The width of the shaft is given in CSS pixels, and it is 1 by default.
|
|
296
|
+
*/
|
|
297
|
+
width?: number;
|
|
298
|
+
/**
|
|
299
|
+
* The arrowhead is a filled triangle at the tip, 0.8 times as wide as it is long.
|
|
300
|
+
*/
|
|
301
|
+
head?: {
|
|
302
|
+
/**
|
|
303
|
+
* The length of the arrowhead is given in CSS pixels, and it is 10 by default.
|
|
304
|
+
*/
|
|
305
|
+
size?: number;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
309
|
+
*/
|
|
310
|
+
visible?: InputRef;
|
|
311
|
+
/**
|
|
312
|
+
* With a layer clock, the fractions along are computed by a channel of the layer's own. (rule `layer-clock`)
|
|
313
|
+
*/
|
|
314
|
+
clock?: LayerClock;
|
|
315
|
+
} | {
|
|
316
|
+
/**
|
|
317
|
+
* The kind is "inset_box".
|
|
318
|
+
*/
|
|
319
|
+
kind: 'inset_box';
|
|
320
|
+
/**
|
|
321
|
+
* The rectangle is the one shown by the first shown panel of the declared panel with this id, which has a 2d camera. (rule `inset-box`)
|
|
322
|
+
*/
|
|
323
|
+
panel: Id;
|
|
324
|
+
/**
|
|
325
|
+
* The box is drawn in this color, and in the foreground of the theme by default.
|
|
326
|
+
*/
|
|
327
|
+
color?: Color;
|
|
328
|
+
/**
|
|
329
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
330
|
+
*/
|
|
331
|
+
opacity?: Opacity;
|
|
332
|
+
/**
|
|
333
|
+
* The width of the line is given in CSS pixels, and it is 1 by default.
|
|
334
|
+
*/
|
|
335
|
+
width?: number;
|
|
336
|
+
/**
|
|
337
|
+
* The line is dashed with dashes of on and gaps of off CSS pixels, given as [on, off].
|
|
338
|
+
*
|
|
339
|
+
* @minItems 2
|
|
340
|
+
* @maxItems 2
|
|
341
|
+
*/
|
|
342
|
+
dash?: [number, number];
|
|
343
|
+
/**
|
|
344
|
+
* On the screen, the box is at least this many CSS pixels wide and tall, and 8 by default.
|
|
345
|
+
*/
|
|
346
|
+
min_size?: number;
|
|
347
|
+
/**
|
|
348
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
349
|
+
*/
|
|
350
|
+
visible?: InputRef;
|
|
351
|
+
} | {
|
|
352
|
+
/**
|
|
353
|
+
* The kind is "body".
|
|
354
|
+
*/
|
|
355
|
+
kind: 'body';
|
|
356
|
+
/**
|
|
357
|
+
* The body with this id is drawn.
|
|
358
|
+
*/
|
|
359
|
+
body: Id;
|
|
360
|
+
/**
|
|
361
|
+
* With a trail, the path of the body over the trail of the reference trajectory is drawn as well. (rule `body-layer`)
|
|
362
|
+
*/
|
|
363
|
+
trail?: Trail;
|
|
364
|
+
/**
|
|
365
|
+
* The diameter of the body, or the width of its image, is given in CSS pixels, and it is 8 by default.
|
|
366
|
+
*/
|
|
367
|
+
size?: number;
|
|
368
|
+
/**
|
|
369
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
370
|
+
*/
|
|
371
|
+
visible?: InputRef;
|
|
372
|
+
/**
|
|
373
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
374
|
+
*/
|
|
375
|
+
opacity?: Opacity;
|
|
376
|
+
} | {
|
|
377
|
+
/**
|
|
378
|
+
* The kind is "axes".
|
|
379
|
+
*/
|
|
380
|
+
kind: 'axes';
|
|
381
|
+
/**
|
|
382
|
+
* With "full", both directions of each axis are drawn across the panel, with "positive" only the positive half-axes, and with "box" a box around the plot under a 2d camera. The default is "full" under a 2d camera and "positive" under a 3d camera.
|
|
383
|
+
*/
|
|
384
|
+
span?: 'positive' | 'full' | 'box';
|
|
385
|
+
/**
|
|
386
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
387
|
+
*/
|
|
388
|
+
visible?: InputRef;
|
|
389
|
+
/**
|
|
390
|
+
* The axes of the plane that carry tick numbers in a box, "x" and "y", are listed here. Both are listed by default.
|
|
391
|
+
*/
|
|
392
|
+
ticks?: ('x' | 'y')[];
|
|
393
|
+
/**
|
|
394
|
+
* The height of the tick numbers of a box is given in CSS pixels, and it is 12 by default.
|
|
395
|
+
*/
|
|
396
|
+
size?: number;
|
|
397
|
+
/**
|
|
398
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
399
|
+
*/
|
|
400
|
+
opacity?: Opacity;
|
|
401
|
+
/**
|
|
402
|
+
* The two texts given here replace the titles of the axes of the frame, e.g. with a subscript.
|
|
403
|
+
*
|
|
404
|
+
* @minItems 2
|
|
405
|
+
* @maxItems 2
|
|
406
|
+
*/
|
|
407
|
+
titles?: [Text, Text];
|
|
408
|
+
} | {
|
|
409
|
+
/**
|
|
410
|
+
* The kind is "grid".
|
|
411
|
+
*/
|
|
412
|
+
kind: 'grid';
|
|
413
|
+
/**
|
|
414
|
+
* With true, the lines are numbered under a 2d camera. The default is true under a 2d camera and false under a 3d camera.
|
|
415
|
+
*/
|
|
416
|
+
labels?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
419
|
+
*/
|
|
420
|
+
visible?: InputRef;
|
|
421
|
+
/**
|
|
422
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
423
|
+
*/
|
|
424
|
+
opacity?: Opacity;
|
|
425
|
+
} | {
|
|
426
|
+
/**
|
|
427
|
+
* The kind is "label".
|
|
428
|
+
*/
|
|
429
|
+
kind: 'label';
|
|
430
|
+
/**
|
|
431
|
+
* The text is a string or a list of parts, read in the panel of the layer. (rule `timeline-parts`)
|
|
432
|
+
*/
|
|
433
|
+
text: Text;
|
|
434
|
+
/**
|
|
435
|
+
* The anchor is a point, a member, or a fixed place on the screen. (rule `label`)
|
|
436
|
+
*/
|
|
437
|
+
at: Anchor;
|
|
438
|
+
/**
|
|
439
|
+
* The text is drawn [dx, dy] CSS pixels from the anchor, with dy pointing down the screen. The default is [0, 0].
|
|
440
|
+
*
|
|
441
|
+
* @minItems 2
|
|
442
|
+
* @maxItems 2
|
|
443
|
+
*/
|
|
444
|
+
offset?: [number, number];
|
|
445
|
+
/**
|
|
446
|
+
* The text is aligned along the line at its "start", the default, its "center", or its "end".
|
|
447
|
+
*/
|
|
448
|
+
align?: 'start' | 'center' | 'end';
|
|
449
|
+
/**
|
|
450
|
+
* The text is aligned vertically at the "top", "middle", or "bottom" of its box, or at the "alphabetic" baseline of its last line. The default is "middle".
|
|
451
|
+
*/
|
|
452
|
+
baseline?: 'top' | 'middle' | 'bottom' | 'alphabetic';
|
|
453
|
+
/**
|
|
454
|
+
* The height of the text is given in CSS pixels, and it is 13 by default.
|
|
455
|
+
*/
|
|
456
|
+
size?: number;
|
|
457
|
+
/**
|
|
458
|
+
* The text is drawn in this color, and in the foreground of the theme by default.
|
|
459
|
+
*/
|
|
460
|
+
color?: Color;
|
|
461
|
+
/**
|
|
462
|
+
* The weight of the font is "normal", the default, or "bold".
|
|
463
|
+
*/
|
|
464
|
+
weight?: 'normal' | 'bold';
|
|
465
|
+
/**
|
|
466
|
+
* The spacing of lines is given as in matplotlib, and it is 1.2 by default.
|
|
467
|
+
*/
|
|
468
|
+
linespacing?: number;
|
|
469
|
+
/**
|
|
470
|
+
* The text is drawn on a rectangle with this fill and edge.
|
|
471
|
+
*/
|
|
472
|
+
box?: Box;
|
|
473
|
+
/**
|
|
474
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
475
|
+
*/
|
|
476
|
+
opacity?: Opacity;
|
|
477
|
+
/**
|
|
478
|
+
* With a leader, a line is drawn from the anchor toward the text. True gives the default line.
|
|
479
|
+
*/
|
|
480
|
+
leader?: boolean | {
|
|
481
|
+
/**
|
|
482
|
+
* The leader is drawn in this color, and in the color of the text by default.
|
|
483
|
+
*/
|
|
484
|
+
color?: Color;
|
|
485
|
+
/**
|
|
486
|
+
* The width of the leader is given in CSS pixels, and it is 1 by default.
|
|
487
|
+
*/
|
|
488
|
+
width?: number;
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* With a layer clock, the fractions along are computed by a channel of the layer's own. (rule `layer-clock`)
|
|
492
|
+
*/
|
|
493
|
+
clock?: LayerClock;
|
|
494
|
+
/**
|
|
495
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
496
|
+
*/
|
|
497
|
+
visible?: InputRef;
|
|
498
|
+
} | {
|
|
499
|
+
/**
|
|
500
|
+
* The kind is "points".
|
|
501
|
+
*/
|
|
502
|
+
kind: 'points';
|
|
503
|
+
/**
|
|
504
|
+
* The trajectories are taken from the set that this query resolves to. (rule `set-query`)
|
|
505
|
+
*/
|
|
506
|
+
sets: SetQuery;
|
|
507
|
+
/**
|
|
508
|
+
* The members of the set that are drawn are selected here. (rule `members`)
|
|
509
|
+
*/
|
|
510
|
+
members: MemberRef;
|
|
511
|
+
/**
|
|
512
|
+
* The samples are drawn with this marker, 4 CSS pixels wide in the foreground of the theme by default.
|
|
513
|
+
*/
|
|
514
|
+
marker?: Marker;
|
|
515
|
+
/**
|
|
516
|
+
* With "none", the default, every sample is drawn. With "grow", the samples appear one after another as the clock passes them. (rule `points`)
|
|
517
|
+
*/
|
|
518
|
+
reveal?: 'none' | 'grow';
|
|
519
|
+
/**
|
|
520
|
+
* In mode epoch, "clamp", the default, holds a member at its first sample before it starts, and "hidden" hides it. (rule `before-after`)
|
|
521
|
+
*/
|
|
522
|
+
before?: 'clamp' | 'hidden';
|
|
523
|
+
/**
|
|
524
|
+
* In mode epoch, "clamp", the default, holds a member at its last sample after it ends, and "hidden" hides it. (rule `before-after`)
|
|
525
|
+
*/
|
|
526
|
+
after?: 'clamp' | 'hidden';
|
|
527
|
+
/**
|
|
528
|
+
* With a layer clock, the fractions along are computed by a channel of the layer's own. (rule `layer-clock`)
|
|
529
|
+
*/
|
|
530
|
+
clock?: LayerClock;
|
|
531
|
+
/**
|
|
532
|
+
* With false, the layer is drawn but left out of the camera fit. The default is true.
|
|
533
|
+
*/
|
|
534
|
+
fit?: boolean;
|
|
535
|
+
/**
|
|
536
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
537
|
+
*/
|
|
538
|
+
opacity?: Opacity;
|
|
539
|
+
/**
|
|
540
|
+
* The layer is omitted while the toggle that this refers to is false. (rule `visible`)
|
|
541
|
+
*/
|
|
542
|
+
visible?: InputRef;
|
|
543
|
+
};
|
|
544
|
+
/**
|
|
545
|
+
* A name of a channel, a parameter, an attribute, or an array of the data container is a nonempty string.
|
|
546
|
+
*
|
|
547
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
548
|
+
* via the `definition` "name".
|
|
549
|
+
*/
|
|
550
|
+
export type Name = string;
|
|
551
|
+
/**
|
|
552
|
+
* A text is a string or a list of parts. A newline character starts a new line. (rule `plain-text`)
|
|
553
|
+
*
|
|
554
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
555
|
+
* via the `definition` "text".
|
|
556
|
+
*/
|
|
557
|
+
export type Text = string | TextPart[];
|
|
558
|
+
/**
|
|
559
|
+
* A part of a text is a string, shown as it is, or a value, a subscript, or a superscript. (rule `timeline-parts`)
|
|
560
|
+
*
|
|
561
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
562
|
+
* via the `definition` "textPart".
|
|
563
|
+
*/
|
|
564
|
+
export type TextPart = string | {
|
|
565
|
+
/**
|
|
566
|
+
* The value of the input with this id is shown.
|
|
567
|
+
*/
|
|
568
|
+
input: Id;
|
|
569
|
+
/**
|
|
570
|
+
* The number is shown to this many significant digits, from 1 to 17. Without it, an integer is shown as it is and any other number to six significant digits.
|
|
571
|
+
*/
|
|
572
|
+
digits?: number;
|
|
573
|
+
/**
|
|
574
|
+
* The number is shown with this many digits after the decimal point, from 0 to 17, in place of digits.
|
|
575
|
+
*/
|
|
576
|
+
decimals?: number;
|
|
577
|
+
/**
|
|
578
|
+
* With true, the thousands of the integer part are separated by commas. The default is false.
|
|
579
|
+
*/
|
|
580
|
+
grouping?: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* The number is multiplied by this factor before it is shown, and 1 by default.
|
|
583
|
+
*/
|
|
584
|
+
factor?: number;
|
|
585
|
+
/**
|
|
586
|
+
* This offset is added after the factor, and it is 0 by default.
|
|
587
|
+
*/
|
|
588
|
+
offset?: number;
|
|
589
|
+
/**
|
|
590
|
+
* The number is padded with spaces on the left to this many characters, and 0 by default.
|
|
591
|
+
*/
|
|
592
|
+
width?: number;
|
|
593
|
+
} | {
|
|
594
|
+
/**
|
|
595
|
+
* The value of the parameter with this name is shown, and the name @index is accepted.
|
|
596
|
+
*/
|
|
597
|
+
parameter: Name;
|
|
598
|
+
/**
|
|
599
|
+
* The number is shown to this many significant digits, from 1 to 17. Without it, an integer is shown as it is and any other number to six significant digits.
|
|
600
|
+
*/
|
|
601
|
+
digits?: number;
|
|
602
|
+
/**
|
|
603
|
+
* The number is shown with this many digits after the decimal point, from 0 to 17, in place of digits.
|
|
604
|
+
*/
|
|
605
|
+
decimals?: number;
|
|
606
|
+
/**
|
|
607
|
+
* With true, the thousands of the integer part are separated by commas. The default is false.
|
|
608
|
+
*/
|
|
609
|
+
grouping?: boolean;
|
|
610
|
+
/**
|
|
611
|
+
* The number is multiplied by this factor before it is shown, and 1 by default.
|
|
612
|
+
*/
|
|
613
|
+
factor?: number;
|
|
614
|
+
/**
|
|
615
|
+
* This offset is added after the factor, and it is 0 by default.
|
|
616
|
+
*/
|
|
617
|
+
offset?: number;
|
|
618
|
+
/**
|
|
619
|
+
* The number is padded with spaces on the left to this many characters, and 0 by default.
|
|
620
|
+
*/
|
|
621
|
+
width?: number;
|
|
622
|
+
} | {
|
|
623
|
+
/**
|
|
624
|
+
* The value of the attribute with this name is shown.
|
|
625
|
+
*/
|
|
626
|
+
attr: Name;
|
|
627
|
+
/**
|
|
628
|
+
* The number is shown to this many significant digits, from 1 to 17. Without it, an integer is shown as it is and any other number to six significant digits.
|
|
629
|
+
*/
|
|
630
|
+
digits?: number;
|
|
631
|
+
/**
|
|
632
|
+
* The number is shown with this many digits after the decimal point, from 0 to 17, in place of digits.
|
|
633
|
+
*/
|
|
634
|
+
decimals?: number;
|
|
635
|
+
/**
|
|
636
|
+
* With true, the thousands of the integer part are separated by commas. The default is false.
|
|
637
|
+
*/
|
|
638
|
+
grouping?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* The number is multiplied by this factor before it is shown, and 1 by default.
|
|
641
|
+
*/
|
|
642
|
+
factor?: number;
|
|
643
|
+
/**
|
|
644
|
+
* This offset is added after the factor, and it is 0 by default.
|
|
645
|
+
*/
|
|
646
|
+
offset?: number;
|
|
647
|
+
/**
|
|
648
|
+
* The number is padded with spaces on the left to this many characters, and 0 by default.
|
|
649
|
+
*/
|
|
650
|
+
width?: number;
|
|
651
|
+
} | {
|
|
652
|
+
/**
|
|
653
|
+
* The value of the channel with this name is shown. The channel @index is not allowed. (rule `index-channel`)
|
|
654
|
+
*/
|
|
655
|
+
channel: Name;
|
|
656
|
+
/**
|
|
657
|
+
* The number is shown to this many significant digits, from 1 to 17. Without it, an integer is shown as it is and any other number to six significant digits.
|
|
658
|
+
*/
|
|
659
|
+
digits?: number;
|
|
660
|
+
/**
|
|
661
|
+
* The number is shown with this many digits after the decimal point, from 0 to 17, in place of digits.
|
|
662
|
+
*/
|
|
663
|
+
decimals?: number;
|
|
664
|
+
/**
|
|
665
|
+
* With true, the thousands of the integer part are separated by commas. The default is false.
|
|
666
|
+
*/
|
|
667
|
+
grouping?: boolean;
|
|
668
|
+
/**
|
|
669
|
+
* The number is multiplied by this factor before it is shown, and 1 by default.
|
|
670
|
+
*/
|
|
671
|
+
factor?: number;
|
|
672
|
+
/**
|
|
673
|
+
* This offset is added after the factor, and it is 0 by default.
|
|
674
|
+
*/
|
|
675
|
+
offset?: number;
|
|
676
|
+
/**
|
|
677
|
+
* The number is padded with spaces on the left to this many characters, and 0 by default.
|
|
678
|
+
*/
|
|
679
|
+
width?: number;
|
|
680
|
+
} | {
|
|
681
|
+
/**
|
|
682
|
+
* The value is the "frame_index", the "frame_count", the shared "value" of the clock channel, or the "time" of the timeline in seconds. (rule `timeline-parts`)
|
|
683
|
+
*/
|
|
684
|
+
clock: 'frame_index' | 'frame_count' | 'value' | 'time';
|
|
685
|
+
/**
|
|
686
|
+
* The number is shown to this many significant digits, from 1 to 17. Without it, an integer is shown as it is and any other number to six significant digits.
|
|
687
|
+
*/
|
|
688
|
+
digits?: number;
|
|
689
|
+
/**
|
|
690
|
+
* The number is shown with this many digits after the decimal point, from 0 to 17, in place of digits.
|
|
691
|
+
*/
|
|
692
|
+
decimals?: number;
|
|
693
|
+
/**
|
|
694
|
+
* With true, the thousands of the integer part are separated by commas. The default is false.
|
|
695
|
+
*/
|
|
696
|
+
grouping?: boolean;
|
|
697
|
+
/**
|
|
698
|
+
* The number is multiplied by this factor before it is shown, and 1 by default.
|
|
699
|
+
*/
|
|
700
|
+
factor?: number;
|
|
701
|
+
/**
|
|
702
|
+
* This offset is added after the factor, and it is 0 by default.
|
|
703
|
+
*/
|
|
704
|
+
offset?: number;
|
|
705
|
+
/**
|
|
706
|
+
* The number is padded with spaces on the left to this many characters, and 0 by default.
|
|
707
|
+
*/
|
|
708
|
+
width?: number;
|
|
709
|
+
} | {
|
|
710
|
+
/**
|
|
711
|
+
* The value shown is given by these keyframes.
|
|
712
|
+
*/
|
|
713
|
+
keyframes: Keyframes;
|
|
714
|
+
/**
|
|
715
|
+
* The number is shown to this many significant digits, from 1 to 17. Without it, an integer is shown as it is and any other number to six significant digits.
|
|
716
|
+
*/
|
|
717
|
+
digits?: number;
|
|
718
|
+
/**
|
|
719
|
+
* The number is shown with this many digits after the decimal point, from 0 to 17, in place of digits.
|
|
720
|
+
*/
|
|
721
|
+
decimals?: number;
|
|
722
|
+
/**
|
|
723
|
+
* With true, the thousands of the integer part are separated by commas. The default is false.
|
|
724
|
+
*/
|
|
725
|
+
grouping?: boolean;
|
|
726
|
+
/**
|
|
727
|
+
* The number is multiplied by this factor before it is shown, and 1 by default.
|
|
728
|
+
*/
|
|
729
|
+
factor?: number;
|
|
730
|
+
/**
|
|
731
|
+
* This offset is added after the factor, and it is 0 by default.
|
|
732
|
+
*/
|
|
733
|
+
offset?: number;
|
|
734
|
+
/**
|
|
735
|
+
* The number is padded with spaces on the left to this many characters, and 0 by default.
|
|
736
|
+
*/
|
|
737
|
+
width?: number;
|
|
738
|
+
} | {
|
|
739
|
+
/**
|
|
740
|
+
* The pairs [t, text] are given with nondecreasing times t in seconds of the timeline.
|
|
741
|
+
*/
|
|
742
|
+
timed_text: [number | string, number | string][];
|
|
743
|
+
} | {
|
|
744
|
+
/**
|
|
745
|
+
* This text is set as a subscript at 0.7 times the size, and as plain text in a readout.
|
|
746
|
+
*/
|
|
747
|
+
sub: string;
|
|
748
|
+
} | {
|
|
749
|
+
/**
|
|
750
|
+
* This text is set as a superscript at 0.7 times the size, and as plain text in a readout.
|
|
751
|
+
*/
|
|
752
|
+
sup: string;
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* A control is a widget on the page that sets an input or drives the clock. (rule `control`)
|
|
756
|
+
*
|
|
757
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
758
|
+
* via the `definition` "control".
|
|
759
|
+
*/
|
|
760
|
+
export type Control = {
|
|
761
|
+
/**
|
|
762
|
+
* The kind is "slider".
|
|
763
|
+
*/
|
|
764
|
+
kind: 'slider';
|
|
765
|
+
/**
|
|
766
|
+
* The slider sets the input of kind parameter with this id.
|
|
767
|
+
*/
|
|
768
|
+
input: Id;
|
|
769
|
+
/**
|
|
770
|
+
* The name shown beside the slider is plain text.
|
|
771
|
+
*/
|
|
772
|
+
label: string;
|
|
773
|
+
/**
|
|
774
|
+
* The slider stops at the distinct values of the parameter over the sets that this query matches.
|
|
775
|
+
*/
|
|
776
|
+
domain: SetQuery;
|
|
777
|
+
} | {
|
|
778
|
+
/**
|
|
779
|
+
* The kind is "tabs" or "toggle".
|
|
780
|
+
*/
|
|
781
|
+
kind: 'tabs' | 'toggle';
|
|
782
|
+
/**
|
|
783
|
+
* The control sets the input with this id.
|
|
784
|
+
*/
|
|
785
|
+
input: Id;
|
|
786
|
+
/**
|
|
787
|
+
* The name shown beside the control is plain text.
|
|
788
|
+
*/
|
|
789
|
+
label: string;
|
|
790
|
+
} | {
|
|
791
|
+
/**
|
|
792
|
+
* The kind is "playback".
|
|
793
|
+
*/
|
|
794
|
+
kind: 'playback';
|
|
795
|
+
};
|
|
796
|
+
/**
|
|
797
|
+
* An overlay is a text or a legend drawn over the whole panel area.
|
|
798
|
+
*
|
|
799
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
800
|
+
* via the `definition` "overlay".
|
|
801
|
+
*/
|
|
802
|
+
export type Overlay = {
|
|
803
|
+
/**
|
|
804
|
+
* The kind is "text".
|
|
805
|
+
*/
|
|
806
|
+
kind: 'text';
|
|
807
|
+
/**
|
|
808
|
+
* The text is a string or a list of parts. (rule `timeline-parts`)
|
|
809
|
+
*/
|
|
810
|
+
text: Text;
|
|
811
|
+
/**
|
|
812
|
+
* The text is placed at [fx, fy], the fractions of the width and the height of the panel area.
|
|
813
|
+
*
|
|
814
|
+
* @minItems 2
|
|
815
|
+
* @maxItems 2
|
|
816
|
+
*/
|
|
817
|
+
at: [number, number];
|
|
818
|
+
/**
|
|
819
|
+
* The text is aligned along the line at its "start", the default, its "center", or its "end".
|
|
820
|
+
*/
|
|
821
|
+
align?: 'start' | 'center' | 'end';
|
|
822
|
+
/**
|
|
823
|
+
* The text is aligned vertically at the "top", "middle", or "bottom" of its box, or at the "alphabetic" baseline of its last line. The default is "middle".
|
|
824
|
+
*/
|
|
825
|
+
baseline?: 'top' | 'middle' | 'bottom' | 'alphabetic';
|
|
826
|
+
/**
|
|
827
|
+
* The height of the text is given in CSS pixels, and it is 13 by default.
|
|
828
|
+
*/
|
|
829
|
+
size?: number;
|
|
830
|
+
/**
|
|
831
|
+
* The text is drawn in this color, and in the foreground of the theme by default.
|
|
832
|
+
*/
|
|
833
|
+
color?: Color;
|
|
834
|
+
/**
|
|
835
|
+
* The weight of the font is "normal", the default, or "bold".
|
|
836
|
+
*/
|
|
837
|
+
weight?: 'normal' | 'bold';
|
|
838
|
+
/**
|
|
839
|
+
* The spacing of lines is given as in matplotlib, and it is 1.2 by default.
|
|
840
|
+
*/
|
|
841
|
+
linespacing?: number;
|
|
842
|
+
/**
|
|
843
|
+
* The text is drawn on a rectangle with this fill and edge.
|
|
844
|
+
*/
|
|
845
|
+
box?: Box;
|
|
846
|
+
/**
|
|
847
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
848
|
+
*/
|
|
849
|
+
opacity?: Opacity;
|
|
850
|
+
} | {
|
|
851
|
+
/**
|
|
852
|
+
* The kind is "legend".
|
|
853
|
+
*/
|
|
854
|
+
kind: 'legend';
|
|
855
|
+
/**
|
|
856
|
+
* The legend is placed at [fx, fy], the fractions of the width and the height of the panel area.
|
|
857
|
+
*
|
|
858
|
+
* @minItems 2
|
|
859
|
+
* @maxItems 2
|
|
860
|
+
*/
|
|
861
|
+
at: [number, number];
|
|
862
|
+
/**
|
|
863
|
+
* The entries fill the columns from the top down.
|
|
864
|
+
*/
|
|
865
|
+
entries: {
|
|
866
|
+
/**
|
|
867
|
+
* The label is a string, or a list of strings and subscript and superscript parts.
|
|
868
|
+
*/
|
|
869
|
+
label: string | (string | {
|
|
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
|
+
})[];
|
|
880
|
+
/**
|
|
881
|
+
* The entry is drawn as a short line.
|
|
882
|
+
*/
|
|
883
|
+
line?: {
|
|
884
|
+
/**
|
|
885
|
+
* The line is drawn in this color.
|
|
886
|
+
*/
|
|
887
|
+
color?: Color;
|
|
888
|
+
/**
|
|
889
|
+
* The width of the line is given in CSS pixels, and it is 2 by default.
|
|
890
|
+
*/
|
|
891
|
+
width?: number;
|
|
892
|
+
/**
|
|
893
|
+
* The line is dashed with dashes of on and gaps of off CSS pixels, given as [on, off].
|
|
894
|
+
*
|
|
895
|
+
* @minItems 2
|
|
896
|
+
* @maxItems 2
|
|
897
|
+
*/
|
|
898
|
+
dash?: [number, number];
|
|
899
|
+
/**
|
|
900
|
+
* The opacity of the line is in [0, 1], and it is 1 by default.
|
|
901
|
+
*/
|
|
902
|
+
opacity?: number;
|
|
903
|
+
};
|
|
904
|
+
/**
|
|
905
|
+
* The entry is drawn as this marker.
|
|
906
|
+
*/
|
|
907
|
+
marker?: Marker;
|
|
908
|
+
/**
|
|
909
|
+
* The entry is drawn as short lines side by side in these colors, e.g. one per member of a family.
|
|
910
|
+
*
|
|
911
|
+
* @minItems 1
|
|
912
|
+
*/
|
|
913
|
+
colors?: [Color, ...Color[]];
|
|
914
|
+
}[];
|
|
915
|
+
/**
|
|
916
|
+
* The number of entries per row is all of them by default.
|
|
917
|
+
*/
|
|
918
|
+
columns?: number;
|
|
919
|
+
/**
|
|
920
|
+
* The height of the text is given in CSS pixels, and it is 13 by default.
|
|
921
|
+
*/
|
|
922
|
+
size?: number;
|
|
923
|
+
/**
|
|
924
|
+
* The text is drawn in this color, and in the foreground of the theme by default.
|
|
925
|
+
*/
|
|
926
|
+
color?: Color;
|
|
927
|
+
/**
|
|
928
|
+
* The legend is aligned at its "start", "center", the default, or "end".
|
|
929
|
+
*/
|
|
930
|
+
align?: 'start' | 'center' | 'end';
|
|
931
|
+
/**
|
|
932
|
+
* The legend is aligned vertically at its "top", the default, "middle", or "bottom", or at the "alphabetic" baseline.
|
|
933
|
+
*/
|
|
934
|
+
baseline?: 'top' | 'middle' | 'bottom' | 'alphabetic';
|
|
935
|
+
/**
|
|
936
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
937
|
+
*/
|
|
938
|
+
opacity?: Opacity;
|
|
939
|
+
/**
|
|
940
|
+
* The length of the line of an entry is given in units of the size, and it is 2 by default.
|
|
941
|
+
*/
|
|
942
|
+
handle_length?: number;
|
|
943
|
+
/**
|
|
944
|
+
* The gap between the line and the label is given in units of the size, and it is 0.8 by default.
|
|
945
|
+
*/
|
|
946
|
+
handle_pad?: number;
|
|
947
|
+
/**
|
|
948
|
+
* The gap between columns is given in units of the size, and it is 2 by default.
|
|
949
|
+
*/
|
|
950
|
+
column_spacing?: number;
|
|
951
|
+
};
|
|
952
|
+
/**
|
|
953
|
+
* A fixed color is written #rrggbb, with two hexadecimal digits each for red, green, and blue.
|
|
18
954
|
*
|
|
19
955
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
20
|
-
* via the `definition` "
|
|
956
|
+
* via the `definition` "color".
|
|
21
957
|
*/
|
|
22
|
-
export type
|
|
958
|
+
export type Color = string;
|
|
23
959
|
/**
|
|
960
|
+
* A constant scalar is a number or an attribute, and it does not change along a trajectory. (rule `context-number`)
|
|
961
|
+
*
|
|
24
962
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
25
963
|
* via the `definition` "constantScalar".
|
|
26
964
|
*/
|
|
27
965
|
export type ConstantScalar = number | Attr;
|
|
28
966
|
/**
|
|
967
|
+
* A point is given by three scalars, its coordinates x, y, and z.
|
|
968
|
+
*
|
|
969
|
+
* @minItems 3
|
|
970
|
+
* @maxItems 3
|
|
971
|
+
*
|
|
29
972
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
30
|
-
* via the `definition` "
|
|
31
|
-
*/
|
|
32
|
-
export type Name = string;
|
|
33
|
-
/**
|
|
34
|
-
* This interface was referenced by `Scene`'s JSON-Schema
|
|
35
|
-
* via the `definition` "scalar".
|
|
36
|
-
*/
|
|
37
|
-
export type Scalar = number | Attr | ChannelRef;
|
|
38
|
-
/**
|
|
39
|
-
* This interface was referenced by `Scene`'s JSON-Schema
|
|
40
|
-
* via the `definition` "variable".
|
|
973
|
+
* via the `definition` "point".
|
|
41
974
|
*/
|
|
42
|
-
export type
|
|
43
|
-
kind: 'selector';
|
|
44
|
-
by?: 'nearest' | 'index';
|
|
45
|
-
parameter?: Name;
|
|
46
|
-
default: number;
|
|
47
|
-
scope?: 'scene' | 'panel';
|
|
48
|
-
} | {
|
|
49
|
-
kind: 'choice';
|
|
50
|
-
/**
|
|
51
|
-
* @minItems 1
|
|
52
|
-
*/
|
|
53
|
-
values: [string, ...string[]];
|
|
54
|
-
labels?: string[];
|
|
55
|
-
default: string;
|
|
56
|
-
scope?: 'scene' | 'panel';
|
|
57
|
-
} | {
|
|
58
|
-
kind: 'toggle';
|
|
59
|
-
default: boolean;
|
|
60
|
-
scope?: 'scene' | 'panel';
|
|
61
|
-
};
|
|
975
|
+
export type Point = [ConstantScalar, ConstantScalar, ConstantScalar];
|
|
62
976
|
/**
|
|
977
|
+
* A string is given as it is or read from an input of kind choice.
|
|
978
|
+
*
|
|
63
979
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
64
|
-
* via the `definition` "
|
|
980
|
+
* via the `definition` "stringValue".
|
|
65
981
|
*/
|
|
66
|
-
export type
|
|
67
|
-
kind: 'plane';
|
|
68
|
-
plane?: 'xy' | 'xz' | 'yz';
|
|
69
|
-
} | {
|
|
70
|
-
kind: 'orbit';
|
|
71
|
-
projection?: 'orthographic' | 'perspective';
|
|
72
|
-
up?: 'x' | 'y' | 'z';
|
|
73
|
-
};
|
|
982
|
+
export type StringValue = string | InputRef;
|
|
74
983
|
/**
|
|
984
|
+
* A set query is the way a scene refers to a trajectory set, by its id or by its tags. (rule `set-query`)
|
|
985
|
+
*
|
|
75
986
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
76
987
|
* via the `definition` "setQuery".
|
|
77
988
|
*/
|
|
78
989
|
export type SetQuery = {
|
|
990
|
+
/**
|
|
991
|
+
* The query matches the trajectory set with this id.
|
|
992
|
+
*/
|
|
79
993
|
set: Id;
|
|
80
994
|
} | {
|
|
995
|
+
/**
|
|
996
|
+
* The query matches every trajectory set whose tags contain all the given pairs. A value may be read from an input of kind choice.
|
|
997
|
+
*/
|
|
81
998
|
tags: {
|
|
82
999
|
[k: string]: StringValue | undefined;
|
|
83
1000
|
};
|
|
84
1001
|
};
|
|
85
1002
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*/
|
|
89
|
-
export type StringValue = string | VarRef;
|
|
90
|
-
/**
|
|
91
|
-
* This interface was referenced by `Scene`'s JSON-Schema
|
|
92
|
-
* via the `definition` "layer".
|
|
93
|
-
*/
|
|
94
|
-
export type Layer = {
|
|
95
|
-
kind: 'track';
|
|
96
|
-
sets: SetQuery;
|
|
97
|
-
members: MemberRef;
|
|
98
|
-
reveal?: 'none' | 'grow' | 'trail';
|
|
99
|
-
trail?: Trail;
|
|
100
|
-
head?: boolean | {
|
|
101
|
-
color?: Color;
|
|
102
|
-
size?: number;
|
|
103
|
-
};
|
|
104
|
-
before?: 'clamp' | 'hidden';
|
|
105
|
-
after?: 'clamp' | 'hidden';
|
|
106
|
-
color?: ColorSpec;
|
|
107
|
-
opacity?: number;
|
|
108
|
-
width?: number;
|
|
109
|
-
highlight?: {
|
|
110
|
-
var: Id;
|
|
111
|
-
width?: number;
|
|
112
|
-
opacity?: number;
|
|
113
|
-
kernel?: {
|
|
114
|
-
width: number;
|
|
115
|
-
opacity: number;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
visible?: VarRef;
|
|
119
|
-
} | {
|
|
120
|
-
kind: 'body';
|
|
121
|
-
body: Id;
|
|
122
|
-
trail?: Trail;
|
|
123
|
-
size?: number;
|
|
124
|
-
visible?: VarRef;
|
|
125
|
-
} | {
|
|
126
|
-
kind: 'axes';
|
|
127
|
-
span?: 'positive' | 'full';
|
|
128
|
-
visible?: VarRef;
|
|
129
|
-
} | {
|
|
130
|
-
kind: 'grid';
|
|
131
|
-
labels?: boolean;
|
|
132
|
-
visible?: VarRef;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
1003
|
+
* A member reference says which trajectories of a set are drawn: "all", one by index, an evenly spaced selection, or the one that an input of kind parameter selects. (rule `members`)
|
|
1004
|
+
*
|
|
135
1005
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
136
1006
|
* via the `definition` "memberRef".
|
|
137
1007
|
*/
|
|
138
1008
|
export type MemberRef = 'all' | {
|
|
1009
|
+
/**
|
|
1010
|
+
* The trajectory with this number, counted from 0, is selected. A number at or past the count of trajectories is an error. (rule `members`)
|
|
1011
|
+
*/
|
|
139
1012
|
index: number;
|
|
140
1013
|
} | {
|
|
141
|
-
|
|
142
|
-
|
|
1014
|
+
/**
|
|
1015
|
+
* About this many trajectories are selected, and every trajectory when it is at least the count. (rule `members`)
|
|
1016
|
+
*/
|
|
1017
|
+
evenly_spaced: number;
|
|
1018
|
+
} | InputRef;
|
|
1019
|
+
/**
|
|
1020
|
+
* A colormap is named after its matplotlib equivalent.
|
|
1021
|
+
*
|
|
1022
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1023
|
+
* via the `definition` "colormapName".
|
|
1024
|
+
*/
|
|
1025
|
+
export type ColormapName = 'viridis' | 'plasma' | 'cividis' | 'blues' | 'reds';
|
|
143
1026
|
/**
|
|
1027
|
+
* A color is a fixed color, a colormap over a parameter or a channel, or a color by thresholds of a channel.
|
|
1028
|
+
*
|
|
144
1029
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
145
1030
|
* via the `definition` "colorSpec".
|
|
146
1031
|
*/
|
|
147
1032
|
export type ColorSpec = Color | {
|
|
1033
|
+
/**
|
|
1034
|
+
* The colormap is taken over the parameter with this name, which the set of the layer carries.
|
|
1035
|
+
*/
|
|
148
1036
|
parameter: Name;
|
|
1037
|
+
/**
|
|
1038
|
+
* The colormap is a name or is picked by an input of kind choice.
|
|
1039
|
+
*/
|
|
149
1040
|
colormap: ColormapName | ColormapByChoice;
|
|
150
1041
|
/**
|
|
1042
|
+
* This interval of values is mapped onto the colormap. It is the extent of the values over the set by default.
|
|
1043
|
+
*
|
|
151
1044
|
* @minItems 2
|
|
152
1045
|
* @maxItems 2
|
|
153
1046
|
*/
|
|
154
1047
|
range?: [number, number];
|
|
155
1048
|
/**
|
|
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.
|
|
1050
|
+
*
|
|
156
1051
|
* @minItems 2
|
|
157
1052
|
* @maxItems 2
|
|
158
1053
|
*/
|
|
159
|
-
|
|
1054
|
+
truncate?: [number, number];
|
|
160
1055
|
} | {
|
|
1056
|
+
/**
|
|
1057
|
+
* The colormap is taken over the channel with this name, which the set of the layer carries.
|
|
1058
|
+
*/
|
|
161
1059
|
channel: Name;
|
|
1060
|
+
/**
|
|
1061
|
+
* The colormap is a name or is picked by an input of kind choice.
|
|
1062
|
+
*/
|
|
162
1063
|
colormap: ColormapName | ColormapByChoice;
|
|
163
1064
|
/**
|
|
1065
|
+
* This interval of values is mapped onto the colormap. It is the extent of the values over the set by default.
|
|
1066
|
+
*
|
|
164
1067
|
* @minItems 2
|
|
165
1068
|
* @maxItems 2
|
|
166
1069
|
*/
|
|
167
1070
|
range?: [number, number];
|
|
168
1071
|
/**
|
|
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.
|
|
1073
|
+
*
|
|
169
1074
|
* @minItems 2
|
|
170
1075
|
* @maxItems 2
|
|
171
1076
|
*/
|
|
172
|
-
|
|
1077
|
+
truncate?: [number, number];
|
|
1078
|
+
} | {
|
|
1079
|
+
/**
|
|
1080
|
+
* The thresholds apply to the channel with this name, which the set of the layer carries.
|
|
1081
|
+
*/
|
|
1082
|
+
channel: Name;
|
|
1083
|
+
/**
|
|
1084
|
+
* The thresholds are given in increasing order.
|
|
1085
|
+
*
|
|
1086
|
+
* @minItems 1
|
|
1087
|
+
*/
|
|
1088
|
+
thresholds: [number, ...number[]];
|
|
1089
|
+
/**
|
|
1090
|
+
* The colors are given one more than the thresholds.
|
|
1091
|
+
*
|
|
1092
|
+
* @minItems 2
|
|
1093
|
+
*/
|
|
1094
|
+
colors: [Color, Color, ...Color[]];
|
|
173
1095
|
};
|
|
174
1096
|
/**
|
|
1097
|
+
* The camera is the way a panel shows its display frame, as a flat picture of one plane or as a three-dimensional picture.
|
|
1098
|
+
*
|
|
175
1099
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
176
|
-
* via the `definition` "
|
|
177
|
-
*/
|
|
178
|
-
export type ColormapName = 'viridis' | 'plasma' | 'cividis' | 'blues' | 'reds';
|
|
179
|
-
/**
|
|
180
|
-
* This interface was referenced by `Scene`'s JSON-Schema
|
|
181
|
-
* via the `definition` "control".
|
|
1100
|
+
* via the `definition` "camera".
|
|
182
1101
|
*/
|
|
183
|
-
export type
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
1102
|
+
export type Camera = {
|
|
1103
|
+
/**
|
|
1104
|
+
* The kind is "2d".
|
|
1105
|
+
*/
|
|
1106
|
+
kind: '2d';
|
|
1107
|
+
/**
|
|
1108
|
+
* The picture shows the plane "xy", the default, "xz", or "yz". (rule `panel`)
|
|
1109
|
+
*/
|
|
1110
|
+
plane?: 'xy' | 'xz' | 'yz';
|
|
1111
|
+
/**
|
|
1112
|
+
* With "equal", the default, one unit is as long across the panel as up it. With "free", the two axes are scaled separately.
|
|
1113
|
+
*/
|
|
1114
|
+
aspect?: 'equal' | 'free';
|
|
1115
|
+
/**
|
|
1116
|
+
* The window that the panel shows is given by camera keyframes over the timeline. (rule `camera-keyframes`)
|
|
1117
|
+
*
|
|
1118
|
+
* @minItems 1
|
|
1119
|
+
*/
|
|
1120
|
+
keyframes?: [
|
|
1121
|
+
{
|
|
1122
|
+
/**
|
|
1123
|
+
* The time of the keyframe is given in seconds of the timeline.
|
|
1124
|
+
*/
|
|
1125
|
+
at: number;
|
|
1126
|
+
/**
|
|
1127
|
+
* The extent of the window along the first axis of the plane is given in units of the display frame.
|
|
1128
|
+
*/
|
|
1129
|
+
width: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* The extent of the window along the second axis is given only under "aspect": "free", and the aspect ratio of the panel gives it otherwise.
|
|
1132
|
+
*/
|
|
1133
|
+
height?: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* The center of the window is given by two coordinates along the axes of the plane.
|
|
1136
|
+
*
|
|
1137
|
+
* @minItems 2
|
|
1138
|
+
* @maxItems 2
|
|
1139
|
+
*/
|
|
1140
|
+
center?: [number, number];
|
|
1141
|
+
/**
|
|
1142
|
+
* The center follows the mean of the moving points of these targets, plus the offset. (rule `camera-keyframes`)
|
|
1143
|
+
*
|
|
1144
|
+
* @minItems 1
|
|
1145
|
+
*/
|
|
1146
|
+
follow?: [
|
|
1147
|
+
{
|
|
1148
|
+
/**
|
|
1149
|
+
* The target is a member of the trajectories layer at this index of the layers of the panel.
|
|
1150
|
+
*/
|
|
1151
|
+
layer: number;
|
|
1152
|
+
/**
|
|
1153
|
+
* The target is the member with this number in the set of the layer.
|
|
1154
|
+
*/
|
|
1155
|
+
member: number;
|
|
1156
|
+
},
|
|
1157
|
+
...{
|
|
1158
|
+
/**
|
|
1159
|
+
* The target is a member of the trajectories layer at this index of the layers of the panel.
|
|
1160
|
+
*/
|
|
1161
|
+
layer: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* The target is the member with this number in the set of the layer.
|
|
1164
|
+
*/
|
|
1165
|
+
member: number;
|
|
1166
|
+
}[]
|
|
1167
|
+
];
|
|
1168
|
+
/**
|
|
1169
|
+
* This offset is added to the center of a follow keyframe, and it is [0, 0] by default.
|
|
1170
|
+
*
|
|
1171
|
+
* @minItems 2
|
|
1172
|
+
* @maxItems 2
|
|
1173
|
+
*/
|
|
1174
|
+
offset?: [number, number];
|
|
1175
|
+
/**
|
|
1176
|
+
* The window travels to this keyframe from the one before by this ease, and linearly by default. (rule `ease`)
|
|
1177
|
+
*/
|
|
1178
|
+
ease?: Ease;
|
|
1179
|
+
},
|
|
1180
|
+
...{
|
|
1181
|
+
/**
|
|
1182
|
+
* The time of the keyframe is given in seconds of the timeline.
|
|
1183
|
+
*/
|
|
1184
|
+
at: number;
|
|
1185
|
+
/**
|
|
1186
|
+
* The extent of the window along the first axis of the plane is given in units of the display frame.
|
|
1187
|
+
*/
|
|
1188
|
+
width: number;
|
|
1189
|
+
/**
|
|
1190
|
+
* The extent of the window along the second axis is given only under "aspect": "free", and the aspect ratio of the panel gives it otherwise.
|
|
1191
|
+
*/
|
|
1192
|
+
height?: number;
|
|
1193
|
+
/**
|
|
1194
|
+
* The center of the window is given by two coordinates along the axes of the plane.
|
|
1195
|
+
*
|
|
1196
|
+
* @minItems 2
|
|
1197
|
+
* @maxItems 2
|
|
1198
|
+
*/
|
|
1199
|
+
center?: [number, number];
|
|
1200
|
+
/**
|
|
1201
|
+
* The center follows the mean of the moving points of these targets, plus the offset. (rule `camera-keyframes`)
|
|
1202
|
+
*
|
|
1203
|
+
* @minItems 1
|
|
1204
|
+
*/
|
|
1205
|
+
follow?: [
|
|
1206
|
+
{
|
|
1207
|
+
/**
|
|
1208
|
+
* The target is a member of the trajectories layer at this index of the layers of the panel.
|
|
1209
|
+
*/
|
|
1210
|
+
layer: number;
|
|
1211
|
+
/**
|
|
1212
|
+
* The target is the member with this number in the set of the layer.
|
|
1213
|
+
*/
|
|
1214
|
+
member: number;
|
|
1215
|
+
},
|
|
1216
|
+
...{
|
|
1217
|
+
/**
|
|
1218
|
+
* The target is a member of the trajectories layer at this index of the layers of the panel.
|
|
1219
|
+
*/
|
|
1220
|
+
layer: number;
|
|
1221
|
+
/**
|
|
1222
|
+
* The target is the member with this number in the set of the layer.
|
|
1223
|
+
*/
|
|
1224
|
+
member: number;
|
|
1225
|
+
}[]
|
|
1226
|
+
];
|
|
1227
|
+
/**
|
|
1228
|
+
* This offset is added to the center of a follow keyframe, and it is [0, 0] by default.
|
|
1229
|
+
*
|
|
1230
|
+
* @minItems 2
|
|
1231
|
+
* @maxItems 2
|
|
1232
|
+
*/
|
|
1233
|
+
offset?: [number, number];
|
|
1234
|
+
/**
|
|
1235
|
+
* The window travels to this keyframe from the one before by this ease, and linearly by default. (rule `ease`)
|
|
1236
|
+
*/
|
|
1237
|
+
ease?: Ease;
|
|
1238
|
+
}[]
|
|
1239
|
+
];
|
|
192
1240
|
} | {
|
|
193
|
-
|
|
1241
|
+
/**
|
|
1242
|
+
* The kind is "3d".
|
|
1243
|
+
*/
|
|
1244
|
+
kind: '3d';
|
|
1245
|
+
/**
|
|
1246
|
+
* With "perspective", the default, far objects look smaller. With "orthographic", parallel lines stay parallel.
|
|
1247
|
+
*/
|
|
1248
|
+
projection?: 'orthographic' | 'perspective';
|
|
1249
|
+
/**
|
|
1250
|
+
* The axis of the display frame that points up the screen is "x", "y", or "z", the default.
|
|
1251
|
+
*/
|
|
1252
|
+
up?: 'x' | 'y' | 'z';
|
|
1253
|
+
/**
|
|
1254
|
+
* Every position is multiplied by these three positive factors along x, y, and z, which are 1 by default.
|
|
1255
|
+
*
|
|
1256
|
+
* @minItems 3
|
|
1257
|
+
* @maxItems 3
|
|
1258
|
+
*/
|
|
1259
|
+
stretch?: [number, number, number];
|
|
1260
|
+
/**
|
|
1261
|
+
* The camera is turned about its up axis by this many degrees over each loop, and by 0 by default.
|
|
1262
|
+
*/
|
|
1263
|
+
auto_rotate?: number;
|
|
194
1264
|
};
|
|
195
1265
|
/**
|
|
1266
|
+
* A layout node holds one shown panel or splits its area into two parts.
|
|
1267
|
+
*
|
|
196
1268
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
197
1269
|
* via the `definition` "layout".
|
|
198
1270
|
*/
|
|
199
1271
|
export type Layout = {
|
|
1272
|
+
/**
|
|
1273
|
+
* The kind is "panel".
|
|
1274
|
+
*/
|
|
200
1275
|
kind: 'panel';
|
|
1276
|
+
/**
|
|
1277
|
+
* The leaf holds the shown panel with this id.
|
|
1278
|
+
*/
|
|
201
1279
|
id: Id;
|
|
202
1280
|
} | {
|
|
1281
|
+
/**
|
|
1282
|
+
* The kind is "split".
|
|
1283
|
+
*/
|
|
203
1284
|
kind: 'split';
|
|
1285
|
+
/**
|
|
1286
|
+
* With "row", the parts are side by side, and with "col" one is above the other.
|
|
1287
|
+
*/
|
|
204
1288
|
dir: 'row' | 'col';
|
|
1289
|
+
/**
|
|
1290
|
+
* The first part takes this fraction of the area, in (0, 1).
|
|
1291
|
+
*/
|
|
205
1292
|
ratio: number;
|
|
1293
|
+
/**
|
|
1294
|
+
* The first part is given by this node.
|
|
1295
|
+
*/
|
|
206
1296
|
a: Layout;
|
|
1297
|
+
/**
|
|
1298
|
+
* The second part is given by this node.
|
|
1299
|
+
*/
|
|
207
1300
|
b: Layout;
|
|
1301
|
+
/**
|
|
1302
|
+
* The ratio is given by keyframes over the timeline, with values in [0, 1], and a part whose share is 0 is not drawn.
|
|
1303
|
+
*/
|
|
1304
|
+
keyframes?: Keyframes;
|
|
1305
|
+
};
|
|
1306
|
+
/**
|
|
1307
|
+
* An ease is the way a value travels to a keyframe from the one before: "linear", "smooth", "in", "out", "in-out", or "hold". (rule `ease`)
|
|
1308
|
+
*
|
|
1309
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1310
|
+
* via the `definition` "ease".
|
|
1311
|
+
*/
|
|
1312
|
+
export type Ease = 'linear' | 'smooth' | 'in' | 'out' | 'in-out' | 'hold';
|
|
1313
|
+
/**
|
|
1314
|
+
* A list of keyframes is written [t, v] or [t, v, ease] each, with the time t in seconds of the timeline. The times are nondecreasing. (rule `keyframes`)
|
|
1315
|
+
*
|
|
1316
|
+
* @minItems 1
|
|
1317
|
+
*
|
|
1318
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1319
|
+
* via the `definition` "keyframes".
|
|
1320
|
+
*/
|
|
1321
|
+
export type Keyframes = [
|
|
1322
|
+
[
|
|
1323
|
+
number | string,
|
|
1324
|
+
number | string
|
|
1325
|
+
] | [number | string, number | string, number | string],
|
|
1326
|
+
...([number | string, number | string] | [number | string, number | string, number | string])[]
|
|
1327
|
+
];
|
|
1328
|
+
/**
|
|
1329
|
+
* An opacity is a number in [0, 1] or a keyframed value whose values lie in [0, 1]. (rule `timeline`)
|
|
1330
|
+
*
|
|
1331
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1332
|
+
* via the `definition` "opacity".
|
|
1333
|
+
*/
|
|
1334
|
+
export type Opacity = number | Keyframed;
|
|
1335
|
+
/**
|
|
1336
|
+
* A size is a positive number of CSS pixels or a keyframed value whose values are positive. (rule `timeline`)
|
|
1337
|
+
*
|
|
1338
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1339
|
+
* via the `definition` "size".
|
|
1340
|
+
*/
|
|
1341
|
+
export type Size = number | Keyframed;
|
|
1342
|
+
/**
|
|
1343
|
+
* An anchor is the place at which a label is written. (rule `label`)
|
|
1344
|
+
*
|
|
1345
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1346
|
+
* via the `definition` "anchor".
|
|
1347
|
+
*/
|
|
1348
|
+
export type Anchor = {
|
|
1349
|
+
/**
|
|
1350
|
+
* The point is given by three coordinates.
|
|
1351
|
+
*
|
|
1352
|
+
* @minItems 3
|
|
1353
|
+
* @maxItems 3
|
|
1354
|
+
*/
|
|
1355
|
+
point: [number, number, number];
|
|
1356
|
+
/**
|
|
1357
|
+
* The point is given in the frame with this id, and in the display frame by default.
|
|
1358
|
+
*/
|
|
1359
|
+
frame?: Id;
|
|
1360
|
+
} | {
|
|
1361
|
+
/**
|
|
1362
|
+
* The member is taken from the set that this query resolves to. (rule `set-query`)
|
|
1363
|
+
*/
|
|
1364
|
+
sets: SetQuery;
|
|
1365
|
+
/**
|
|
1366
|
+
* The member with this number is followed.
|
|
1367
|
+
*/
|
|
1368
|
+
member: number;
|
|
1369
|
+
} | {
|
|
1370
|
+
/**
|
|
1371
|
+
* The place is given as [fx, fy], the fractions of the width from the left and of the height from the top.
|
|
1372
|
+
*
|
|
1373
|
+
* @minItems 2
|
|
1374
|
+
* @maxItems 2
|
|
1375
|
+
*/
|
|
1376
|
+
screen: [number, number];
|
|
208
1377
|
};
|
|
209
1378
|
/**
|
|
210
|
-
* Structure of scene.tys, version 0.
|
|
1379
|
+
* Structure of scene.tys, version 0.5. The rules that this schema cannot express are in tycho-scene.md.
|
|
211
1380
|
*/
|
|
212
1381
|
export interface Scene {
|
|
1382
|
+
/**
|
|
1383
|
+
* The format is always the string "tycho-scene". (rule `scene`)
|
|
1384
|
+
*/
|
|
213
1385
|
format: 'tycho-scene';
|
|
1386
|
+
/**
|
|
1387
|
+
* The version of the scene format is written as "major.minor", e.g. "0.5". (rule `version`)
|
|
1388
|
+
*/
|
|
214
1389
|
version: string;
|
|
1390
|
+
/**
|
|
1391
|
+
* The features that the scene uses are listed here, so that a runtime that does not implement one rejects the scene. (rule `version`)
|
|
1392
|
+
*/
|
|
215
1393
|
requires?: string[];
|
|
1394
|
+
/**
|
|
1395
|
+
* The program that wrote the scene is named here, e.g. pytycho with its version.
|
|
1396
|
+
*/
|
|
216
1397
|
generator?: string;
|
|
1398
|
+
/**
|
|
1399
|
+
* The title of the page is plain text. (rule `plain-text`)
|
|
1400
|
+
*/
|
|
217
1401
|
title?: string;
|
|
1402
|
+
/**
|
|
1403
|
+
* The colors and the font of the page are given here.
|
|
1404
|
+
*/
|
|
218
1405
|
theme?: Theme;
|
|
1406
|
+
/**
|
|
1407
|
+
* The frames of the scene are declared here by id, and together they form one tree. (rule `frame`)
|
|
1408
|
+
*/
|
|
219
1409
|
frames: {
|
|
220
1410
|
[k: string]: Frame | undefined;
|
|
221
1411
|
};
|
|
1412
|
+
/**
|
|
1413
|
+
* The bodies, i.e. named points such as the primary and the secondary, are declared here by id. (rule `body`)
|
|
1414
|
+
*/
|
|
222
1415
|
bodies?: {
|
|
223
1416
|
[k: string]: Body | undefined;
|
|
224
1417
|
};
|
|
225
|
-
|
|
226
|
-
|
|
1418
|
+
/**
|
|
1419
|
+
* The trajectory sets of the scene are declared here by id. (rule `trajectory-set`)
|
|
1420
|
+
*/
|
|
1421
|
+
trajectory_sets: {
|
|
1422
|
+
[k: string]: TrajectorySet | undefined;
|
|
227
1423
|
};
|
|
228
|
-
|
|
229
|
-
|
|
1424
|
+
/**
|
|
1425
|
+
* The inputs, i.e. the values that the person at the page can change, are declared here by id. (rule `input`)
|
|
1426
|
+
*/
|
|
1427
|
+
inputs?: {
|
|
1428
|
+
[k: string]: Input | undefined;
|
|
230
1429
|
};
|
|
1430
|
+
/**
|
|
1431
|
+
* The clock, i.e. the time of the animation shared by every panel, is described here. (rule `clock`)
|
|
1432
|
+
*/
|
|
231
1433
|
clock: Clock;
|
|
232
|
-
|
|
233
|
-
|
|
1434
|
+
/**
|
|
1435
|
+
* The panels that a page may show are declared here by id. (rule `panel`)
|
|
1436
|
+
*/
|
|
1437
|
+
panels: {
|
|
1438
|
+
[k: string]: Panel | undefined;
|
|
234
1439
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
1440
|
+
/**
|
|
1441
|
+
* The controls are the widgets on the page that set an input or drive the clock. (rule `control`)
|
|
1442
|
+
*/
|
|
1443
|
+
controls?: Control[];
|
|
1444
|
+
/**
|
|
1445
|
+
* The readouts are the texts on the page that show current values.
|
|
1446
|
+
*/
|
|
1447
|
+
readouts?: Readout[];
|
|
1448
|
+
/**
|
|
1449
|
+
* The state at the start, with the panels shown and the values of the inputs, is given here. (rule `state`)
|
|
1450
|
+
*/
|
|
1451
|
+
initial: State;
|
|
1452
|
+
/**
|
|
1453
|
+
* The steps are the named times of the timeline at which a presentation stops. (rule `steps`)
|
|
1454
|
+
*/
|
|
1455
|
+
steps?: {
|
|
1456
|
+
/**
|
|
1457
|
+
* The step is found by this identifier, which differs from the ids of the other steps. (rule `identifier`)
|
|
1458
|
+
*/
|
|
1459
|
+
id: Id;
|
|
1460
|
+
/**
|
|
1461
|
+
* The time of the step is given in seconds of the timeline, within one loop. (rule `steps`)
|
|
1462
|
+
*/
|
|
1463
|
+
at: number;
|
|
1464
|
+
/**
|
|
1465
|
+
* The name of the step is plain text, and it may be left out.
|
|
1466
|
+
*/
|
|
1467
|
+
label?: string;
|
|
1468
|
+
}[];
|
|
1469
|
+
/**
|
|
1470
|
+
* The overlays are texts and legends drawn over the whole panel area rather than in one panel.
|
|
1471
|
+
*/
|
|
1472
|
+
overlays?: Overlay[];
|
|
247
1473
|
}
|
|
248
1474
|
/**
|
|
1475
|
+
* A frame is a coordinate system, defined against its parent by an origin, a rotation, and a scale. The root frame has none of them. (rule `transform`)
|
|
1476
|
+
*
|
|
249
1477
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
250
1478
|
* via the `definition` "frame".
|
|
251
1479
|
*/
|
|
252
1480
|
export interface Frame {
|
|
1481
|
+
/**
|
|
1482
|
+
* The name shown for the frame is plain text, and it does not affect any computation.
|
|
1483
|
+
*/
|
|
253
1484
|
label?: string;
|
|
254
1485
|
/**
|
|
1486
|
+
* The three axis labels, e.g. ["x", "y", "z"], are used as the titles of the axes.
|
|
1487
|
+
*
|
|
255
1488
|
* @minItems 3
|
|
256
1489
|
* @maxItems 3
|
|
257
1490
|
*/
|
|
258
1491
|
axes?: [string, string, string];
|
|
1492
|
+
/**
|
|
1493
|
+
* The unit label, e.g. "DU", is appended to the titles of the axes.
|
|
1494
|
+
*/
|
|
259
1495
|
unit?: string;
|
|
1496
|
+
/**
|
|
1497
|
+
* The frame is defined against the frame with this id, and only the root frame lacks a parent. (rule `frame`)
|
|
1498
|
+
*/
|
|
260
1499
|
parent?: Id;
|
|
261
|
-
|
|
1500
|
+
/**
|
|
1501
|
+
* The origin of the frame is given in the coordinates of the parent, as three scalars or at a body. It is 0 by default. (rule `origin`)
|
|
1502
|
+
*/
|
|
1503
|
+
origin?: [Scalar, Scalar, Scalar] | {
|
|
1504
|
+
/**
|
|
1505
|
+
* The origin is placed at the body with this id.
|
|
1506
|
+
*/
|
|
262
1507
|
body: Id;
|
|
263
1508
|
};
|
|
1509
|
+
/**
|
|
1510
|
+
* The axes of the frame are turned against those of the parent by an angle about one axis. Without a rotation, the axes are parallel. (rule `transform`)
|
|
1511
|
+
*/
|
|
264
1512
|
rotation?: {
|
|
1513
|
+
/**
|
|
1514
|
+
* The rotation is made about this axis of the parent.
|
|
1515
|
+
*/
|
|
265
1516
|
axis: 'x' | 'y' | 'z';
|
|
1517
|
+
/**
|
|
1518
|
+
* The angle is given in radians, in the right-handed sense, so that a point fixed in the parent appears in the frame rotated by this angle. (rule `transform`)
|
|
1519
|
+
*/
|
|
266
1520
|
angle: Scalar;
|
|
267
1521
|
};
|
|
1522
|
+
/**
|
|
1523
|
+
* One parent unit is this many units of the frame. The scale is 1 by default, and it is never zero. (rule `origin`)
|
|
1524
|
+
*/
|
|
268
1525
|
scale?: Scalar;
|
|
269
1526
|
}
|
|
270
1527
|
/**
|
|
1528
|
+
* An attribute scalar has the value factor * attrs[attr] + offset, where attrs[attr] is the attribute of the trajectory set in context. (rule `context-number`)
|
|
1529
|
+
*
|
|
271
1530
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
272
1531
|
* via the `definition` "attr".
|
|
273
1532
|
*/
|
|
274
1533
|
export interface Attr {
|
|
1534
|
+
/**
|
|
1535
|
+
* The attribute is read by this name from the attrs of the trajectory set in context.
|
|
1536
|
+
*/
|
|
275
1537
|
attr: Name;
|
|
1538
|
+
/**
|
|
1539
|
+
* The attribute is multiplied by this factor, which is 1 by default.
|
|
1540
|
+
*/
|
|
276
1541
|
factor?: number;
|
|
1542
|
+
/**
|
|
1543
|
+
* This offset is added after the factor, and it is 0 by default.
|
|
1544
|
+
*/
|
|
277
1545
|
offset?: number;
|
|
278
1546
|
}
|
|
279
1547
|
/**
|
|
1548
|
+
* A channel scalar has the value of the channel at the sample in context, hence it changes along the trajectory. (rule `context-number`)
|
|
1549
|
+
*
|
|
280
1550
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
281
1551
|
* via the `definition` "channelRef".
|
|
282
1552
|
*/
|
|
283
1553
|
export interface ChannelRef {
|
|
1554
|
+
/**
|
|
1555
|
+
* The channel is read by this name from the trajectory set in context.
|
|
1556
|
+
*/
|
|
284
1557
|
channel: Name;
|
|
285
1558
|
}
|
|
286
1559
|
/**
|
|
1560
|
+
* A body is a named point, e.g. a primary of the three-body problem, without a radius or a shape. (rule `body`)
|
|
1561
|
+
*
|
|
287
1562
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
288
1563
|
* via the `definition` "body".
|
|
289
1564
|
*/
|
|
290
1565
|
export interface Body {
|
|
1566
|
+
/**
|
|
1567
|
+
* The name shown for the body is plain text.
|
|
1568
|
+
*/
|
|
291
1569
|
label?: string;
|
|
1570
|
+
/**
|
|
1571
|
+
* The position of the body is given in the frame with this id. (rule `body`)
|
|
1572
|
+
*/
|
|
292
1573
|
frame: Id;
|
|
1574
|
+
/**
|
|
1575
|
+
* The position is given by three constant scalars in the frame of the body. (rule `body`)
|
|
1576
|
+
*/
|
|
293
1577
|
position: Point;
|
|
1578
|
+
/**
|
|
1579
|
+
* The body is drawn in this color, and in the foreground of the theme by default.
|
|
1580
|
+
*/
|
|
294
1581
|
color?: Color;
|
|
1582
|
+
/**
|
|
1583
|
+
* A uint8 array of the data container with this name holds a PNG, JPEG, or WebP image, which is drawn in place of the disc of the body.
|
|
1584
|
+
*/
|
|
1585
|
+
image?: Name;
|
|
295
1586
|
}
|
|
296
1587
|
/**
|
|
1588
|
+
* A trajectory set holds trajectories that share a frame and a meaning, e.g. the members of a family of periodic orbits. (rule `trajectory-set`)
|
|
1589
|
+
*
|
|
297
1590
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
298
|
-
* via the `definition` "
|
|
1591
|
+
* via the `definition` "trajectorySet".
|
|
299
1592
|
*/
|
|
300
|
-
export interface
|
|
1593
|
+
export interface TrajectorySet {
|
|
1594
|
+
/**
|
|
1595
|
+
* The name of the set is plain text. It is written by pytycho and not drawn by the runtime.
|
|
1596
|
+
*/
|
|
301
1597
|
label?: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* The positions of the set are given in the frame with this id.
|
|
1600
|
+
*/
|
|
302
1601
|
frame: Id;
|
|
1602
|
+
/**
|
|
1603
|
+
* The tags label the whole set, each a string value under a name, e.g. "family": "7". A set query finds sets by them. (rule `set-query`)
|
|
1604
|
+
*/
|
|
303
1605
|
tags?: {
|
|
304
1606
|
[k: string]: string | undefined;
|
|
305
1607
|
};
|
|
1608
|
+
/**
|
|
1609
|
+
* The attributes are numbers of the whole set, e.g. "mu": 0.01215. (rule `context-number`)
|
|
1610
|
+
*/
|
|
306
1611
|
attrs?: {
|
|
307
1612
|
[k: string]: number | undefined;
|
|
308
1613
|
};
|
|
309
|
-
|
|
1614
|
+
/**
|
|
1615
|
+
* The number of trajectories in the set is at least 1.
|
|
1616
|
+
*/
|
|
1617
|
+
trajectories: number;
|
|
1618
|
+
/**
|
|
1619
|
+
* A uint32 array of shape (trajectories + 1,) with this name marks where each trajectory begins in the arrays of the set. Each trajectory has at least two samples. (rule `two-samples`)
|
|
1620
|
+
*/
|
|
310
1621
|
offsets: Name;
|
|
1622
|
+
/**
|
|
1623
|
+
* A float array of shape (S, 2) or (S, 3) with this name holds the position of every sample in the frame of the set, where S is the total number of samples. (rule `trajectory-set`)
|
|
1624
|
+
*/
|
|
311
1625
|
positions: Name;
|
|
1626
|
+
/**
|
|
1627
|
+
* The channels are quantities stored at every sample, e.g. the time or the true anomaly, declared here by name. The name @index is reserved. (rule `index-channel`)
|
|
1628
|
+
*/
|
|
312
1629
|
channels?: {
|
|
313
1630
|
[k: string]: {
|
|
314
|
-
|
|
1631
|
+
/**
|
|
1632
|
+
* An array of shape (S,) with this name holds one value of the channel per sample.
|
|
1633
|
+
*/
|
|
1634
|
+
array: Name;
|
|
1635
|
+
/**
|
|
1636
|
+
* The value of the channel between samples is "linear", the default, or "hold", which keeps the value of the earlier sample. Only a channel part of a text reads it. (rule `timeline-parts`)
|
|
1637
|
+
*/
|
|
315
1638
|
interp?: 'linear' | 'hold';
|
|
1639
|
+
/**
|
|
1640
|
+
* The unit of the channel is plain text, e.g. "TU". It is written by pytycho and not drawn by the runtime.
|
|
1641
|
+
*/
|
|
316
1642
|
unit?: string;
|
|
317
1643
|
} | undefined;
|
|
318
1644
|
};
|
|
1645
|
+
/**
|
|
1646
|
+
* The parameters are numbers stored once per trajectory, e.g. the Jacobi constant of each member, declared here by name. The name @index is reserved. (rule `index-channel`)
|
|
1647
|
+
*/
|
|
319
1648
|
parameters?: {
|
|
320
1649
|
[k: string]: {
|
|
321
|
-
|
|
1650
|
+
/**
|
|
1651
|
+
* An array of shape (trajectories,) with this name holds one finite value of the parameter per trajectory.
|
|
1652
|
+
*/
|
|
1653
|
+
array: Name;
|
|
1654
|
+
/**
|
|
1655
|
+
* The name shown for the parameter, e.g. in the title of a colorbar, is plain text. The name of the parameter is shown by default.
|
|
1656
|
+
*/
|
|
322
1657
|
label?: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* The unit of the parameter is plain text, and it is appended to the title of a colorbar over the parameter.
|
|
1660
|
+
*/
|
|
323
1661
|
unit?: string;
|
|
324
1662
|
} | undefined;
|
|
325
1663
|
};
|
|
1664
|
+
/**
|
|
1665
|
+
* With true, each trajectory is declared periodic, i.e. its last sample is the first sample again one period later. The default is false. (rule `periodic`)
|
|
1666
|
+
*/
|
|
326
1667
|
periodic?: boolean;
|
|
327
1668
|
}
|
|
328
1669
|
/**
|
|
1670
|
+
* A declared panel is one picture that a page may show, with a display frame, a camera, a reference trajectory, and layers. (rule `panel`)
|
|
1671
|
+
*
|
|
329
1672
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
330
|
-
* via the `definition` "
|
|
1673
|
+
* via the `definition` "panel".
|
|
331
1674
|
*/
|
|
332
|
-
export interface
|
|
333
|
-
mode: 'fraction' | 'value';
|
|
1675
|
+
export interface Panel {
|
|
334
1676
|
/**
|
|
335
|
-
*
|
|
1677
|
+
* The name shown in the header of the panel is plain text, and the id of the panel by default.
|
|
336
1678
|
*/
|
|
337
|
-
|
|
338
|
-
labels?: string[];
|
|
339
|
-
steps: number;
|
|
1679
|
+
label?: string;
|
|
340
1680
|
/**
|
|
341
|
-
*
|
|
342
|
-
* @maxItems 2
|
|
1681
|
+
* The display frame, in which everything is drawn, is given by a frame id or by an input whose values are frame ids.
|
|
343
1682
|
*/
|
|
344
|
-
|
|
345
|
-
|
|
1683
|
+
frame: Id | InputRef;
|
|
1684
|
+
/**
|
|
1685
|
+
* The camera is the way the panel shows the display frame.
|
|
1686
|
+
*/
|
|
1687
|
+
camera?: Camera;
|
|
1688
|
+
/**
|
|
1689
|
+
* The reference trajectory of the panel is given here.
|
|
1690
|
+
*/
|
|
1691
|
+
reference: Reference;
|
|
1692
|
+
/**
|
|
1693
|
+
* The layers are drawn in the order of this list, and a label layer is drawn above the others.
|
|
1694
|
+
*/
|
|
1695
|
+
layers: Layer[];
|
|
1696
|
+
/**
|
|
1697
|
+
* Every shown panel of this declared panel is faded by this opacity, in [0, 1] or keyframed, and 1 by default.
|
|
1698
|
+
*/
|
|
1699
|
+
opacity?: Opacity;
|
|
1700
|
+
/**
|
|
1701
|
+
* The camera does not draw into these fractions of the height or the width of the panel, e.g. to leave room for tick numbers.
|
|
1702
|
+
*/
|
|
1703
|
+
margin?: {
|
|
1704
|
+
/**
|
|
1705
|
+
* The margin at the top is a fraction of the height of the panel, and 0 by default.
|
|
1706
|
+
*/
|
|
1707
|
+
top?: number;
|
|
1708
|
+
/**
|
|
1709
|
+
* The margin at the right is a fraction of the width of the panel, and 0 by default.
|
|
1710
|
+
*/
|
|
1711
|
+
right?: number;
|
|
1712
|
+
/**
|
|
1713
|
+
* The margin at the bottom is a fraction of the height of the panel, and 0 by default.
|
|
1714
|
+
*/
|
|
1715
|
+
bottom?: number;
|
|
1716
|
+
/**
|
|
1717
|
+
* The margin at the left is a fraction of the width of the panel, and 0 by default.
|
|
1718
|
+
*/
|
|
1719
|
+
left?: number;
|
|
1720
|
+
};
|
|
346
1721
|
}
|
|
347
1722
|
/**
|
|
1723
|
+
* A value is read from an input by its id. (rule `input-scope`)
|
|
1724
|
+
*
|
|
348
1725
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
349
|
-
* via the `definition` "
|
|
1726
|
+
* via the `definition` "inputRef".
|
|
350
1727
|
*/
|
|
351
|
-
export interface
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
layers: Layer[];
|
|
1728
|
+
export interface InputRef {
|
|
1729
|
+
/**
|
|
1730
|
+
* The value is read from the input with this id. (rule `input`)
|
|
1731
|
+
*/
|
|
1732
|
+
input: Id;
|
|
357
1733
|
}
|
|
358
1734
|
/**
|
|
1735
|
+
* A keyframed value is the value that its keyframes give at each time of the timeline. (rule `keyframes`)
|
|
1736
|
+
*
|
|
359
1737
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
360
|
-
* via the `definition` "
|
|
1738
|
+
* via the `definition` "keyframed".
|
|
361
1739
|
*/
|
|
362
|
-
export interface
|
|
363
|
-
|
|
1740
|
+
export interface Keyframed {
|
|
1741
|
+
/**
|
|
1742
|
+
* The value is given by these keyframes. (rule `keyframes`)
|
|
1743
|
+
*/
|
|
1744
|
+
keyframes: Keyframes;
|
|
364
1745
|
}
|
|
365
1746
|
/**
|
|
1747
|
+
* A readout is a text that shows current values, read at the reference trajectory.
|
|
1748
|
+
*
|
|
366
1749
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
367
|
-
* via the `definition` "
|
|
1750
|
+
* via the `definition` "readout".
|
|
368
1751
|
*/
|
|
369
|
-
export interface
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
1752
|
+
export interface Readout {
|
|
1753
|
+
/**
|
|
1754
|
+
* With "panel", the readout is shown in each shown panel, and with "caption" it is shown once below the panels.
|
|
1755
|
+
*/
|
|
1756
|
+
place: 'caption' | 'panel';
|
|
1757
|
+
/**
|
|
1758
|
+
* The text is joined from these parts, without a format string. (rule `timeline-parts`)
|
|
1759
|
+
*/
|
|
1760
|
+
parts: TextPart[];
|
|
374
1761
|
}
|
|
375
1762
|
/**
|
|
1763
|
+
* The theme gives the colors and the font of the page.
|
|
1764
|
+
*
|
|
376
1765
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
377
|
-
* via the `definition` "
|
|
1766
|
+
* via the `definition` "theme".
|
|
378
1767
|
*/
|
|
379
|
-
export interface
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
1768
|
+
export interface Theme {
|
|
1769
|
+
/**
|
|
1770
|
+
* The background color of the page is #000000 by default.
|
|
1771
|
+
*/
|
|
1772
|
+
background?: Color;
|
|
1773
|
+
/**
|
|
1774
|
+
* The foreground color is used for text, axes, and every line without a color of its own, and it is #d8d8d8 by default.
|
|
1775
|
+
*/
|
|
1776
|
+
foreground?: Color;
|
|
1777
|
+
/**
|
|
1778
|
+
* The color of the lines of a grid layer is #262626 by default.
|
|
1779
|
+
*/
|
|
1780
|
+
grid?: Color;
|
|
1781
|
+
/**
|
|
1782
|
+
* A CSS font family is used for every text of the page and of a video.
|
|
1783
|
+
*/
|
|
1784
|
+
font?: string;
|
|
1785
|
+
/**
|
|
1786
|
+
* The color of the panel area behind the panels and of the gutters between them, on the page and in a video, is a blend of the foreground and the background by default.
|
|
1787
|
+
*/
|
|
1788
|
+
gutter?: Color;
|
|
385
1789
|
}
|
|
386
1790
|
/**
|
|
1791
|
+
* The colormap is picked by the panel's value of an input of kind choice.
|
|
1792
|
+
*
|
|
387
1793
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
388
1794
|
* via the `definition` "colormapByChoice".
|
|
389
1795
|
*/
|
|
390
1796
|
export interface ColormapByChoice {
|
|
391
|
-
|
|
1797
|
+
/**
|
|
1798
|
+
* The colormap is picked by the value of the input of kind choice with this id.
|
|
1799
|
+
*/
|
|
1800
|
+
input: Id;
|
|
1801
|
+
/**
|
|
1802
|
+
* Every value of the choice, and only these values, is given a colormap name.
|
|
1803
|
+
*/
|
|
392
1804
|
map: {
|
|
393
1805
|
[k: string]: ColormapName | undefined;
|
|
394
1806
|
};
|
|
395
1807
|
}
|
|
396
1808
|
/**
|
|
1809
|
+
* The clock is the time of the animation, shared by every panel, so that all panels move together. (rule `clock`)
|
|
1810
|
+
*
|
|
397
1811
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
398
|
-
* via the `definition` "
|
|
1812
|
+
* via the `definition` "clock".
|
|
399
1813
|
*/
|
|
400
|
-
export interface
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
1814
|
+
export interface Clock {
|
|
1815
|
+
/**
|
|
1816
|
+
* In mode "fraction", every trajectory runs from its first to its last sample in one loop. In mode "epoch", every trajectory shows the same value of the clock channel. (rule `clock-mode`)
|
|
1817
|
+
*/
|
|
1818
|
+
mode: 'fraction' | 'epoch';
|
|
1819
|
+
/**
|
|
1820
|
+
* The channels that may be the clock channel are listed here, and the person at the page switches among them with the playback control. (rule `monotone-clock-channel`)
|
|
1821
|
+
*
|
|
1822
|
+
* @minItems 1
|
|
1823
|
+
*/
|
|
1824
|
+
channels: [Name, ...Name[]];
|
|
1825
|
+
/**
|
|
1826
|
+
* The text shown for each clock channel is given here, one entry per channel.
|
|
1827
|
+
*/
|
|
1828
|
+
labels?: string[];
|
|
1829
|
+
/**
|
|
1830
|
+
* The number of frame indices in one loop is an integer of at least 1. (rule `clock`)
|
|
1831
|
+
*/
|
|
1832
|
+
frame_count: number;
|
|
1833
|
+
/**
|
|
1834
|
+
* In mode epoch, the clock channel runs through this range [a, b] of values over one loop. (rule `clock-mode`)
|
|
1835
|
+
*
|
|
1836
|
+
* @minItems 2
|
|
1837
|
+
* @maxItems 2
|
|
1838
|
+
*/
|
|
1839
|
+
range?: [number, number];
|
|
1840
|
+
/**
|
|
1841
|
+
* In mode fraction, one loop covers this many revolutions of every periodic set. The default is 1. (rule `revolutions`)
|
|
1842
|
+
*/
|
|
1843
|
+
revolutions?: number;
|
|
1844
|
+
/**
|
|
1845
|
+
* The length of one loop is given in seconds at playback speed 1, and it is 8 seconds per revolution by default.
|
|
1846
|
+
*/
|
|
1847
|
+
seconds?: number;
|
|
1848
|
+
/**
|
|
1849
|
+
* In mode epoch, the shared value of the clock channel is given by keyframes over the timeline, in place of a range. (rule `clock-keyframes`)
|
|
1850
|
+
*/
|
|
1851
|
+
keyframes?: Keyframes;
|
|
1852
|
+
/**
|
|
1853
|
+
* With "loop", the default, the next loop starts at the end of a loop. With "stop", playback stops there. (rule `steps`)
|
|
1854
|
+
*/
|
|
1855
|
+
end?: 'loop' | 'stop';
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* A trail of fixed length follows the moving point. (rule `trail-wrap`)
|
|
1859
|
+
*
|
|
1860
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1861
|
+
* via the `definition` "trail".
|
|
1862
|
+
*/
|
|
1863
|
+
export interface Trail {
|
|
1864
|
+
/**
|
|
1865
|
+
* The length of the trail is a fraction of the whole loop, in (0, 1]. (rule `panel`)
|
|
1866
|
+
*/
|
|
1867
|
+
fraction: number;
|
|
1868
|
+
/**
|
|
1869
|
+
* The width and the opacity fall linearly from the head to these fractions of themselves at the tail.
|
|
1870
|
+
*/
|
|
1871
|
+
taper?: {
|
|
1872
|
+
/**
|
|
1873
|
+
* The width at the tail is this fraction of the width at the head, in [0, 1], and 0.25 by default.
|
|
1874
|
+
*/
|
|
1875
|
+
width?: number;
|
|
1876
|
+
/**
|
|
1877
|
+
* The opacity at the tail is this fraction of the opacity at the head, in [0, 1], and 0.35 by default.
|
|
1878
|
+
*/
|
|
1879
|
+
opacity?: number;
|
|
1880
|
+
};
|
|
1881
|
+
}
|
|
1882
|
+
/**
|
|
1883
|
+
* The reference trajectory is the one trajectory that a panel follows, at which the bodies and the readouts of the panel are placed and read.
|
|
1884
|
+
*
|
|
1885
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1886
|
+
* via the `definition` "reference".
|
|
1887
|
+
*/
|
|
1888
|
+
export interface Reference {
|
|
1889
|
+
/**
|
|
1890
|
+
* The reference trajectory is taken from the set that this query resolves to. (rule `set-query`)
|
|
1891
|
+
*/
|
|
1892
|
+
sets: SetQuery;
|
|
1893
|
+
/**
|
|
1894
|
+
* The reference trajectory is selected by its number or by an input of kind parameter. (rule `members`)
|
|
1895
|
+
*/
|
|
1896
|
+
member: {
|
|
1897
|
+
/**
|
|
1898
|
+
* The trajectory with this number, counted from 0, is selected.
|
|
1899
|
+
*/
|
|
1900
|
+
index: number;
|
|
1901
|
+
} | InputRef;
|
|
419
1902
|
}
|
|
420
1903
|
/**
|
|
1904
|
+
* A state is everything that the person at the page can change, i.e. the shown panels, the values of the inputs, and the clock channel. (rule `state`)
|
|
1905
|
+
*
|
|
421
1906
|
* This interface was referenced by `Scene`'s JSON-Schema
|
|
422
1907
|
* via the `definition` "state".
|
|
423
1908
|
*/
|
|
424
1909
|
export interface State {
|
|
425
|
-
|
|
1910
|
+
/**
|
|
1911
|
+
* The values of the shared inputs are given by input id, and an input without a value takes its default. (rule `input-scope`)
|
|
1912
|
+
*/
|
|
1913
|
+
inputs?: {
|
|
426
1914
|
[k: string]: number | string | boolean | undefined;
|
|
427
1915
|
};
|
|
1916
|
+
/**
|
|
1917
|
+
* The clock channel of the state is given here.
|
|
1918
|
+
*/
|
|
428
1919
|
clock: {
|
|
1920
|
+
/**
|
|
1921
|
+
* The clock channel is the one with this name, one of the channels of the clock. (rule `clock`)
|
|
1922
|
+
*/
|
|
429
1923
|
channel: Name;
|
|
430
1924
|
};
|
|
1925
|
+
/**
|
|
1926
|
+
* The shown panels are given by id, each with its declared panel and its values of the per-panel inputs.
|
|
1927
|
+
*/
|
|
431
1928
|
panels: {
|
|
432
1929
|
[k: string]: {
|
|
433
|
-
|
|
434
|
-
|
|
1930
|
+
/**
|
|
1931
|
+
* The shown panel shows the declared panel with this id.
|
|
1932
|
+
*/
|
|
1933
|
+
panel: Id;
|
|
1934
|
+
/**
|
|
1935
|
+
* The values of the per-panel inputs in this shown panel are given by input id. (rule `input-scope`)
|
|
1936
|
+
*/
|
|
1937
|
+
inputs?: {
|
|
435
1938
|
[k: string]: number | string | boolean | undefined;
|
|
436
1939
|
};
|
|
437
1940
|
} | undefined;
|
|
438
1941
|
};
|
|
1942
|
+
/**
|
|
1943
|
+
* The shown panels are arranged by this tree of layout nodes, which holds each of them once.
|
|
1944
|
+
*/
|
|
439
1945
|
layout: Layout;
|
|
440
1946
|
}
|
|
1947
|
+
/**
|
|
1948
|
+
* With a layer clock, a layer computes its fractions along in mode epoch by a channel of its own, through a range or keyframes. (rule `layer-clock`)
|
|
1949
|
+
*
|
|
1950
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1951
|
+
* via the `definition` "layerClock".
|
|
1952
|
+
*/
|
|
1953
|
+
export interface LayerClock {
|
|
1954
|
+
/**
|
|
1955
|
+
* The fractions along are computed by the channel with this name.
|
|
1956
|
+
*/
|
|
1957
|
+
channel: Name;
|
|
1958
|
+
/**
|
|
1959
|
+
* The channel runs through this range [a, b] of values over one loop. (rule `clock-mode`)
|
|
1960
|
+
*
|
|
1961
|
+
* @minItems 2
|
|
1962
|
+
* @maxItems 2
|
|
1963
|
+
*/
|
|
1964
|
+
range?: [number, number];
|
|
1965
|
+
/**
|
|
1966
|
+
* The shared value of the channel is given by keyframes over the timeline. (rule `clock-keyframes`)
|
|
1967
|
+
*/
|
|
1968
|
+
keyframes?: Keyframes;
|
|
1969
|
+
}
|
|
1970
|
+
/**
|
|
1971
|
+
* A marker is a shape drawn at a point, as matplotlib draws a marker.
|
|
1972
|
+
*
|
|
1973
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
1974
|
+
* via the `definition` "marker".
|
|
1975
|
+
*/
|
|
1976
|
+
export interface Marker {
|
|
1977
|
+
/**
|
|
1978
|
+
* The shape is "disc", the default, "ring", "square", "diamond", "triangle", "star", "cross", or "plus".
|
|
1979
|
+
*/
|
|
1980
|
+
shape?: 'disc' | 'ring' | 'square' | 'diamond' | 'triangle' | 'star' | 'cross' | 'plus';
|
|
1981
|
+
/**
|
|
1982
|
+
* The width of the shape is given in CSS pixels, or keyframed. It is 9 for a head and 4 for a points layer by default.
|
|
1983
|
+
*/
|
|
1984
|
+
size?: Size;
|
|
1985
|
+
/**
|
|
1986
|
+
* A filled shape is filled with this color, and a ring, a cross, or a plus is stroked with it. It is the color of the layer for a head, and the foreground of the theme for a points layer, by default.
|
|
1987
|
+
*/
|
|
1988
|
+
color?: Color;
|
|
1989
|
+
/**
|
|
1990
|
+
* A filled shape is outlined in this color when it is given.
|
|
1991
|
+
*/
|
|
1992
|
+
edge?: Color;
|
|
1993
|
+
/**
|
|
1994
|
+
* 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.
|
|
1995
|
+
*/
|
|
1996
|
+
edge_width?: number | Keyframed;
|
|
1997
|
+
/**
|
|
1998
|
+
* The opacity is in [0, 1], or keyframed, and 1 by default.
|
|
1999
|
+
*/
|
|
2000
|
+
opacity?: Opacity;
|
|
2001
|
+
}
|
|
2002
|
+
/**
|
|
2003
|
+
* A box is a rectangle drawn behind a text.
|
|
2004
|
+
*
|
|
2005
|
+
* This interface was referenced by `Scene`'s JSON-Schema
|
|
2006
|
+
* via the `definition` "box".
|
|
2007
|
+
*/
|
|
2008
|
+
export interface Box {
|
|
2009
|
+
/**
|
|
2010
|
+
* The box is filled with this color, and it is not filled by default.
|
|
2011
|
+
*/
|
|
2012
|
+
fill?: Color;
|
|
2013
|
+
/**
|
|
2014
|
+
* The box is outlined in this color, and it is not outlined by default.
|
|
2015
|
+
*/
|
|
2016
|
+
edge?: Color;
|
|
2017
|
+
/**
|
|
2018
|
+
* The width of the outline is given in CSS pixels, and it is 1 by default.
|
|
2019
|
+
*/
|
|
2020
|
+
edge_width?: number;
|
|
2021
|
+
/**
|
|
2022
|
+
* The box surrounds the text by this many CSS pixels, and by 4 by default.
|
|
2023
|
+
*/
|
|
2024
|
+
pad?: number;
|
|
2025
|
+
/**
|
|
2026
|
+
* The radius of the corners is given in CSS pixels, and it is 0 by default.
|
|
2027
|
+
*/
|
|
2028
|
+
radius?: number;
|
|
2029
|
+
/**
|
|
2030
|
+
* The opacity of the box is in [0, 1], and it is 1 by default.
|
|
2031
|
+
*/
|
|
2032
|
+
opacity?: number;
|
|
2033
|
+
}
|