@hatiolab/figure-model 0.1.82 → 0.1.83
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/CHANGELOG.md +21 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/v3-authoring-actions.d.ts +2 -0
- package/dist/v3-authoring-actions.d.ts.map +1 -1
- package/dist/v3-authoring-actions.js +4 -2
- package/dist/v3-authoring-actions.js.map +1 -1
- package/dist/v3-create.d.ts +14 -0
- package/dist/v3-create.d.ts.map +1 -1
- package/dist/v3-create.js +2 -1
- package/dist/v3-create.js.map +1 -1
- package/dist/v3-follow.d.ts +28 -0
- package/dist/v3-follow.d.ts.map +1 -0
- package/dist/v3-follow.js +68 -0
- package/dist/v3-follow.js.map +1 -0
- package/dist/v3-graph.d.ts.map +1 -1
- package/dist/v3-graph.js +12 -1
- package/dist/v3-graph.js.map +1 -1
- package/dist/v3-kernel-version.d.ts +1 -1
- package/dist/v3-kernel-version.js +1 -1
- package/dist/v3-proposal.js +2 -2
- package/dist/v3-proposal.js.map +1 -1
- package/dist/v3-recipe-build.d.ts +27 -0
- package/dist/v3-recipe-build.d.ts.map +1 -0
- package/dist/v3-recipe-build.js +118 -0
- package/dist/v3-recipe-build.js.map +1 -0
- package/dist/v3-recipe-from-parts.d.ts +8 -0
- package/dist/v3-recipe-from-parts.d.ts.map +1 -0
- package/dist/v3-recipe-from-parts.js +178 -0
- package/dist/v3-recipe-from-parts.js.map +1 -0
- package/dist/v3-recipe.d.ts +23 -0
- package/dist/v3-recipe.d.ts.map +1 -1
- package/dist/v3-recipe.js +43 -0
- package/dist/v3-recipe.js.map +1 -1
- package/package.json +2 -4
- package/recipes/hinged-door.json +0 -46
- package/recipes/roller-row.json +0 -19
- package/recipes/sliding-door.json +0 -69
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sliding-door",
|
|
3
|
-
"title": { "ko": "미닫이 문", "en": "sliding door" },
|
|
4
|
-
"description": {
|
|
5
|
-
"ko": "고른 부품의 앞면에 문틀과 미닫이 문짝을 넣습니다. 문틀은 그 부품의 폭과 높이를 따르고, 문짝은 열림 조작값 하나로 열립니다.",
|
|
6
|
-
"en": "A frame and sliding leaves on the chosen part's front. The frame follows the part's width and height; one control opens the leaves."
|
|
7
|
-
},
|
|
8
|
-
"target": "part",
|
|
9
|
-
"params": [
|
|
10
|
-
{ "name": "share", "kind": "ratio", "default": 0.35, "min": 0.05, "max": 0.95, "label": { "ko": "문틀 폭 (부품 폭에 대해)", "en": "frame width (of the part's)" } },
|
|
11
|
-
{ "name": "height", "kind": "ratio", "default": 0.95, "min": 0.3, "max": 1, "label": { "ko": "문틀 높이 (부품 높이에 대해)", "en": "frame height (of the part's)" } },
|
|
12
|
-
{ "name": "leaves", "kind": "choice", "default": 2, "options": [1, 2], "label": { "ko": "문짝 수", "en": "leaves" } },
|
|
13
|
-
{ "name": "lamp", "kind": "flag", "default": true, "label": { "ko": "열리면 켜지는 램프", "en": "a lamp lit while open" } }
|
|
14
|
-
],
|
|
15
|
-
"steps": [
|
|
16
|
-
{ "kind": "add-part", "part": { "id": "{id}-frame", "kind": "portal", "dimensions": { "width": 1400, "height": 2900, "depth": 300, "jamb": 300, "head": 700 } } },
|
|
17
|
-
{ "kind": "attach", "part": "{id}-frame", "face": "back", "to": { "part": "{target}", "face": "front" }, "align": { "y": "min" } },
|
|
18
|
-
{ "kind": "link-dimension", "part": "{id}-frame", "axis": "x", "source": { "of": "part", "part": "{target}", "axis": "x" }, "times": { "param": "share" }, "narrowRange": true },
|
|
19
|
-
{ "kind": "link-dimension", "part": "{id}-frame", "axis": "y", "source": { "of": "part", "part": "{target}", "axis": "y" }, "times": { "param": "height" }, "narrowRange": true },
|
|
20
|
-
|
|
21
|
-
{ "kind": "add-part", "part": { "id": "{id}-left", "kind": "box", "dimensions": { "width": 400, "height": 2200, "depth": 40 } } },
|
|
22
|
-
{ "when": { "param": "leaves", "is": 1 }, "kind": "link-dimension", "part": "{id}-left", "axis": "x", "source": { "of": "part", "part": "{id}-frame", "axis": "x" }, "plus": -600, "narrowRange": true },
|
|
23
|
-
{ "when": { "param": "leaves", "is": 2 }, "kind": "link-dimension", "part": "{id}-left", "axis": "x", "source": { "of": "part", "part": "{id}-frame", "axis": "x" }, "times": 0.5, "plus": -300, "narrowRange": true },
|
|
24
|
-
{ "kind": "link-dimension", "part": "{id}-left", "axis": "y", "source": { "of": "part", "part": "{id}-frame", "axis": "y" }, "plus": -700, "narrowRange": true },
|
|
25
|
-
{
|
|
26
|
-
"when": { "param": "leaves", "is": 1 },
|
|
27
|
-
"kind": "set-joint",
|
|
28
|
-
"joint": {
|
|
29
|
-
"id": "{id}-left", "type": "prismatic",
|
|
30
|
-
"body0": { "part": "{id}-frame", "face": "front" }, "body1": { "part": "{id}-left", "face": "back" },
|
|
31
|
-
"origin": { "facing": "meet", "align": { "y": "min" } },
|
|
32
|
-
"axis": "X", "lowerLimit": 0, "upperLimit": 1,
|
|
33
|
-
"travel": { "source": { "of": "part", "part": "{id}-left", "axis": "x" }, "times": -1 },
|
|
34
|
-
"state": { "id": "{id}-open" }
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"when": { "param": "leaves", "is": 2 },
|
|
39
|
-
"kind": "set-joint",
|
|
40
|
-
"joint": {
|
|
41
|
-
"id": "{id}-left", "type": "prismatic",
|
|
42
|
-
"body0": { "part": "{id}-frame", "face": "front" }, "body1": { "part": "{id}-left", "face": "back" },
|
|
43
|
-
"origin": { "facing": "meet", "align": { "y": "min", "x": { "mm": { "from": { "of": "part", "part": "{id}-frame", "axis": "x" }, "times": -0.25, "plus": 150 } } } },
|
|
44
|
-
"axis": "X", "lowerLimit": 0, "upperLimit": 1,
|
|
45
|
-
"travel": { "source": { "of": "part", "part": "{id}-left", "axis": "x" }, "times": -1 },
|
|
46
|
-
"state": { "id": "{id}-open" }
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
{ "when": { "param": "leaves", "is": 2 }, "kind": "add-part", "part": { "id": "{id}-right", "kind": "box", "dimensions": { "width": 400, "height": 2200, "depth": 40 } } },
|
|
51
|
-
{ "when": { "param": "leaves", "is": 2 }, "kind": "link-dimension", "part": "{id}-right", "axis": "x", "source": { "of": "part", "part": "{id}-left", "axis": "x" }, "narrowRange": true },
|
|
52
|
-
{ "when": { "param": "leaves", "is": 2 }, "kind": "link-dimension", "part": "{id}-right", "axis": "y", "source": { "of": "part", "part": "{id}-left", "axis": "y" }, "narrowRange": true },
|
|
53
|
-
{
|
|
54
|
-
"when": { "param": "leaves", "is": 2 },
|
|
55
|
-
"kind": "set-joint",
|
|
56
|
-
"joint": {
|
|
57
|
-
"id": "{id}-right", "type": "prismatic",
|
|
58
|
-
"body0": { "part": "{id}-frame", "face": "front" }, "body1": { "part": "{id}-right", "face": "back" },
|
|
59
|
-
"origin": { "facing": "meet", "align": { "y": "min", "x": { "mm": { "from": { "of": "part", "part": "{id}-frame", "axis": "x" }, "times": 0.25, "plus": -150 } } } },
|
|
60
|
-
"axis": "X",
|
|
61
|
-
"mimic": { "joint": "{id}-left", "multiplier": -1 }
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
{ "when": { "param": "lamp", "is": true }, "kind": "add-part", "part": { "id": "{id}-lamp", "kind": "cylinder", "dimensions": { "radius": 80, "length": 80 } } },
|
|
66
|
-
{ "when": { "param": "lamp", "is": true }, "kind": "attach", "part": "{id}-lamp", "face": "bottom", "to": { "part": "{id}-frame", "face": "top" } },
|
|
67
|
-
{ "when": { "param": "lamp", "is": true }, "kind": "set-visibility", "target": "{id}-lamp", "shownWhen": { "input": "{id}-open", "atLeast": 0.01 } }
|
|
68
|
-
]
|
|
69
|
-
}
|