@kubohiroya/turbowarp-photogrammetry 0.1.0 → 0.3.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 +1 -1
- package/README.md +4 -3
- package/dist/photogrammetry.js +61 -61
- package/docs/architecture.md +2 -1
- package/package.json +5 -5
- package/templates/README.md +2 -1
package/README.ja.md
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="assets/block-icon.svg" alt="" width="48" height="48">
|
|
4
4
|
|
|
5
|
-
[日本語](README.ja.md)
|
|
5
|
+
English | [日本語](README.ja.md)
|
|
6
6
|
|
|
7
7
|
Initial TurboWarp extension scaffold for photogrammetry. This repository is based on `turbowarp-extension-template` v0.4.0. The proposed runtime algorithms are not implemented yet.
|
|
8
8
|
|
|
@@ -72,11 +72,12 @@ Arrows indicate provider → consumer. This is a proposal; these integrations ar
|
|
|
72
72
|
|
|
73
73
|
## Requirements and safety
|
|
74
74
|
|
|
75
|
-
Node.js >=
|
|
75
|
+
Node.js >=24 and pnpm 11.28.8. The current sample runs sandboxed. Future camera/WebGPU integration requires an explicitly implemented unsandboxed runtime and capability checks. Published packages and hosted documentation are not available as part of this scaffold.
|
|
76
76
|
|
|
77
77
|
## Development
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
+
npm install --global corepack@latest
|
|
80
81
|
corepack enable
|
|
81
82
|
pnpm install --frozen-lockfile
|
|
82
83
|
pnpm run build
|
|
@@ -86,7 +87,7 @@ pnpm run test
|
|
|
86
87
|
pnpm run repo:check
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
Package identity: `@kubohiroya/turbowarp-photogrammetry@0.
|
|
90
|
+
Package identity: `@kubohiroya/turbowarp-photogrammetry@0.3.0` (initial scaffold; reconstruction algorithms are not implemented).
|
|
90
91
|
Bundle: `dist/photogrammetry.js`. Contract: `dist/extension-manifest.json`.
|
|
91
92
|
|
|
92
93
|
`pnpm run check` additionally checks generated files against Git. Run it after the initial files have been committed. No initial commit or remote publication is performed by scaffolding.
|
package/dist/photogrammetry.js
CHANGED
|
@@ -7,66 +7,66 @@
|
|
|
7
7
|
(function (Scratch) {
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
10
|
+
//#region src/config.ts
|
|
11
|
+
var extensionConfig = {
|
|
12
|
+
id: "kubohiroyaphotogrammetry",
|
|
13
|
+
slug: "photogrammetry",
|
|
14
|
+
name: "TurboWarp-Photogrammetry",
|
|
15
|
+
description: "Initial scaffold for photogrammetry.",
|
|
16
|
+
author: "Hiroya Kubo",
|
|
17
|
+
license: "MPL-2.0",
|
|
18
|
+
unsandboxed: false,
|
|
19
|
+
docsURI: "https://kubohiroya.github.io/turbowarp-photogrammetry/",
|
|
20
|
+
blockIconURI: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OCA0OCI+PHBhdGggZD0iTTI0IDEzbDEwIDZ2MTJsLTEwIDYtMTAtNlYxOXoiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzRDOTdGRiIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMyAxN2w4IDYtOCA2eiIgZmlsbD0iIzU5QzA1OSIvPjxwYXRoIGQ9Ik00NSAxN2wtOCA2IDggNnoiIGZpbGw9IiM1OUMwNTkiLz48L3N2Zz4="
|
|
21
|
+
};
|
|
22
|
+
var block_definitions_default = {
|
|
23
|
+
extensionName: "TurboWarp-Photogrammetry",
|
|
24
|
+
blocks: [{
|
|
25
|
+
"opcode": "hello",
|
|
26
|
+
"blockType": "REPORTER",
|
|
27
|
+
"text": "hello [NAME]",
|
|
28
|
+
"description": "Returns a localized greeting for the supplied name.",
|
|
29
|
+
"arguments": { "NAME": {
|
|
30
|
+
"type": "STRING",
|
|
31
|
+
"defaultValue": "world"
|
|
32
|
+
} }
|
|
33
|
+
}]
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/extension.ts
|
|
37
|
+
var blockDefinitions = block_definitions_default.blocks;
|
|
38
|
+
var PhotogrammetryExtension = class {
|
|
39
|
+
getInfo() {
|
|
40
|
+
return {
|
|
41
|
+
id: extensionConfig.id,
|
|
42
|
+
name: Scratch.translate(block_definitions_default.extensionName),
|
|
43
|
+
docsURI: extensionConfig.docsURI,
|
|
44
|
+
blockIconURI: extensionConfig.blockIconURI,
|
|
45
|
+
blocks: blockDefinitions.map((block) => this.toScratchBlock(block))
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
hello(args) {
|
|
49
|
+
return Scratch.translate({
|
|
50
|
+
default: "Hello, {name}!",
|
|
51
|
+
description: "{name} is replaced with the value supplied to the block."
|
|
52
|
+
}, { name: Scratch.Cast.toString(args.NAME) });
|
|
53
|
+
}
|
|
54
|
+
toScratchBlock(block) {
|
|
55
|
+
return {
|
|
56
|
+
opcode: block.opcode,
|
|
57
|
+
blockType: Scratch.BlockType[block.blockType],
|
|
58
|
+
text: Scratch.translate(block.text),
|
|
59
|
+
arguments: Object.fromEntries(Object.entries(block.arguments).map(([name, argument]) => [name, {
|
|
60
|
+
type: Scratch.ArgumentType[argument.type],
|
|
61
|
+
defaultValue: argument.defaultValue
|
|
62
|
+
}]))
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/index.ts
|
|
68
|
+
if (extensionConfig.unsandboxed && !Scratch.extensions.unsandboxed) throw new Error(`${extensionConfig.name} must run unsandboxed.`);
|
|
69
|
+
Scratch.extensions.register(new PhotogrammetryExtension());
|
|
70
|
+
//#endregion
|
|
71
71
|
|
|
72
72
|
})(Scratch);
|
package/docs/architecture.md
CHANGED
|
@@ -70,11 +70,12 @@ Arrows indicate provider → consumer. This is a proposal; these integrations ar
|
|
|
70
70
|
|
|
71
71
|
## Requirements and safety
|
|
72
72
|
|
|
73
|
-
Node.js >=
|
|
73
|
+
Node.js >=24 and pnpm 11.28.8. The current sample runs sandboxed. Future camera/WebGPU integration requires an explicitly implemented unsandboxed runtime and capability checks. Published packages and hosted documentation are not available as part of this scaffold.
|
|
74
74
|
|
|
75
75
|
## Development
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
+
npm install --global corepack@latest
|
|
78
79
|
corepack enable
|
|
79
80
|
pnpm install --frozen-lockfile
|
|
80
81
|
pnpm run build
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-photogrammetry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "WebGPUによる逐次3D再構成 for TurboWarp (initial scaffold; algorithms not implemented).",
|
|
5
5
|
"author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"access": "public",
|
|
36
36
|
"registry": "https://registry.npmjs.org/"
|
|
37
37
|
},
|
|
38
|
-
"packageManager": "pnpm@11.
|
|
38
|
+
"packageManager": "pnpm@11.28.8",
|
|
39
39
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
40
|
+
"node": ">=24"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "vite build --watch",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@eslint/js": "^9.39.5",
|
|
58
|
-
"@kubohiroya/turbowarp-extension-manifest": "^0.
|
|
59
|
-
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.
|
|
58
|
+
"@kubohiroya/turbowarp-extension-manifest": "^0.4.0",
|
|
59
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.9.0",
|
|
60
60
|
"@types/node": "^24.13.3",
|
|
61
61
|
"eslint": "^9.39.5",
|
|
62
62
|
"typescript": "^5.9.3",
|
package/templates/README.md
CHANGED
|
@@ -70,11 +70,12 @@ Arrows indicate provider → consumer. This is a proposal; these integrations ar
|
|
|
70
70
|
|
|
71
71
|
## Requirements and safety
|
|
72
72
|
|
|
73
|
-
Node.js >=
|
|
73
|
+
Node.js >=24 and pnpm 11.28.8. The current sample runs sandboxed. Future camera/WebGPU integration requires an explicitly implemented unsandboxed runtime and capability checks. Published packages and hosted documentation are not available as part of this scaffold.
|
|
74
74
|
|
|
75
75
|
## Development
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
+
npm install --global corepack@latest
|
|
78
79
|
corepack enable
|
|
79
80
|
pnpm install --frozen-lockfile
|
|
80
81
|
pnpm run build
|