@kubohiroya/turbowarp-camera-source 0.10.0 → 0.12.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.ja.md +74 -4
- package/README.md +148 -4
- package/dist/calibration/camera-info.d.ts +32 -0
- package/dist/calibration/camera-info.d.ts.map +1 -0
- package/dist/calibration/camera-info.js +336 -0
- package/dist/calibration/camera-info.js.map +1 -0
- package/dist/calibration/profile-text.d.ts +10 -0
- package/dist/calibration/profile-text.d.ts.map +1 -0
- package/dist/calibration/profile-text.js +25 -0
- package/dist/calibration/profile-text.js.map +1 -0
- package/dist/calibration/profile.d.ts +47 -0
- package/dist/calibration/profile.d.ts.map +1 -0
- package/dist/calibration/profile.js +479 -0
- package/dist/calibration/profile.js.map +1 -0
- package/dist/calibration/yaml.d.ts +21 -0
- package/dist/calibration/yaml.d.ts.map +1 -0
- package/dist/calibration/yaml.js +441 -0
- package/dist/calibration/yaml.js.map +1 -0
- package/dist/camera-source.js +967 -10
- package/dist/extension-manifest.json +50 -0
- package/dist/profile.d.ts +21 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +18 -0
- package/dist/profile.js.map +1 -0
- package/package.json +5 -1
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
"formatVersion": 1,
|
|
3
3
|
"id": "kubohiroyacamerasource",
|
|
4
4
|
"blocks": [
|
|
5
|
+
{
|
|
6
|
+
"opcode": "bindCameraProfileToDevice",
|
|
7
|
+
"blockType": "COMMAND",
|
|
8
|
+
"arguments": [
|
|
9
|
+
{
|
|
10
|
+
"id": "CAMERA_ID",
|
|
11
|
+
"type": "STRING"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
5
15
|
{
|
|
6
16
|
"opcode": "cameraConditionsGeneration",
|
|
7
17
|
"blockType": "REPORTER",
|
|
@@ -167,6 +177,16 @@
|
|
|
167
177
|
}
|
|
168
178
|
]
|
|
169
179
|
},
|
|
180
|
+
{
|
|
181
|
+
"opcode": "cameraProfileOnDevice",
|
|
182
|
+
"blockType": "BOOLEAN",
|
|
183
|
+
"arguments": [
|
|
184
|
+
{
|
|
185
|
+
"id": "CAMERA_ID",
|
|
186
|
+
"type": "STRING"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
170
190
|
{
|
|
171
191
|
"opcode": "cameraProfileRegistered",
|
|
172
192
|
"blockType": "BOOLEAN",
|
|
@@ -177,6 +197,16 @@
|
|
|
177
197
|
}
|
|
178
198
|
]
|
|
179
199
|
},
|
|
200
|
+
{
|
|
201
|
+
"opcode": "cameraProfileYaml",
|
|
202
|
+
"blockType": "REPORTER",
|
|
203
|
+
"arguments": [
|
|
204
|
+
{
|
|
205
|
+
"id": "CAMERA_ID",
|
|
206
|
+
"type": "STRING"
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
180
210
|
{
|
|
181
211
|
"opcode": "forgetCameraProfile",
|
|
182
212
|
"blockType": "COMMAND",
|
|
@@ -246,6 +276,16 @@
|
|
|
246
276
|
}
|
|
247
277
|
]
|
|
248
278
|
},
|
|
279
|
+
{
|
|
280
|
+
"opcode": "restoreStoredCameraProfileForDevice",
|
|
281
|
+
"blockType": "COMMAND",
|
|
282
|
+
"arguments": [
|
|
283
|
+
{
|
|
284
|
+
"id": "CAMERA_ID",
|
|
285
|
+
"type": "STRING"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
},
|
|
249
289
|
{
|
|
250
290
|
"opcode": "saveCameraProfile",
|
|
251
291
|
"blockType": "COMMAND",
|
|
@@ -271,6 +311,16 @@
|
|
|
271
311
|
}
|
|
272
312
|
]
|
|
273
313
|
},
|
|
314
|
+
{
|
|
315
|
+
"opcode": "startRequestedSharedCamera",
|
|
316
|
+
"blockType": "COMMAND",
|
|
317
|
+
"arguments": [
|
|
318
|
+
{
|
|
319
|
+
"id": "CAMERA_ID",
|
|
320
|
+
"type": "STRING"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
274
324
|
{
|
|
275
325
|
"opcode": "startSharedCamera",
|
|
276
326
|
"blockType": "COMMAND",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The profile contract as functions, for code that runs outside TurboWarp.
|
|
3
|
+
*
|
|
4
|
+
* `./runtime` names what another extension talks to at run time and deliberately carries no logic.
|
|
5
|
+
* This entry is the other half: reading and writing a calibration file, validating a document, and
|
|
6
|
+
* deciding whether a profile fits a camera, as plain functions over plain values. A test that checks
|
|
7
|
+
* a file a calibration app wrote, or a tool that prepares one, imports these instead of copying the
|
|
8
|
+
* rules -- a copy is checked against nothing, and the day the contract moved it would go on agreeing
|
|
9
|
+
* with itself.
|
|
10
|
+
*
|
|
11
|
+
* Nothing here touches a camera, a document, or the VM.
|
|
12
|
+
*/
|
|
13
|
+
export { CAMERA_INFO_EXTENSION_KEY, readCameraInfoYaml, serializeCameraInfoYaml, type CameraInfoReadResult } from './calibration/camera-info.js';
|
|
14
|
+
export { readProfileText, type ProfileTextResult } from './calibration/profile-text.js';
|
|
15
|
+
export { CAMERA_INTRINSIC_PROFILE_SCHEMA, CAMERA_INTRINSIC_PROFILE_VERSION, readCameraProfileDocument, serializeCameraIntrinsicProfile } from './calibration/profile.js';
|
|
16
|
+
export { evaluateProfileCompatibility } from './calibration/compatibility.js';
|
|
17
|
+
export { readCameraConditions } from './calibration/conditions.js';
|
|
18
|
+
export type { CompatibilityCode, CompatibilityFinding, CompatibilityReport, CompatibilityState } from './calibration/compatibility.js';
|
|
19
|
+
export type { CameraConditions } from './calibration/conditions.js';
|
|
20
|
+
export type { CalibrationCapture, CalibrationDeviceHint, CalibrationImage, CalibrationQuality, CameraDistortion, CameraIntrinsicProfileV1, CameraIntrinsics, DistortionModel, ProfileError, ProfileErrorCode, ProfileResult } from './calibration/types.js';
|
|
21
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,EAChC,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAClE,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACd,MAAM,wBAAwB,CAAC"}
|
package/dist/profile.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The profile contract as functions, for code that runs outside TurboWarp.
|
|
3
|
+
*
|
|
4
|
+
* `./runtime` names what another extension talks to at run time and deliberately carries no logic.
|
|
5
|
+
* This entry is the other half: reading and writing a calibration file, validating a document, and
|
|
6
|
+
* deciding whether a profile fits a camera, as plain functions over plain values. A test that checks
|
|
7
|
+
* a file a calibration app wrote, or a tool that prepares one, imports these instead of copying the
|
|
8
|
+
* rules -- a copy is checked against nothing, and the day the contract moved it would go on agreeing
|
|
9
|
+
* with itself.
|
|
10
|
+
*
|
|
11
|
+
* Nothing here touches a camera, a document, or the VM.
|
|
12
|
+
*/
|
|
13
|
+
export { CAMERA_INFO_EXTENSION_KEY, readCameraInfoYaml, serializeCameraInfoYaml } from './calibration/camera-info.js';
|
|
14
|
+
export { readProfileText } from './calibration/profile-text.js';
|
|
15
|
+
export { CAMERA_INTRINSIC_PROFILE_SCHEMA, CAMERA_INTRINSIC_PROFILE_VERSION, readCameraProfileDocument, serializeCameraIntrinsicProfile } from './calibration/profile.js';
|
|
16
|
+
export { evaluateProfileCompatibility } from './calibration/compatibility.js';
|
|
17
|
+
export { readCameraConditions } from './calibration/conditions.js';
|
|
18
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EAExB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EAEhB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,EAChC,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-camera-source",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
|
|
5
5
|
"description": "A TurboWarp capability extension for sharing one MediaDevices camera stream across extensions.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"types": "./dist/runtime.d.ts",
|
|
20
20
|
"import": "./dist/runtime.js"
|
|
21
21
|
},
|
|
22
|
+
"./profile": {
|
|
23
|
+
"types": "./dist/profile.d.ts",
|
|
24
|
+
"import": "./dist/profile.js"
|
|
25
|
+
},
|
|
22
26
|
"./package.json": "./package.json"
|
|
23
27
|
},
|
|
24
28
|
"files": [
|