@things-factory/figure-ui 10.1.114 → 10.1.116
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/client/graphql/index.ts +6 -1
- package/client/modeller/canvas.ts +6 -0
- package/client/modeller/editor.ts +4 -9
- package/client/modeller/figure-links.ts +20 -7
- package/client/modeller/figure-preview.ts +34 -10
- package/client/modeller/joint-drag.ts +3 -3
- package/client/modeller/links.ts +28 -11
- package/client/modeller/preview-model.ts +8 -0
- package/client/modeller/recipes.ts +6 -1
- package/client/pages/figure-list-page.ts +4 -4
- package/client/pages/figure-modeller-page.ts +7 -1
- package/client/types.ts +1 -1
- package/client/viewparts/detail-motion.ts +11 -0
- package/client/viewparts/figure-asset-viewer.ts +177 -0
- package/client/viewparts/figure-detail-dock.ts +187 -0
- package/dist-client/graphql/index.d.ts +5 -0
- package/dist-client/graphql/index.js +5 -1
- package/dist-client/graphql/index.js.map +1 -1
- package/dist-client/modeller/canvas.js +7 -0
- package/dist-client/modeller/canvas.js.map +1 -1
- package/dist-client/modeller/clips.d.ts +1 -1
- package/dist-client/modeller/editor.d.ts +3 -2
- package/dist-client/modeller/editor.js +4 -9
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/figure-links.js +35 -22
- package/dist-client/modeller/figure-links.js.map +1 -1
- package/dist-client/modeller/figure-preview.d.ts +2 -0
- package/dist-client/modeller/figure-preview.js +38 -10
- package/dist-client/modeller/figure-preview.js.map +1 -1
- package/dist-client/modeller/joint-drag.js +3 -3
- package/dist-client/modeller/joint-drag.js.map +1 -1
- package/dist-client/modeller/links.d.ts +18 -3
- package/dist-client/modeller/links.js +21 -10
- package/dist-client/modeller/links.js.map +1 -1
- package/dist-client/modeller/preview-model.d.ts +5 -0
- package/dist-client/modeller/preview-model.js +7 -0
- package/dist-client/modeller/preview-model.js.map +1 -1
- package/dist-client/modeller/recipes.js +5 -1
- package/dist-client/modeller/recipes.js.map +1 -1
- package/dist-client/pages/figure-list-page.d.ts +2 -3
- package/dist-client/pages/figure-list-page.js +4 -4
- package/dist-client/pages/figure-list-page.js.map +1 -1
- package/dist-client/pages/figure-modeller-page.d.ts +1 -0
- package/dist-client/pages/figure-modeller-page.js +7 -1
- package/dist-client/pages/figure-modeller-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types.d.ts +1 -1
- package/dist-client/types.js.map +1 -1
- package/dist-client/viewparts/detail-motion.d.ts +6 -0
- package/dist-client/viewparts/detail-motion.js +9 -0
- package/dist-client/viewparts/detail-motion.js.map +1 -0
- package/dist-client/viewparts/figure-asset-viewer.d.ts +31 -0
- package/dist-client/viewparts/figure-asset-viewer.js +198 -0
- package/dist-client/viewparts/figure-asset-viewer.js.map +1 -0
- package/dist-client/viewparts/figure-detail-dock.d.ts +36 -0
- package/dist-client/viewparts/figure-detail-dock.js +224 -0
- package/dist-client/viewparts/figure-detail-dock.js.map +1 -0
- package/package.json +6 -6
- package/test/browser/detail-page.js +34 -0
- package/test/browser/serve-detail.mjs +10 -0
- package/test/detail-motion.test.ts +26 -0
- package/test/links.test.ts +20 -1
- package/test/modeller-route.test.ts +12 -2
- package/test/preview.test.ts +39 -1
- package/test/verdict.test.ts +3 -1
- package/translations/en.json +19 -1
- package/translations/ja.json +19 -1
- package/translations/ko.json +19 -1
- package/translations/ms.json +19 -1
- package/translations/zh.json +19 -1
|
@@ -777,11 +777,13 @@ let FigureLinks = class FigureLinks extends localize(i18next)(LitElement) {
|
|
|
777
777
|
${now.travel
|
|
778
778
|
? html `<small>${i18next.t('figure.label.motion-travel-is', { part: now.travel.part, axis: now.travel.axis.toUpperCase(), plus: now.travel.plus ?? 0 })}</small>`
|
|
779
779
|
: nothing}
|
|
780
|
-
${now.follows
|
|
781
|
-
? html `<small>${i18next.t('figure.label.motion-follows', { joint: now.follows.joint, multiplier: now.follows.multiplier, offset: now.follows.offset
|
|
782
|
-
: now.
|
|
783
|
-
? html `<small>${
|
|
784
|
-
:
|
|
780
|
+
${now.follows?.sum.length === 1
|
|
781
|
+
? html `<small>${i18next.t('figure.label.motion-follows', { joint: now.follows.sum[0].joint, multiplier: now.follows.sum[0].multiplier, offset: now.follows.offset })}</small>`
|
|
782
|
+
: now.follows
|
|
783
|
+
? html `<small>${i18next.t('figure.label.motion-follow')}: ${now.follows.sum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')} + ${now.follows.offset}</small>`
|
|
784
|
+
: now.control
|
|
785
|
+
? html `<small>${now.control.id} (${now.control.unit}) ${now.control.min} … ${now.control.max}</small>`
|
|
786
|
+
: nothing}
|
|
785
787
|
</span>
|
|
786
788
|
<button
|
|
787
789
|
act
|
|
@@ -826,42 +828,53 @@ let FigureLinks = class FigureLinks extends localize(i18next)(LitElement) {
|
|
|
826
828
|
${AXES.map(a => html `<option value=${a} ?selected=${a === m.axis}>${i18next.t('figure.label.motion-axis')} ${a.toUpperCase()}</option>`)}
|
|
827
829
|
</select>
|
|
828
830
|
</div>
|
|
829
|
-
${
|
|
831
|
+
${m.followSum
|
|
830
832
|
? html `<div form>
|
|
831
833
|
<span>${i18next.t('figure.label.motion-follow')}</span>
|
|
834
|
+
<span>${m.followSum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')}</span>
|
|
835
|
+
<span>${i18next.t('figure.label.motion-offset')} (${unit})</span>
|
|
836
|
+
<input type="number" step="any" .value=${String(m.offset)} @change=${(e) => (this.motion = { ...m, offset: Number(e.target.value) || 0 })} />
|
|
837
|
+
</div>`
|
|
838
|
+
: leaders.length
|
|
839
|
+
? html `<div form>
|
|
840
|
+
<span>${i18next.t('figure.label.motion-follow')}</span>
|
|
832
841
|
<select @change=${(e) => (this.motion = { ...m, follow: e.target.value })}>
|
|
833
842
|
<option value="" ?selected=${!follow}>${i18next.t('figure.label.motion-own-control')}</option>
|
|
834
843
|
${leaders.map(j => html `<option value=${j.id} ?selected=${j.id === follow}>${j.body1.part}${j.state ? ` · ${j.state.id}` : ''}</option>`)}
|
|
835
844
|
</select>
|
|
836
845
|
</div>`
|
|
837
|
-
|
|
838
|
-
${
|
|
839
|
-
?
|
|
846
|
+
: nothing}
|
|
847
|
+
${m.followSum
|
|
848
|
+
? nothing
|
|
849
|
+
: follow
|
|
850
|
+
? html `<div form>
|
|
840
851
|
<span>${i18next.t('figure.label.motion-multiplier')}</span>
|
|
841
852
|
<input type="number" step="any" .value=${String(m.multiplier)} @change=${(e) => (this.motion = { ...m, multiplier: Number(e.target.value) })} />
|
|
842
853
|
<span>${i18next.t('figure.label.motion-offset')} (${unit})</span>
|
|
843
854
|
<input type="number" step="any" .value=${String(m.offset)} @change=${(e) => (this.motion = { ...m, offset: Number(e.target.value) || 0 })} />
|
|
844
855
|
</div>`
|
|
845
|
-
|
|
856
|
+
: html `<div form>
|
|
846
857
|
${m.kind === 'slide'
|
|
847
|
-
|
|
858
|
+
? html `<span>${i18next.t('figure.label.motion-travel')}</span>
|
|
848
859
|
<select @change=${(e) => (this.motion = { ...m, travel: e.target.value })}>
|
|
849
|
-
|
|
860
|
+
${m.travelSum
|
|
861
|
+
? html `<option value="" ?selected=${!m.travel}>${m.travelSum.sum.map(t => `${t.from.of === 'input' ? t.from.input : `${t.from.of === 'part' ? t.from.part : i18next.t('figure.label.motion-travel')} · ${t.from.axis.toUpperCase()}`}${t.times !== undefined && t.times !== 1 ? ` × ${t.times}` : ''}`).join(' + ')}</option>`
|
|
862
|
+
: html `<option value="" ?selected=${!m.travel}>${i18next.t('figure.label.motion-travel-mm')}</option>`}
|
|
850
863
|
${asset.appearance
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
864
|
+
.map(look => look.target)
|
|
865
|
+
.filter(one => canFollow(asset, one))
|
|
866
|
+
.flatMap(one => AXES.map(a => html `<option value=${`${one}:${a}`} ?selected=${m.travel === `${one}:${a}`}>${one} · ${a.toUpperCase()}</option>`))}
|
|
854
867
|
</select>
|
|
855
868
|
${m.travel
|
|
856
|
-
|
|
869
|
+
? html `<span>${i18next.t('figure.label.follows-plus')}</span>
|
|
857
870
|
<input type="number" step="any" .value=${String(m.travelPlus ?? 0)} @change=${(e) => (this.motion = { ...m, travelPlus: Number(e.target.value) || 0 })} />`
|
|
858
|
-
|
|
859
|
-
|
|
871
|
+
: nothing}`
|
|
872
|
+
: nothing}
|
|
860
873
|
<span>${i18next.t('figure.label.control-id')}</span>
|
|
861
874
|
<input .value=${m.id} placeholder=${`${this.partId}-${m.kind}`} @change=${(e) => (this.motion = { ...m, id: e.target.value.trim() })} />
|
|
862
|
-
${m.kind === 'continuous' || (m.kind === 'slide' && m.travel)
|
|
863
|
-
|
|
864
|
-
|
|
875
|
+
${m.kind === 'continuous' || (m.kind === 'slide' && (m.travel || m.travelSum))
|
|
876
|
+
? nothing
|
|
877
|
+
: html `<span>${i18next.t('figure.label.control-range')} (${unit})</span>
|
|
865
878
|
<div pair>
|
|
866
879
|
<input type="number" step="any" .value=${String(m.min)} @change=${(e) => (this.motion = { ...m, min: Number(e.target.value) })} />
|
|
867
880
|
<input type="number" step="any" .value=${String(m.max)} @change=${(e) => (this.motion = { ...m, max: Number(e.target.value) })} />
|
|
@@ -869,7 +882,7 @@ let FigureLinks = class FigureLinks extends localize(i18next)(LitElement) {
|
|
|
869
882
|
</div>`}
|
|
870
883
|
<button
|
|
871
884
|
act
|
|
872
|
-
?disabled=${this.locked || (follow ? !(Number.isFinite(m.multiplier) && m.multiplier !== 0) : m.kind !== 'continuous' && !(m.kind === 'slide' && m.travel) && !(m.max > m.min && m.min <= 0 && 0 <= m.max))}
|
|
885
|
+
?disabled=${this.locked || (m.followSum ? false : follow ? !(Number.isFinite(m.multiplier) && m.multiplier !== 0) : m.kind !== 'continuous' && !(m.kind === 'slide' && (m.travel || m.travelSum)) && !(m.max > m.min && m.min <= 0 && 0 <= m.max))}
|
|
873
886
|
title=${!follow && m.kind !== 'continuous' && !(m.min <= 0 && 0 <= m.max) ? i18next.t('figure.text.joint-range-holds-zero') : ''}
|
|
874
887
|
@click=${() => {
|
|
875
888
|
this.command({ kind: 'set-joint', joint: motionJoint(joint, { ...m, follow }, this.partId) });
|