@johnoscott/isometric-engine 0.15.0 → 0.17.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/README.md +3 -1
- package/iso-editor.js +230 -193
- package/iso-remotion.js +353 -0
- package/iso-render.js +184 -147
- package/iso-systems.js +183 -146
- package/isometric-diagram.js +389 -0
- package/js/iso-core/arimo.js +5 -0
- package/js/iso-core/arimo.json +1 -0
- package/js/iso-core/index.js +8 -2
- package/js/iso-core/kernel.js +13 -2
- package/js/iso-core/mono.js +242 -0
- package/js/iso-editor/ui/canvas.js +23 -1
- package/js/iso-objects/ants.js +1 -1
- package/js/iso-objects/index.js +10 -2
- package/js/iso-objects/mono-paint.js +96 -0
- package/js/iso-objects/motion-doc.js +0 -79
- package/js/iso-objects/motion-entry.js +4 -2
- package/js/iso-objects/motion-schema.js +83 -0
- package/js/iso-objects/motion.js +9 -4
- package/js/iso-objects/timeline.js +60 -16
- package/js/iso-systems/compile.js +34 -3
- package/js/iso-systems/render.js +1 -1
- package/js/iso-systems/schema.json +1 -0
- package/js/iso-viewer/index.js +6 -0
- package/js/iso-viewer/page.js +40 -17
- package/js/iso-viewer/play.js +340 -0
- package/js/iso-viewer/player.js +147 -162
- package/js/iso-viewer/transport.js +289 -0
- package/package.json +61 -2
- package/src/iso-core/arimo.json +1 -0
- package/src/iso-core/arimo.ts +6 -0
- package/src/iso-core/index.ts +2 -1
- package/src/iso-core/kernel.ts +11 -1
- package/src/iso-core/mono.ts +306 -0
- package/src/iso-core/theme.ts +2 -1
- package/src/iso-editor/ui/canvas.ts +14 -1
- package/src/iso-objects/ants.ts +2 -2
- package/src/iso-objects/index.ts +5 -3
- package/src/iso-objects/mono-paint.ts +97 -0
- package/src/iso-objects/motion-doc.ts +0 -52
- package/src/iso-objects/motion-entry.ts +4 -3
- package/src/iso-objects/motion-schema.ts +55 -0
- package/src/iso-objects/motion.ts +6 -5
- package/src/iso-objects/scene.ts +3 -0
- package/src/iso-objects/timeline.ts +71 -15
- package/src/iso-objects/types.ts +2 -0
- package/src/iso-systems/compile.ts +37 -4
- package/src/iso-systems/render.ts +5 -1
- package/src/iso-systems/schema.json +1 -0
- package/src/iso-viewer/index.ts +4 -0
- package/src/iso-viewer/page.ts +28 -12
- package/src/iso-viewer/play.ts +280 -0
- package/src/iso-viewer/player.ts +133 -134
- package/src/iso-viewer/transport.ts +272 -0
- package/types/iso-core/arimo.d.ts +2 -0
- package/types/iso-core/index.d.ts +2 -1
- package/types/iso-core/kernel.d.ts +9 -0
- package/types/iso-core/mono.d.ts +61 -0
- package/types/iso-core/theme.d.ts +2 -0
- package/types/iso-objects/ants.d.ts +1 -0
- package/types/iso-objects/index.d.ts +5 -3
- package/types/iso-objects/mono-paint.d.ts +20 -0
- package/types/iso-objects/motion-doc.d.ts +0 -594
- package/types/iso-objects/motion-entry.d.ts +4 -3
- package/types/iso-objects/motion-schema.d.ts +594 -0
- package/types/iso-objects/motion.d.ts +4 -2
- package/types/iso-objects/scene.d.ts +3 -0
- package/types/iso-objects/timeline.d.ts +26 -3
- package/types/iso-objects/types.d.ts +2 -0
- package/types/iso-systems/compile.d.ts +8 -0
- package/types/iso-systems/render.d.ts +4 -0
- package/types/iso-viewer/index.d.ts +4 -0
- package/types/iso-viewer/play.d.ts +37 -0
- package/types/iso-viewer/transport.d.ts +73 -0
- package/types/player/isometric-diagram.d.ts +24 -0
- package/types/remotion/entry.d.ts +2 -0
- package/types/remotion/frames.d.ts +70 -0
- package/types/remotion/index.d.ts +39 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
export declare const MOTION_SCHEMA: {
|
|
2
|
+
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
3
|
+
readonly title: 'isomotion/1';
|
|
4
|
+
readonly type: 'object';
|
|
5
|
+
readonly required: readonly ['isomotion'];
|
|
6
|
+
readonly additionalProperties: false;
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly isomotion: {
|
|
9
|
+
readonly const: 1;
|
|
10
|
+
};
|
|
11
|
+
readonly fps: {
|
|
12
|
+
readonly type: 'number';
|
|
13
|
+
readonly exclusiveMinimum: 0;
|
|
14
|
+
readonly description: 'Frames a second, for lengths written "30f".';
|
|
15
|
+
};
|
|
16
|
+
readonly seed: {
|
|
17
|
+
readonly type: 'integer';
|
|
18
|
+
};
|
|
19
|
+
readonly ambient: {
|
|
20
|
+
readonly enum: readonly ['on', 'off'];
|
|
21
|
+
readonly description: 'Off: the ants and the looping tokens and pulses stand still, each at its start.';
|
|
22
|
+
};
|
|
23
|
+
readonly series: {
|
|
24
|
+
readonly $ref: '#/$defs/series';
|
|
25
|
+
};
|
|
26
|
+
readonly layers: {
|
|
27
|
+
readonly $ref: '#/$defs/nodes';
|
|
28
|
+
};
|
|
29
|
+
readonly markers: {
|
|
30
|
+
readonly type: 'object';
|
|
31
|
+
readonly additionalProperties: {
|
|
32
|
+
readonly anyOf: readonly [{
|
|
33
|
+
readonly type: 'number';
|
|
34
|
+
}, {
|
|
35
|
+
readonly type: 'string';
|
|
36
|
+
}];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
readonly $defs: {
|
|
41
|
+
readonly time: {
|
|
42
|
+
readonly anyOf: readonly [{
|
|
43
|
+
readonly type: 'number';
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: 'string';
|
|
46
|
+
readonly pattern: '^-?\\d+(\\.\\d+)?(ms|s|f)?$';
|
|
47
|
+
}];
|
|
48
|
+
};
|
|
49
|
+
readonly ids: {
|
|
50
|
+
readonly type: 'array';
|
|
51
|
+
readonly items: {
|
|
52
|
+
readonly type: 'string';
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
readonly ease: {
|
|
56
|
+
readonly anyOf: readonly [{
|
|
57
|
+
readonly enum: readonly ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "settle", "bounce"];
|
|
58
|
+
}, {
|
|
59
|
+
readonly type: 'object';
|
|
60
|
+
readonly required: readonly ['bezier'];
|
|
61
|
+
readonly additionalProperties: false;
|
|
62
|
+
readonly properties: {
|
|
63
|
+
readonly bezier: {
|
|
64
|
+
readonly type: 'array';
|
|
65
|
+
readonly items: {
|
|
66
|
+
readonly type: 'number';
|
|
67
|
+
};
|
|
68
|
+
readonly minItems: 4;
|
|
69
|
+
readonly maxItems: 4;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
readonly type: 'object';
|
|
74
|
+
readonly required: readonly ['spring'];
|
|
75
|
+
readonly additionalProperties: false;
|
|
76
|
+
readonly properties: {
|
|
77
|
+
readonly spring: {
|
|
78
|
+
readonly $ref: '#/$defs/spring';
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}];
|
|
82
|
+
};
|
|
83
|
+
readonly spring: {
|
|
84
|
+
readonly type: 'object';
|
|
85
|
+
readonly additionalProperties: false;
|
|
86
|
+
readonly properties: {
|
|
87
|
+
readonly mass: {
|
|
88
|
+
readonly type: 'number';
|
|
89
|
+
readonly exclusiveMinimum: 0;
|
|
90
|
+
};
|
|
91
|
+
readonly damping: {
|
|
92
|
+
readonly type: 'number';
|
|
93
|
+
readonly exclusiveMinimum: 0;
|
|
94
|
+
};
|
|
95
|
+
readonly stiffness: {
|
|
96
|
+
readonly type: 'number';
|
|
97
|
+
readonly exclusiveMinimum: 0;
|
|
98
|
+
};
|
|
99
|
+
readonly overshootClamping: {
|
|
100
|
+
readonly type: 'boolean';
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly curve: {
|
|
105
|
+
readonly type: 'object';
|
|
106
|
+
readonly required: readonly ['times', 'values'];
|
|
107
|
+
readonly additionalProperties: false;
|
|
108
|
+
readonly properties: {
|
|
109
|
+
readonly times: {
|
|
110
|
+
readonly type: 'array';
|
|
111
|
+
readonly items: {
|
|
112
|
+
readonly $ref: '#/$defs/time';
|
|
113
|
+
};
|
|
114
|
+
readonly minItems: 1;
|
|
115
|
+
};
|
|
116
|
+
readonly values: {
|
|
117
|
+
readonly type: 'array';
|
|
118
|
+
readonly items: {
|
|
119
|
+
readonly type: 'number';
|
|
120
|
+
};
|
|
121
|
+
readonly minItems: 1;
|
|
122
|
+
};
|
|
123
|
+
readonly easing: {
|
|
124
|
+
readonly $ref: '#/$defs/ease';
|
|
125
|
+
};
|
|
126
|
+
readonly extrapolateLeft: {
|
|
127
|
+
readonly enum: readonly ["extend", "clamp", "wrap", "identity"];
|
|
128
|
+
};
|
|
129
|
+
readonly extrapolateRight: {
|
|
130
|
+
readonly enum: readonly ["extend", "clamp", "wrap", "identity"];
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly say: {
|
|
135
|
+
readonly type: 'object';
|
|
136
|
+
readonly additionalProperties: false;
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly chapter: {
|
|
139
|
+
readonly type: 'string';
|
|
140
|
+
};
|
|
141
|
+
readonly title: {
|
|
142
|
+
readonly type: 'string';
|
|
143
|
+
};
|
|
144
|
+
readonly text: {
|
|
145
|
+
readonly type: 'string';
|
|
146
|
+
};
|
|
147
|
+
readonly code: {
|
|
148
|
+
readonly type: 'string';
|
|
149
|
+
};
|
|
150
|
+
readonly color: {
|
|
151
|
+
readonly type: 'string';
|
|
152
|
+
};
|
|
153
|
+
readonly facts: {
|
|
154
|
+
readonly type: 'array';
|
|
155
|
+
readonly items: {
|
|
156
|
+
readonly type: 'array';
|
|
157
|
+
readonly items: {
|
|
158
|
+
readonly type: 'string';
|
|
159
|
+
};
|
|
160
|
+
readonly minItems: 2;
|
|
161
|
+
readonly maxItems: 2;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly focus: {
|
|
167
|
+
readonly type: 'object';
|
|
168
|
+
readonly required: readonly ['lit'];
|
|
169
|
+
readonly additionalProperties: false;
|
|
170
|
+
readonly properties: {
|
|
171
|
+
readonly lit: {
|
|
172
|
+
readonly $ref: '#/$defs/ids';
|
|
173
|
+
};
|
|
174
|
+
readonly scope: {
|
|
175
|
+
readonly enum: readonly ['all', 'links'];
|
|
176
|
+
};
|
|
177
|
+
readonly level: {
|
|
178
|
+
readonly type: 'number';
|
|
179
|
+
readonly minimum: 0;
|
|
180
|
+
readonly maximum: 1;
|
|
181
|
+
};
|
|
182
|
+
readonly always: {
|
|
183
|
+
readonly $ref: '#/$defs/ids';
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
readonly sequence: {
|
|
188
|
+
readonly type: 'object';
|
|
189
|
+
readonly additionalProperties: false;
|
|
190
|
+
readonly properties: {
|
|
191
|
+
readonly name: {
|
|
192
|
+
readonly type: 'string';
|
|
193
|
+
readonly pattern: '^[A-Za-z][\\w-]*$';
|
|
194
|
+
};
|
|
195
|
+
readonly from: {
|
|
196
|
+
readonly $ref: '#/$defs/time';
|
|
197
|
+
};
|
|
198
|
+
readonly offset: {
|
|
199
|
+
readonly $ref: '#/$defs/time';
|
|
200
|
+
};
|
|
201
|
+
readonly trimBefore: {
|
|
202
|
+
readonly $ref: '#/$defs/time';
|
|
203
|
+
};
|
|
204
|
+
readonly duration: {
|
|
205
|
+
readonly anyOf: readonly [{
|
|
206
|
+
readonly $ref: '#/$defs/time';
|
|
207
|
+
}, {
|
|
208
|
+
readonly type: 'object';
|
|
209
|
+
readonly required: readonly ['read'];
|
|
210
|
+
readonly additionalProperties: false;
|
|
211
|
+
readonly properties: {
|
|
212
|
+
readonly read: {
|
|
213
|
+
readonly anyOf: readonly [{
|
|
214
|
+
readonly const: true;
|
|
215
|
+
}, {
|
|
216
|
+
readonly type: 'object';
|
|
217
|
+
readonly additionalProperties: false;
|
|
218
|
+
readonly properties: {
|
|
219
|
+
readonly base: {
|
|
220
|
+
readonly type: 'number';
|
|
221
|
+
};
|
|
222
|
+
readonly perChar: {
|
|
223
|
+
readonly type: 'number';
|
|
224
|
+
};
|
|
225
|
+
readonly min: {
|
|
226
|
+
readonly type: 'number';
|
|
227
|
+
};
|
|
228
|
+
readonly max: {
|
|
229
|
+
readonly type: 'number';
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
}];
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
}];
|
|
236
|
+
};
|
|
237
|
+
readonly loop: {
|
|
238
|
+
readonly anyOf: readonly [{
|
|
239
|
+
readonly type: 'boolean';
|
|
240
|
+
}, {
|
|
241
|
+
readonly type: 'integer';
|
|
242
|
+
readonly minimum: 1;
|
|
243
|
+
}];
|
|
244
|
+
};
|
|
245
|
+
readonly playbackRate: {
|
|
246
|
+
readonly type: 'number';
|
|
247
|
+
readonly exclusiveMinimum: 0;
|
|
248
|
+
};
|
|
249
|
+
readonly say: {
|
|
250
|
+
readonly $ref: '#/$defs/say';
|
|
251
|
+
};
|
|
252
|
+
readonly show: {
|
|
253
|
+
readonly $ref: '#/$defs/ids';
|
|
254
|
+
};
|
|
255
|
+
readonly hide: {
|
|
256
|
+
readonly $ref: '#/$defs/ids';
|
|
257
|
+
};
|
|
258
|
+
readonly focus: {
|
|
259
|
+
readonly $ref: '#/$defs/focus';
|
|
260
|
+
};
|
|
261
|
+
readonly highlight: {
|
|
262
|
+
readonly $ref: '#/$defs/ids';
|
|
263
|
+
};
|
|
264
|
+
readonly levels: {
|
|
265
|
+
readonly type: 'object';
|
|
266
|
+
readonly additionalProperties: {
|
|
267
|
+
readonly type: 'number';
|
|
268
|
+
readonly minimum: 0;
|
|
269
|
+
readonly maximum: 1;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly variants: {
|
|
273
|
+
readonly type: 'object';
|
|
274
|
+
readonly additionalProperties: {
|
|
275
|
+
readonly type: 'string';
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly enter: {
|
|
279
|
+
readonly type: 'object';
|
|
280
|
+
readonly required: readonly ['fade'];
|
|
281
|
+
readonly additionalProperties: false;
|
|
282
|
+
readonly properties: {
|
|
283
|
+
readonly fade: {
|
|
284
|
+
readonly $ref: '#/$defs/time';
|
|
285
|
+
};
|
|
286
|
+
readonly easing: {
|
|
287
|
+
readonly $ref: '#/$defs/ease';
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
readonly ants: {
|
|
292
|
+
readonly anyOf: readonly [{
|
|
293
|
+
readonly type: 'boolean';
|
|
294
|
+
}, {
|
|
295
|
+
readonly $ref: '#/$defs/ids';
|
|
296
|
+
}];
|
|
297
|
+
};
|
|
298
|
+
readonly children: {
|
|
299
|
+
readonly $ref: '#/$defs/nodes';
|
|
300
|
+
};
|
|
301
|
+
readonly layers: {
|
|
302
|
+
readonly $ref: '#/$defs/nodes';
|
|
303
|
+
};
|
|
304
|
+
readonly series: {
|
|
305
|
+
readonly $ref: '#/$defs/series';
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
readonly series: {
|
|
310
|
+
readonly type: 'array';
|
|
311
|
+
readonly items: {
|
|
312
|
+
readonly anyOf: readonly [{
|
|
313
|
+
readonly $ref: '#/$defs/seq';
|
|
314
|
+
}, {
|
|
315
|
+
type: string;
|
|
316
|
+
required: string[];
|
|
317
|
+
additionalProperties: boolean;
|
|
318
|
+
properties: {
|
|
319
|
+
from?: {
|
|
320
|
+
$ref: string;
|
|
321
|
+
} | undefined;
|
|
322
|
+
duration?: {
|
|
323
|
+
$ref: string;
|
|
324
|
+
} | undefined;
|
|
325
|
+
easing?: {
|
|
326
|
+
$ref: string;
|
|
327
|
+
} | undefined;
|
|
328
|
+
};
|
|
329
|
+
}];
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
readonly seq: {
|
|
333
|
+
type: string;
|
|
334
|
+
required: string[];
|
|
335
|
+
additionalProperties: boolean;
|
|
336
|
+
properties: {
|
|
337
|
+
from?: {
|
|
338
|
+
$ref: string;
|
|
339
|
+
} | undefined;
|
|
340
|
+
duration?: {
|
|
341
|
+
$ref: string;
|
|
342
|
+
} | undefined;
|
|
343
|
+
easing?: {
|
|
344
|
+
$ref: string;
|
|
345
|
+
} | undefined;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
readonly plan: {
|
|
349
|
+
readonly type: 'object';
|
|
350
|
+
};
|
|
351
|
+
readonly nodes: {
|
|
352
|
+
readonly type: 'array';
|
|
353
|
+
readonly items: {
|
|
354
|
+
readonly anyOf: readonly [{
|
|
355
|
+
readonly $ref: '#/$defs/seq';
|
|
356
|
+
}, {
|
|
357
|
+
type: string;
|
|
358
|
+
required: string[];
|
|
359
|
+
additionalProperties: boolean;
|
|
360
|
+
properties: {
|
|
361
|
+
from?: {
|
|
362
|
+
$ref: string;
|
|
363
|
+
} | undefined;
|
|
364
|
+
duration?: {
|
|
365
|
+
$ref: string;
|
|
366
|
+
} | undefined;
|
|
367
|
+
easing?: {
|
|
368
|
+
$ref: string;
|
|
369
|
+
} | undefined;
|
|
370
|
+
};
|
|
371
|
+
}, {
|
|
372
|
+
type: string;
|
|
373
|
+
required: string[];
|
|
374
|
+
additionalProperties: boolean;
|
|
375
|
+
properties: {
|
|
376
|
+
from?: {
|
|
377
|
+
$ref: string;
|
|
378
|
+
} | undefined;
|
|
379
|
+
duration?: {
|
|
380
|
+
$ref: string;
|
|
381
|
+
} | undefined;
|
|
382
|
+
easing?: {
|
|
383
|
+
$ref: string;
|
|
384
|
+
} | undefined;
|
|
385
|
+
};
|
|
386
|
+
}, {
|
|
387
|
+
type: string;
|
|
388
|
+
required: string[];
|
|
389
|
+
additionalProperties: boolean;
|
|
390
|
+
properties: {
|
|
391
|
+
from?: {
|
|
392
|
+
$ref: string;
|
|
393
|
+
} | undefined;
|
|
394
|
+
duration?: {
|
|
395
|
+
$ref: string;
|
|
396
|
+
} | undefined;
|
|
397
|
+
easing?: {
|
|
398
|
+
$ref: string;
|
|
399
|
+
} | undefined;
|
|
400
|
+
};
|
|
401
|
+
}, {
|
|
402
|
+
type: string;
|
|
403
|
+
required: string[];
|
|
404
|
+
additionalProperties: boolean;
|
|
405
|
+
properties: {
|
|
406
|
+
from?: {
|
|
407
|
+
$ref: string;
|
|
408
|
+
} | undefined;
|
|
409
|
+
duration?: {
|
|
410
|
+
$ref: string;
|
|
411
|
+
} | undefined;
|
|
412
|
+
easing?: {
|
|
413
|
+
$ref: string;
|
|
414
|
+
} | undefined;
|
|
415
|
+
};
|
|
416
|
+
}, {
|
|
417
|
+
type: string;
|
|
418
|
+
required: string[];
|
|
419
|
+
additionalProperties: boolean;
|
|
420
|
+
properties: {
|
|
421
|
+
from?: {
|
|
422
|
+
$ref: string;
|
|
423
|
+
} | undefined;
|
|
424
|
+
duration?: {
|
|
425
|
+
$ref: string;
|
|
426
|
+
} | undefined;
|
|
427
|
+
easing?: {
|
|
428
|
+
$ref: string;
|
|
429
|
+
} | undefined;
|
|
430
|
+
};
|
|
431
|
+
}, {
|
|
432
|
+
type: string;
|
|
433
|
+
required: string[];
|
|
434
|
+
additionalProperties: boolean;
|
|
435
|
+
properties: {
|
|
436
|
+
from?: {
|
|
437
|
+
$ref: string;
|
|
438
|
+
} | undefined;
|
|
439
|
+
duration?: {
|
|
440
|
+
$ref: string;
|
|
441
|
+
} | undefined;
|
|
442
|
+
easing?: {
|
|
443
|
+
$ref: string;
|
|
444
|
+
} | undefined;
|
|
445
|
+
};
|
|
446
|
+
}, {
|
|
447
|
+
type: string;
|
|
448
|
+
required: string[];
|
|
449
|
+
additionalProperties: boolean;
|
|
450
|
+
properties: {
|
|
451
|
+
from?: {
|
|
452
|
+
$ref: string;
|
|
453
|
+
} | undefined;
|
|
454
|
+
duration?: {
|
|
455
|
+
$ref: string;
|
|
456
|
+
} | undefined;
|
|
457
|
+
easing?: {
|
|
458
|
+
$ref: string;
|
|
459
|
+
} | undefined;
|
|
460
|
+
};
|
|
461
|
+
}, {
|
|
462
|
+
type: string;
|
|
463
|
+
required: string[];
|
|
464
|
+
additionalProperties: boolean;
|
|
465
|
+
properties: {
|
|
466
|
+
from?: {
|
|
467
|
+
$ref: string;
|
|
468
|
+
} | undefined;
|
|
469
|
+
duration?: {
|
|
470
|
+
$ref: string;
|
|
471
|
+
} | undefined;
|
|
472
|
+
easing?: {
|
|
473
|
+
$ref: string;
|
|
474
|
+
} | undefined;
|
|
475
|
+
};
|
|
476
|
+
}, {
|
|
477
|
+
type: string;
|
|
478
|
+
required: string[];
|
|
479
|
+
additionalProperties: boolean;
|
|
480
|
+
properties: {
|
|
481
|
+
from?: {
|
|
482
|
+
$ref: string;
|
|
483
|
+
} | undefined;
|
|
484
|
+
duration?: {
|
|
485
|
+
$ref: string;
|
|
486
|
+
} | undefined;
|
|
487
|
+
easing?: {
|
|
488
|
+
$ref: string;
|
|
489
|
+
} | undefined;
|
|
490
|
+
};
|
|
491
|
+
}, {
|
|
492
|
+
readonly type: 'object';
|
|
493
|
+
readonly required: readonly ['move'];
|
|
494
|
+
readonly additionalProperties: false;
|
|
495
|
+
readonly properties: {
|
|
496
|
+
readonly move: {
|
|
497
|
+
readonly type: 'string';
|
|
498
|
+
};
|
|
499
|
+
readonly from: {
|
|
500
|
+
readonly $ref: '#/$defs/time';
|
|
501
|
+
};
|
|
502
|
+
readonly x: {
|
|
503
|
+
readonly $ref: '#/$defs/curve';
|
|
504
|
+
};
|
|
505
|
+
readonly y: {
|
|
506
|
+
readonly $ref: '#/$defs/curve';
|
|
507
|
+
};
|
|
508
|
+
readonly scale: {
|
|
509
|
+
readonly $ref: '#/$defs/curve';
|
|
510
|
+
};
|
|
511
|
+
readonly opacity: {
|
|
512
|
+
readonly $ref: '#/$defs/curve';
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
}, {
|
|
516
|
+
readonly type: 'object';
|
|
517
|
+
readonly required: readonly ['lift', 'by'];
|
|
518
|
+
readonly additionalProperties: false;
|
|
519
|
+
readonly properties: {
|
|
520
|
+
readonly from: {
|
|
521
|
+
$ref: string;
|
|
522
|
+
};
|
|
523
|
+
readonly duration: {
|
|
524
|
+
$ref: string;
|
|
525
|
+
};
|
|
526
|
+
readonly easing: {
|
|
527
|
+
$ref: string;
|
|
528
|
+
};
|
|
529
|
+
readonly lift: {
|
|
530
|
+
readonly $ref: '#/$defs/ids';
|
|
531
|
+
};
|
|
532
|
+
readonly by: {
|
|
533
|
+
readonly type: 'number';
|
|
534
|
+
};
|
|
535
|
+
readonly stagger: {
|
|
536
|
+
readonly $ref: '#/$defs/time';
|
|
537
|
+
};
|
|
538
|
+
readonly to: {
|
|
539
|
+
readonly enum: readonly ['up', 'down'];
|
|
540
|
+
};
|
|
541
|
+
readonly opacity: {
|
|
542
|
+
readonly $ref: '#/$defs/curve';
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
}, {
|
|
546
|
+
type: string;
|
|
547
|
+
required: string[];
|
|
548
|
+
additionalProperties: boolean;
|
|
549
|
+
properties: {
|
|
550
|
+
from?: {
|
|
551
|
+
$ref: string;
|
|
552
|
+
} | undefined;
|
|
553
|
+
duration?: {
|
|
554
|
+
$ref: string;
|
|
555
|
+
} | undefined;
|
|
556
|
+
easing?: {
|
|
557
|
+
$ref: string;
|
|
558
|
+
} | undefined;
|
|
559
|
+
};
|
|
560
|
+
}, {
|
|
561
|
+
type: string;
|
|
562
|
+
required: string[];
|
|
563
|
+
additionalProperties: boolean;
|
|
564
|
+
properties: {
|
|
565
|
+
from?: {
|
|
566
|
+
$ref: string;
|
|
567
|
+
} | undefined;
|
|
568
|
+
duration?: {
|
|
569
|
+
$ref: string;
|
|
570
|
+
} | undefined;
|
|
571
|
+
easing?: {
|
|
572
|
+
$ref: string;
|
|
573
|
+
} | undefined;
|
|
574
|
+
};
|
|
575
|
+
}, {
|
|
576
|
+
type: string;
|
|
577
|
+
required: string[];
|
|
578
|
+
additionalProperties: boolean;
|
|
579
|
+
properties: {
|
|
580
|
+
from?: {
|
|
581
|
+
$ref: string;
|
|
582
|
+
} | undefined;
|
|
583
|
+
duration?: {
|
|
584
|
+
$ref: string;
|
|
585
|
+
} | undefined;
|
|
586
|
+
easing?: {
|
|
587
|
+
$ref: string;
|
|
588
|
+
} | undefined;
|
|
589
|
+
};
|
|
590
|
+
}];
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
};
|
|
@@ -185,12 +185,14 @@ export declare function planOf(m: MotionModel, kind: 'assemble' | 'disassemble',
|
|
|
185
185
|
export declare function alongPath(d: string, f: number): [number, number];
|
|
186
186
|
/** the start of a text run: an entity counts as one character */
|
|
187
187
|
export declare function typed(s: string, f: number): string;
|
|
188
|
-
type Looks = Pick<CompiledScene['rendered'], 'svg' | 'variants' | 'looks'>;
|
|
188
|
+
type Looks = Pick<CompiledScene['rendered'], 'svg' | 'variants' | 'looks' | 'inks'>;
|
|
189
189
|
/** A scene as it looks in a state, as SVG text. An empty state is the still render itself, byte for byte. */
|
|
190
190
|
export declare function svgAt(scene: Pick<CompiledScene, 'rendered' | 'id'>, S: SceneState): string;
|
|
191
191
|
/** The same on a live drawing (a scene's own <svg>). Idempotent, in any order: what the last state changed is put back
|
|
192
192
|
* first, so the same state gives the same DOM; an empty state gives the still back. */
|
|
193
|
-
export declare function paint(svg: SVGSVGElement, S: SceneState, rendered?: Looks
|
|
193
|
+
export declare function paint(svg: SVGSVGElement, S: SceneState, rendered?: Looks, o?: {
|
|
194
|
+
styles?: 'attribute' | 'cssom';
|
|
195
|
+
}): void;
|
|
194
196
|
/** the drawing arrives: frame(0) is empty, frame(duration) is the still render */
|
|
195
197
|
export declare const assemble: (s: CompiledScene, o?: AssembleOptions) => ScenePlan;
|
|
196
198
|
/** the drawing leaves: frame(0) is the still render, frame(duration) is empty */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MonoLook } from '../iso-core/mono.js';
|
|
1
2
|
import { type Box } from '../iso-core/kernel.js';
|
|
2
3
|
import { type KindCatalog } from './kinds.js';
|
|
3
4
|
import { type Layout } from './place.js';
|
|
@@ -32,6 +33,8 @@ export interface RenderedScene {
|
|
|
32
33
|
control: string;
|
|
33
34
|
kinds?: Record<string, string>;
|
|
34
35
|
};
|
|
36
|
+
/** (0.16.0) its black and white table, when it is in that treatment */
|
|
37
|
+
mono?: MonoLook;
|
|
35
38
|
/** the drawing with every thing that has a look of this name in it, as SVG text (what a switch takes the thing's parts from);
|
|
36
39
|
* none when nothing declares one */
|
|
37
40
|
variants?: Record<string, string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CompiledScene } from './compile.js';
|
|
2
|
-
import {
|
|
3
|
-
import { type
|
|
2
|
+
import { antsOf } from './ants.js';
|
|
3
|
+
import { type MotionModel, type SceneState } from './motion.js';
|
|
4
|
+
import { type MotionDiag, type MotionDoc, type Say, type Transition } from './motion-doc.js';
|
|
4
5
|
export interface BeatInfo {
|
|
5
6
|
name: string;
|
|
6
7
|
index: number;
|
|
@@ -24,6 +25,10 @@ export interface Timeline {
|
|
|
24
25
|
readonly duration: number;
|
|
25
26
|
readonly beats: BeatInfo[];
|
|
26
27
|
readonly markers: Record<string, number>;
|
|
28
|
+
/** the document's own `ambient`: what at(ms) does with none given */
|
|
29
|
+
readonly ambient: 'on' | 'off';
|
|
30
|
+
/** whether anything in it runs on the ambient clock (ants, looping tokens and pulses): a host with none needs no frames while paused */
|
|
31
|
+
readonly loops: boolean;
|
|
27
32
|
/** what the drawing looks like at ms. `ambient`: the ambient clock's time (default: the same; a host that stopped it passes the time it
|
|
28
33
|
* stopped at, and what loops stands where it was), or 'off': it never ran, and each loop stands at its start */
|
|
29
34
|
at(ms: number, o?: {
|
|
@@ -37,10 +42,28 @@ export interface BindOptions {
|
|
|
37
42
|
/** the connectors' dashes, by kind: the theme's `kinds` (a dashed kind marches with its own dash) */
|
|
38
43
|
kinds?: Record<string, {
|
|
39
44
|
dash?: 'solid' | 'dashed' | 'dotted';
|
|
45
|
+
ants?: [number, number];
|
|
40
46
|
}>;
|
|
41
47
|
/** kinds whose connectors stand still (default: blocked, planned) */
|
|
42
48
|
still?: string[];
|
|
43
49
|
}
|
|
44
|
-
|
|
50
|
+
/** What binding needs to know of a drawing, as plain JSON: for a page that has the drawing and no compiler. */
|
|
51
|
+
export interface MotionSource {
|
|
52
|
+
model: MotionModel;
|
|
53
|
+
/** each connector's kind */
|
|
54
|
+
kinds: Record<string, string>;
|
|
55
|
+
/** each thing's outline */
|
|
56
|
+
outlines: Record<string, [number, number][]>;
|
|
57
|
+
/** the looks each thing declares */
|
|
58
|
+
looks?: Record<string, string[]>;
|
|
59
|
+
ants?: ReturnType<typeof antsOf>;
|
|
60
|
+
/** the notes on nothing (JSON keeps no undefined) */
|
|
61
|
+
free?: string[];
|
|
62
|
+
}
|
|
63
|
+
export declare function motionSource(scene: CompiledScene): MotionSource;
|
|
64
|
+
export declare function bindMotion(drawing: CompiledScene | MotionSource, doc: MotionDoc, opts?: BindOptions): Timeline;
|
|
65
|
+
/** how long a transition is, ms, and how far it is in at t of them */
|
|
66
|
+
export declare const transitionMs: (g: Transition['timing'], fps?: number) => number;
|
|
67
|
+
export declare function transitionAt(g: Transition['timing'], t: number, length: number): number;
|
|
45
68
|
/** A drawing's own steps as a motion document, so that every drawing with steps has a timeline. */
|
|
46
69
|
export declare function motionOfSteps(scene: CompiledScene): MotionDoc;
|
|
@@ -148,6 +148,8 @@ export interface RawDiagram {
|
|
|
148
148
|
footer?: string;
|
|
149
149
|
grid?: GridDef;
|
|
150
150
|
assemble?: boolean;
|
|
151
|
+
/** how a self-contained drawing of it is painted, where the host doesn't say */
|
|
152
|
+
treatment?: 'mono';
|
|
151
153
|
scenes: RawScene[];
|
|
152
154
|
}
|
|
153
155
|
/** a region kind's name in the catalogue the drawing is laid out with (src/iso-objects/kinds.ts) */
|