paperlab 0.5.2 → 0.6.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 +21 -6
- package/dist/{chunk-HRXQTJFS.js → chunk-E22ILEDO.js} +2408 -486
- package/dist/chunk-E22ILEDO.js.map +1 -0
- package/dist/index.cjs +2365 -435
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +175 -29
- package/dist/index.d.ts +175 -29
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/slots-C5PqY0Q5.d.cts +2297 -0
- package/dist/slots-C5PqY0Q5.d.ts +2297 -0
- package/dist/stage.cjs +2358 -449
- package/dist/stage.cjs.map +1 -1
- package/dist/stage.d.cts +78 -636
- package/dist/stage.d.ts +78 -636
- package/dist/stage.js +11 -11
- package/dist/stage.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-HRXQTJFS.js.map +0 -1
- package/dist/slots-CIo7FnlY.d.cts +0 -13357
- package/dist/slots-CIo7FnlY.d.ts +0 -13357
package/dist/stage.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-
|
|
2
|
+
import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-C5PqY0Q5.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -15,136 +15,63 @@ import { z } from 'zod';
|
|
|
15
15
|
* you say you want it raw.
|
|
16
16
|
*/
|
|
17
17
|
declare const stageGradeSchema: z.ZodObject<{
|
|
18
|
-
/**
|
|
19
|
-
* How far light bleeds past what is emitting it.
|
|
20
|
-
*
|
|
21
|
-
* This is the one that matters most in a backlit hall, because the source
|
|
22
|
-
* plane is drawn with `toneMapped: false` — it is light, not an object, so
|
|
23
|
-
* no tone curve ever rolls it off. Bloom is the only thing that gives it
|
|
24
|
-
* an edge that behaves like light instead of like a lit rectangle.
|
|
25
|
-
*/
|
|
26
18
|
bloom: z.ZodDefault<z.ZodNumber>;
|
|
27
|
-
/**
|
|
28
|
-
* How bright a pixel has to be before it blooms at all, in LINEAR light.
|
|
29
|
-
*
|
|
30
|
-
* Above 1.0 is not only legal, it is the useful range — and that is the
|
|
31
|
-
* whole reason the bound is 4 rather than 1. Bloom reads the scene before
|
|
32
|
-
* the tone curve, while values are still unbounded, so "1.0" means "as
|
|
33
|
-
* bright as white" rather than "as bright as the brightest pixel on
|
|
34
|
-
* screen". Lit near-white paper sits close to 1.0 all by itself; the
|
|
35
|
-
* source burns at `SOURCE_INTENSITY`, several times that. A threshold
|
|
36
|
-
* under 1 therefore blooms the PAPER, which fogs the hall and costs the
|
|
37
|
-
* sheets their edges — the exact failure this default is set to avoid.
|
|
38
|
-
*/
|
|
39
19
|
threshold: z.ZodDefault<z.ZodNumber>;
|
|
40
|
-
/**
|
|
41
|
-
* Depth falloff — how much the near and far ends of the walk go soft.
|
|
42
|
-
*
|
|
43
|
-
* **Defaults to 0, and that is a considered default rather than a stub.**
|
|
44
|
-
* Depth in this scene is already staged by haze, which is how a real hall
|
|
45
|
-
* does it and which costs one fragment instruction; optical blur is a
|
|
46
|
-
* second full-screen pass with a circle-of-confusion buffer behind it, and
|
|
47
|
-
* it is the effect most likely to read as a video game rather than as a
|
|
48
|
-
* photograph. Every paper installation worth copying is shot deep — an
|
|
49
|
-
* f/11 room where the sheets at the far end are as sharp as the ones you
|
|
50
|
-
* can touch.
|
|
51
|
-
*
|
|
52
|
-
* It is here because a shallow frame is a legitimate look and the schema
|
|
53
|
-
* is the only place a look is allowed to live. Turn it up for a close shot
|
|
54
|
-
* on one banner; leave it alone for a hall.
|
|
55
|
-
*/
|
|
56
20
|
depth: z.ZodDefault<z.ZodNumber>;
|
|
57
|
-
/** How far the corners fall off. A frame with no edge reads as a viewport rather than a photograph. */
|
|
58
21
|
vignette: z.ZodDefault<z.ZodNumber>;
|
|
59
|
-
/**
|
|
60
|
-
* Film grain.
|
|
61
|
-
*
|
|
62
|
-
* Worth more here than in most scenes: grain is the one texture shared
|
|
63
|
-
* between the render and the thing being rendered. Keep it under ~0.05 —
|
|
64
|
-
* past that it stops reading as stock and starts reading as noise.
|
|
65
|
-
*/
|
|
66
22
|
grain: z.ZodDefault<z.ZodNumber>;
|
|
67
|
-
},
|
|
68
|
-
grain: number;
|
|
69
|
-
depth: number;
|
|
70
|
-
bloom: number;
|
|
71
|
-
threshold: number;
|
|
72
|
-
vignette: number;
|
|
73
|
-
}, {
|
|
74
|
-
grain?: number | undefined;
|
|
75
|
-
depth?: number | undefined;
|
|
76
|
-
bloom?: number | undefined;
|
|
77
|
-
threshold?: number | undefined;
|
|
78
|
-
vignette?: number | undefined;
|
|
79
|
-
}>;
|
|
23
|
+
}, z.core.$strip>;
|
|
80
24
|
declare const stageSchema: z.ZodObject<{
|
|
81
|
-
path: z.
|
|
82
|
-
points: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null
|
|
25
|
+
path: z.ZodPrefault<z.ZodObject<{
|
|
26
|
+
points: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
83
27
|
closed: z.ZodDefault<z.ZodBoolean>;
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
shot: z.ZodDefault<z.ZodEnum<["follow", "lead", "low", "wide"]>>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
shot: z.ZodPrefault<z.ZodObject<{
|
|
30
|
+
shot: z.ZodDefault<z.ZodEnum<{
|
|
31
|
+
low: "low";
|
|
32
|
+
follow: "follow";
|
|
33
|
+
lead: "lead";
|
|
34
|
+
wide: "wide";
|
|
35
|
+
}>>;
|
|
93
36
|
distance: z.ZodDefault<z.ZodNumber>;
|
|
94
37
|
height: z.ZodDefault<z.ZodNumber>;
|
|
95
38
|
lookAhead: z.ZodDefault<z.ZodNumber>;
|
|
96
39
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
offset: number;
|
|
100
|
-
distance: number;
|
|
101
|
-
shot: "low" | "follow" | "lead" | "wide";
|
|
102
|
-
lookAhead: number;
|
|
103
|
-
}, {
|
|
104
|
-
height?: number | undefined;
|
|
105
|
-
offset?: number | undefined;
|
|
106
|
-
distance?: number | undefined;
|
|
107
|
-
shot?: "low" | "follow" | "lead" | "wide" | undefined;
|
|
108
|
-
lookAhead?: number | undefined;
|
|
109
|
-
}>>;
|
|
110
|
-
figure: z.ZodDefault<z.ZodObject<{
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
figure: z.ZodPrefault<z.ZodObject<{
|
|
111
42
|
height: z.ZodDefault<z.ZodNumber>;
|
|
112
43
|
speed: z.ZodDefault<z.ZodNumber>;
|
|
113
44
|
stride: z.ZodDefault<z.ZodNumber>;
|
|
114
45
|
swing: z.ZodDefault<z.ZodNumber>;
|
|
115
46
|
color: z.ZodDefault<z.ZodString>;
|
|
116
|
-
finish: z.ZodDefault<z.ZodEnum<
|
|
117
|
-
|
|
47
|
+
finish: z.ZodDefault<z.ZodEnum<{
|
|
48
|
+
silhouette: "silhouette";
|
|
49
|
+
shaded: "shaded";
|
|
50
|
+
}>>;
|
|
51
|
+
gait: z.ZodDefault<z.ZodEnum<{
|
|
52
|
+
auto: "auto";
|
|
53
|
+
walk: "walk";
|
|
54
|
+
run: "run";
|
|
55
|
+
}>>;
|
|
118
56
|
model: z.ZodOptional<z.ZodString>;
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
height?: number | undefined;
|
|
130
|
-
speed?: number | undefined;
|
|
131
|
-
color?: string | undefined;
|
|
132
|
-
stride?: number | undefined;
|
|
133
|
-
swing?: number | undefined;
|
|
134
|
-
finish?: "silhouette" | "shaded" | undefined;
|
|
135
|
-
gait?: "auto" | "walk" | "run" | undefined;
|
|
136
|
-
model?: string | undefined;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
lighting: z.ZodDefault<z.ZodEnum<{
|
|
59
|
+
studio: "studio";
|
|
60
|
+
window: "window";
|
|
61
|
+
leaves: "leaves";
|
|
62
|
+
goldenhour: "goldenhour";
|
|
63
|
+
noir: "noir";
|
|
64
|
+
nave: "nave";
|
|
65
|
+
raking: "raking";
|
|
66
|
+
lightbox: "lightbox";
|
|
137
67
|
}>>;
|
|
138
|
-
/** Stage mode is built for `nave`; the others are all front-lit. */
|
|
139
|
-
lighting: z.ZodDefault<z.ZodEnum<["studio", "window", "leaves", "goldenhour", "noir", "nave", "raking", "lightbox"]>>;
|
|
140
|
-
/**
|
|
141
|
-
* The light, by hand: exposure, key, direction, height, ambient, studio,
|
|
142
|
-
* haze. Overrides on `lighting` rather than a replacement for it, so a
|
|
143
|
-
* shared stage carries the sliders that were moved and nothing else.
|
|
144
|
-
*/
|
|
145
68
|
light: z.ZodDefault<z.ZodObject<{
|
|
146
69
|
exposure: z.ZodOptional<z.ZodNumber>;
|
|
147
|
-
film: z.ZodOptional<z.ZodEnum<
|
|
70
|
+
film: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
agx: "agx";
|
|
72
|
+
neutral: "neutral";
|
|
73
|
+
filmic: "filmic";
|
|
74
|
+
}>>;
|
|
148
75
|
key: z.ZodOptional<z.ZodNumber>;
|
|
149
76
|
color: z.ZodOptional<z.ZodString>;
|
|
150
77
|
direction: z.ZodOptional<z.ZodNumber>;
|
|
@@ -152,481 +79,59 @@ declare const stageSchema: z.ZodObject<{
|
|
|
152
79
|
ambient: z.ZodOptional<z.ZodNumber>;
|
|
153
80
|
studio: z.ZodOptional<z.ZodNumber>;
|
|
154
81
|
haze: z.ZodOptional<z.ZodNumber>;
|
|
155
|
-
},
|
|
156
|
-
key?: number | undefined;
|
|
157
|
-
height?: number | undefined;
|
|
158
|
-
color?: string | undefined;
|
|
159
|
-
studio?: number | undefined;
|
|
160
|
-
exposure?: number | undefined;
|
|
161
|
-
film?: "agx" | "neutral" | "filmic" | undefined;
|
|
162
|
-
direction?: number | undefined;
|
|
163
|
-
ambient?: number | undefined;
|
|
164
|
-
haze?: number | undefined;
|
|
165
|
-
}, {
|
|
166
|
-
key?: number | undefined;
|
|
167
|
-
height?: number | undefined;
|
|
168
|
-
color?: string | undefined;
|
|
169
|
-
studio?: number | undefined;
|
|
170
|
-
exposure?: number | undefined;
|
|
171
|
-
film?: "agx" | "neutral" | "filmic" | undefined;
|
|
172
|
-
direction?: number | undefined;
|
|
173
|
-
ambient?: number | undefined;
|
|
174
|
-
haze?: number | undefined;
|
|
175
|
-
}>>;
|
|
176
|
-
/**
|
|
177
|
-
* OFF by default now.
|
|
178
|
-
*
|
|
179
|
-
* The figure existed to say "this is a room at gallery scale", which is a
|
|
180
|
-
* real job and the right instinct. A rendered human is simply the most
|
|
181
|
-
* expensive and least reliable way to do it: it is the one thing in frame
|
|
182
|
-
* every viewer appraises, and a low-polygon one reads as an asset-store
|
|
183
|
-
* placeholder no matter how good the hall around it is.
|
|
184
|
-
*
|
|
185
|
-
* `stageRoomSchema` does the job instead, with objects whose size the
|
|
186
|
-
* viewer already knows. And the deciding argument is that the stage is
|
|
187
|
-
* NAVIGABLE — drag, wheel, arrow-step, click-to-approach — so there is
|
|
188
|
-
* already a person in the hall and it is the viewer. A second one walking
|
|
189
|
-
* the same aisle on its own clock competes for that role.
|
|
190
|
-
*
|
|
191
|
-
* Still one flag away for anyone who wants it.
|
|
192
|
-
*/
|
|
82
|
+
}, z.core.$strip>>;
|
|
193
83
|
showFigure: z.ZodDefault<z.ZodBoolean>;
|
|
194
|
-
source: z.
|
|
195
|
-
/** The bright void the walk resolves toward. Without it the vanishing point is a hole. */
|
|
84
|
+
source: z.ZodPrefault<z.ZodObject<{
|
|
196
85
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
197
86
|
color: z.ZodDefault<z.ZodString>;
|
|
198
|
-
/** How far past the end of the walk it stands, world units. */
|
|
199
87
|
beyond: z.ZodDefault<z.ZodNumber>;
|
|
200
|
-
/**
|
|
201
|
-
* A cyclorama around the whole stage, graded from the source colour at the
|
|
202
|
-
* horizon to near-dark overhead. The source plane only faces down the walk,
|
|
203
|
-
* so without this every shot that isn't axial — `wide` especially — looks
|
|
204
|
-
* out at a black void where the room should be.
|
|
205
|
-
*/
|
|
206
88
|
surround: z.ZodDefault<z.ZodBoolean>;
|
|
207
|
-
/** Colour overhead. The horizon takes the source's own colour. */
|
|
208
89
|
zenith: z.ZodDefault<z.ZodString>;
|
|
209
|
-
/**
|
|
210
|
-
* Size, as a multiple of the PAPER height.
|
|
211
|
-
*
|
|
212
|
-
* It is an OPENING, not a wall. At 5 the plane was 100 units across and
|
|
213
|
-
* filled the entire frame behind the colonnade, so the hall had no dark
|
|
214
|
-
* end to resolve toward and the whole picture sat at one value. Sized to
|
|
215
|
-
* roughly the height of the paper it stands behind, it reads as the way
|
|
216
|
-
* out — which is what the figure is walking toward.
|
|
217
|
-
*/
|
|
218
90
|
spread: z.ZodDefault<z.ZodNumber>;
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
spread: number;
|
|
222
|
-
enabled: boolean;
|
|
223
|
-
zenith: string;
|
|
224
|
-
beyond: number;
|
|
225
|
-
surround: boolean;
|
|
226
|
-
}, {
|
|
227
|
-
color?: string | undefined;
|
|
228
|
-
spread?: number | undefined;
|
|
229
|
-
enabled?: boolean | undefined;
|
|
230
|
-
zenith?: string | undefined;
|
|
231
|
-
beyond?: number | undefined;
|
|
232
|
-
surround?: boolean | undefined;
|
|
233
|
-
}>>;
|
|
234
|
-
ground: z.ZodDefault<z.ZodObject<{
|
|
235
|
-
/** The floor. Without something to catch the shadows there is no ground and no scale. */
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
ground: z.ZodPrefault<z.ZodObject<{
|
|
236
93
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
237
|
-
/**
|
|
238
|
-
* Lifted off near-black (`#0e0b09`). A floor dark enough to disappear
|
|
239
|
-
* cannot show its own seams, and the seams are the scale cue — the hall
|
|
240
|
-
* kept its contrast against the source and gained a surface you can read
|
|
241
|
-
* the size of the room from.
|
|
242
|
-
*/
|
|
243
94
|
color: z.ZodDefault<z.ZodString>;
|
|
244
|
-
/**
|
|
245
|
-
* Width of one poured slab, in world units. 0 leaves the floor unseamed.
|
|
246
|
-
*
|
|
247
|
-
* The cheapest scale cue there is, and the one this scene most lacked. A
|
|
248
|
-
* concrete floor is poured in bays of roughly two and a half metres, and a
|
|
249
|
-
* viewer knows that without being told — so a floor with seams in it
|
|
250
|
-
* states the size of the room, while a floor without them is a gradient
|
|
251
|
-
* that happens to be horizontal.
|
|
252
|
-
*/
|
|
253
95
|
slab: z.ZodDefault<z.ZodNumber>;
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
enabled: boolean;
|
|
257
|
-
slab: number;
|
|
258
|
-
}, {
|
|
259
|
-
color?: string | undefined;
|
|
260
|
-
enabled?: boolean | undefined;
|
|
261
|
-
slab?: number | undefined;
|
|
262
|
-
}>>;
|
|
263
|
-
/** Ceiling and the architecture around the walk — see `stageRoomSchema`. */
|
|
264
|
-
room: z.ZodDefault<z.ZodObject<{
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
room: z.ZodPrefault<z.ZodObject<{
|
|
265
98
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
266
|
-
/**
|
|
267
|
-
* Ceiling height, as a multiple of the paper's own height.
|
|
268
|
-
*
|
|
269
|
-
* Relative rather than absolute because the banners ARE the architecture
|
|
270
|
-
* here: a hall whose ceiling sits just above its hangings reads as built
|
|
271
|
-
* for them, and one at a fixed world height reads as whatever the paper
|
|
272
|
-
* happened to be scaled to that day.
|
|
273
|
-
*/
|
|
274
99
|
height: z.ZodDefault<z.ZodNumber>;
|
|
275
100
|
color: z.ZodDefault<z.ZodString>;
|
|
276
|
-
|
|
277
|
-
columns: z.ZodDefault<z.ZodObject<{
|
|
101
|
+
columns: z.ZodPrefault<z.ZodObject<{
|
|
278
102
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
279
|
-
/** Centres this far apart along the walk. Roughly a bay. */
|
|
280
103
|
spacing: z.ZodDefault<z.ZodNumber>;
|
|
281
|
-
/** Shaft width. The number doing the work — a column is a known size. */
|
|
282
104
|
width: z.ZodDefault<z.ZodNumber>;
|
|
283
|
-
/**
|
|
284
|
-
* How far off the walk's centreline each rank stands.
|
|
285
|
-
*
|
|
286
|
-
* Outside the banners, always. Columns are the room; the paper is the
|
|
287
|
-
* subject, and a column standing between the viewer and a banner has
|
|
288
|
-
* swapped the two over. Default clears a `colonnade`'s widest sensible
|
|
289
|
-
* aisle with room to spare.
|
|
290
|
-
*/
|
|
291
105
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
292
|
-
/**
|
|
293
|
-
* Stone, and darker than paper on purpose.
|
|
294
|
-
*
|
|
295
|
-
* The brightest thing in any of these frames has to be the light, and the
|
|
296
|
-
* second brightest has to be the paper. A column the same value as a
|
|
297
|
-
* banner does not read as architecture behind the subject; it reads as
|
|
298
|
-
* more banners, and the eye stops being able to tell what the room is made
|
|
299
|
-
* of from what is hanging in it.
|
|
300
|
-
*/
|
|
301
106
|
color: z.ZodDefault<z.ZodString>;
|
|
302
|
-
},
|
|
303
|
-
|
|
304
|
-
offset: number;
|
|
305
|
-
color: string;
|
|
306
|
-
spacing: number;
|
|
307
|
-
enabled: boolean;
|
|
308
|
-
}, {
|
|
309
|
-
width?: number | undefined;
|
|
310
|
-
offset?: number | undefined;
|
|
311
|
-
color?: string | undefined;
|
|
312
|
-
spacing?: number | undefined;
|
|
313
|
-
enabled?: boolean | undefined;
|
|
314
|
-
}>>;
|
|
315
|
-
/** A wall at the end of the walk with the source in it. */
|
|
316
|
-
doorway: z.ZodDefault<z.ZodObject<{
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
doorway: z.ZodPrefault<z.ZodObject<{
|
|
317
109
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
318
|
-
/** Opening size, as a multiple of the source's own. 1 frames it exactly. */
|
|
319
110
|
opening: z.ZodDefault<z.ZodNumber>;
|
|
320
111
|
color: z.ZodDefault<z.ZodString>;
|
|
321
|
-
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
opening?: number | undefined;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
suspension: z.ZodPrefault<z.ZodObject<{
|
|
115
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
116
|
+
none: "none";
|
|
117
|
+
thread: "thread";
|
|
118
|
+
rod: "rod";
|
|
329
119
|
}>>;
|
|
330
|
-
}, "strip", z.ZodTypeAny, {
|
|
331
|
-
height: number;
|
|
332
|
-
color: string;
|
|
333
|
-
enabled: boolean;
|
|
334
|
-
columns: {
|
|
335
|
-
width: number;
|
|
336
|
-
offset: number;
|
|
337
|
-
color: string;
|
|
338
|
-
spacing: number;
|
|
339
|
-
enabled: boolean;
|
|
340
|
-
};
|
|
341
|
-
doorway: {
|
|
342
|
-
color: string;
|
|
343
|
-
enabled: boolean;
|
|
344
|
-
opening: number;
|
|
345
|
-
};
|
|
346
|
-
}, {
|
|
347
|
-
height?: number | undefined;
|
|
348
|
-
color?: string | undefined;
|
|
349
|
-
enabled?: boolean | undefined;
|
|
350
|
-
columns?: {
|
|
351
|
-
width?: number | undefined;
|
|
352
|
-
offset?: number | undefined;
|
|
353
|
-
color?: string | undefined;
|
|
354
|
-
spacing?: number | undefined;
|
|
355
|
-
enabled?: boolean | undefined;
|
|
356
|
-
} | undefined;
|
|
357
|
-
doorway?: {
|
|
358
|
-
color?: string | undefined;
|
|
359
|
-
enabled?: boolean | undefined;
|
|
360
|
-
opening?: number | undefined;
|
|
361
|
-
} | undefined;
|
|
362
|
-
}>>;
|
|
363
|
-
/** Thread and clips — see `stageSuspensionSchema`. */
|
|
364
|
-
suspension: z.ZodDefault<z.ZodObject<{
|
|
365
|
-
/**
|
|
366
|
-
* What carries the load.
|
|
367
|
-
*
|
|
368
|
-
* `thread` is monofilament to the ceiling — one straight line per sheet.
|
|
369
|
-
* `rod` is a dowel across each sheet's top edge, hung from the ceiling at
|
|
370
|
-
* both ends, which is a different image entirely: a rank on threads reads
|
|
371
|
-
* as sheets floating in a row, and a rank on rods reads as sheets that
|
|
372
|
-
* were HUNG, by someone, on something. `none` is for a stage where the
|
|
373
|
-
* paper is meant to be impossible.
|
|
374
|
-
*/
|
|
375
|
-
type: z.ZodDefault<z.ZodEnum<["none", "thread", "rod"]>>;
|
|
376
120
|
color: z.ZodDefault<z.ZodString>;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
* thing that survives being one instanced box at the top of an
|
|
385
|
-
* eight-metre banner.
|
|
386
|
-
*
|
|
387
|
-
* This replaced a `clips: boolean`. Two of the four pieces of hardware the
|
|
388
|
-
* plan named — pegs, and a rod — had no way to be asked for, and a boolean
|
|
389
|
-
* cannot grow a third answer.
|
|
390
|
-
*/
|
|
391
|
-
hardware: z.ZodDefault<z.ZodEnum<["none", "clip", "peg"]>>;
|
|
392
|
-
}, "strip", z.ZodTypeAny, {
|
|
393
|
-
type: "none" | "thread" | "rod";
|
|
394
|
-
color: string;
|
|
395
|
-
hardware: "none" | "clip" | "peg";
|
|
396
|
-
}, {
|
|
397
|
-
type?: "none" | "thread" | "rod" | undefined;
|
|
398
|
-
color?: string | undefined;
|
|
399
|
-
hardware?: "none" | "clip" | "peg" | undefined;
|
|
400
|
-
}>>;
|
|
401
|
-
/**
|
|
402
|
-
* The print — bloom, vignette, grain.
|
|
403
|
-
*
|
|
404
|
-
* Needs `@react-three/postprocessing` and `postprocessing`. They are
|
|
405
|
-
* declared OPTIONAL peers, which means `<Paper>` never pulls them in and a
|
|
406
|
-
* bundle that only imports `<Paper>` never contains them — not that a
|
|
407
|
-
* stage renders without them. A bundler asked to resolve `<PaperStage>`
|
|
408
|
-
* without them installed fails at build time, and that is the intended
|
|
409
|
-
* behaviour: a stage silently losing its grade would be worse than a
|
|
410
|
-
* missing-module error that names the package.
|
|
411
|
-
*/
|
|
412
|
-
grade: z.ZodDefault<z.ZodObject<{
|
|
413
|
-
/**
|
|
414
|
-
* How far light bleeds past what is emitting it.
|
|
415
|
-
*
|
|
416
|
-
* This is the one that matters most in a backlit hall, because the source
|
|
417
|
-
* plane is drawn with `toneMapped: false` — it is light, not an object, so
|
|
418
|
-
* no tone curve ever rolls it off. Bloom is the only thing that gives it
|
|
419
|
-
* an edge that behaves like light instead of like a lit rectangle.
|
|
420
|
-
*/
|
|
121
|
+
hardware: z.ZodDefault<z.ZodEnum<{
|
|
122
|
+
none: "none";
|
|
123
|
+
clip: "clip";
|
|
124
|
+
peg: "peg";
|
|
125
|
+
}>>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
grade: z.ZodPrefault<z.ZodObject<{
|
|
421
128
|
bloom: z.ZodDefault<z.ZodNumber>;
|
|
422
|
-
/**
|
|
423
|
-
* How bright a pixel has to be before it blooms at all, in LINEAR light.
|
|
424
|
-
*
|
|
425
|
-
* Above 1.0 is not only legal, it is the useful range — and that is the
|
|
426
|
-
* whole reason the bound is 4 rather than 1. Bloom reads the scene before
|
|
427
|
-
* the tone curve, while values are still unbounded, so "1.0" means "as
|
|
428
|
-
* bright as white" rather than "as bright as the brightest pixel on
|
|
429
|
-
* screen". Lit near-white paper sits close to 1.0 all by itself; the
|
|
430
|
-
* source burns at `SOURCE_INTENSITY`, several times that. A threshold
|
|
431
|
-
* under 1 therefore blooms the PAPER, which fogs the hall and costs the
|
|
432
|
-
* sheets their edges — the exact failure this default is set to avoid.
|
|
433
|
-
*/
|
|
434
129
|
threshold: z.ZodDefault<z.ZodNumber>;
|
|
435
|
-
/**
|
|
436
|
-
* Depth falloff — how much the near and far ends of the walk go soft.
|
|
437
|
-
*
|
|
438
|
-
* **Defaults to 0, and that is a considered default rather than a stub.**
|
|
439
|
-
* Depth in this scene is already staged by haze, which is how a real hall
|
|
440
|
-
* does it and which costs one fragment instruction; optical blur is a
|
|
441
|
-
* second full-screen pass with a circle-of-confusion buffer behind it, and
|
|
442
|
-
* it is the effect most likely to read as a video game rather than as a
|
|
443
|
-
* photograph. Every paper installation worth copying is shot deep — an
|
|
444
|
-
* f/11 room where the sheets at the far end are as sharp as the ones you
|
|
445
|
-
* can touch.
|
|
446
|
-
*
|
|
447
|
-
* It is here because a shallow frame is a legitimate look and the schema
|
|
448
|
-
* is the only place a look is allowed to live. Turn it up for a close shot
|
|
449
|
-
* on one banner; leave it alone for a hall.
|
|
450
|
-
*/
|
|
451
130
|
depth: z.ZodDefault<z.ZodNumber>;
|
|
452
|
-
/** How far the corners fall off. A frame with no edge reads as a viewport rather than a photograph. */
|
|
453
131
|
vignette: z.ZodDefault<z.ZodNumber>;
|
|
454
|
-
/**
|
|
455
|
-
* Film grain.
|
|
456
|
-
*
|
|
457
|
-
* Worth more here than in most scenes: grain is the one texture shared
|
|
458
|
-
* between the render and the thing being rendered. Keep it under ~0.05 —
|
|
459
|
-
* past that it stops reading as stock and starts reading as noise.
|
|
460
|
-
*/
|
|
461
132
|
grain: z.ZodDefault<z.ZodNumber>;
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
depth: number;
|
|
465
|
-
bloom: number;
|
|
466
|
-
threshold: number;
|
|
467
|
-
vignette: number;
|
|
468
|
-
}, {
|
|
469
|
-
grain?: number | undefined;
|
|
470
|
-
depth?: number | undefined;
|
|
471
|
-
bloom?: number | undefined;
|
|
472
|
-
threshold?: number | undefined;
|
|
473
|
-
vignette?: number | undefined;
|
|
474
|
-
}>>;
|
|
475
|
-
}, "strip", z.ZodTypeAny, {
|
|
476
|
-
path: {
|
|
477
|
-
points: [number, number][];
|
|
478
|
-
closed: boolean;
|
|
479
|
-
};
|
|
480
|
-
lighting: "studio" | "window" | "leaves" | "goldenhour" | "noir" | "nave" | "raking" | "lightbox";
|
|
481
|
-
light: {
|
|
482
|
-
key?: number | undefined;
|
|
483
|
-
height?: number | undefined;
|
|
484
|
-
color?: string | undefined;
|
|
485
|
-
studio?: number | undefined;
|
|
486
|
-
exposure?: number | undefined;
|
|
487
|
-
film?: "agx" | "neutral" | "filmic" | undefined;
|
|
488
|
-
direction?: number | undefined;
|
|
489
|
-
ambient?: number | undefined;
|
|
490
|
-
haze?: number | undefined;
|
|
491
|
-
};
|
|
492
|
-
figure: {
|
|
493
|
-
height: number;
|
|
494
|
-
speed: number;
|
|
495
|
-
color: string;
|
|
496
|
-
stride: number;
|
|
497
|
-
swing: number;
|
|
498
|
-
finish: "silhouette" | "shaded";
|
|
499
|
-
gait: "auto" | "walk" | "run";
|
|
500
|
-
model?: string | undefined;
|
|
501
|
-
};
|
|
502
|
-
source: {
|
|
503
|
-
color: string;
|
|
504
|
-
spread: number;
|
|
505
|
-
enabled: boolean;
|
|
506
|
-
zenith: string;
|
|
507
|
-
beyond: number;
|
|
508
|
-
surround: boolean;
|
|
509
|
-
};
|
|
510
|
-
shot: {
|
|
511
|
-
height: number;
|
|
512
|
-
offset: number;
|
|
513
|
-
distance: number;
|
|
514
|
-
shot: "low" | "follow" | "lead" | "wide";
|
|
515
|
-
lookAhead: number;
|
|
516
|
-
};
|
|
517
|
-
ground: {
|
|
518
|
-
color: string;
|
|
519
|
-
enabled: boolean;
|
|
520
|
-
slab: number;
|
|
521
|
-
};
|
|
522
|
-
showFigure: boolean;
|
|
523
|
-
room: {
|
|
524
|
-
height: number;
|
|
525
|
-
color: string;
|
|
526
|
-
enabled: boolean;
|
|
527
|
-
columns: {
|
|
528
|
-
width: number;
|
|
529
|
-
offset: number;
|
|
530
|
-
color: string;
|
|
531
|
-
spacing: number;
|
|
532
|
-
enabled: boolean;
|
|
533
|
-
};
|
|
534
|
-
doorway: {
|
|
535
|
-
color: string;
|
|
536
|
-
enabled: boolean;
|
|
537
|
-
opening: number;
|
|
538
|
-
};
|
|
539
|
-
};
|
|
540
|
-
suspension: {
|
|
541
|
-
type: "none" | "thread" | "rod";
|
|
542
|
-
color: string;
|
|
543
|
-
hardware: "none" | "clip" | "peg";
|
|
544
|
-
};
|
|
545
|
-
grade: {
|
|
546
|
-
grain: number;
|
|
547
|
-
depth: number;
|
|
548
|
-
bloom: number;
|
|
549
|
-
threshold: number;
|
|
550
|
-
vignette: number;
|
|
551
|
-
};
|
|
552
|
-
}, {
|
|
553
|
-
path?: {
|
|
554
|
-
points?: [number, number][] | undefined;
|
|
555
|
-
closed?: boolean | undefined;
|
|
556
|
-
} | undefined;
|
|
557
|
-
lighting?: "studio" | "window" | "leaves" | "goldenhour" | "noir" | "nave" | "raking" | "lightbox" | undefined;
|
|
558
|
-
light?: {
|
|
559
|
-
key?: number | undefined;
|
|
560
|
-
height?: number | undefined;
|
|
561
|
-
color?: string | undefined;
|
|
562
|
-
studio?: number | undefined;
|
|
563
|
-
exposure?: number | undefined;
|
|
564
|
-
film?: "agx" | "neutral" | "filmic" | undefined;
|
|
565
|
-
direction?: number | undefined;
|
|
566
|
-
ambient?: number | undefined;
|
|
567
|
-
haze?: number | undefined;
|
|
568
|
-
} | undefined;
|
|
569
|
-
figure?: {
|
|
570
|
-
height?: number | undefined;
|
|
571
|
-
speed?: number | undefined;
|
|
572
|
-
color?: string | undefined;
|
|
573
|
-
stride?: number | undefined;
|
|
574
|
-
swing?: number | undefined;
|
|
575
|
-
finish?: "silhouette" | "shaded" | undefined;
|
|
576
|
-
gait?: "auto" | "walk" | "run" | undefined;
|
|
577
|
-
model?: string | undefined;
|
|
578
|
-
} | undefined;
|
|
579
|
-
source?: {
|
|
580
|
-
color?: string | undefined;
|
|
581
|
-
spread?: number | undefined;
|
|
582
|
-
enabled?: boolean | undefined;
|
|
583
|
-
zenith?: string | undefined;
|
|
584
|
-
beyond?: number | undefined;
|
|
585
|
-
surround?: boolean | undefined;
|
|
586
|
-
} | undefined;
|
|
587
|
-
shot?: {
|
|
588
|
-
height?: number | undefined;
|
|
589
|
-
offset?: number | undefined;
|
|
590
|
-
distance?: number | undefined;
|
|
591
|
-
shot?: "low" | "follow" | "lead" | "wide" | undefined;
|
|
592
|
-
lookAhead?: number | undefined;
|
|
593
|
-
} | undefined;
|
|
594
|
-
ground?: {
|
|
595
|
-
color?: string | undefined;
|
|
596
|
-
enabled?: boolean | undefined;
|
|
597
|
-
slab?: number | undefined;
|
|
598
|
-
} | undefined;
|
|
599
|
-
showFigure?: boolean | undefined;
|
|
600
|
-
room?: {
|
|
601
|
-
height?: number | undefined;
|
|
602
|
-
color?: string | undefined;
|
|
603
|
-
enabled?: boolean | undefined;
|
|
604
|
-
columns?: {
|
|
605
|
-
width?: number | undefined;
|
|
606
|
-
offset?: number | undefined;
|
|
607
|
-
color?: string | undefined;
|
|
608
|
-
spacing?: number | undefined;
|
|
609
|
-
enabled?: boolean | undefined;
|
|
610
|
-
} | undefined;
|
|
611
|
-
doorway?: {
|
|
612
|
-
color?: string | undefined;
|
|
613
|
-
enabled?: boolean | undefined;
|
|
614
|
-
opening?: number | undefined;
|
|
615
|
-
} | undefined;
|
|
616
|
-
} | undefined;
|
|
617
|
-
suspension?: {
|
|
618
|
-
type?: "none" | "thread" | "rod" | undefined;
|
|
619
|
-
color?: string | undefined;
|
|
620
|
-
hardware?: "none" | "clip" | "peg" | undefined;
|
|
621
|
-
} | undefined;
|
|
622
|
-
grade?: {
|
|
623
|
-
grain?: number | undefined;
|
|
624
|
-
depth?: number | undefined;
|
|
625
|
-
bloom?: number | undefined;
|
|
626
|
-
threshold?: number | undefined;
|
|
627
|
-
vignette?: number | undefined;
|
|
628
|
-
} | undefined;
|
|
629
|
-
}>;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
}, z.core.$strip>;
|
|
630
135
|
type StageConfig = z.infer<typeof stageSchema>;
|
|
631
136
|
type StageConfigInput = z.input<typeof stageSchema>;
|
|
632
137
|
type StageGradeConfig = z.infer<typeof stageGradeSchema>;
|
|
@@ -650,51 +155,14 @@ type StageGradeConfig = z.infer<typeof stageGradeSchema>;
|
|
|
650
155
|
* Pure math lives here so it tests in node; the listeners are in `useWalk`.
|
|
651
156
|
*/
|
|
652
157
|
declare const stageMotionSchema: z.ZodObject<{
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
* - `drag` — the viewer. Pointer, wheel, arrow keys, or a click on a paper.
|
|
659
|
-
* It DRIFTS on the clock until the first time they touch it, and then it
|
|
660
|
-
* is theirs for good. That is one behaviour rather than two drivers, and
|
|
661
|
-
* it is the default because the alternatives are each half wrong: a stage
|
|
662
|
-
* that only autoplays cannot be touched, and one that only waits opens as
|
|
663
|
-
* a still photograph of itself.
|
|
664
|
-
* - `autoplay` — the clock, and only the clock. It never hands over.
|
|
665
|
-
* - `none` — nothing. The walk stands wherever it was left.
|
|
666
|
-
*
|
|
667
|
-
* An explicit `progress` prop outranks all three: a stage bound to page
|
|
668
|
-
* scroll is a controlled component, and a driver fighting the page for the
|
|
669
|
-
* same number is the bug you would spend an afternoon on.
|
|
670
|
-
*/
|
|
671
|
-
driver: z.ZodDefault<z.ZodEnum<["autoplay", "drag", "none"]>>;
|
|
672
|
-
/** Multiplier on the pace: the figure's walking speed for `autoplay`, the hand for `drag`. */
|
|
158
|
+
driver: z.ZodDefault<z.ZodEnum<{
|
|
159
|
+
none: "none";
|
|
160
|
+
drag: "drag";
|
|
161
|
+
autoplay: "autoplay";
|
|
162
|
+
}>>;
|
|
673
163
|
speed: z.ZodDefault<z.ZodNumber>;
|
|
674
|
-
/**
|
|
675
|
-
* Whether the walk takes the WHEEL and the TOUCH away from the page.
|
|
676
|
-
*
|
|
677
|
-
* True for a stage that fills the screen — it is the page, so there is
|
|
678
|
-
* nothing to take it from. False for one sitting in a column of prose,
|
|
679
|
-
* where capturing them means a reader who scrolls past it has their scroll
|
|
680
|
-
* eaten and a reader on a phone has their finger trapped. Dragging with a
|
|
681
|
-
* mouse and stepping with the arrow keys work either way, because neither
|
|
682
|
-
* is a gesture the page also wants.
|
|
683
|
-
*
|
|
684
|
-
* Even when captured, the wheel is handed BACK at the ends of an open
|
|
685
|
-
* walk: scrolling past the last banner should carry on down the page
|
|
686
|
-
* rather than press silently into a wall.
|
|
687
|
-
*/
|
|
688
164
|
capture: z.ZodDefault<z.ZodBoolean>;
|
|
689
|
-
},
|
|
690
|
-
speed: number;
|
|
691
|
-
driver: "none" | "autoplay" | "drag";
|
|
692
|
-
capture: boolean;
|
|
693
|
-
}, {
|
|
694
|
-
speed?: number | undefined;
|
|
695
|
-
driver?: "none" | "autoplay" | "drag" | undefined;
|
|
696
|
-
capture?: boolean | undefined;
|
|
697
|
-
}>;
|
|
165
|
+
}, z.core.$strip>;
|
|
698
166
|
type StageMotion = z.infer<typeof stageMotionSchema>;
|
|
699
167
|
type StageMotionInput = z.input<typeof stageMotionSchema>;
|
|
700
168
|
|
|
@@ -870,20 +338,9 @@ declare function listStagePresets(): string[];
|
|
|
870
338
|
/** A point on the floor. */
|
|
871
339
|
type Ground = [x: number, z: number];
|
|
872
340
|
declare const walkPathSchema: z.ZodObject<{
|
|
873
|
-
|
|
874
|
-
* Control points on the ground plane, [x, z]. The default walks away from
|
|
875
|
-
* the camera down -Z — the shot every reference image is composed on.
|
|
876
|
-
*/
|
|
877
|
-
points: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">>;
|
|
878
|
-
/** Join the last point back to the first: an endless walk, and the only form `phase` can slide. */
|
|
341
|
+
points: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
879
342
|
closed: z.ZodDefault<z.ZodBoolean>;
|
|
880
|
-
},
|
|
881
|
-
points: [number, number][];
|
|
882
|
-
closed: boolean;
|
|
883
|
-
}, {
|
|
884
|
-
points?: [number, number][] | undefined;
|
|
885
|
-
closed?: boolean | undefined;
|
|
886
|
-
}>;
|
|
343
|
+
}, z.core.$strip>;
|
|
887
344
|
type WalkPathOptions = z.infer<typeof walkPathSchema>;
|
|
888
345
|
interface WalkPath {
|
|
889
346
|
/** Total arc length in world units. */
|
|
@@ -922,32 +379,17 @@ declare function getWalk(name: WalkName): WalkPathOptions;
|
|
|
922
379
|
declare const shotNames: readonly ["follow", "lead", "low", "wide"];
|
|
923
380
|
type ShotName = (typeof shotNames)[number];
|
|
924
381
|
declare const shotSchema: z.ZodObject<{
|
|
925
|
-
shot: z.ZodDefault<z.ZodEnum<
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
382
|
+
shot: z.ZodDefault<z.ZodEnum<{
|
|
383
|
+
low: "low";
|
|
384
|
+
follow: "follow";
|
|
385
|
+
lead: "lead";
|
|
386
|
+
wide: "wide";
|
|
387
|
+
}>>;
|
|
931
388
|
distance: z.ZodDefault<z.ZodNumber>;
|
|
932
|
-
/** Multiplier on the shot's natural camera height. 1 is as designed. */
|
|
933
389
|
height: z.ZodDefault<z.ZodNumber>;
|
|
934
|
-
/** How far up the walk the camera looks past the figure, world units. */
|
|
935
390
|
lookAhead: z.ZodDefault<z.ZodNumber>;
|
|
936
|
-
/** Sideways step off the walk line, world units. Positive is the walker's left. */
|
|
937
391
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
938
|
-
},
|
|
939
|
-
height: number;
|
|
940
|
-
offset: number;
|
|
941
|
-
distance: number;
|
|
942
|
-
shot: "low" | "follow" | "lead" | "wide";
|
|
943
|
-
lookAhead: number;
|
|
944
|
-
}, {
|
|
945
|
-
height?: number | undefined;
|
|
946
|
-
offset?: number | undefined;
|
|
947
|
-
distance?: number | undefined;
|
|
948
|
-
shot?: "low" | "follow" | "lead" | "wide" | undefined;
|
|
949
|
-
lookAhead?: number | undefined;
|
|
950
|
-
}>;
|
|
392
|
+
}, z.core.$strip>;
|
|
951
393
|
type ShotOptions = z.infer<typeof shotSchema>;
|
|
952
394
|
interface StageShot {
|
|
953
395
|
position: [x: number, y: number, z: number];
|