@popcraft/kit 0.1.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/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +74 -0
- package/dist/index.js +160558 -0
- package/package.json +40 -0
- package/types/design-script.d.ts +39 -0
- package/types/lib/agent/design-script/build.d.ts +35 -0
- package/types/lib/agent/design-script/check.d.ts +11 -0
- package/types/lib/agent/design-script/helper-names.d.ts +1 -0
- package/types/lib/agent/design-script/kit-modules.d.ts +43 -0
- package/types/lib/agent/design-script/recorder.d.ts +52 -0
- package/types/lib/agent/design-script/replay.d.ts +13 -0
- package/types/lib/agent/design-script/run-node.d.ts +2 -0
- package/types/lib/ai/audio-models.d.ts +66 -0
- package/types/lib/ai/content.d.ts +27 -0
- package/types/lib/ai/limits.d.ts +42 -0
- package/types/lib/audio/presentation/loudness.d.ts +80 -0
- package/types/lib/audio/presentation/types.d.ts +112 -0
- package/types/lib/brand/apply.d.ts +25 -0
- package/types/lib/brand/review-kits.d.ts +10 -0
- package/types/lib/brand/types.d.ts +20 -0
- package/types/lib/code/hash.d.ts +2 -0
- package/types/lib/document/auto-layout.d.ts +10 -0
- package/types/lib/document/breakpoints.d.ts +45 -0
- package/types/lib/document/clone.d.ts +6 -0
- package/types/lib/document/color.d.ts +52 -0
- package/types/lib/document/detach.d.ts +12 -0
- package/types/lib/document/effects.d.ts +60 -0
- package/types/lib/document/expressions.d.ts +78 -0
- package/types/lib/document/instance-layout.d.ts +94 -0
- package/types/lib/document/instances.d.ts +63 -0
- package/types/lib/document/libraries.d.ts +97 -0
- package/types/lib/document/node-delta.d.ts +21 -0
- package/types/lib/document/page-tokens.d.ts +16 -0
- package/types/lib/document/photo-frames.d.ts +14 -0
- package/types/lib/document/print-pages.d.ts +85 -0
- package/types/lib/document/scene-graph.d.ts +194 -0
- package/types/lib/document/scene3d.d.ts +76 -0
- package/types/lib/document/shader-graph-effects.d.ts +8 -0
- package/types/lib/document/shader-graph.d.ts +134 -0
- package/types/lib/document/shader-params.d.ts +65 -0
- package/types/lib/document/shape-to-path.d.ts +20 -0
- package/types/lib/document/text-styles.d.ts +28 -0
- package/types/lib/document/text-tokens.d.ts +6 -0
- package/types/lib/document/transform.d.ts +79 -0
- package/types/lib/document/transform3d.d.ts +99 -0
- package/types/lib/document/trim.d.ts +35 -0
- package/types/lib/document/types.d.ts +2560 -0
- package/types/lib/document/variables.d.ts +14 -0
- package/types/lib/editor/easing.d.ts +46 -0
- package/types/lib/editor/modes/types.d.ts +131 -0
- package/types/lib/editor/prototype-connect.d.ts +49 -0
- package/types/lib/editor/smart-animate.d.ts +37 -0
- package/types/lib/engine/geometry/flatten.d.ts +2 -0
- package/types/lib/engine/geometry/shape-outline.d.ts +24 -0
- package/types/lib/engine/pixel/cells.d.ts +12 -0
- package/types/lib/engine/pixel/palettes.d.ts +25 -0
- package/types/lib/engine/readiness.d.ts +20 -0
- package/types/lib/engine/routing.d.ts +41 -0
- package/types/lib/engine/shader-graph-presets.d.ts +22 -0
- package/types/lib/engine/shader-presets-legacy.d.ts +7 -0
- package/types/lib/engine/shader-presets.d.ts +43 -0
- package/types/lib/engine/text/atlas.d.ts +120 -0
- package/types/lib/engine/text/emoji/segment.d.ts +15 -0
- package/types/lib/engine/text/fallback-fonts.d.ts +47 -0
- package/types/lib/engine/text/fontkit-lazy.d.ts +8 -0
- package/types/lib/engine/text/fonts.d.ts +33 -0
- package/types/lib/engine/text/glyph-linear.d.ts +22 -0
- package/types/lib/engine/text/google-fonts.d.ts +17 -0
- package/types/lib/engine/text/hyphenate/en-us.d.ts +6 -0
- package/types/lib/engine/text/hyphenate/liang.d.ts +21 -0
- package/types/lib/engine/text/layout-access.d.ts +16 -0
- package/types/lib/engine/text/layout.d.ts +168 -0
- package/types/lib/engine/text/lists.d.ts +16 -0
- package/types/lib/engine/text/measure.d.ts +58 -0
- package/types/lib/engine/text/outline-sdf.d.ts +34 -0
- package/types/lib/engine/text/shaper.d.ts +88 -0
- package/types/lib/engine/text/text-area.d.ts +16 -0
- package/types/lib/engine/text/text-fit.d.ts +51 -0
- package/types/lib/engine/text/text-path.d.ts +134 -0
- package/types/lib/engine/text/text-rings.d.ts +17 -0
- package/types/lib/engine/text/wrap-obstacles.d.ts +20 -0
- package/types/lib/i18n/catalogs.d.ts +10 -0
- package/types/lib/i18n/format.d.ts +27 -0
- package/types/lib/i18n/locales.d.ts +25 -0
- package/types/lib/i18n/pseudo.d.ts +10 -0
- package/types/lib/i18n/runtime.d.ts +27 -0
- package/types/lib/io/codecs/wav.d.ts +7 -0
- package/types/lib/io/codecs/webp.d.ts +7 -0
- package/types/lib/io/export-ir/children.d.ts +2 -0
- package/types/lib/io/json-export.d.ts +11 -0
- package/types/lib/media-library/types.d.ts +39 -0
- package/types/lib/motion/audio-analysis.d.ts +44 -0
- package/types/lib/motion/audio-clips.d.ts +92 -0
- package/types/lib/motion/audio-onsets.d.ts +13 -0
- package/types/lib/motion/audio-signals.d.ts +59 -0
- package/types/lib/motion/author.d.ts +80 -0
- package/types/lib/motion/composition.d.ts +99 -0
- package/types/lib/motion/instances.d.ts +95 -0
- package/types/lib/motion/key-selection.d.ts +100 -0
- package/types/lib/motion/keys.d.ts +41 -0
- package/types/lib/motion/layer-time-edit.d.ts +40 -0
- package/types/lib/motion/markers.d.ts +31 -0
- package/types/lib/motion/modifier-edit.d.ts +84 -0
- package/types/lib/motion/modifiers.d.ts +44 -0
- package/types/lib/motion/morph.d.ts +14 -0
- package/types/lib/motion/pose-layout.d.ts +6 -0
- package/types/lib/motion/pose.d.ts +115 -0
- package/types/lib/motion/presets.d.ts +148 -0
- package/types/lib/motion/properties.d.ts +74 -0
- package/types/lib/motion/sample-keys.d.ts +8 -0
- package/types/lib/motion/sample.d.ts +51 -0
- package/types/lib/motion/sound.d.ts +25 -0
- package/types/lib/motion/spatial-curve.d.ts +15 -0
- package/types/lib/motion/spatial.d.ts +38 -0
- package/types/lib/motion/text-animators.d.ts +79 -0
- package/types/lib/motion/text-units.d.ts +47 -0
- package/types/lib/motion/time.d.ts +58 -0
- package/types/lib/motion/transitions.d.ts +99 -0
- package/types/lib/motion/values.d.ts +12 -0
- package/types/lib/motion/video-clip.d.ts +63 -0
- package/types/lib/presets/page-presets.d.ts +50 -0
- package/types/lib/storage/media-hash.d.ts +4 -0
- package/types/lib/storage/media-refs.d.ts +2 -0
- package/types/lib/storage/media-store.d.ts +70 -0
- package/types/lib/templates/apply.d.ts +38 -0
- package/types/lib/templates/capture.d.ts +25 -0
- package/types/lib/templates/groups.d.ts +82 -0
- package/types/lib/templates/layout.d.ts +20 -0
- package/types/lib/templates/quality.d.ts +59 -0
- package/types/lib/templates/resize.d.ts +34 -0
- package/types/lib/templates/safe-areas.d.ts +42 -0
- package/types/lib/templates/text-measurer.d.ts +10 -0
- package/types/lib/templates/thumbnail.d.ts +134 -0
- package/types/lib/templates/types.d.ts +95 -0
- package/types/lib/templates/vocabulary.d.ts +50 -0
- package/types/lib/units/units.d.ts +23 -0
- package/types/packages/kit/src/index.d.ts +59 -0
- package/types/packages/runtime/src/expressions.d.ts +41 -0
- package/types/templates/src/app/shared.d.ts +29 -0
- package/types/templates/src/audio/beat-loop.d.ts +9 -0
- package/types/templates/src/audio/media.d.ts +42 -0
- package/types/templates/src/audio/music-synth.d.ts +57 -0
- package/types/templates/src/audio/music-worlds.d.ts +8 -0
- package/types/templates/src/audio/music.d.ts +19 -0
- package/types/templates/src/audio/studio/deck.d.ts +340 -0
- package/types/templates/src/audio/studio/dsp.d.ts +151 -0
- package/types/templates/src/audio/studio/fx.d.ts +96 -0
- package/types/templates/src/audio/studio/mix.d.ts +84 -0
- package/types/templates/src/audio/studio/voices.d.ts +120 -0
- package/types/templates/src/data/geometry.d.ts +16 -0
- package/types/templates/src/effects/shared.d.ts +17 -0
- package/types/templates/src/kit.d.ts +582 -0
- package/types/templates/src/motion3d/devices.d.ts +42 -0
- package/types/templates/src/motion3d/ui.d.ts +48 -0
- package/types/templates/src/saas/video-shared.d.ts +114 -0
- package/types/templates/src/saas/web-shared.d.ts +74 -0
- package/types/templates/src/shared/beat.d.ts +24 -0
- package/types/templates/src/shared/captions.d.ts +24 -0
- package/types/templates/src/shared/devices.d.ts +188 -0
- package/types/templates/src/shared/draw.d.ts +43 -0
- package/types/templates/src/shared/fit.d.ts +73 -0
- package/types/templates/src/shared/marks.d.ts +51 -0
- package/types/templates/src/shared/motion.d.ts +15 -0
- package/types/templates/src/shared/overlays.d.ts +80 -0
- package/types/templates/src/shared/pointer.d.ts +46 -0
- package/types/templates/src/shared/texture.d.ts +41 -0
- package/types/templates/src/shared/type.d.ts +6 -0
- package/types/templates/src/shared/window.d.ts +50 -0
- package/types/templates/src/social/shared.d.ts +66 -0
- package/types/templates/src/web/shared.d.ts +64 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { VectorPath } from '../../../lib/document/types.js';
|
|
2
|
+
import type { Fill, Kit, VariantSpec } from '../kit.js';
|
|
3
|
+
import { type SizeTweaks } from '../social/shared.js';
|
|
4
|
+
import type { Score } from '../shared/beat.js';
|
|
5
|
+
import { type TrackId } from '../audio/music.js';
|
|
6
|
+
/**
|
|
7
|
+
* `bars` bars of a shipped track from its bar `fromBar`, as a video's score: the clip starts on that bar line, so
|
|
8
|
+
* beat 0 of the video is a downbeat of the track, and two videos can take different parts of one track.
|
|
9
|
+
*/
|
|
10
|
+
export declare function section(track: TrackId, fromBar: number, bars: number): Score;
|
|
11
|
+
/** The 9:16 master as an auto-layout column inside every vertical app's safe area, with its timeline and sound. */
|
|
12
|
+
export declare function reelSheet(k: Kit, s: Score, o: {
|
|
13
|
+
name: string;
|
|
14
|
+
gap: number;
|
|
15
|
+
paper?: string;
|
|
16
|
+
justify?: 'MIN' | 'CENTER' | 'MAX' | 'SPACE_BETWEEN';
|
|
17
|
+
align?: 'MIN' | 'CENTER' | 'MAX';
|
|
18
|
+
}): string;
|
|
19
|
+
/** Width of the master's column (the safe area between the action rail and its mirror). */
|
|
20
|
+
export declare const COLUMN: number;
|
|
21
|
+
/** The square and 4:5 cuts of a reel. */
|
|
22
|
+
export declare const reelCuts: (pad: {
|
|
23
|
+
post: number;
|
|
24
|
+
portrait: number;
|
|
25
|
+
}, tweak?: SizeTweaks) => VariantSpec[];
|
|
26
|
+
export interface WideBox {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A reel laid out again at 1920 × 1080 in two columns. The sheet stays the one column it is, narrowed to `left` px
|
|
34
|
+
* down the left (the words: hook, caption, button); what `adjust` then floats (`float`) sits in the box it is given,
|
|
35
|
+
* the room on the right. The copy keeps the master's layers in the master's order, so its motion carries over.
|
|
36
|
+
*/
|
|
37
|
+
export declare function wideCut(left: number, adjust: (k: Kit, sheet: string, right: WideBox) => void, o?: {
|
|
38
|
+
pad?: number;
|
|
39
|
+
gap?: number;
|
|
40
|
+
spacing?: number;
|
|
41
|
+
}): VariantSpec;
|
|
42
|
+
/**
|
|
43
|
+
* Take every layer named `name` out of the sheet's column and put it at (`x`, `y`) of the sheet, `scale` times its
|
|
44
|
+
* size (about its own corner) and, if said, `width` px wide before scaling.
|
|
45
|
+
*/
|
|
46
|
+
export declare function float(k: Kit, sheet: string, name: string, x: number, y: number, o?: {
|
|
47
|
+
scale?: number;
|
|
48
|
+
width?: number;
|
|
49
|
+
}): void;
|
|
50
|
+
/**
|
|
51
|
+
* A dot grid over the whole sheet: one vector of small squares, `step` px apart, placed at the sheet's corner. Drawn
|
|
52
|
+
* 1080 × 1920, so a smaller cut shows its top-left part: the same pattern at every size.
|
|
53
|
+
*/
|
|
54
|
+
export declare function dotGrid(k: Kit, sheet: string, color: Fill, o?: DotGrid): string;
|
|
55
|
+
export interface DotGrid {
|
|
56
|
+
step?: number;
|
|
57
|
+
size?: number;
|
|
58
|
+
opacity?: number;
|
|
59
|
+
name?: string;
|
|
60
|
+
}
|
|
61
|
+
/** The dot grid of a resized copy, drawn again over the whole of it (give the options it was made with). */
|
|
62
|
+
export declare const redrawDots: (k: Kit, sheet: string, o?: DotGrid) => void;
|
|
63
|
+
/** A ruled grid over the whole sheet: hairlines every `step` px (and only the verticals, or horizontals, if said). */
|
|
64
|
+
export declare function lineGrid(k: Kit, sheet: string, color: Fill, o?: LineGrid): string;
|
|
65
|
+
export interface LineGrid {
|
|
66
|
+
step?: number;
|
|
67
|
+
weight?: number;
|
|
68
|
+
opacity?: number;
|
|
69
|
+
only?: 'x' | 'y';
|
|
70
|
+
name?: string;
|
|
71
|
+
stepY?: number;
|
|
72
|
+
}
|
|
73
|
+
/** The ruled grid of a resized copy, drawn again over the whole of it (give the options it was made with). */
|
|
74
|
+
export declare const redrawLines: (k: Kit, sheet: string, o?: LineGrid) => void;
|
|
75
|
+
/** A head and shoulders in a `w` × `h` box. */
|
|
76
|
+
export declare function bust(w: number, h: number): {
|
|
77
|
+
head: {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
d: number;
|
|
81
|
+
};
|
|
82
|
+
shoulders: VectorPath;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* A photo slot for a person, with a drawn head and shoulders over it until a photo is dropped in: drop the photo on
|
|
86
|
+
* the slot's photo layer and hide "Placeholder portrait". Returns the slot.
|
|
87
|
+
*/
|
|
88
|
+
export declare function portraitSlot(k: Kit, parent: string, w: number, h: number, o: {
|
|
89
|
+
radius: number;
|
|
90
|
+
ground: string;
|
|
91
|
+
skin: string;
|
|
92
|
+
top: string;
|
|
93
|
+
halo: string;
|
|
94
|
+
name: string;
|
|
95
|
+
photo: string;
|
|
96
|
+
}): string;
|
|
97
|
+
export interface Shot {
|
|
98
|
+
/** Sheet ms the move starts, and how long it takes. */
|
|
99
|
+
t: number;
|
|
100
|
+
duration?: number;
|
|
101
|
+
/** How far in (1: the whole stage), and the point of the stage (its own px) brought to the centre. */
|
|
102
|
+
zoom: number;
|
|
103
|
+
x?: number;
|
|
104
|
+
y?: number;
|
|
105
|
+
}
|
|
106
|
+
/** Where the point `p` of the stage is seen through a shot (px of the frame the camera is in). */
|
|
107
|
+
export declare function seenAt(width: number, height: number, s: Pick<Shot, 'zoom' | 'x' | 'y'>, p: {
|
|
108
|
+
x: number;
|
|
109
|
+
y: number;
|
|
110
|
+
}): {
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
};
|
|
114
|
+
export declare function camera(k: Kit, id: string, width: number, height: number, shots: readonly Shot[]): void;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Effect, VectorPath } from '../../../lib/document/types.js';
|
|
2
|
+
import type { Kit, StackOpts } from '../kit.js';
|
|
3
|
+
import { type Responsive } from '../web/shared.js';
|
|
4
|
+
type StyleDef = Parameters<Kit['textStyle']>[1];
|
|
5
|
+
/**
|
|
6
|
+
* A page's type scale, by name: `s('Lead 20')` makes the style on first use and answers its name, so a page lists
|
|
7
|
+
* every step it might need and ships only the ones it set.
|
|
8
|
+
*/
|
|
9
|
+
export declare function typeScale(k: Kit, defs: Record<string, StyleDef>): (name: string) => string;
|
|
10
|
+
/**
|
|
11
|
+
* `webResponsive`, with the steps a page restyles down to made first. `used` is the page's `typeScale`: a step is
|
|
12
|
+
* only made when the style it replaces is one the page set something in.
|
|
13
|
+
*/
|
|
14
|
+
export declare function respond(k: Kit, sheet: string, s: (name: string) => string, r: Responsive & {
|
|
15
|
+
typing?: readonly Typing[];
|
|
16
|
+
}): string[];
|
|
17
|
+
/** A typed text and the caret that follows it: the layers' names, and the typewriter cue's start and length. */
|
|
18
|
+
export interface Typing {
|
|
19
|
+
text: string;
|
|
20
|
+
caret: string;
|
|
21
|
+
at: number;
|
|
22
|
+
duration: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Keys each `caret` under `root` to ride the end of what its `text` has typed so far: along the line, and down to
|
|
26
|
+
* the next one where the text wraps. The caret is an absolute layer beside its text (the same parent); it rests
|
|
27
|
+
* after the last letter, and its keys are offsets from there, so the page at rest shows a finished field.
|
|
28
|
+
*/
|
|
29
|
+
export declare function followTyping(k: Kit, root: string, t: Typing): void;
|
|
30
|
+
/**
|
|
31
|
+
* The tablet's nav: the links stay, closer together, and the ones named in `drop` fold away so the row clears the
|
|
32
|
+
* brand name (the phone folds them all).
|
|
33
|
+
*/
|
|
34
|
+
export declare function compactNav(k: Kit, sheet: string, drop?: readonly string[], gap?: number): void;
|
|
35
|
+
/** A soft shadow under a card (black at `a`), and a hard offset one with no blur (the neo-brutalist kind). */
|
|
36
|
+
export declare const soft: (a?: number, y?: number, blur?: number) => Effect;
|
|
37
|
+
export declare const hard: (k: Kit, role: string, d?: number) => Effect;
|
|
38
|
+
/** A polyline through `values` (0…1, low to high) across a `w` × `h` box, and the same closed down to the floor. */
|
|
39
|
+
export declare function linePath(values: readonly number[], w: number, h: number, close?: boolean): VectorPath;
|
|
40
|
+
/** A hairline across its parent. */
|
|
41
|
+
export declare const rule: (k: Kit, parent: string, color: string, o?: {
|
|
42
|
+
weight?: number;
|
|
43
|
+
opacity?: number;
|
|
44
|
+
name?: string;
|
|
45
|
+
}) => string;
|
|
46
|
+
/**
|
|
47
|
+
* A page footer with real columns: the brand and a line about it, then link columns, then a legal line under a
|
|
48
|
+
* rule. The row is `Footer columns` (stack it on the phone).
|
|
49
|
+
*/
|
|
50
|
+
export declare function footer(k: Kit, sheet: string, o: {
|
|
51
|
+
about: string;
|
|
52
|
+
columns: readonly (readonly [string, readonly string[]])[];
|
|
53
|
+
legal: string;
|
|
54
|
+
brandStyle: string;
|
|
55
|
+
headStyle: string;
|
|
56
|
+
linkStyle: string;
|
|
57
|
+
ruleColor: string;
|
|
58
|
+
ink?: string;
|
|
59
|
+
quiet?: string;
|
|
60
|
+
box?: StackOpts;
|
|
61
|
+
}): string;
|
|
62
|
+
/** The width a page's content has at each breakpoint: the sheet less its side padding (templates/src/web/shared.ts). */
|
|
63
|
+
export declare const CONTENT: {
|
|
64
|
+
readonly desktop: 1200;
|
|
65
|
+
readonly laptop: 1120;
|
|
66
|
+
readonly tablet: 672;
|
|
67
|
+
readonly mobile: 335;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Set every layer named `item` under `root` to the width that puts `cols` of them across a wrapping row `inside`
|
|
71
|
+
* px wide with `gap` between them: a grid of cards that is four across on a desk, two on a tablet, one on a phone.
|
|
72
|
+
*/
|
|
73
|
+
export declare function columns(k: Kit, root: string, item: string, cols: number, gap: number, inside: number): void;
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AudioClip } from '../../../lib/document/types.js';
|
|
2
|
+
import { type TrackId } from '../audio/music.js';
|
|
3
|
+
export interface Score {
|
|
4
|
+
/** Sheet ms the video lasts: the track, `passes` times. */
|
|
5
|
+
duration: number;
|
|
6
|
+
/** Whole beats in the video. */
|
|
7
|
+
beats: number;
|
|
8
|
+
/** Sheet ms of beat `n` (fractions are off-beats). */
|
|
9
|
+
beat: (n: number) => number;
|
|
10
|
+
/** The clips, back to back on one lane, the last fading out. */
|
|
11
|
+
audio: AudioClip[];
|
|
12
|
+
}
|
|
13
|
+
/** A shipped track (`pop` is the 120 BPM "Pop Drop" loop) played `passes` times, and its beat clock. */
|
|
14
|
+
export declare function score(track: TrackId | 'pop', passes?: number): Score;
|
|
15
|
+
export interface Bed {
|
|
16
|
+
/** Film ms of beat `n` (fractions are off-beats). */
|
|
17
|
+
beat: (n: number) => number;
|
|
18
|
+
/** The film's length. */
|
|
19
|
+
duration: number;
|
|
20
|
+
/** The track back to back on one lane, the last pass trimmed to the film's end and faded out. */
|
|
21
|
+
audio: AudioClip[];
|
|
22
|
+
}
|
|
23
|
+
/** A shipped track under a film `beats` beats long: its beat clock, and its clips trimmed to that length. */
|
|
24
|
+
export declare function bed(track: TrackId | 'pop', beats: number): Bed;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Effect } from '../../../lib/document/types.js';
|
|
2
|
+
import type { BrandStroke, Fill, Kit, Swap } from '../kit.js';
|
|
3
|
+
/**
|
|
4
|
+
* The caption track: one text named `Caption` on a strip, saying `lines` in turn word by word, from `at` until
|
|
5
|
+
* `until` (the end of the video, so the strip is never left empty). Every line has the same number of words, so
|
|
6
|
+
* each takes the same time.
|
|
7
|
+
*/
|
|
8
|
+
export declare function captionSwap(lines: readonly string[], at: number, until: number, o?: {
|
|
9
|
+
stagger?: number;
|
|
10
|
+
in?: number;
|
|
11
|
+
out?: number;
|
|
12
|
+
rise?: number;
|
|
13
|
+
}): Swap;
|
|
14
|
+
/** The caption strip: a filled bar with the caption on it (its first line, until the swap plays). */
|
|
15
|
+
export declare function captionStrip(k: Kit, parent: string, first: string, o: {
|
|
16
|
+
style: string;
|
|
17
|
+
fill: Fill;
|
|
18
|
+
ink: string;
|
|
19
|
+
width?: number | 'FILL';
|
|
20
|
+
radius?: number;
|
|
21
|
+
pad?: [number, number];
|
|
22
|
+
stroke?: BrandStroke;
|
|
23
|
+
effects?: Effect[];
|
|
24
|
+
}): string;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import type { Effect } from '../../../lib/document/types.js';
|
|
2
|
+
import type { Fill, Kit } from '../kit.js';
|
|
3
|
+
import { APP_COLORS } from '../motion3d/ui.js';
|
|
4
|
+
import { DEVICE_COLORS } from '../motion3d/devices.js';
|
|
5
|
+
/** The app's and the device's roles with a template's own values over them. */
|
|
6
|
+
export declare const uiRoles: (o?: Partial<Record<keyof typeof APP_COLORS | keyof typeof DEVICE_COLORS, string>>) => Record<string, string>;
|
|
7
|
+
declare const UI: {
|
|
8
|
+
readonly 'App title 30': {
|
|
9
|
+
readonly size: 30;
|
|
10
|
+
readonly fontWeight: 800;
|
|
11
|
+
readonly letterSpacing: -0.7;
|
|
12
|
+
readonly lineHeight: 36;
|
|
13
|
+
};
|
|
14
|
+
readonly 'App head 20': {
|
|
15
|
+
readonly size: 20;
|
|
16
|
+
readonly fontWeight: 700;
|
|
17
|
+
readonly letterSpacing: -0.3;
|
|
18
|
+
readonly lineHeight: 26;
|
|
19
|
+
};
|
|
20
|
+
readonly 'App row 17': {
|
|
21
|
+
readonly size: 17;
|
|
22
|
+
readonly fontWeight: 600;
|
|
23
|
+
readonly lineHeight: 22;
|
|
24
|
+
};
|
|
25
|
+
readonly 'App note 16': {
|
|
26
|
+
readonly size: 16;
|
|
27
|
+
readonly fontWeight: 500;
|
|
28
|
+
readonly lineHeight: 21;
|
|
29
|
+
};
|
|
30
|
+
readonly 'App figure 44': {
|
|
31
|
+
readonly size: 44;
|
|
32
|
+
readonly fontWeight: 800;
|
|
33
|
+
readonly letterSpacing: -1.6;
|
|
34
|
+
readonly lineHeight: 48;
|
|
35
|
+
};
|
|
36
|
+
readonly 'App figure 26': {
|
|
37
|
+
readonly size: 26;
|
|
38
|
+
readonly fontWeight: 800;
|
|
39
|
+
readonly letterSpacing: -0.7;
|
|
40
|
+
readonly lineHeight: 30;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type UIStyle = keyof typeof UI;
|
|
44
|
+
/** A UI text style, made the first time a screen sets words in it. */
|
|
45
|
+
export declare const ui: (k: Kit, name: UIStyle) => string;
|
|
46
|
+
export type Glyph = 'dot' | 'leaf' | 'drop' | 'moon' | 'bolt' | 'bars' | 'play' | 'check' | 'sun' | 'square' | 'star';
|
|
47
|
+
/** A mark `size` px across in `role` (drawn, so it needs no glyph from a font). */
|
|
48
|
+
export declare function glyph(k: Kit, parent: string, g: Glyph, size: number, role: Fill, o?: {
|
|
49
|
+
absolute?: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
};
|
|
53
|
+
name?: string;
|
|
54
|
+
}): string;
|
|
55
|
+
export interface Row {
|
|
56
|
+
title: string;
|
|
57
|
+
sub?: string;
|
|
58
|
+
value?: string;
|
|
59
|
+
glyph?: Glyph; /** The mark's role and its tile's (default `primary` on `tile`). */
|
|
60
|
+
ink?: string;
|
|
61
|
+
tile?: string;
|
|
62
|
+
}
|
|
63
|
+
export type Block = {
|
|
64
|
+
kind: 'title';
|
|
65
|
+
text: string;
|
|
66
|
+
note?: string;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'heading';
|
|
69
|
+
text: string;
|
|
70
|
+
note?: string;
|
|
71
|
+
} | {
|
|
72
|
+
kind: 'text';
|
|
73
|
+
text: string;
|
|
74
|
+
} | {
|
|
75
|
+
kind: 'hero';
|
|
76
|
+
label: string;
|
|
77
|
+
figure: string;
|
|
78
|
+
note?: string;
|
|
79
|
+
share?: number;
|
|
80
|
+
fill?: string;
|
|
81
|
+
ink?: string;
|
|
82
|
+
} | {
|
|
83
|
+
kind: 'tiles';
|
|
84
|
+
items: readonly (readonly [label: string, figure: string])[];
|
|
85
|
+
} | {
|
|
86
|
+
kind: 'bars';
|
|
87
|
+
title?: string;
|
|
88
|
+
note?: string;
|
|
89
|
+
values: readonly number[];
|
|
90
|
+
hi?: number;
|
|
91
|
+
labels?: readonly string[];
|
|
92
|
+
height?: number;
|
|
93
|
+
} | {
|
|
94
|
+
kind: 'curve';
|
|
95
|
+
title?: string;
|
|
96
|
+
note?: string;
|
|
97
|
+
values: readonly number[];
|
|
98
|
+
height?: number;
|
|
99
|
+
mark?: number;
|
|
100
|
+
} | {
|
|
101
|
+
kind: 'rows';
|
|
102
|
+
rows: readonly Row[];
|
|
103
|
+
card?: boolean;
|
|
104
|
+
} | {
|
|
105
|
+
kind: 'checks';
|
|
106
|
+
rows: readonly (readonly [text: string, done: boolean])[];
|
|
107
|
+
} | {
|
|
108
|
+
kind: 'ring';
|
|
109
|
+
share: number;
|
|
110
|
+
figure: string;
|
|
111
|
+
label: string;
|
|
112
|
+
size?: number;
|
|
113
|
+
} | {
|
|
114
|
+
kind: 'chips';
|
|
115
|
+
items: readonly string[];
|
|
116
|
+
on?: number;
|
|
117
|
+
} | {
|
|
118
|
+
kind: 'photo';
|
|
119
|
+
height: number;
|
|
120
|
+
name?: string;
|
|
121
|
+
} | {
|
|
122
|
+
kind: 'button';
|
|
123
|
+
label: string;
|
|
124
|
+
} | {
|
|
125
|
+
kind: 'custom';
|
|
126
|
+
build: (k: Kit, parent: string, width: number) => void;
|
|
127
|
+
};
|
|
128
|
+
export interface ScreenSpec {
|
|
129
|
+
/** The component is `Screen / <name>` (or `Tablet / <name>`). */
|
|
130
|
+
name: string;
|
|
131
|
+
description?: string;
|
|
132
|
+
blocks: readonly Block[];
|
|
133
|
+
/** Tabs at the foot (icons only), and which is lit; none when left out. */
|
|
134
|
+
tabs?: readonly [count: number, on: number];
|
|
135
|
+
gap?: number;
|
|
136
|
+
/** Blocks only the tablet shows, at the foot of its right column. */
|
|
137
|
+
tablet?: readonly Block[];
|
|
138
|
+
}
|
|
139
|
+
/** Make a phone screen component `Screen / <name>` from `spec`. Returns the component's name. */
|
|
140
|
+
export declare function appScreen(k: Kit, spec: ScreenSpec): string;
|
|
141
|
+
/** The same screen for the tablet, `Tablet / <name>`: its blocks in two columns (`split` blocks go left). */
|
|
142
|
+
export declare function tabletScreen(k: Kit, spec: ScreenSpec, split?: number): string;
|
|
143
|
+
/**
|
|
144
|
+
* The devices a template shows, their screens made first: `Phone` (and `Tablet`) from ../motion3d/devices.ts, with
|
|
145
|
+
* `Screen / Screenshot` beside the drawn screens for a founder's own capture.
|
|
146
|
+
*/
|
|
147
|
+
export declare function storeDevices(k: Kit, o: {
|
|
148
|
+
phone?: string;
|
|
149
|
+
tablet?: string;
|
|
150
|
+
}): void;
|
|
151
|
+
export interface Placed {
|
|
152
|
+
holder: string;
|
|
153
|
+
device: string;
|
|
154
|
+
width: number;
|
|
155
|
+
height: number;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* A device drawn flat at `scale`, its top-left at (`x`, `y`) of `parent` — or in `parent`'s flow, with `flow`. The
|
|
159
|
+
* holder is a frame the size the device is drawn at; the device inside it is the component's own instance, scaled
|
|
160
|
+
* about its centre, so its Screen stays one swap.
|
|
161
|
+
*/
|
|
162
|
+
export declare function placeDevice(k: Kit, parent: string, o: {
|
|
163
|
+
device?: 'Phone' | 'Tablet';
|
|
164
|
+
screen: string;
|
|
165
|
+
scale: number;
|
|
166
|
+
x?: number;
|
|
167
|
+
y?: number;
|
|
168
|
+
flow?: boolean;
|
|
169
|
+
name?: string;
|
|
170
|
+
shadow?: Effect | null;
|
|
171
|
+
rotation?: number;
|
|
172
|
+
}): Placed;
|
|
173
|
+
/**
|
|
174
|
+
* The phone laid flat as ordinary layers, for a device a frame edge cuts: the same body, bezel and island as the
|
|
175
|
+
* `Phone` component (../motion3d/devices.ts), its screen a picture slot ("Your screenshot") under the drawn
|
|
176
|
+
* "Placeholder screen" — drop a capture on the slot and hide the placeholder. Its words are real layers inside a
|
|
177
|
+
* clipping body, so a sheet that crops the phone crops them too.
|
|
178
|
+
*/
|
|
179
|
+
export declare function flatPhone(k: Kit, parent: string, o: {
|
|
180
|
+
spec: ScreenSpec;
|
|
181
|
+
scale: number;
|
|
182
|
+
x: number;
|
|
183
|
+
y: number;
|
|
184
|
+
name?: string;
|
|
185
|
+
shadow?: Effect | null;
|
|
186
|
+
rotation?: number;
|
|
187
|
+
}): Placed;
|
|
188
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { VectorPath } from '../../../lib/document/types.js';
|
|
2
|
+
/** `v` to a thousandth of a px (and never `-0`), so geometry worked out with trigonometry builds the same on every machine. */
|
|
3
|
+
export declare const r3: (v: number) => number;
|
|
4
|
+
export declare const DEG: number;
|
|
5
|
+
export type P = {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
/** A point as a pair, for shapes written out as lists of numbers. */
|
|
10
|
+
export type P2 = readonly [number, number];
|
|
11
|
+
export declare const pt: (x: number, y: number) => {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
/** A point held to a thousandth. */
|
|
16
|
+
export declare const pt3: (x: number, y: number) => {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
/** A seeded stream of numbers in 0…1 (integer arithmetic only, so every machine draws the same scatter). */
|
|
21
|
+
export declare function rng(seed: number): () => number;
|
|
22
|
+
/** The older, plainer stream (a linear congruential one): kept for the drawings that were seeded with it. */
|
|
23
|
+
export declare function lcg(seed: number): () => number;
|
|
24
|
+
/** A rectangle. */
|
|
25
|
+
export declare const box: (x: number, y: number, w: number, h: number) => VectorPath;
|
|
26
|
+
/** One straight stroke. */
|
|
27
|
+
export declare const line: (x1: number, y1: number, x2: number, y2: number) => VectorPath;
|
|
28
|
+
/** A shape through `pts` (closed unless said). */
|
|
29
|
+
export declare const poly: (pts: readonly P2[], closed?: boolean) => VectorPath;
|
|
30
|
+
/** `n` points round a circle. */
|
|
31
|
+
export declare const circle: (cx: number, cy: number, r: number, n?: number) => P[];
|
|
32
|
+
/** The four corners of a rectangle, as points to build a shape from. */
|
|
33
|
+
export declare const corners: (x: number, y: number, w: number, h: number) => P[];
|
|
34
|
+
/** `n` points round a circle, held to a thousandth. */
|
|
35
|
+
export declare const circle3: (cx: number, cy: number, r: number, n?: number) => P[];
|
|
36
|
+
/** A shape through `points` (closed unless said). */
|
|
37
|
+
export declare const poly3: (points: P[], closed?: boolean) => VectorPath;
|
|
38
|
+
/** A rectangle. */
|
|
39
|
+
export declare const box3: (x: number, y: number, w: number, h: number) => VectorPath;
|
|
40
|
+
/** A closed curve through `pts` (handles from each point's neighbours). */
|
|
41
|
+
export declare const smooth: (pts: P[], tension?: number) => VectorPath;
|
|
42
|
+
/** An open curve through `pts` (it starts and ends without a turn). */
|
|
43
|
+
export declare const curve3: (pts: P[], tension?: number) => VectorPath;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Effect, VectorPath } from '../../../lib/document/types.js';
|
|
2
|
+
import type { AbsoluteAt, Fill, Kit } from '../kit.js';
|
|
3
|
+
import { type P } from './draw.js';
|
|
4
|
+
/** A sheet's (or any layer's) size. */
|
|
5
|
+
export declare const sizeOf: (k: Kit, id: string) => {
|
|
6
|
+
w: number;
|
|
7
|
+
h: number;
|
|
8
|
+
};
|
|
9
|
+
export interface Box {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
/** The boxes of the layers named in `names` under `root`, in `root`'s own space (settle the layout first). */
|
|
16
|
+
export declare const boxesOf: (k: Kit, root: string, names: readonly string[]) => Box[];
|
|
17
|
+
/** A sheet as a clipped ground: an auto-layout column whose layers are placed by hand (give each `absolute`). */
|
|
18
|
+
export declare function ground(k: Kit, sheet: string, name: string, paper: string): void;
|
|
19
|
+
/** Run `fn` on every layer named `name` under `root`. */
|
|
20
|
+
export declare function each(k: Kit, root: string, name: string, fn: (id: string, i: number) => void): void;
|
|
21
|
+
/** Move every layer named `name` under `root` to (`x`, `y`) of its parent. */
|
|
22
|
+
export declare function put(k: Kit, root: string, name: string, x: number, y: number, more?: Record<string, unknown>): void;
|
|
23
|
+
/** Put every layer named `name` under `root` at (`x`, `y`), scaled by `s` about its own corner. */
|
|
24
|
+
export declare function place(k: Kit, root: string, name: string, x: number, y: number, s?: number): void;
|
|
25
|
+
/** Hide every layer named in `names` under `root` (a cut with no room for them). */
|
|
26
|
+
export declare function hide(k: Kit, root: string, names: readonly string[]): void;
|
|
27
|
+
/** Set every text named `name` under `root` in the text style `style`. */
|
|
28
|
+
export declare function restyle(k: Kit, root: string, name: string, style: string): void;
|
|
29
|
+
/** Patch every layer named `name` under `root`. */
|
|
30
|
+
export declare function patchAll(k: Kit, root: string, name: string, props: Record<string, unknown>): void;
|
|
31
|
+
/**
|
|
32
|
+
* A full-bleed drawing over `sheet` named `name`: `paths(w, h)` drawn at the sheet's own size. `redraw` draws it
|
|
33
|
+
* again on a resized copy.
|
|
34
|
+
*/
|
|
35
|
+
export declare function pattern(k: Kit, sheet: string, name: string, role: string, paths: (w: number, h: number) => VectorPath[], opacity?: number): string;
|
|
36
|
+
export declare function redraw(k: Kit, sheet: string, name: string, paths: (w: number, h: number) => VectorPath[]): void;
|
|
37
|
+
/**
|
|
38
|
+
* A drawing worked out before it is drawn: a layer's name, its box on the sheet and its paths inside that box. A
|
|
39
|
+
* scene is a list of parts made from a description, so a resized copy is the same description worked out again and
|
|
40
|
+
* each part patched (`patchPart`), never a stretched vector.
|
|
41
|
+
*/
|
|
42
|
+
export interface Part {
|
|
43
|
+
name: string;
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
w: number;
|
|
47
|
+
h: number;
|
|
48
|
+
paths: VectorPath[];
|
|
49
|
+
}
|
|
50
|
+
/** `shapes` (in sheet px) as a part: boxed tight, never thinner than 1 px, its points held to a thousandth. */
|
|
51
|
+
export declare function boxed(name: string, shapes: P[][], closed?: boolean): Part;
|
|
52
|
+
/** The same from paths that are each open or closed (and a part with nothing in it draws nothing). */
|
|
53
|
+
export declare function boxedPaths(name: string, paths: {
|
|
54
|
+
closed: boolean;
|
|
55
|
+
points: P[];
|
|
56
|
+
}[]): Part;
|
|
57
|
+
/** Draw a part on `parent`. */
|
|
58
|
+
export declare const vectorAt: (k: Kit, parent: string, p: Part, color: Fill, o?: {
|
|
59
|
+
effects?: Effect[];
|
|
60
|
+
strokeWidth?: number;
|
|
61
|
+
opacity?: number;
|
|
62
|
+
}) => string;
|
|
63
|
+
/** Put the layer `id` where the part now is (nothing, if the copy has no such layer). */
|
|
64
|
+
export declare const patchPart: (k: Kit, id: string | undefined, p: Part) => void;
|
|
65
|
+
/**
|
|
66
|
+
* A stage in the flow, `w` × `h` at `scale`, and the drawing board inside it (a frame of the drawing's own `w` × `h`,
|
|
67
|
+
* scaled about its middle and put back at the stage's corner): one drawing, shown smaller on a smaller sheet.
|
|
68
|
+
*/
|
|
69
|
+
export declare function board(k: Kit, parent: string, w: number, h: number, scale: number, name: string, o?: {
|
|
70
|
+
absolute?: AbsoluteAt;
|
|
71
|
+
}): string;
|
|
72
|
+
/** The boards named `name` under `root`, shown at `scale` instead. */
|
|
73
|
+
export declare function reboard(k: Kit, root: string, name: string, scale: number): void;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { VectorPath } from '../../../lib/document/types.js';
|
|
2
|
+
import type { AbsoluteAt, Kit } from '../kit.js';
|
|
3
|
+
import type { Box } from './fit.js';
|
|
4
|
+
/** Hairlines every `step` px over a `w` × `h` box. */
|
|
5
|
+
export declare function gridPaths(w: number, h: number, step: number, weight?: number, only?: 'x' | 'y'): VectorPath[];
|
|
6
|
+
/** Small squares every `step` px over a `w` × `h` box. */
|
|
7
|
+
export declare function dotPaths(w: number, h: number, step: number, size?: number): VectorPath[];
|
|
8
|
+
/** `n` confetti pieces scattered over a `w` × `h` box: slips, squares and triangles, each turned its own way. */
|
|
9
|
+
export declare function confettiPaths(w: number, h: number, n: number, seed: number, scale?: number, keepOut?: readonly Box[]): VectorPath[];
|
|
10
|
+
/** A tick in a `w` × `h` box (drawn as a stroke). */
|
|
11
|
+
export declare const tickPath: (w: number, h: number) => VectorPath;
|
|
12
|
+
/** An arrow pointing right in a `w` × `h` box (filled): a shaft `t` thick and a head. */
|
|
13
|
+
export declare function arrowPath(w: number, h: number, t?: number): VectorPath;
|
|
14
|
+
/** A four-point spark in a `s` × `s` box. */
|
|
15
|
+
export declare function sparkPath(s: number, pinch?: number): VectorPath;
|
|
16
|
+
/** A star burst (a sticker's edge) with `points` teeth in a `s` × `s` box. */
|
|
17
|
+
export declare function burstPath(s: number, points?: number, depth?: number): VectorPath;
|
|
18
|
+
/** A tick, drawn (no glyph to go missing in a face), in a `size` box. */
|
|
19
|
+
export declare function tick(k: Kit, parent: string, size: number, color: string, o?: {
|
|
20
|
+
name?: string;
|
|
21
|
+
weight?: number;
|
|
22
|
+
absolute?: AbsoluteAt;
|
|
23
|
+
}): string;
|
|
24
|
+
/** A cross, drawn the same way. */
|
|
25
|
+
export declare function cross(k: Kit, parent: string, size: number, color: string, o?: {
|
|
26
|
+
name?: string;
|
|
27
|
+
weight?: number;
|
|
28
|
+
}): string;
|
|
29
|
+
/** A text caret that blinks about twice a second for as long as the page plays. */
|
|
30
|
+
export declare function caret(k: Kit, parent: string, width: number, height: number, color: string, o?: {
|
|
31
|
+
name?: string;
|
|
32
|
+
absolute?: AbsoluteAt;
|
|
33
|
+
}): string;
|
|
34
|
+
/** Five stars in a row. */
|
|
35
|
+
export declare function stars(k: Kit, parent: string, size: number, role: string, gap?: number): string;
|
|
36
|
+
/** A chart of `values` in a `w` × `h` box from 0 to `max`: its line, the area under it, and each point. */
|
|
37
|
+
export declare function chart(values: readonly number[], w: number, h: number, max: number): {
|
|
38
|
+
line: VectorPath;
|
|
39
|
+
area: VectorPath;
|
|
40
|
+
pts: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
/** Bars of `values` (0…`max`) standing on the floor of a `w` × `h` box, `gap` px apart. */
|
|
46
|
+
export declare function barPaths(values: readonly number[], w: number, h: number, max: number, gap?: number): VectorPath[];
|
|
47
|
+
/**
|
|
48
|
+
* A head and shoulders drawn inside a photo frame (`photo`, `w` × `h`), so an empty face slot reads as one. It is
|
|
49
|
+
* part of the frame's content: dropping a photo on the frame replaces it.
|
|
50
|
+
*/
|
|
51
|
+
export declare function faceSlot(k: Kit, photo: string, w: number, h: number, role: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Interp } from '../../../lib/document/types.js';
|
|
2
|
+
import type { Cue, Kit } from '../kit.js';
|
|
3
|
+
/** Whole cycles a second for `cycles` of them over a loop of `loopMs` (so a behaviour comes round when the loop does). */
|
|
4
|
+
export declare const hz: (cycles: number, loopMs: number) => number;
|
|
5
|
+
export declare const HOLD: Interp;
|
|
6
|
+
/** `layer` cuts on at `at` (no fade): hidden until then. With `gap`, each layer of that name cuts on `gap` ms after the last. */
|
|
7
|
+
export declare const cutOn: (layer: string | readonly string[], at: number, gap?: number) => Cue;
|
|
8
|
+
/** `layer` cuts off at `at`. */
|
|
9
|
+
export declare const cutOff: (layer: string | readonly string[], at: number, gap?: number) => Cue;
|
|
10
|
+
/** `layer` blinks off and on twice over `duration`, on held keys: an attract screen's INSERT COIN, a cursor, a warning lamp. */
|
|
11
|
+
export declare const blink: (layer: string, at: number, duration?: number) => Cue;
|
|
12
|
+
/** The line `id` draws itself from its first point, from `at` over `duration` ms. */
|
|
13
|
+
export declare function drawOn(k: Kit, id: string, at: number, duration: number): void;
|
|
14
|
+
/** `id` is not there until `at`, then is (over `fade` ms), at `to` opacity. */
|
|
15
|
+
export declare function appear(k: Kit, id: string, at: number, fade?: number, to?: number): void;
|