@kubohiroya/turbowarp-camera-source 0.14.0 → 0.15.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 +6 -2
- package/README.md +6 -2
- package/dist/camera-source.js +9 -0
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -26,13 +26,13 @@ TurboWarp-Camera-Sourceは、MediaDevicesのカメラストリームを名前付
|
|
|
26
26
|
次のURLをunsandboxed custom extensionとして読み込みます。
|
|
27
27
|
|
|
28
28
|
```text
|
|
29
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-source@0.
|
|
29
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-source@0.15.0/dist/camera-source.js
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
npm hostでは次を使います。
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
pnpm add @kubohiroya/turbowarp-camera-source@0.
|
|
35
|
+
pnpm add @kubohiroya/turbowarp-camera-source@0.15.0
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Quick start
|
|
@@ -279,6 +279,10 @@ if <(stored camera profile result for [pose]) = [restored]> then
|
|
|
279
279
|
|
|
280
280
|
## 互換性
|
|
281
281
|
|
|
282
|
+
0.15.0では`getInfo()`に`docsURI`と`blockIconURI`を宣言した。この拡張を同梱するホストが、
|
|
283
|
+
パレットのアイコンとドキュメントボタンを描けるようになる。既存のブロックとcapabilityのメンバーは
|
|
284
|
+
変えていない。
|
|
285
|
+
|
|
282
286
|
0.14.0では呼び出し側が持っているstreamを共有する`adoptCamera`と、`./runtime`に`CameraAdoptOptions`・
|
|
283
287
|
`CameraLeaseOptions`の宣言を追加した。`CameraAcquireOptions`のメンバーは変えていない。既存のブロックと
|
|
284
288
|
capabilityのメンバーは変えていない。
|
package/README.md
CHANGED
|
@@ -30,13 +30,13 @@ or select separate cameras for separate roles.
|
|
|
30
30
|
Load this URL as an unsandboxed custom extension:
|
|
31
31
|
|
|
32
32
|
```text
|
|
33
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-source@0.
|
|
33
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-source@0.15.0/dist/camera-source.js
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
For npm hosts:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
pnpm add @kubohiroya/turbowarp-camera-source@0.
|
|
39
|
+
pnpm add @kubohiroya/turbowarp-camera-source@0.15.0
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Quick Start
|
|
@@ -680,6 +680,10 @@ profile), and save it. An app that opens the calibration app for one camera name
|
|
|
680
680
|
|
|
681
681
|
## Compatibility
|
|
682
682
|
|
|
683
|
+
Version 0.15.0 declares `docsURI` and `blockIconURI` in `getInfo()`, so a host that
|
|
684
|
+
bundles this extension can draw its palette icon and its documentation button. No existing block
|
|
685
|
+
or capability member changes.
|
|
686
|
+
|
|
683
687
|
Version 0.14.0 adds `adoptCamera` for sharing a stream the caller already holds, and the
|
|
684
688
|
`CameraAdoptOptions` and `CameraLeaseOptions` declarations to `./runtime`. `CameraAcquireOptions`
|
|
685
689
|
keeps every member it had. No existing block or capability member changes.
|
package/dist/camera-source.js
CHANGED
|
@@ -2288,6 +2288,13 @@
|
|
|
2288
2288
|
//#region src/extension.ts
|
|
2289
2289
|
var blockDefinitions = block_definitions_default.blocks;
|
|
2290
2290
|
var menuDefinitions = block_definitions_default.menus;
|
|
2291
|
+
/**
|
|
2292
|
+
* The documentation site this extension's palette button opens, and the icon the palette draws
|
|
2293
|
+
* on every block. Hosts that bundle several extensions read both out of `getInfo()`, so a
|
|
2294
|
+
* bundled Camera Source without them loses its docs button in the host's palette.
|
|
2295
|
+
*/
|
|
2296
|
+
var EXTENSION_DOCS_URI = "https://kubohiroya.github.io/turbowarp-camera-source/";
|
|
2297
|
+
var BLOCK_ICON_URI = `data:image/svg+xml,${encodeURIComponent("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><g fill=\"none\" stroke=\"#fff\" stroke-width=\"5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 20h24a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H12a4 4 0 0 1-4-4V24a4 4 0 0 1 4-4Z\"/><path d=\"m40 29 14-9v24l-14-9\"/></g></svg>")}`;
|
|
2291
2298
|
var defaultCameraId = "default";
|
|
2292
2299
|
function mediaDevices() {
|
|
2293
2300
|
const devices = globalThis.navigator?.mediaDevices;
|
|
@@ -2469,6 +2476,8 @@
|
|
|
2469
2476
|
return {
|
|
2470
2477
|
id: extensionConfig.id,
|
|
2471
2478
|
name: Scratch.translate(block_definitions_default.extensionName),
|
|
2479
|
+
docsURI: EXTENSION_DOCS_URI,
|
|
2480
|
+
blockIconURI: BLOCK_ICON_URI,
|
|
2472
2481
|
blocks: blockDefinitions.map((block) => this.toScratchBlock(block)),
|
|
2473
2482
|
menus: Object.fromEntries(Object.entries(menuDefinitions).map(([id, menu]) => [id, {
|
|
2474
2483
|
acceptReporters: menu.acceptReporters,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-camera-source",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.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",
|