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