@things-factory/figure-viewer 10.1.291 → 10.1.303

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.
@@ -0,0 +1,32 @@
1
+ /*
2
+ * A run that travels (ADR-0217 revision 7) seen in a preview: the figure is placed with `clipTravel: 'treadmill'`, so it
3
+ * stays where it is, and its floor grid flows back under it as far as its clips have carried it, one cell of the grid at
4
+ * a time. A planted foot is seen to stand, and the figure never runs out of view (the user, 2026-11-21: 「바닥 격자를
5
+ * 흘려 발이 붙어 보이게」). Every preview of a figure does this the same way: the modeller's and the catalogue's.
6
+ */
7
+ /** How a preview places its figure: the clip travels on a treadmill, never off the board. */
8
+ export const PREVIEW_CLIP_TRAVEL = 'treadmill';
9
+ /** Where the grid stands for a travel: back by what is left over a whole cell, so it flows and never runs out. */
10
+ export function floorShiftOf(travel, cell) {
11
+ return -(((travel % cell) + cell) % cell);
12
+ }
13
+ /**
14
+ * Follows the first figure's travel on the scene's floor grid, every frame, until the returned stop is called. `rootOf`
15
+ * gives the scene's root as it stands now: a preview makes its content again without making a new scene.
16
+ */
17
+ export function followTravelFloor(rootOf) {
18
+ let frame = 0;
19
+ const step = () => {
20
+ const root = rootOf();
21
+ const ground = root?.scene3d?.getObjectByName('coordinate-ground');
22
+ const grid = ground?.children[0];
23
+ const cell = Number(ground?.userData.step) || 0;
24
+ const travel = root?.components?.[0]?._realObject?.travelDrawn;
25
+ if (grid && cell > 0 && travel)
26
+ grid.position.set(floorShiftOf(travel.x, cell), 0, floorShiftOf(travel.z, cell));
27
+ frame = requestAnimationFrame(step);
28
+ };
29
+ frame = requestAnimationFrame(step);
30
+ return () => cancelAnimationFrame(frame);
31
+ }
32
+ //# sourceMappingURL=travel-floor.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/figure-viewer",
3
- "version": "10.1.291",
3
+ "version": "10.1.303",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "files": [
@@ -49,5 +49,5 @@
49
49
  "@things-factory/styles": "^10.1.281",
50
50
  "lit": "^3.1.2"
51
51
  },
52
- "gitHead": "994bc91b2d71513039c204560bb0571baa92ca0b"
52
+ "gitHead": "2d5888ebfc0a004b000a4aa3dfb8ff9561e75ff9"
53
53
  }
@@ -30,7 +30,6 @@
30
30
  "figure.label.tags": "tags",
31
31
  "figure.label.what-this-does": "function",
32
32
  "figure.text.detail-no-motion": "No motion is defined.",
33
- "figure.text.detail-clip-by-data": "The figure's data chooses the clip {clip}, and no data value turns into it, so it cannot be played here.",
34
33
  "figure.text.detail-thumbnail-failed": "could not save the thumbnail. try again.",
35
34
  "figure.text.detail-thumbnail-saved": "saved as the thumbnail",
36
35
  "figure.text.not-measured-yet": "not measured",
@@ -76,9 +75,11 @@
76
75
  "figure.label.detail-tab-properties": "Properties",
77
76
  "figure.label.detail-example": "Example data",
78
77
  "figure.text.detail-no-properties": "No properties a board sets.",
78
+ "label.data-values": "Data values",
79
79
  "label.design-inputs": "design values",
80
80
  "label.state-values": "state values",
81
81
  "label.clip-speeds": "clip speeds",
82
+ "label.clip-travel": "clip travel",
82
83
  "label.motion-groups": "motion groups",
83
84
  "label.slot-layout": "Slot layout",
84
85
  "figure.label.data-item-id": "item id",
@@ -101,5 +102,13 @@
101
102
  "figure.label.data-kind-boolean": "true/false",
102
103
  "figure.label.data-kind-text": "text",
103
104
  "figure.label.data-kind-object": "object",
104
- "figure.label.data-kind-list": "list"
105
+ "figure.label.data-kind-list": "list",
106
+ "figure.label.playback-speed": "speed",
107
+ "figure.label.joints-count": "Joint controls ({count})",
108
+ "figure.label.data-true": "true",
109
+ "figure.label.data-false": "false",
110
+ "figure.label.data-value-from-sample": "sample data",
111
+ "figure.text.data-value-from-sample": "The data tab's sample gives this value. Turn off 「apply to the preview」 in the data tab to set it here.",
112
+ "figure.text.control-played": "Playing",
113
+ "figure.text.control-played-explained": "The {clip} clip is moving this control. Stop the clip to give it a value."
105
114
  }
@@ -30,7 +30,6 @@
30
30
  "figure.label.tags": "etiquetas",
31
31
  "figure.label.what-this-does": "función",
32
32
  "figure.text.detail-no-motion": "No hay ningún movimiento definido.",
33
- "figure.text.detail-clip-by-data": "Los datos de la figura eligen el clip {clip} y ningún valor de datos lleva a él, así que no se puede reproducir aquí.",
34
33
  "figure.text.detail-thumbnail-failed": "no se pudo guardar la miniatura. inténtelo de nuevo.",
35
34
  "figure.text.detail-thumbnail-saved": "guardada como miniatura",
36
35
  "figure.text.not-measured-yet": "no medido",
@@ -76,9 +75,11 @@
76
75
  "figure.label.detail-tab-properties": "Propiedades",
77
76
  "figure.label.detail-example": "Datos de ejemplo",
78
77
  "figure.text.detail-no-properties": "No hay propiedades que fije el tablero.",
78
+ "label.data-values": "Valores de datos",
79
79
  "label.design-inputs": "valores de diseño",
80
80
  "label.state-values": "valores de estado",
81
81
  "label.clip-speeds": "velocidades de los clips",
82
+ "label.clip-travel": "desplazamiento de los clips",
82
83
  "label.motion-groups": "grupos de movimiento",
83
84
  "label.slot-layout": "Disposición de posiciones",
84
85
  "figure.label.data-item-id": "id del artículo",
@@ -101,5 +102,13 @@
101
102
  "figure.label.data-kind-boolean": "verdadero/falso",
102
103
  "figure.label.data-kind-text": "texto",
103
104
  "figure.label.data-kind-object": "objeto",
104
- "figure.label.data-kind-list": "lista"
105
+ "figure.label.data-kind-list": "lista",
106
+ "figure.label.playback-speed": "velocidad",
107
+ "figure.label.joints-count": "Controles de articulaciones ({count})",
108
+ "figure.label.data-true": "verdadero",
109
+ "figure.label.data-false": "falso",
110
+ "figure.label.data-value-from-sample": "datos de muestra",
111
+ "figure.text.data-value-from-sample": "La muestra de la pestaña de datos da este valor. Desactive «aplicar a la vista previa» en la pestaña de datos para fijarlo aquí.",
112
+ "figure.text.control-played": "En reproducción",
113
+ "figure.text.control-played-explained": "El clip {clip} está moviendo este control. Detén el clip para darle un valor."
105
114
  }
@@ -30,7 +30,6 @@
30
30
  "figure.label.tags": "タグ",
31
31
  "figure.label.what-this-does": "機能",
32
32
  "figure.text.detail-no-motion": "登録された動きがありません。",
33
- "figure.text.detail-clip-by-data": "{clip} クリップはこのFigureのデータが選びますが、そのクリップになるデータ値がないため、ここでは再生できません。",
34
33
  "figure.text.detail-thumbnail-failed": "サムネイルを保存できませんでした。もう一度お試しください。",
35
34
  "figure.text.detail-thumbnail-saved": "サムネイルに保存しました",
36
35
  "figure.text.not-measured-yet": "not measured",
@@ -76,9 +75,11 @@
76
75
  "figure.label.detail-tab-properties": "プロパティ",
77
76
  "figure.label.detail-example": "データ例",
78
77
  "figure.text.detail-no-properties": "ボードで設定するプロパティはありません。",
78
+ "label.data-values": "データ値",
79
79
  "label.design-inputs": "設計値",
80
80
  "label.state-values": "状態値",
81
81
  "label.clip-speeds": "クリップ速度",
82
+ "label.clip-travel": "クリップの移動",
82
83
  "label.motion-groups": "モーショングループ",
83
84
  "label.slot-layout": "位置の配置",
84
85
  "figure.label.data-item-id": "アイテムID",
@@ -101,5 +102,13 @@
101
102
  "figure.label.data-kind-boolean": "真偽",
102
103
  "figure.label.data-kind-text": "文字",
103
104
  "figure.label.data-kind-object": "オブジェクト",
104
- "figure.label.data-kind-list": "リスト"
105
+ "figure.label.data-kind-list": "リスト",
106
+ "figure.label.playback-speed": "再生速度",
107
+ "figure.label.joints-count": "関節の操作 {count}件",
108
+ "figure.label.data-true": "真",
109
+ "figure.label.data-false": "偽",
110
+ "figure.label.data-value-from-sample": "サンプルデータ",
111
+ "figure.text.data-value-from-sample": "データタブのサンプルデータがこの値を決めます。データタブで「プレビューに適用」をオフにするとここで変更できます。",
112
+ "figure.text.control-played": "再生中",
113
+ "figure.text.control-played-explained": "{clip} クリップがこの操作値を動かしています。クリップを止めると値を与えられます。"
105
114
  }
@@ -30,13 +30,12 @@
30
30
  "figure.label.tags": "태그",
31
31
  "figure.label.what-this-does": "기능",
32
32
  "figure.text.detail-no-motion": "등록된 움직임이 없습니다.",
33
- "figure.text.detail-clip-by-data": "{clip} 클립은 이 피규어의 데이터가 고르는데, 그 클립이 되는 데이터 값이 없어 여기서 재생할 수 없습니다.",
34
33
  "figure.text.detail-thumbnail-failed": "썸네일을 저장하지 못했습니다. 다시 시도하세요.",
35
34
  "figure.text.detail-thumbnail-saved": "썸네일로 저장했습니다",
36
35
  "figure.text.not-measured-yet": "미측정",
37
36
  "figure.text.place-accepts": "받는 것 {accepts}",
38
37
  "figure.text.place-accepts-any": "받는 것 모든 아이템",
39
- "figure.text.board-data-none": "이 피규어는 데이터 형식이 없습니다. 하나만 고르면 보입니다.",
38
+ "figure.text.board-data-none": "이 피규어는 데이터 형식이 없습니다. 하나만 선택하면 보입니다.",
40
39
  "figure.label.board-data-source-live": "데이터",
41
40
  "figure.label.board-data-source-manual": "저장값",
42
41
  "figure.label.board-data-source-default": "기본값",
@@ -76,9 +75,11 @@
76
75
  "figure.label.detail-tab-properties": "속성",
77
76
  "figure.label.detail-example": "예제 데이터",
78
77
  "figure.text.detail-no-properties": "보드에서 정하는 속성이 없습니다.",
78
+ "label.data-values": "데이터 값",
79
79
  "label.design-inputs": "설계값",
80
80
  "label.state-values": "상태값",
81
81
  "label.clip-speeds": "애니메이션 속도",
82
+ "label.clip-travel": "달리는 클립의 이동",
82
83
  "label.motion-groups": "동작 그룹",
83
84
  "label.slot-layout": "자리 배치",
84
85
  "figure.label.data-item-id": "아이템 ID",
@@ -101,5 +102,13 @@
101
102
  "figure.label.data-kind-boolean": "참/거짓",
102
103
  "figure.label.data-kind-text": "글자",
103
104
  "figure.label.data-kind-object": "객체",
104
- "figure.label.data-kind-list": "목록"
105
+ "figure.label.data-kind-list": "목록",
106
+ "figure.label.playback-speed": "배속",
107
+ "figure.label.joints-count": "관절 조작 {count}개",
108
+ "figure.label.data-true": "참",
109
+ "figure.label.data-false": "거짓",
110
+ "figure.label.data-value-from-sample": "견본 데이터",
111
+ "figure.text.data-value-from-sample": "데이터 탭의 견본 데이터가 이 값을 정합니다. 데이터 탭에서 「미리보기에 적용」을 끄면 여기서 바꿀 수 있습니다.",
112
+ "figure.text.control-played": "재생 중",
113
+ "figure.text.control-played-explained": "{clip} 클립이 이 조작값을 움직이고 있습니다. 클립을 멈추면 값을 줄 수 있습니다."
105
114
  }
@@ -30,7 +30,6 @@
30
30
  "figure.label.tags": "tag",
31
31
  "figure.label.what-this-does": "fungsi",
32
32
  "figure.text.detail-no-motion": "Tiada gerakan didaftarkan.",
33
- "figure.text.detail-clip-by-data": "Data figure ini memilih klip {clip}, dan tiada nilai data menjadi klip itu, jadi ia tidak boleh dimainkan di sini.",
34
33
  "figure.text.detail-thumbnail-failed": "lakaran kecil tidak dapat disimpan. cuba lagi.",
35
34
  "figure.text.detail-thumbnail-saved": "disimpan sebagai lakaran kecil",
36
35
  "figure.text.not-measured-yet": "not measured",
@@ -76,9 +75,11 @@
76
75
  "figure.label.detail-tab-properties": "Sifat",
77
76
  "figure.label.detail-example": "Contoh data",
78
77
  "figure.text.detail-no-properties": "Tiada sifat yang ditetapkan pada papan.",
78
+ "label.data-values": "Nilai data",
79
79
  "label.design-inputs": "nilai reka bentuk",
80
80
  "label.state-values": "nilai keadaan",
81
81
  "label.clip-speeds": "kelajuan klip",
82
+ "label.clip-travel": "gerakan klip",
82
83
  "label.motion-groups": "kumpulan gerakan",
83
84
  "label.slot-layout": "Susunan kedudukan",
84
85
  "figure.label.data-item-id": "id item",
@@ -101,5 +102,13 @@
101
102
  "figure.label.data-kind-boolean": "benar/palsu",
102
103
  "figure.label.data-kind-text": "teks",
103
104
  "figure.label.data-kind-object": "objek",
104
- "figure.label.data-kind-list": "senarai"
105
+ "figure.label.data-kind-list": "senarai",
106
+ "figure.label.playback-speed": "kelajuan",
107
+ "figure.label.joints-count": "Kawalan sendi ({count})",
108
+ "figure.label.data-true": "benar",
109
+ "figure.label.data-false": "palsu",
110
+ "figure.label.data-value-from-sample": "data sampel",
111
+ "figure.text.data-value-from-sample": "Sampel dalam tab data memberi nilai ini. Matikan 「guna pada pratonton」 dalam tab data untuk menetapkannya di sini.",
112
+ "figure.text.control-played": "Dimainkan",
113
+ "figure.text.control-played-explained": "Klip {clip} sedang menggerakkan kawalan ini. Hentikan klip untuk memberinya nilai."
105
114
  }
@@ -30,7 +30,6 @@
30
30
  "figure.label.tags": "标签",
31
31
  "figure.label.what-this-does": "功能",
32
32
  "figure.text.detail-no-motion": "没有已注册的动作。",
33
- "figure.text.detail-clip-by-data": "片段 {clip} 由此 Figure 的数据选择,但没有数据值对应它,因此无法在此播放。",
34
33
  "figure.text.detail-thumbnail-failed": "无法保存缩略图。请重试。",
35
34
  "figure.text.detail-thumbnail-saved": "已保存为缩略图",
36
35
  "figure.text.not-measured-yet": "not measured",
@@ -76,9 +75,11 @@
76
75
  "figure.label.detail-tab-properties": "属性",
77
76
  "figure.label.detail-example": "示例数据",
78
77
  "figure.text.detail-no-properties": "没有在看板中设置的属性。",
78
+ "label.data-values": "数据值",
79
79
  "label.design-inputs": "设计值",
80
80
  "label.state-values": "状态值",
81
81
  "label.clip-speeds": "动画速度",
82
+ "label.clip-travel": "片段位移",
82
83
  "label.motion-groups": "动作组",
83
84
  "label.slot-layout": "位置布局",
84
85
  "figure.label.data-item-id": "物品 ID",
@@ -101,5 +102,13 @@
101
102
  "figure.label.data-kind-boolean": "真/假",
102
103
  "figure.label.data-kind-text": "文本",
103
104
  "figure.label.data-kind-object": "对象",
104
- "figure.label.data-kind-list": "列表"
105
+ "figure.label.data-kind-list": "列表",
106
+ "figure.label.playback-speed": "播放速度",
107
+ "figure.label.joints-count": "关节操作 {count} 个",
108
+ "figure.label.data-true": "真",
109
+ "figure.label.data-false": "假",
110
+ "figure.label.data-value-from-sample": "示例数据",
111
+ "figure.text.data-value-from-sample": "此值由数据页的示例数据决定。在数据页关闭「应用到预览」后可在此修改。",
112
+ "figure.text.control-played": "播放中",
113
+ "figure.text.control-played-explained": "{clip} 片段正在驱动此控制值。停止片段后即可赋值。"
105
114
  }