@meeeetup/camera-web 0.8.0 → 0.9.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 +211 -167
- package/dist/index.d.ts +5 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -17
- package/dist/index.js.map +1 -1
- package/dist/react/components/AlignmentRing.js +2 -2
- package/dist/react/components/AlignmentRing.js.map +1 -1
- package/dist/react/components/CameraToggle.js +2 -2
- package/dist/react/components/CameraToggle.js.map +1 -1
- package/dist/react/components/CameraViewport.d.ts +4 -2
- package/dist/react/components/CameraViewport.d.ts.map +1 -1
- package/dist/react/components/CameraViewport.js +12 -10
- package/dist/react/components/CameraViewport.js.map +1 -1
- package/dist/react/components/CaptureButton.js +2 -2
- package/dist/react/components/CaptureButton.js.map +1 -1
- package/dist/react/components/DevicePicker.js +2 -2
- package/dist/react/components/DevicePicker.js.map +1 -1
- package/dist/react/components/FaceCounter.js +2 -2
- package/dist/react/components/FaceCounter.js.map +1 -1
- package/dist/react/components/FaceGrid.d.ts.map +1 -1
- package/dist/react/components/FaceGrid.js +23 -11
- package/dist/react/components/FaceGrid.js.map +1 -1
- package/dist/react/components/SingleAlignmentOverlay.js +2 -2
- package/dist/react/components/SingleAlignmentOverlay.js.map +1 -1
- package/dist/react/context/{MeeeetUpCamContext.d.ts → CameraContext.d.ts} +23 -6
- package/dist/react/context/CameraContext.d.ts.map +1 -0
- package/dist/react/context/CameraContext.js +3 -0
- package/dist/react/context/CameraContext.js.map +1 -0
- package/dist/react/context/{MeeeetUpCamProvider.d.ts → CameraProvider.d.ts} +32 -26
- package/dist/react/context/CameraProvider.d.ts.map +1 -0
- package/dist/react/context/{MeeeetUpCamProvider.js → CameraProvider.js} +34 -62
- package/dist/react/context/CameraProvider.js.map +1 -0
- package/dist/react/context/useCamera.d.ts +15 -0
- package/dist/react/context/useCamera.d.ts.map +1 -0
- package/dist/react/context/useCamera.js +22 -0
- package/dist/react/context/useCamera.js.map +1 -0
- package/dist/react/usePassiveCamera.d.ts +16 -1
- package/dist/react/usePassiveCamera.d.ts.map +1 -1
- package/dist/react/usePassiveCamera.js +19 -2
- package/dist/react/usePassiveCamera.js.map +1 -1
- package/dist/ui/index.d.ts +19 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +18 -0
- package/dist/ui/index.js.map +1 -0
- package/package.json +7 -2
- package/dist/react/context/MeeeetUpCamContext.d.ts.map +0 -1
- package/dist/react/context/MeeeetUpCamContext.js +0 -3
- package/dist/react/context/MeeeetUpCamContext.js.map +0 -1
- package/dist/react/context/MeeeetUpCamProvider.d.ts.map +0 -1
- package/dist/react/context/MeeeetUpCamProvider.js.map +0 -1
- package/dist/react/context/useMeeeetUpCam.d.ts +0 -15
- package/dist/react/context/useMeeeetUpCam.d.ts.map +0 -1
- package/dist/react/context/useMeeeetUpCam.js +0 -22
- package/dist/react/context/useMeeeetUpCam.js.map +0 -1
- package/dist/react/useAutoUpload.d.ts +0 -17
- package/dist/react/useAutoUpload.d.ts.map +0 -1
- package/dist/react/useAutoUpload.js +0 -46
- package/dist/react/useAutoUpload.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,91 +1,116 @@
|
|
|
1
1
|
# @meeeetup/camera-web
|
|
2
2
|
|
|
3
|
-
Browser face-capture SDK
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
Browser face-capture SDK. Detects faces with MediaPipe BlazeFace, tracks each
|
|
4
|
+
one, picks the best-quality frame per person, and hands you the images through
|
|
5
|
+
a callback. **No network, no credentials, no vendor lock-in** — the SDK runs
|
|
6
|
+
entirely on the device and the transport is yours.
|
|
7
|
+
|
|
8
|
+
- **Headless-first.** The data surface (`CameraProvider`, `useCamera`) is the
|
|
9
|
+
package default. Pre-built UI (viewport, overlay, face grid) is a separate
|
|
10
|
+
entry under `/ui` — import it only if you want the stock visuals.
|
|
11
|
+
- **BYOT (bring your own transport).** The SDK calls `onBatchCapture` (passive)
|
|
12
|
+
or `onCapture` (single, interactive) with base64 JPEG data URLs. Sending
|
|
13
|
+
them is your code — any backend, any auth scheme, any retry strategy.
|
|
14
|
+
- **Pre-GA.** Breaking API changes land without deprecation shims; version
|
|
15
|
+
bumps document them in `CHANGELOG.md`.
|
|
12
16
|
|
|
13
17
|
Requires React 18 or 19. ESM-only. Served over HTTPS or `localhost` —
|
|
14
18
|
`getUserMedia` is a secure-context API.
|
|
15
19
|
|
|
20
|
+
---
|
|
21
|
+
|
|
16
22
|
## Install
|
|
17
23
|
|
|
18
24
|
```bash
|
|
19
25
|
npm i @meeeetup/camera-web react react-dom
|
|
20
26
|
```
|
|
21
27
|
|
|
22
|
-
|
|
23
|
-
import from it directly (this package already re-exports `SelectedFace`,
|
|
24
|
-
`LiveFacePreview` and `PersonResult`).
|
|
28
|
+
Optional (only if you use the stock components):
|
|
25
29
|
|
|
26
30
|
```ts
|
|
27
31
|
import "@meeeetup/camera-web/styles.css";
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
`@meeeetup/camera-core` arrives as a transitive dependency — add it explicitly
|
|
35
|
+
only if you import from it directly (`SelectedFace`, `LiveFacePreview`,
|
|
36
|
+
`PersonResult`, `TrackSnapshot` are already re-exported here).
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## The two entry points
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
// Headless API — Provider, hook, types. ~zero visual bytes.
|
|
44
|
+
import { CameraProvider, useCamera } from "@meeeetup/camera-web";
|
|
45
|
+
|
|
46
|
+
// Pre-built components — only if you want our visuals. Opt-in bundle cost.
|
|
47
|
+
import { CameraViewport, FaceGrid, FaceCounter } from "@meeeetup/camera-web/ui";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Everything renders inside a single `<CameraProvider>`. Children — stock
|
|
51
|
+
components or your own — read live state through `useCamera()`.
|
|
31
52
|
|
|
32
|
-
|
|
33
|
-
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Three capture modes
|
|
56
|
+
|
|
57
|
+
| Mode | Trigger | Output | When to use |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| `passive` | Continuous — SDK picks best shots as faces appear | Batched `onBatchCapture(faces[])` | Walk-by cameras, kiosks that watch a space |
|
|
60
|
+
| `single` | Automatic — one best-shot per `trigger()` call | One `onCapture(crop, _, meta)` | Checkout-style self-serve ID |
|
|
61
|
+
| `interactive` | Manual — user presses the capture button | One `onCapture(crop, fullCircleImage)` | Guided enrollment flow |
|
|
62
|
+
|
|
63
|
+
### Passive — continuous, batched
|
|
34
64
|
|
|
35
65
|
```tsx
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
CameraViewport,
|
|
39
|
-
FaceCounter,
|
|
40
|
-
FaceGrid,
|
|
41
|
-
type SelectedFace,
|
|
42
|
-
} from "@meeeetup/camera-web";
|
|
66
|
+
import { CameraProvider, useCamera, type SelectedFace } from "@meeeetup/camera-web";
|
|
67
|
+
import { CameraViewport, FaceCounter, FaceGrid } from "@meeeetup/camera-web/ui";
|
|
43
68
|
|
|
44
69
|
export function PassiveCamera({ captureKey }: { captureKey: string }) {
|
|
70
|
+
const handleBatch = async (faces: SelectedFace[]) => {
|
|
71
|
+
const res = await fetch("https://api.example.com/capture", {
|
|
72
|
+
method: "POST",
|
|
73
|
+
headers: {
|
|
74
|
+
Authorization: `Bearer ${captureKey}`,
|
|
75
|
+
"Content-Type": "application/json",
|
|
76
|
+
},
|
|
77
|
+
body: JSON.stringify({
|
|
78
|
+
images: faces.map((f) => ({
|
|
79
|
+
image: f.dataUrl,
|
|
80
|
+
capturedAt: new Date(f.createdAt).toISOString(),
|
|
81
|
+
})),
|
|
82
|
+
}),
|
|
83
|
+
});
|
|
84
|
+
// Throw to report failure. The SDK re-queues on throw; a 4xx would
|
|
85
|
+
// livelock a retry, so swallow those at the sink.
|
|
86
|
+
if (!res.ok && res.status >= 500) throw new Error(`send failed: ${res.status}`);
|
|
87
|
+
};
|
|
88
|
+
|
|
45
89
|
return (
|
|
46
|
-
<
|
|
47
|
-
mode="passive"
|
|
48
|
-
onBatchCapture={async (faces: SelectedFace[]) => {
|
|
49
|
-
const res = await fetch("https://api.example.com/capture", {
|
|
50
|
-
method: "POST",
|
|
51
|
-
headers: {
|
|
52
|
-
Authorization: `Bearer ${captureKey}`,
|
|
53
|
-
"Content-Type": "application/json",
|
|
54
|
-
},
|
|
55
|
-
body: JSON.stringify({
|
|
56
|
-
images: faces.map((f) => ({
|
|
57
|
-
image: f.dataUrl,
|
|
58
|
-
capturedAt: new Date(f.createdAt).toISOString(),
|
|
59
|
-
})),
|
|
60
|
-
}),
|
|
61
|
-
});
|
|
62
|
-
// Throw to report failure. A missing status, <400 or >=500 is retried;
|
|
63
|
-
// 4xx drops that batch (resending an unchanged rejected payload
|
|
64
|
-
// livelocks).
|
|
65
|
-
if (!res.ok) throw Object.assign(new Error("send failed"), { status: res.status });
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
90
|
+
<CameraProvider mode="passive" onBatchCapture={handleBatch}>
|
|
68
91
|
<CameraViewport />
|
|
69
92
|
<FaceCounter />
|
|
70
93
|
<FaceGrid />
|
|
71
|
-
</
|
|
94
|
+
</CameraProvider>
|
|
72
95
|
);
|
|
73
96
|
}
|
|
74
97
|
```
|
|
75
98
|
|
|
76
|
-
|
|
99
|
+
Faces flush every 10 s or when the buffer reaches the key's
|
|
100
|
+
`maxFacesPerRequest` cap. A face is handed over once per selection event — if a
|
|
101
|
+
better frame arrives later the SDK commits again. On the default settle path
|
|
102
|
+
every selection is `final: true`; set `captureWindowMs` and tracks publish
|
|
103
|
+
with `final: false` intermediate updates until the window expires.
|
|
104
|
+
|
|
105
|
+
### Interactive — user-triggered
|
|
77
106
|
|
|
78
107
|
```tsx
|
|
79
|
-
import {
|
|
80
|
-
|
|
81
|
-
CameraViewport,
|
|
82
|
-
AlignmentRing,
|
|
83
|
-
CaptureButton,
|
|
84
|
-
} from "@meeeetup/camera-web";
|
|
108
|
+
import { CameraProvider } from "@meeeetup/camera-web";
|
|
109
|
+
import { CameraViewport, AlignmentRing, CaptureButton } from "@meeeetup/camera-web/ui";
|
|
85
110
|
|
|
86
111
|
export function KioskCamera() {
|
|
87
112
|
return (
|
|
88
|
-
<
|
|
113
|
+
<CameraProvider
|
|
89
114
|
mode="interactive"
|
|
90
115
|
onCapture={async (faceImage, fullCircleImage) => {
|
|
91
116
|
await upload(faceImage, fullCircleImage);
|
|
@@ -94,163 +119,184 @@ export function KioskCamera() {
|
|
|
94
119
|
<CameraViewport />
|
|
95
120
|
<AlignmentRing />
|
|
96
121
|
<CaptureButton />
|
|
97
|
-
</
|
|
122
|
+
</CameraProvider>
|
|
98
123
|
);
|
|
99
124
|
}
|
|
100
125
|
```
|
|
101
126
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
`autoUpload` is accepted by `MeeeetUpCamProvider` in all three modes
|
|
105
|
-
(`passive`, `single`, `interactive`) and makes the SDK post captures itself.
|
|
106
|
-
Omit it and no capture ever leaves the device — your callback stays the only
|
|
107
|
-
output path. With it, a passive camera needs no transport code at all:
|
|
127
|
+
### Single — automatic one-shot
|
|
108
128
|
|
|
109
129
|
```tsx
|
|
110
|
-
import {
|
|
111
|
-
|
|
112
|
-
CameraViewport,
|
|
113
|
-
FaceCounter,
|
|
114
|
-
FaceGrid,
|
|
115
|
-
} from "@meeeetup/camera-web";
|
|
130
|
+
import { CameraProvider } from "@meeeetup/camera-web";
|
|
131
|
+
import { CameraViewport } from "@meeeetup/camera-web/ui";
|
|
116
132
|
|
|
117
|
-
export function
|
|
133
|
+
export function EnrollCamera() {
|
|
118
134
|
return (
|
|
119
|
-
<
|
|
135
|
+
<CameraProvider
|
|
136
|
+
mode="single"
|
|
137
|
+
onCapture={async (faceImage, _fullCircleImage, meta) => {
|
|
138
|
+
console.log("frontalness", meta.frontalness, "face size", meta.faceSize);
|
|
139
|
+
await upload(faceImage);
|
|
140
|
+
}}
|
|
141
|
+
>
|
|
120
142
|
<CameraViewport />
|
|
121
|
-
|
|
122
|
-
<FaceGrid />
|
|
123
|
-
</MeeeetUpCamProvider>
|
|
143
|
+
</CameraProvider>
|
|
124
144
|
);
|
|
125
145
|
}
|
|
126
146
|
```
|
|
127
147
|
|
|
128
|
-
|
|
129
|
-
`Authorization: Bearer <captureKey>` and `Content-Type: application/json`, and
|
|
130
|
-
a body of `{ images: [{ image, capturedAt }], channelId? }` — the `POST
|
|
131
|
-
/capture` contract of the Meeeetup face-ID API. `capturedAt` is each face's
|
|
132
|
-
`createdAt` as an ISO-8601 string.
|
|
148
|
+
---
|
|
133
149
|
|
|
134
|
-
|
|
150
|
+
## Custom UI (`useCamera`)
|
|
135
151
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
| `captureKey` | `string` | required — sent as `Authorization: Bearer <captureKey>` |
|
|
139
|
-
| `endpoint` | `string` | `DEFAULT_CAPTURE_ENDPOINT` (`https://api.meeeetup.com/capture`) |
|
|
140
|
-
| `channelId` | `string` | unset — omitted from the body entirely, not sent empty |
|
|
141
|
-
| `maxRetries` | `number` | `2` — extra attempts after a transient failure |
|
|
142
|
-
| `retryDelayMs` | `number` | `1000` — base backoff, doubled each attempt |
|
|
143
|
-
| `fetch` | `CaptureFetch` | the global `fetch` — override for tests or a proxy |
|
|
144
|
-
| `onUploaded` | `(result: AutoUploadResult) => void` | — fires per accepted request with `{ count, status, attempts }` |
|
|
145
|
-
| `onError` | `(error: unknown) => void` | — fires once per upload that exhausted its attempts |
|
|
146
|
-
|
|
147
|
-
### Capture callbacks become observers
|
|
148
|
-
|
|
149
|
-
With `autoUpload` set, `onBatchCapture` / `onCapture` are optional and purely
|
|
150
|
-
observational — a counter, a preview, analytics. They are fired without being
|
|
151
|
-
awaited, so they can neither delay nor fail the upload, and anything they throw
|
|
152
|
-
surfaces on `autoUpload.onError` rather than in the capture pipeline. Without
|
|
153
|
-
`autoUpload` they are the only output path and behave as before: a rejection
|
|
154
|
-
requeues the batch.
|
|
155
|
-
|
|
156
|
-
In single and interactive mode only the face crop is uploaded.
|
|
157
|
-
`fullCircleImage` is framing for your own UI and never leaves the device.
|
|
158
|
-
|
|
159
|
-
### Retries and failures
|
|
160
|
-
|
|
161
|
-
5xx, 429, 408 and transport-level failures are retried up to `maxRetries`, each
|
|
162
|
-
attempt resending a byte-identical payload after
|
|
163
|
-
`retryDelayMs * 2 ** (attempt - 1)` ms. Any other 4xx fails immediately — the
|
|
164
|
-
server rejected that payload, and resending it unchanged would livelock.
|
|
165
|
-
|
|
166
|
-
Once the attempts are spent the uploader throws `CaptureUploadError`:
|
|
167
|
-
|
|
168
|
-
| Field | Meaning |
|
|
169
|
-
|---|---|
|
|
170
|
-
| `status` | HTTP status; absent when the request never completed |
|
|
171
|
-
| `retryable` | `true` for 408 / 429 / 5xx / transport failure, `false` for any other 4xx |
|
|
172
|
-
| `attempts` | attempts spent before giving up |
|
|
173
|
-
| `cause` | the underlying transport error, when there was one |
|
|
174
|
-
|
|
175
|
-
The passive session reads that flag: a retryable batch is requeued and retried
|
|
176
|
-
on a later flush, a non-retryable one is dropped. Batches reach the uploader
|
|
177
|
-
already chunked to 50 images (`maxFacesPerRequest`), which must not exceed the
|
|
178
|
-
key's `maxImagesPerRequest` from `GET /capture/keys/me`.
|
|
179
|
-
|
|
180
|
-
### Driving the low-level hooks
|
|
181
|
-
|
|
182
|
-
`createAutoUploader`, `CaptureUploadError`, `DEFAULT_CAPTURE_ENDPOINT` and the
|
|
183
|
-
`AutoUpload*` / `Capture*` types are re-exported from this package, so code
|
|
184
|
-
driving the low-level hooks (`usePassiveCamera`, `useSingleCapture`) instead of
|
|
185
|
-
the provider gets the same transport. `uploadFaces` takes `SelectedFace[]` from
|
|
186
|
-
a passive batch; `uploadImages` takes the single-shot data URLs.
|
|
152
|
+
`useCamera()` is the data surface. Narrow on `cam.mode` first; the hook throws
|
|
153
|
+
if used outside a provider.
|
|
187
154
|
|
|
188
155
|
```tsx
|
|
189
|
-
import {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const cam =
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
156
|
+
import { useCamera } from "@meeeetup/camera-web";
|
|
157
|
+
|
|
158
|
+
function Status() {
|
|
159
|
+
const cam = useCamera();
|
|
160
|
+
if (cam.mode !== "passive") return null;
|
|
161
|
+
return (
|
|
162
|
+
<p>
|
|
163
|
+
{cam.trackedCount} in frame — {cam.capturedFaces.length} captured
|
|
164
|
+
</p>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
198
167
|
```
|
|
199
168
|
|
|
200
|
-
|
|
169
|
+
### Shared across modes
|
|
170
|
+
|
|
171
|
+
`ready`, `error`, `videoRef`, `devices`, `currentDeviceId`, `setDeviceId`,
|
|
172
|
+
`currentFacingMode`, `toggleCamera`.
|
|
201
173
|
|
|
202
|
-
|
|
203
|
-
|
|
174
|
+
### Passive mode (`cam.mode === "passive"`)
|
|
175
|
+
|
|
176
|
+
| Field | Shape | What it is |
|
|
177
|
+
|---|---|---|
|
|
178
|
+
| `activeTracks` | `TrackSnapshot[]` | Per-frame snapshot of every live track — `cx`/`cy`/`width`/`height` in normalised 0–1 coords, plus `smoothedFrontalness` / `selectedFrontalness` / `lastSeenAt` / `lastSentAt`. Drive custom overlays off this |
|
|
179
|
+
| `liveFaces` | `LiveFacePreview[]` | Tracks currently in frame that have NOT yet been committed — your "watching" row |
|
|
180
|
+
| `capturedFaces` | `SelectedFace[]` | Everything committed this session, newest first — your "captured" row |
|
|
181
|
+
| `livePreviews` | `LiveFacePreview[]` | Raw: all tracked faces that have a best crop yet |
|
|
182
|
+
| `selectedFaces` | `SelectedFace[]` | Raw: SDK's committed buffer, order defined by the pipeline |
|
|
183
|
+
| `trackedCount` / `totalCount` | `number` | Faces in frame now / unique faces seen this session |
|
|
184
|
+
| `flushBatch` | `() => Promise<void>` | Drive the batch flush yourself instead of waiting 10 s |
|
|
185
|
+
| `rearm` | `() => void` | Re-open every track's capture window (no-op without `captureWindowMs`) |
|
|
186
|
+
| `overlayRef` | `RefObject<HTMLCanvasElement>` | Where the stock green-box overlay draws — attach to your own `<canvas>` to let the SDK render into it |
|
|
187
|
+
|
|
188
|
+
### Interactive mode (`cam.mode === "interactive"`)
|
|
189
|
+
|
|
190
|
+
| Field | Shape | What it is |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| `videoStream` | `MediaStream \| null` | Raw camera stream — attach to secondary `<video>` elements for picture-in-picture |
|
|
193
|
+
| `isLoading` / `isCapturing` / `isSwitchingCamera` / `isFlipped` / `isFaceAligned` | `boolean` | Pipeline state |
|
|
194
|
+
| `captureProgress` / `alignmentCountdown` | `number` | 0–1 progress for the alignment ring and auto-capture countdown |
|
|
195
|
+
| `faceBoundingBox` | `{ originX, originY, width, height } \| null` | Current face box in video coords |
|
|
196
|
+
| `captureImage()` / `toggleFlip()` | `() => void` | Trigger capture / mirror the preview |
|
|
197
|
+
| `canvasRef` | `RefObject<HTMLCanvasElement>` | Full-circle framing canvas |
|
|
198
|
+
|
|
199
|
+
### Single mode (`cam.mode === "single"`)
|
|
200
|
+
|
|
201
|
+
| Field | Shape | What it is |
|
|
202
|
+
|---|---|---|
|
|
203
|
+
| `state` | `SingleCaptureState` | `idle` / `tracking` / `capturing` / `locked` |
|
|
204
|
+
| `bbox` | `SingleCaptureBox \| null` | Current face box |
|
|
205
|
+
| `isAligned` / `locked` | `boolean` | Alignment / lock state |
|
|
206
|
+
| `captureProgress` / `faceSize` / `frontalness` / `score` | `number` | Per-frame readings |
|
|
207
|
+
| `result` | `SingleCaptureResult \| null` | Published best-shot + meta |
|
|
208
|
+
| `trigger()` / `rearm()` | `() => void` | Open a fresh capture window / restart search |
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Declarative overlays (`CameraViewport` children)
|
|
213
|
+
|
|
214
|
+
`<CameraViewport>` passes any children through to a `pointer-events: none`
|
|
215
|
+
layer on top of the camera. Anything that reads `useCamera()` can position
|
|
216
|
+
itself over the video — Mapbox-style composition.
|
|
204
217
|
|
|
205
218
|
```tsx
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
219
|
+
<CameraProvider mode="passive" overlayEnabled={false} onBatchCapture={handleBatch}>
|
|
220
|
+
<CameraViewport>
|
|
221
|
+
<TrackBoxes /> {/* reads activeTracks, draws DOM boxes */}
|
|
222
|
+
<ThresholdLine />
|
|
223
|
+
<DebugHud />
|
|
224
|
+
</CameraViewport>
|
|
225
|
+
</CameraProvider>
|
|
226
|
+
|
|
227
|
+
function TrackBoxes() {
|
|
228
|
+
const cam = useCamera();
|
|
229
|
+
if (cam.mode !== "passive") return null;
|
|
230
|
+
return (
|
|
231
|
+
<>
|
|
232
|
+
{cam.activeTracks.map((t) => (
|
|
233
|
+
<div
|
|
234
|
+
key={t.trackId}
|
|
235
|
+
style={{
|
|
236
|
+
position: "absolute",
|
|
237
|
+
left: `${(t.cx - t.width / 2) * 100}%`,
|
|
238
|
+
top: `${(t.cy - t.height / 2) * 100}%`,
|
|
239
|
+
width: `${t.width * 100}%`,
|
|
240
|
+
height: `${t.height * 100}%`,
|
|
241
|
+
border: `2px solid ${t.smoothedFrontalness > 50 ? "lime" : "red"}`,
|
|
242
|
+
}}
|
|
243
|
+
/>
|
|
244
|
+
))}
|
|
245
|
+
</>
|
|
246
|
+
);
|
|
210
247
|
}
|
|
211
248
|
```
|
|
212
249
|
|
|
213
|
-
|
|
214
|
-
|
|
250
|
+
`overlayEnabled={false}` turns off the SDK's green-box canvas so your DOM
|
|
251
|
+
boxes are the only overlay. Omit it (or set `true`) to layer custom children
|
|
252
|
+
on top of the stock overlay.
|
|
253
|
+
|
|
254
|
+
---
|
|
215
255
|
|
|
216
|
-
##
|
|
256
|
+
## Pre-built components (`@meeeetup/camera-web/ui`)
|
|
217
257
|
|
|
218
258
|
| Component | Mode | Renders |
|
|
219
259
|
|---|---|---|
|
|
220
260
|
| `CameraViewport` | both | `<video>` + overlay canvas (passive) / circular viewport (interactive) |
|
|
221
261
|
| `FaceCounter` | passive | Tracked + total badge |
|
|
222
|
-
| `FaceGrid` | passive | Grid of selected face crops |
|
|
262
|
+
| `FaceGrid` | passive | Grid of selected face crops (live / committed / ready) |
|
|
223
263
|
| `DevicePicker` | both | Camera dropdown |
|
|
224
264
|
| `CameraToggle` | both | Front/back switch |
|
|
225
265
|
| `AlignmentRing` | interactive | Alignment ring, progress, countdown |
|
|
226
266
|
| `CaptureButton` | interactive | Manual capture trigger |
|
|
227
267
|
|
|
228
|
-
Every component
|
|
229
|
-
|
|
230
|
-
|
|
268
|
+
Every component accepts `className`. The skin is CSS custom properties
|
|
269
|
+
(`--mfc-*`) with dark defaults — re-theme by setting them on any ancestor.
|
|
270
|
+
|
|
271
|
+
---
|
|
231
272
|
|
|
232
273
|
## Provider props
|
|
233
274
|
|
|
234
|
-
Every mode
|
|
235
|
-
|
|
275
|
+
Every mode: `children`, `mediapipeWasmUrl`, `deviceId`, `onDeviceChange`,
|
|
276
|
+
`overlayEnabled`. Mode-specific props below. Capture gates (`cooldownMs`,
|
|
277
|
+
`minFrontalness`, `captureWindowMs`, …) are passive-only.
|
|
236
278
|
|
|
237
279
|
| Prop | Mode | Type | Default |
|
|
238
280
|
|---|---|---|---|
|
|
239
|
-
| `
|
|
240
|
-
| `
|
|
241
|
-
| `
|
|
281
|
+
| `onBatchCapture` | passive | `(faces: SelectedFace[]) => void \| Promise<void>` | **required** |
|
|
282
|
+
| `onCapture` | single, interactive | mode-specific signature | **required** |
|
|
283
|
+
| `deviceId` | all | `string` | unset — browser picks a default camera |
|
|
284
|
+
| `onDeviceChange` | all | `(id: string \| undefined) => void` | — fires when a child picker changes the device |
|
|
285
|
+
| `overlayEnabled` | passive | `boolean` | `true` — set `false` to disable the SDK's green boxes and render custom overlays |
|
|
242
286
|
| `cooldownMs` | passive | `number` | `10000` — minimum ms between sends for the same face |
|
|
243
|
-
| `
|
|
244
|
-
| `
|
|
245
|
-
| `minDetectionScore` | passive | `number` | `0.5` — detector confidence floor, applied before any pose analysis |
|
|
287
|
+
| `captureWindowMs` | passive | `number` | `0` — per-track best-shot window; `0` keeps settle-based capture |
|
|
288
|
+
| `minDetectionScore` | passive | `number` | `0.5` — detector confidence floor, applied before pose analysis |
|
|
246
289
|
| `minFaceHeight` | passive | `number` | `0` — minimum face-box height as a fraction of frame height (0–1); off by default |
|
|
247
290
|
| `minFrontalness` | passive | `number` | `50` — minimum pose score (0–100) a frame must reach to be captured |
|
|
248
|
-
| `
|
|
291
|
+
| `mediapipeWasmUrl` | all | `string` | jsDelivr CDN — override to self-host MediaPipe WASM |
|
|
292
|
+
| `alignmentCaptureDelayMs` | interactive | `number` | `2000` — how long a face must stay aligned before auto-capture |
|
|
249
293
|
|
|
250
|
-
With `captureWindowMs
|
|
251
|
-
best frame is published as final at expiry. `
|
|
294
|
+
With `captureWindowMs > 0`, each tracked face is searched for that long and
|
|
295
|
+
the best frame is published as final at expiry. `useCamera()` in passive mode
|
|
252
296
|
returns `rearm()`, which starts every window's search again.
|
|
253
297
|
|
|
298
|
+
---
|
|
299
|
+
|
|
254
300
|
## Runtime network access
|
|
255
301
|
|
|
256
302
|
MediaPipe assets are fetched on demand, so the browser must reach:
|
|
@@ -258,12 +304,10 @@ MediaPipe assets are fetched on demand, so the browser must reach:
|
|
|
258
304
|
- `https://cdn.jsdelivr.net` — WASM runtime (override with `mediapipeWasmUrl`)
|
|
259
305
|
- `https://storage.googleapis.com` — the `.tflite` detection model
|
|
260
306
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
- `https://api.meeeetup.com` — capture ingest (override with `autoUpload.endpoint`)
|
|
307
|
+
The SDK itself makes no other requests. A strict CSP needs the two asset
|
|
308
|
+
origins in `connect-src`, plus `script-src 'wasm-unsafe-eval'`.
|
|
264
309
|
|
|
265
|
-
|
|
266
|
-
'wasm-unsafe-eval'`; add the capture origin when you use `autoUpload`.
|
|
310
|
+
---
|
|
267
311
|
|
|
268
312
|
## Licence
|
|
269
313
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
export type { SelectedFace, LiveFacePreview, PersonResult } from "@meeeetup/camera-core";
|
|
2
|
-
export {
|
|
3
|
-
export type {
|
|
4
|
-
export {
|
|
5
|
-
export type {
|
|
6
|
-
export { useMeeeetUpCam } from "./react/context/useMeeeetUpCam.js";
|
|
7
|
-
export type { MeeeetUpCamContextValue, CameraMode, PassiveState, InteractiveState, SingleState } from "./react/context/MeeeetUpCamContext.js";
|
|
1
|
+
export type { SelectedFace, LiveFacePreview, PersonResult, TrackSnapshot } from "@meeeetup/camera-core";
|
|
2
|
+
export { CameraProvider } from "./react/context/CameraProvider.js";
|
|
3
|
+
export type { CameraProviderProps, PassiveCameraProviderProps, InteractiveCameraProviderProps, SingleCameraProviderProps, SingleCaptureMeta, } from "./react/context/CameraProvider.js";
|
|
4
|
+
export { useCamera } from "./react/context/useCamera.js";
|
|
5
|
+
export type { CameraContextValue, CameraMode, PassiveState, InteractiveState, SingleState } from "./react/context/CameraContext.js";
|
|
8
6
|
export { useSingleCapture, MIN_SCORE_FLOOR, MIN_WINDOW_MS, MAX_WINDOW_MS } from "./react/useSingleCapture.js";
|
|
9
7
|
export type { UseSingleCaptureOptions, UseSingleCaptureReturn, SingleCaptureState, SingleCaptureBox, SingleCaptureResult, } from "./react/useSingleCapture.js";
|
|
10
|
-
export { CameraViewport } from "./react/components/CameraViewport.js";
|
|
11
|
-
export type { CameraViewportProps } from "./react/components/CameraViewport.js";
|
|
12
|
-
export { FaceCounter } from "./react/components/FaceCounter.js";
|
|
13
|
-
export { FaceGrid } from "./react/components/FaceGrid.js";
|
|
14
|
-
export { CameraToggle } from "./react/components/CameraToggle.js";
|
|
15
|
-
export { DevicePicker } from "./react/components/DevicePicker.js";
|
|
16
|
-
export { AlignmentRing } from "./react/components/AlignmentRing.js";
|
|
17
|
-
export { SingleAlignmentOverlay } from "./react/components/SingleAlignmentOverlay.js";
|
|
18
|
-
export { CaptureButton } from "./react/components/CaptureButton.js";
|
|
19
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AASxG,OAAO,EAAE,cAAc,EAAE,MAAS,mCAAmC,CAAC;AACtE,YAAY,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAc,8BAA8B,CAAC;AACjE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAGpI,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC9G,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
// ──
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
export {
|
|
1
|
+
// ── Context API (headless) ──────────────────────────────────────────────────────
|
|
2
|
+
// The Provider + context + hooks are the data surface — bring-your-own UI
|
|
3
|
+
// composes against them. Pre-built UI components live under `/ui`.
|
|
4
|
+
//
|
|
5
|
+
// Transport is yours. The Provider hands captures to your `onBatchCapture` /
|
|
6
|
+
// `onCapture` sink and makes no network request itself; sending the JPEG
|
|
7
|
+
// data URLs is your code (see README for the POST /capture reference).
|
|
8
|
+
export { CameraProvider } from "./react/context/CameraProvider.js";
|
|
9
|
+
export { useCamera } from "./react/context/useCamera.js";
|
|
9
10
|
// ── Single-mode hook (low-level, when the Provider is too much) ────────────────
|
|
10
11
|
export { useSingleCapture, MIN_SCORE_FLOOR, MIN_WINDOW_MS, MAX_WINDOW_MS } from "./react/useSingleCapture.js";
|
|
11
|
-
// ── Built-in components ─────────────────────────────────────────────────────────
|
|
12
|
-
export { CameraViewport } from "./react/components/CameraViewport.js";
|
|
13
|
-
export { FaceCounter } from "./react/components/FaceCounter.js";
|
|
14
|
-
export { FaceGrid } from "./react/components/FaceGrid.js";
|
|
15
|
-
export { CameraToggle } from "./react/components/CameraToggle.js";
|
|
16
|
-
export { DevicePicker } from "./react/components/DevicePicker.js";
|
|
17
|
-
export { AlignmentRing } from "./react/components/AlignmentRing.js";
|
|
18
|
-
export { SingleAlignmentOverlay } from "./react/components/SingleAlignmentOverlay.js";
|
|
19
|
-
export { CaptureButton } from "./react/components/CaptureButton.js";
|
|
20
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,mFAAmF;AACnF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,mFAAmF;AACnF,0EAA0E;AAC1E,mEAAmE;AACnE,EAAE;AACF,6EAA6E;AAC7E,yEAAyE;AACzE,uEAAuE;AACvE,OAAO,EAAE,cAAc,EAAE,MAAS,mCAAmC,CAAC;AAQtE,OAAO,EAAE,SAAS,EAAE,MAAc,8BAA8B,CAAC;AAGjE,kFAAkF;AAClF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useCamera } from "../context/useCamera.js";
|
|
3
3
|
import { CircleProgress } from "../CircleProgress.js";
|
|
4
4
|
/** Alignment ring + progress + countdown. Interactive mode only — renders nothing in passive mode. */
|
|
5
5
|
export function AlignmentRing() {
|
|
6
|
-
const cam =
|
|
6
|
+
const cam = useCamera();
|
|
7
7
|
if (cam.mode !== "interactive")
|
|
8
8
|
return null;
|
|
9
9
|
return (_jsx("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: _jsxs("div", { style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", width: "var(--mfc-circle-size, min(320px, 75vw))", aspectRatio: "1" }, children: [_jsx("div", { className: cam.isFaceAligned ? undefined : "mfc-pulse", style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlignmentRing.js","sourceRoot":"","sources":["../../../src/react/components/AlignmentRing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AlignmentRing.js","sourceRoot":"","sources":["../../../src/react/components/AlignmentRing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,sGAAsG;AACtG,MAAM,UAAU,aAAa;IAC3B,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,IAAI,GAAG,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,IAAI,CAAC;IAE5C,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,YACnE,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,0CAA0C,EAAE,WAAW,EAAE,GAAG,EAAE,aACpK,cACE,SAAS,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EACtD,KAAK,EAAE;wBACL,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK;wBAC9D,MAAM,EAAE,aAAa,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,+CAA+C,CAAC,CAAC,CAAC,yCAAyC,EAAE;wBACtI,SAAS,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,uDAAuD,CAAC,CAAC,CAAC,SAAS;wBAClG,UAAU,EAAE,WAAW;qBACxB,GACD,EACD,GAAG,CAAC,aAAa,IAAI,CACpB,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,YACxD,KAAC,cAAc,IAAC,QAAQ,EAAE,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAC,uCAAuC,EAAC,WAAW,EAAE,EAAE,GAAI,GACvH,CACP,EACA,GAAG,CAAC,kBAAkB,KAAK,IAAI,IAAI,CAClC,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,YACzH,eAAM,SAAS,EAAC,gBAAgB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,sCAAsC,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,mEAAmE,EAAE,YAClN,GAAG,CAAC,kBAAkB,GAClB,GACH,CACP,IACG,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { SwitchCamera } from "lucide-react";
|
|
3
|
-
import {
|
|
3
|
+
import { useCamera } from "../context/useCamera.js";
|
|
4
4
|
import { cx } from "../cx.js";
|
|
5
5
|
/** Front/back camera switch button. Works in both modes. */
|
|
6
6
|
export function CameraToggle({ className }) {
|
|
7
|
-
const cam =
|
|
7
|
+
const cam = useCamera();
|
|
8
8
|
return (_jsx("button", { className: cx("mfc-toggle", className), onClick: cam.toggleCamera, title: "Switch camera", style: { background: "var(--mfc-toggle-bg, rgba(0,0,0,0.45))", border: "none", borderRadius: 8, padding: "6px 8px", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center" }, children: _jsx(SwitchCamera, { size: 16, color: "var(--mfc-fg, #fff)" }) }));
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=CameraToggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraToggle.js","sourceRoot":"","sources":["../../../src/react/components/CameraToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CameraToggle.js","sourceRoot":"","sources":["../../../src/react/components/CameraToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAM9B,4DAA4D;AAC5D,MAAM,UAAU,YAAY,CAAC,EAAE,SAAS,EAAqB;IAC3D,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IAExB,OAAO,CACL,iBACE,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,EACtC,OAAO,EAAE,GAAG,CAAC,YAAY,EACzB,KAAK,EAAC,eAAe,EACrB,KAAK,EAAE,EAAE,UAAU,EAAE,wCAAwC,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,YAExM,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,qBAAqB,GAAG,GAC/C,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -12,8 +12,10 @@ export interface CameraViewportProps {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Renders the camera `<video>` and overlay `<canvas>`.
|
|
15
|
-
* - Passive mode: video + detection overlay
|
|
16
|
-
*
|
|
15
|
+
* - Passive mode: video + the SDK's detection overlay. `children` are rendered
|
|
16
|
+
* as a declarative overlay layer on top (Mapbox-style) — any component that
|
|
17
|
+
* calls `useCamera` can read live track data and position itself over
|
|
18
|
+
* the viewport. `overlay` is ignored.
|
|
17
19
|
* - Interactive mode: circular viewport with blurred background and the
|
|
18
20
|
* default alignment ring. Replaceable via `overlay` or `children`.
|
|
19
21
|
* - Single mode: same circular viewport with the single-mode alignment ring
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraViewport.d.ts","sourceRoot":"","sources":["../../../src/react/components/CameraViewport.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3F,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED
|
|
1
|
+
{"version":3,"file":"CameraViewport.d.ts","sourceRoot":"","sources":["../../../src/react/components/CameraViewport.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3F,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAOnF"}
|