@kubohiroya/turbowarp-photogrammetry 0.1.0 → 0.2.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 +2 -2
- package/dist/photogrammetry.js +61 -61
- package/package.json +3 -3
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
|
|
|
@@ -86,7 +86,7 @@ pnpm run test
|
|
|
86
86
|
pnpm run repo:check
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
Package identity: `@kubohiroya/turbowarp-photogrammetry@0.
|
|
89
|
+
Package identity: `@kubohiroya/turbowarp-photogrammetry@0.2.0` (initial scaffold; reconstruction algorithms are not implemented).
|
|
90
90
|
Bundle: `dist/photogrammetry.js`. Contract: `dist/extension-manifest.json`.
|
|
91
91
|
|
|
92
92
|
`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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-photogrammetry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.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",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@eslint/js": "^9.39.5",
|
|
58
|
-
"@kubohiroya/turbowarp-extension-manifest": "^0.2
|
|
59
|
-
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.
|
|
58
|
+
"@kubohiroya/turbowarp-extension-manifest": "^0.3.2",
|
|
59
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.8.0",
|
|
60
60
|
"@types/node": "^24.13.3",
|
|
61
61
|
"eslint": "^9.39.5",
|
|
62
62
|
"typescript": "^5.9.3",
|