@things-factory/figure-ui 10.1.45 → 10.1.47
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/modeller/angle-dial.ts +70 -0
- package/client/modeller/figure-settings.ts +328 -0
- package/client/modeller/figure-v3-capability.ts +137 -0
- package/client/modeller/figure-v3-clips.ts +253 -0
- package/client/modeller/figure-v3-controls.ts +212 -0
- package/client/modeller/figure-v3-links.ts +150 -79
- package/client/modeller/figure-v3-material.ts +108 -35
- package/client/modeller/figure-v3-parts.ts +96 -3
- package/client/modeller/figure-v3-preview.ts +326 -0
- package/client/modeller/figure-v3-properties.ts +29 -57
- package/client/modeller/figure-v3-verdict.ts +598 -60
- package/client/modeller/figure-view.ts +152 -0
- package/client/modeller/side-panel-styles.ts +326 -0
- package/client/modeller/v3-canvas.ts +221 -263
- package/client/modeller/v3-clips.ts +89 -0
- package/client/modeller/v3-controls.ts +54 -0
- package/client/modeller/v3-editor.ts +532 -223
- package/client/modeller/v3-fields.ts +62 -0
- package/client/modeller/v3-help.ts +41 -0
- package/client/modeller/v3-keys.ts +34 -0
- package/client/modeller/v3-links.ts +126 -10
- package/client/modeller/v3-live.ts +79 -0
- package/client/modeller/v3-maturity.ts +415 -0
- package/client/modeller/v3-palette.ts +45 -0
- package/client/modeller/v3-preview-model.ts +54 -0
- package/client/modeller/v3-stage-model.ts +159 -0
- package/client/pages/figure-list-page.ts +4 -4
- package/client/pages/figure-v3-modeller-page.ts +66 -134
- package/dist-client/modeller/angle-dial.d.ts +32 -0
- package/dist-client/modeller/angle-dial.js +41 -0
- package/dist-client/modeller/angle-dial.js.map +1 -0
- package/dist-client/modeller/figure-settings.d.ts +39 -0
- package/dist-client/modeller/figure-settings.js +317 -0
- package/dist-client/modeller/figure-settings.js.map +1 -0
- package/dist-client/modeller/figure-v3-capability.d.ts +22 -0
- package/dist-client/modeller/figure-v3-capability.js +141 -0
- package/dist-client/modeller/figure-v3-capability.js.map +1 -0
- package/dist-client/modeller/figure-v3-clips.d.ts +31 -0
- package/dist-client/modeller/figure-v3-clips.js +268 -0
- package/dist-client/modeller/figure-v3-clips.js.map +1 -0
- package/dist-client/modeller/figure-v3-controls.d.ts +36 -0
- package/dist-client/modeller/figure-v3-controls.js +226 -0
- package/dist-client/modeller/figure-v3-controls.js.map +1 -0
- package/dist-client/modeller/figure-v3-links.d.ts +10 -2
- package/dist-client/modeller/figure-v3-links.js +134 -79
- package/dist-client/modeller/figure-v3-links.js.map +1 -1
- package/dist-client/modeller/figure-v3-material.d.ts +5 -2
- package/dist-client/modeller/figure-v3-material.js +109 -35
- package/dist-client/modeller/figure-v3-material.js.map +1 -1
- package/dist-client/modeller/figure-v3-parts.d.ts +10 -0
- package/dist-client/modeller/figure-v3-parts.js +88 -3
- package/dist-client/modeller/figure-v3-parts.js.map +1 -1
- package/dist-client/modeller/figure-v3-preview.d.ts +34 -0
- package/dist-client/modeller/figure-v3-preview.js +322 -0
- package/dist-client/modeller/figure-v3-preview.js.map +1 -0
- package/dist-client/modeller/figure-v3-properties.d.ts +2 -2
- package/dist-client/modeller/figure-v3-properties.js +29 -57
- package/dist-client/modeller/figure-v3-properties.js.map +1 -1
- package/dist-client/modeller/figure-v3-verdict.d.ts +31 -17
- package/dist-client/modeller/figure-v3-verdict.js +579 -59
- package/dist-client/modeller/figure-v3-verdict.js.map +1 -1
- package/dist-client/modeller/figure-view.d.ts +118 -0
- package/dist-client/modeller/figure-view.js +78 -0
- package/dist-client/modeller/figure-view.js.map +1 -0
- package/dist-client/modeller/side-panel-styles.d.ts +23 -0
- package/dist-client/modeller/side-panel-styles.js +326 -0
- package/dist-client/modeller/side-panel-styles.js.map +1 -0
- package/dist-client/modeller/v3-canvas.d.ts +29 -37
- package/dist-client/modeller/v3-canvas.js +188 -260
- package/dist-client/modeller/v3-canvas.js.map +1 -1
- package/dist-client/modeller/v3-clips.d.ts +39 -0
- package/dist-client/modeller/v3-clips.js +58 -0
- package/dist-client/modeller/v3-clips.js.map +1 -0
- package/dist-client/modeller/v3-controls.d.ts +28 -0
- package/dist-client/modeller/v3-controls.js +28 -0
- package/dist-client/modeller/v3-controls.js.map +1 -0
- package/dist-client/modeller/v3-editor.d.ts +58 -1
- package/dist-client/modeller/v3-editor.js +556 -218
- package/dist-client/modeller/v3-editor.js.map +1 -1
- package/dist-client/modeller/v3-fields.d.ts +30 -0
- package/dist-client/modeller/v3-fields.js +46 -0
- package/dist-client/modeller/v3-fields.js.map +1 -0
- package/dist-client/modeller/v3-help.d.ts +18 -0
- package/dist-client/modeller/v3-help.js +37 -0
- package/dist-client/modeller/v3-help.js.map +1 -0
- package/dist-client/modeller/v3-keys.d.ts +14 -0
- package/dist-client/modeller/v3-keys.js +23 -0
- package/dist-client/modeller/v3-keys.js.map +1 -0
- package/dist-client/modeller/v3-links.d.ts +44 -2
- package/dist-client/modeller/v3-links.js +125 -8
- package/dist-client/modeller/v3-links.js.map +1 -1
- package/dist-client/modeller/v3-live.d.ts +31 -0
- package/dist-client/modeller/v3-live.js +58 -0
- package/dist-client/modeller/v3-live.js.map +1 -0
- package/dist-client/modeller/v3-maturity.d.ts +120 -0
- package/dist-client/modeller/v3-maturity.js +317 -0
- package/dist-client/modeller/v3-maturity.js.map +1 -0
- package/dist-client/modeller/v3-palette.d.ts +7 -0
- package/dist-client/modeller/v3-palette.js +42 -0
- package/dist-client/modeller/v3-palette.js.map +1 -0
- package/dist-client/modeller/v3-preview-model.d.ts +32 -0
- package/dist-client/modeller/v3-preview-model.js +48 -0
- package/dist-client/modeller/v3-preview-model.js.map +1 -0
- package/dist-client/modeller/v3-stage-model.d.ts +31 -0
- package/dist-client/modeller/v3-stage-model.js +121 -0
- package/dist-client/modeller/v3-stage-model.js.map +1 -0
- 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-v3-modeller-page.d.ts +2 -6
- package/dist-client/pages/figure-v3-modeller-page.js +64 -136
- package/dist-client/pages/figure-v3-modeller-page.js.map +1 -1
- package/dist-client/tsconfig.chk.tsbuildinfo +1 -0
- package/dist-client/tsconfig.scratch-fm.tsbuildinfo +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/test/v3-clips.test.ts +70 -0
- package/test/v3-controls.test.ts +68 -0
- package/test/v3-fields.test.ts +62 -0
- package/test/v3-gizmo.test.ts +3 -5
- package/test/v3-keys.test.ts +37 -0
- package/test/v3-layout.test.ts +78 -0
- package/test/v3-links.test.ts +118 -7
- package/test/v3-live.test.ts +99 -0
- package/test/v3-material.test.ts +6 -0
- package/test/v3-maturity.test.ts +268 -0
- package/test/v3-parts-wiring.test.ts +3 -1
- package/test/v3-preview.test.ts +42 -0
- package/test/v3-properties.test.ts +4 -2
- package/test/v3-scene-canvas.test.ts +85 -0
- package/test/v3-stage-model.test.ts +25 -0
- package/test/v3-theme.test.ts +16 -25
- package/test/v3-verdict.test.ts +12 -6
- package/test/v3-view.test.ts +20 -0
- package/translations/en.json +98 -5
- package/translations/ja.json +100 -7
- package/translations/ko.json +98 -5
- package/translations/ms.json +100 -7
- package/translations/zh.json +100 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figure-v3-verdict.js","sourceRoot":"","sources":["../../client/modeller/figure-v3-verdict.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB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;iDAAkC;AAEzB;IAAhB,KAAK,EAAE;;+CAAmB;AACV;IAAhB,KAAK,EAAE;;mDAAsC;AAC7B;IAAhB,KAAK,EAAE;;gDAAqB;AACZ;IAAhB,KAAK,EAAE;;+CAAuB;AA/EpB,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAqN3B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { parseV3Asset, v3CostOf } from '@hatiolab/figure-model'\n\nimport { inspectFigureDraft } from '../graphql/index.js'\nimport type { FigureInspection } from '../types.js'\nimport { gateFindingStyles, renderGateFinding } from './gate-findings.js'\nimport { capacityFrom, MEASURED } from './scene-budget.js'\nimport type { FigureCapacity } from './scene-budget.js'\n\n/** How long an edit settles before the server is asked again. One question per pause, not one per keystroke. */\nexport const VERDICT_SETTLE_MS = 400\n\n/**\n * 판정 — the V3 modeller's verdict while editing (parity row ①).\n *\n * The V2 modeller shows, as the author edits, how many of the figure fit on one screen and what would stop it\n * being published. The V3 page showed neither: the author learned what blocked a release only after saving, in the\n * release panel. This tab answers both from the source being edited.\n *\n * The count is computed here, from `v3CostOf` and the same `capacityFrom` the catalogue cards use, so the tab and\n * the card cannot disagree. The findings are not: they come from the server's release door (`inspectFigureDraft`),\n * the same door and the same sentences as the release panel. A second judgement on the screen would say something\n * different the first time either changed.\n *\n * No grade. V2's grade measures V2 reuse; nothing measures it for V3, so the tab shows no letter rather than one\n * nothing computed.\n */\n@customElement('figure-v3-verdict')\nexport class FigureV3Verdict extends localize(i18next)(LitElement) {\n static styles = [\n gateFindingStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n gap: 14px;\n padding: 12px;\n overflow: auto;\n font-size: 0.76rem;\n color: var(--md-sys-color-on-surface);\n }\n section > h3 {\n margin: 0 0 6px 0;\n font-size: var(--ui-t-micro, 11px);\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n p {\n margin: 4px 0 0;\n }\n p[lead],\n p[basis],\n p[quiet] {\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n div[count] {\n display: flex;\n align-items: baseline;\n gap: 6px;\n }\n span[capacity] {\n font-size: 2.1rem;\n font-weight: 800;\n line-height: 1;\n letter-spacing: -0.01em;\n color: var(--md-sys-color-primary);\n }\n span[unit] {\n font-size: 0.9rem;\n font-weight: 600;\n color: var(--md-sys-color-primary);\n }\n p[clear] {\n color: var(--md-sys-color-primary);\n font-weight: 600;\n }\n p[failed] {\n color: var(--md-sys-color-error);\n }\n button[fit] {\n align-self: flex-start;\n margin-top: 4px;\n padding: 4px 10px;\n font: inherit;\n color: var(--md-sys-color-on-secondary-container);\n background: var(--md-sys-color-secondary-container);\n border: none;\n border-radius: 999em;\n cursor: pointer;\n }\n `\n ]\n\n /** The source being edited, serialised. Every change of it is a new question. */\n @property({ type: String }) source?: string\n /** The saved row, if any — the server reads its type and last release from it. */\n @property({ type: String }) figureId?: string\n /** Changing the type changes the verdict (a temporary type is refused), so it is a reason to ask again. */\n @property({ type: String }) figureType?: string\n\n @state() private capacity?: FigureCapacity\n /** Bodies in the asset, drawn or hidden. With none there is nothing to fit the space to, so the button is not offered. */\n @state() private bodies = 0\n @state() private inspection?: FigureInspection\n @state() private failure = ''\n @state() private asking = false\n\n private timer?: ReturnType<typeof setTimeout>\n /** Answers can come back out of order; only the newest question's answer is shown. */\n private asked = 0\n\n disconnectedCallback() {\n clearTimeout(this.timer)\n super.disconnectedCallback()\n }\n\n updated(changes: Map<string, unknown>) {\n if (changes.has('source')) this.measure()\n if (changes.has('source') || changes.has('figureId') || changes.has('figureType')) this.schedule()\n }\n\n private measure() {\n let capacity: FigureCapacity | undefined\n let bodies = 0\n try {\n const cost = this.source ? v3CostOf(parseV3Asset(this.source)) : undefined\n capacity = cost ? capacityFrom(cost.groups, cost.triangles) : undefined\n bodies = cost ? cost.groups + cost.hidden : 0\n } catch {\n /* A source the format refuses has no count; the server's finding below says why. */\n capacity = undefined\n }\n this.capacity = capacity\n this.bodies = bodies\n this.dispatchEvent(new CustomEvent('capacity-changed', { detail: { instances: capacity?.instances } }))\n }\n\n private schedule() {\n clearTimeout(this.timer)\n if (!this.source) {\n this.inspection = undefined\n return\n }\n this.timer = setTimeout(() => this.ask(), VERDICT_SETTLE_MS)\n }\n\n private async ask() {\n const question = ++this.asked\n const source = this.source!\n this.asking = true\n try {\n const inspection = await inspectFigureDraft(source, this.figureId)\n if (question !== this.asked) return\n this.inspection = inspection\n this.failure = ''\n } catch (error) {\n if (question !== this.asked) return\n /* The server's reason as it gave it — the screen does not make one up. The last answer is dropped with it. */\n this.inspection = undefined\n this.failure = error instanceof Error ? error.message : String(error)\n } finally {\n if (question === this.asked) this.asking = false\n }\n }\n\n render() {\n return html`${this.renderCount()} ${this.renderGate()}`\n }\n\n private renderCount() {\n const capacity = this.capacity\n return html`\n <section>\n <h3>${i18next.t('figure.label.maturity')}</h3>\n <p lead>${i18next.t('figure.text.how-many-fit')}</p>\n ${capacity\n ? html`\n <div count>\n <span capacity>${capacity.instances.toLocaleString()}</span>\n <span unit>${i18next.t('figure.text.instances-unit')}</span>\n </div>\n <p basis>\n ${i18next.t('figure.text.bound-by-' + capacity.bound, {\n per: capacity.per.toLocaleString(),\n budget: capacity.budget.toLocaleString()\n })}\n <em>\n ${capacity.bound === 'groups'\n ? i18next.t('figure.text.budget-measured-on', { gpu: MEASURED.gpu, on: MEASURED.on })\n : i18next.t('figure.text.budget-not-measured-yet')}\n </em>\n </p>\n `\n : html`<p quiet>${i18next.t('figure.text.maturity-blocked-no-parts')}</p>`}\n </section>\n `\n }\n\n private renderGate() {\n const findings = this.inspection?.findings ?? []\n const blocking = findings.filter(finding => finding.blocking)\n const advisory = findings.filter(finding => !finding.blocking)\n return html`\n <section>\n <h3>${i18next.t('figure.label.release-verdict')}</h3>\n ${this.failure\n ? html`<p failed role=\"alert\">${i18next.t('figure.text.verdict-not-received', { reason: this.failure })}</p>`\n : !this.inspection\n ? html`<p quiet>${i18next.t(this.asking ? 'figure.text.verdict-asking' : 'figure.text.verdict-waiting')}</p>`\n : blocking.length\n ? html`<p>${i18next.t('figure.text.cannot-release-now')}</p>`\n : html`<p clear>${i18next.t('figure.text.nothing-blocks-release')}</p>`}\n ${blocking.length\n ? html`<ul gate>\n <li head>${i18next.t('figure.text.must-fix-to-release')}</li>\n ${blocking.map(finding => renderGateFinding(finding, true, this.actionsFor(finding.code)))}\n </ul>`\n : nothing}\n ${advisory.length\n ? html`<ul gate>\n <li head quiet>${i18next.t('figure.text.does-not-block')}</li>\n ${advisory.map(finding => renderGateFinding(finding, false))}\n </ul>`\n : nothing}\n </section>\n `\n }\n\n /** The same way out the release panel offers for the same two findings — declare the space from the parts. */\n private actionsFor(code: string) {\n if (code !== 'part-outside-occupancy' && code !== 'occupancy-undeclared') return nothing\n /* A new figure with no parts is refused as undeclared too, but fitting needs parts to measure (seen 2026-09-24). */\n if (!this.bodies) return nothing\n return html`<button fit @click=${this.fit}>${i18next.t('figure.button.fit-base-to-parts')}</button>`\n }\n\n private fit = () => {\n this.dispatchEvent(new CustomEvent('fit-base-to-parts', { bubbles: true, composed: true }))\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"figure-v3-verdict.js","sourceRoot":"","sources":["../../client/modeller/figure-v3-verdict.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBA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AoB;AAG9B;IAAhB,KAAK,EAAE;;+CAA0B;AAEjB;IAAhB,KAAK,EAAE;;+CAAmB;AAEV;IAAhB,KAAK,EAAE;;iDAAyB;AAChB;IAAhB,KAAK,EAAE;;mDAAsC;AAC7B;IAAhB,KAAK,EAAE;;gDAAqB;AACZ;IAAhB,KAAK,EAAE;;+CAAuB;AAxVpB,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA8tB3B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing, svg } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { LIMITS, parseV3Asset, V3_PER_INSTANCE, v3CostOf } from '@hatiolab/figure-model'\n\nimport { inspectFigureDraft } from '../graphql/index.js'\nimport type { FigureInspection } from '../types.js'\nimport { gateFindingStyles, renderGateFinding } from './gate-findings.js'\nimport { MEASURED } from './scene-budget.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { budgetOf, CURVE_SIZE, curveLayout, GRADE_SCALE, shortNumber, v3ReportOf } from './v3-maturity.js'\nimport type { V3BudgetUse, V3MaturityAxis, V3Report } from './v3-maturity.js'\n\n/** How long an edit settles before the server is asked again. One question per pause, not one per keystroke. */\nexport const VERDICT_SETTLE_MS = 400\n\n/**\n * 성숙도 — the V3 modeller's verdict while editing (parity row ①), laid out as V2's report (`figure-report.ts`).\n *\n * V2's report showed, as the author edits: how many fit on one screen with the grade beside it and the budget that\n * decided the grade, the grade scale, six maturity axes as a radar and a list, the budget bars, the drawing cost,\n * the reuse trend, and the findings. The first V3 tab kept only the count and the findings (user, 2026-09-24:\n * 「분석부분도 많이 부족하고, 왜 이렇게 너프되었는지」). This is V2's report again, over V3 numbers.\n *\n * ## What is computed where\n *\n * The numbers come from `v3-maturity.ts`, which reads the evaluated asset the way the V3 renderer draws it — the\n * screen calls and shows, it does not count. The count uses the same `capacityFrom` the catalogue cards use, so the\n * tab and the card cannot disagree.\n *\n * The findings do not come from here: they come from the server's release door (`inspectFigureDraft`), the same\n * door and the same sentences as the release panel. A second judgement on the screen would say something different\n * the first time either changed. V2's report drew its findings from `validate`; V3's release judgement is the\n * server's, so that section is the server's answer.\n *\n * ## The grade\n *\n * figure-model's `v3ScoreOf`, which the catalogue uses too: headroom against placing `LIMITS.screenInstances` of the\n * figure on one screen (chief architect, 2026-09-24) -- the screen's measured groups and its triangle target shared\n * per instance -- and V2's rule limits for independently moved parts and transparent materials, decided by the\n * tightest, on V2's scale. The two V2 budgets V3 has no field for are left out and the tab says so.\n */\n/** A per-instance share of the screen is not a whole number; what an instance may draw is the whole part of it. */\nconst limitOf = (use: V3BudgetUse) => Math.floor(use.limit).toLocaleString()\n\n@customElement('figure-v3-verdict')\nexport class FigureV3Verdict extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n SidePanelStyles,\n gateFindingStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n }\n section p {\n margin: 0;\n }\n\n /* ── How many fit ───────────────────────────────────────────────\n The value of low poly is how many can stand on one screen, so that answer leads. The grade says whether\n the shape keeps inside its declared limits, so it is the small badge beside it. */\n p[lead],\n p[basis],\n p[quiet] {\n font-size: 0.74rem;\n line-height: 1.55;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n p[basis] em {\n font-style: normal;\n color: var(--md-sys-color-tertiary);\n }\n div[verdict] {\n display: flex;\n align-items: baseline;\n gap: 6px;\n }\n span[capacity] {\n font-size: 2.1rem;\n font-weight: 800;\n line-height: 1;\n letter-spacing: -0.01em;\n color: var(--md-sys-color-primary);\n }\n span[unit] {\n font-size: 0.9rem;\n font-weight: 600;\n color: var(--md-sys-color-primary);\n }\n /* The badge says what it measures (headroom), so its number is not read as a score out of 100. */\n span[grade] {\n display: flex;\n align-items: baseline;\n gap: 5px;\n margin-left: auto;\n padding: 3px 10px;\n font-size: 0.76rem;\n font-weight: 700;\n color: var(--md-sys-color-on-primary-container);\n background-color: var(--md-sys-color-primary-container);\n border-radius: 999em;\n }\n span[grade] small {\n display: inline;\n margin: 0;\n font-size: 0.68rem;\n font-weight: 500;\n color: inherit;\n }\n /* C keeps within the limit. Red is for over it (D) only; red on a kept limit asks for a fix nothing needs. */\n span[grade][tight] {\n color: var(--md-sys-color-on-tertiary-container);\n background-color: var(--md-sys-color-tertiary-container);\n }\n span[grade][over] {\n color: var(--md-sys-color-on-error-container);\n background-color: var(--md-sys-color-error-container);\n }\n p[because] {\n font-size: 0.78rem;\n line-height: 1.6;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n p[because] strong {\n color: var(--md-sys-color-on-surface);\n }\n /* The grade scale. Not folded away: it is compared against every time, not learned once. */\n p[scale] {\n display: flex;\n flex-wrap: wrap;\n gap: 2px 10px;\n font-size: 0.7rem;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n p[scale] b {\n font-weight: 700;\n }\n p[scale] span[now] {\n color: var(--md-sys-color-on-surface);\n }\n p[scale] span[now] b {\n color: var(--md-sys-color-primary);\n }\n\n /* ── Maturity radar ─────────────────────────────────────────────\n Only the measured axes are drawn; an unmeasured one drawn as a spoke reads as a dent, which is a zero. */\n div[radar] {\n display: flex;\n justify-content: center;\n padding: 2px 0 6px 0;\n color: var(--md-sys-color-primary);\n }\n div[radar] svg {\n width: 100%;\n max-width: 240px;\n height: auto;\n }\n div[radar] polygon[web] {\n fill: none;\n stroke: var(--md-sys-color-outline-variant);\n stroke-width: 0.6;\n }\n div[radar] line[spoke] {\n stroke: var(--md-sys-color-outline-variant);\n stroke-width: 0.6;\n }\n div[radar] polygon[shape] {\n fill: color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);\n stroke: var(--md-sys-color-primary);\n stroke-width: 1.4;\n stroke-linejoin: round;\n }\n div[radar] circle[dot] {\n fill: var(--md-sys-color-primary);\n }\n div[radar] text {\n font-size: 5.2px;\n fill: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n p[unmeasured] {\n font-size: 0.7rem;\n line-height: 1.5;\n color: var(--md-sys-color-tertiary);\n }\n\n /* ── Axes and budgets ───────────────────────────────────────────\n Not merged into one number: merged, 「what to fix」 disappears. */\n ul[axes],\n ul[budgets] {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 7px;\n }\n ul[axes] li,\n ul[budgets] li {\n display: grid;\n grid-template-columns: 1fr auto;\n gap: 2px 8px;\n font-size: 0.75rem;\n }\n ul[axes] li[blocked] {\n opacity: 0.7;\n }\n ul[axes] em {\n grid-column: 1 / -1;\n font-style: normal;\n font-size: 0.68rem;\n line-height: 1.5;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n ul[axes] li[blocked] em {\n color: var(--md-sys-color-tertiary);\n }\n span[reading] {\n font-family: var(--mono-font, monospace);\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n div[bar] {\n grid-column: 1 / -1;\n height: 4px;\n background-color: var(--md-sys-color-surface-container-highest);\n border-radius: 2px;\n overflow: hidden;\n }\n div[bar] > i {\n display: block;\n height: 100%;\n background-color: var(--md-sys-color-primary);\n }\n div[bar] > i[tight] {\n background-color: var(--md-sys-color-error);\n }\n\n /* ── Drawing cost ─────────────────────────────────────────────── */\n dl[metrics] {\n margin: 0;\n display: grid;\n grid-template-columns: 1fr auto;\n gap: 4px 8px;\n font-size: 0.78rem;\n }\n dl[metrics] dt {\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n dl[metrics] dd {\n margin: 0;\n text-align: right;\n font-family: var(--mono-font, monospace);\n }\n\n /* ── Trend ──────────────────────────────────────────────────────\n The chart's natural size is 680px; in a 300px side its words are 4px. The side holds a button, the chart\n opens at its own size. */\n button[expand] {\n justify-self: start;\n padding: 4px 10px;\n font: inherit;\n font-size: 0.74rem;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[expand]:hover {\n background-color: var(--md-sys-color-surface-container);\n }\n div[sheet] {\n position: fixed;\n inset: 0;\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n background-color: color-mix(in srgb, var(--md-sys-color-scrim, black) 32%, transparent);\n }\n div[sheet] > figure {\n max-width: 100%;\n max-height: 100%;\n margin: 0;\n padding: 12px;\n overflow: auto;\n color: var(--md-sys-color-on-surface);\n background-color: var(--md-sys-color-surface-container-lowest);\n border-radius: 6px;\n box-shadow: 0 8px 32px color-mix(in srgb, var(--md-sys-color-shadow, black) 28%, transparent);\n }\n div[sheet] svg {\n display: block;\n /* Not shrunk below its natural size — a narrow window scrolls instead. */\n min-width: 680px;\n font-family: inherit;\n font-size: 11px;\n fill: currentColor;\n }\n div[sheet] svg [grid] {\n stroke: currentColor;\n stroke-opacity: 0.12;\n }\n div[sheet] svg [muted] {\n opacity: 0.55;\n }\n div[sheet] svg path[series] {\n fill: none;\n stroke-width: 2;\n stroke-linejoin: round;\n }\n div[sheet] svg [series='triangles'] {\n stroke: var(--md-sys-color-error);\n fill: var(--md-sys-color-error);\n }\n div[sheet] svg [series='drawCalls'] {\n stroke: var(--md-sys-color-tertiary);\n fill: var(--md-sys-color-tertiary);\n }\n div[sheet] svg [series='geometries'] {\n stroke: var(--md-sys-color-primary);\n fill: var(--md-sys-color-primary);\n }\n div[sheet] svg [series='materials'] {\n stroke: var(--md-sys-color-secondary);\n fill: var(--md-sys-color-secondary);\n }\n div[sheet] svg path[series],\n div[sheet] svg line[series] {\n fill: none;\n }\n /* A legend value is written in its line's colour, not outlined in it. */\n div[sheet] svg text[series] {\n stroke: none;\n }\n div[sheet] figcaption {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n div[sheet] button[close] {\n padding: 5px 14px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 999em;\n cursor: pointer;\n }\n\n /* ── Release verdict ───────────────────────────────────────────── */\n p[clear] {\n color: var(--md-sys-color-primary);\n font-weight: 600;\n }\n p[failed] {\n color: var(--md-sys-color-error);\n }\n button[fit] {\n align-self: flex-start;\n margin-top: 4px;\n padding: 4px 10px;\n font: inherit;\n color: var(--md-sys-color-on-secondary-container);\n background: var(--md-sys-color-secondary-container);\n border: none;\n border-radius: 999em;\n cursor: pointer;\n }\n `\n ]\n\n /** The source being edited, serialised. Every change of it is a new question. */\n @property({ type: String }) source?: string\n /** The saved row, if any — the server reads its type and last release from it. */\n @property({ type: String }) figureId?: string\n /** Changing the type changes the verdict (a temporary type is refused), so it is a reason to ask again. */\n @property({ type: String }) figureType?: string\n\n /** The report over the source being edited. Absent when nothing is drawn, or the format refuses the source. */\n @state() private report?: V3Report\n /** Bodies in the asset, drawn or hidden. With none there is nothing to fit the space to, so the button is not offered. */\n @state() private bodies = 0\n /** Whether the trend chart is open at its own size. */\n @state() private expanded = false\n @state() private inspection?: FigureInspection\n @state() private failure = ''\n @state() private asking = false\n\n private timer?: ReturnType<typeof setTimeout>\n /** Answers can come back out of order; only the newest question's answer is shown. */\n private asked = 0\n\n disconnectedCallback() {\n clearTimeout(this.timer)\n super.disconnectedCallback()\n }\n\n updated(changes: Map<string, unknown>) {\n if (changes.has('source')) this.measure()\n if (changes.has('source') || changes.has('figureId') || changes.has('figureType')) this.schedule()\n }\n\n private measure() {\n let report: V3Report | undefined\n let bodies = 0\n try {\n const asset = this.source ? parseV3Asset(this.source) : undefined\n const cost = asset ? v3CostOf(asset) : undefined\n bodies = cost ? cost.groups + cost.hidden : 0\n report = asset ? v3ReportOf(asset) : undefined\n } catch {\n /* A source the format refuses has no report; the server's finding below says why. */\n report = undefined\n }\n this.report = report\n this.bodies = bodies\n if (!report) this.expanded = false\n this.dispatchEvent(new CustomEvent('capacity-changed', { detail: { instances: report?.capacity.instances, budget: budgetOf(report) } }))\n }\n\n private schedule() {\n clearTimeout(this.timer)\n if (!this.source) {\n this.inspection = undefined\n return\n }\n this.timer = setTimeout(() => this.ask(), VERDICT_SETTLE_MS)\n }\n\n private async ask() {\n const question = ++this.asked\n const source = this.source!\n this.asking = true\n try {\n const inspection = await inspectFigureDraft(source, this.figureId)\n if (question !== this.asked) return\n this.inspection = inspection\n this.failure = ''\n } catch (error) {\n if (question !== this.asked) return\n /* The server's reason as it gave it — the screen does not make one up. The last answer is dropped with it. */\n this.inspection = undefined\n this.failure = error instanceof Error ? error.message : String(error)\n } finally {\n if (question === this.asked) this.asking = false\n }\n }\n\n render() {\n /*\n With nothing drawn the report is guidance, not a verdict: the sections below have meaning only over parts,\n and a number drawn from nothing reads as zero, which reads as bad. The release verdict stays — a new figure\n is already refused for its undeclared space, and the way out is offered there.\n */\n const report = this.report\n if (!report) {\n return html`\n <section>\n <h3>${i18next.t('figure.label.maturity')}</h3>\n <p quiet>${i18next.t('figure.text.report-appears-when-you-add-a-part')}</p>\n </section>\n ${this.renderGate()}\n `\n }\n return html`\n ${this.renderVerdict(report)} ${this.renderAxes(report)} ${this.renderBudgets(report)} ${this.renderMetrics(report)}\n ${this.renderCurve()} ${this.renderGate()} ${this.renderSheet(report)}\n `\n }\n\n /**\n * The head — how many fit, with the grade beside it, the budget that decided it, the scale, and the basis.\n *\n * The count's denominator is measured (2026-09-18, Apple M5) and says so with the machine and the date; the\n * triangle side is still the design document's target and says that.\n */\n private renderVerdict(report: V3Report) {\n const { capacity, score } = report\n return html`\n <section>\n <h3>${i18next.t('figure.label.maturity')}</h3>\n <p lead>${i18next.t('figure.label.axis-scale')} — ${i18next.t('figure.text.how-many-fit')}</p>\n <div verdict>\n <span capacity>${capacity.instances.toLocaleString()}</span>\n <span unit>${i18next.t('figure.text.instances-unit')}</span>\n <span\n grade\n ?tight=${score.grade === 'C'}\n ?over=${score.grade === 'D'}\n title=${i18next.t('figure.text.grade-explained', { target: LIMITS.screenInstances })}\n >\n ${score.grade}\n <small>${i18next.t('figure.text.headroom-percent', { percent: score.score })}</small>\n </span>\n </div>\n <p because>\n ${i18next.t('figure.text.grade-decided-by')}\n <strong>${i18next.t('figure.label.budget-' + score.tightest.key)}</strong>\n — ${score.tightest.used.toLocaleString()} / ${limitOf(score.tightest)} (${Math.round(score.tightest.ratio * 100)}%)\n </p>\n <p basis>\n ${i18next.t('figure.text.grade-target', {\n target: LIMITS.screenInstances,\n groups: Math.floor(V3_PER_INSTANCE.groups),\n triangles: Math.floor(V3_PER_INSTANCE.triangles).toLocaleString()\n })}\n </p>\n ${this.renderGradeScale(score.grade)}\n <p basis>\n ${i18next.t('figure.text.bound-by-' + capacity.bound, {\n per: capacity.per.toLocaleString(),\n budget: capacity.budget.toLocaleString()\n })}\n <em>\n ${capacity.bound === 'groups'\n ? i18next.t('figure.text.budget-measured-on', { gpu: MEASURED.gpu, on: MEASURED.on })\n : i18next.t('figure.text.budget-not-measured-yet')}\n </em>\n </p>\n </section>\n `\n }\n\n /** A · B · C · D and where this figure stands, drawn from the bounds the grade is computed with. */\n private renderGradeScale(now: string) {\n const bounds = [...GRADE_SCALE.map(([grade, bound]) => [grade, `≤ ${bound * 100}%`]), ['D', '> 100%']]\n return html`\n <p scale>\n <span>${i18next.t('figure.text.grade-scale-lead')}</span>\n ${bounds.map(([grade, bound]) => html`<span ?now=${grade === now}><b>${grade}</b> ${bound}</span>`)}\n </p>\n `\n }\n\n /**\n * Maturity by axis — a radar of the measured axes, a line naming the unmeasured ones, and the list.\n *\n * Scale is left out of the list: it leads the tab, and the same number twice reads as two different things.\n */\n private renderAxes(report: V3Report) {\n const measured = report.axes.filter(axis => axis.ratio !== undefined)\n const unmeasured = report.axes.filter(axis => axis.ratio === undefined)\n return html`\n <section>\n <h3>${i18next.t('figure.label.by-axis')}</h3>\n <div radar>${this.renderRadar(measured)}</div>\n ${unmeasured.length\n ? html`<p unmeasured>\n ${i18next.t('figure.text.axes-not-measurable-yet', {\n axes: unmeasured.map(axis => i18next.t('figure.label.axis-' + axis.key)).join(' · ')\n })}\n </p>`\n : nothing}\n <ul axes>\n ${report.axes.filter(axis => axis.key !== 'scale').map(axis => this.renderAxis(axis))}\n </ul>\n </section>\n `\n }\n\n /** V2's radar: rings at a third, two thirds and full, short names so the left edge is not cut. */\n private renderRadar(axes: V3MaturityAxis[]) {\n const cx = 60\n const cy = 46\n const r = 28\n const at = (index: number, ratio: number) => {\n const angle = -Math.PI / 2 + (index * 2 * Math.PI) / axes.length\n return [cx + r * ratio * Math.cos(angle), cy + r * ratio * Math.sin(angle)]\n }\n const clamp = (ratio?: number) => Math.max(0.04, Math.min(1, ratio ?? 0))\n const points = axes.map((axis, index) => at(index, clamp(axis.ratio)).map(n => n.toFixed(1)).join(',')).join(' ')\n\n return svg`\n <svg viewBox=\"0 0 120 96\" aria-hidden=\"true\">\n ${[0.33, 0.66, 1].map(\n ring => svg`<polygon web points=${axes.map((_, i) => at(i, ring).map(n => n.toFixed(1)).join(',')).join(' ')}></polygon>`\n )}\n ${axes.map((_, index) => {\n const [x, y] = at(index, 1)\n return svg`<line spoke x1=${cx} y1=${cy} x2=${x.toFixed(1)} y2=${y.toFixed(1)}></line>`\n })}\n <polygon shape points=${points}></polygon>\n ${axes.map((axis, index) => {\n const [x, y] = at(index, clamp(axis.ratio))\n return svg`<circle dot cx=${x.toFixed(1)} cy=${y.toFixed(1)} r=\"1.4\"></circle>`\n })}\n ${axes.map((axis, index) => {\n const [x, y] = at(index, 1.28)\n const anchor = x < cx - 3 ? 'end' : x > cx + 3 ? 'start' : 'middle'\n return svg`<text x=${x.toFixed(1)} y=${(y + 1.8).toFixed(1)} text-anchor=${anchor}>${i18next.t('figure.label.axis-' + axis.key + '-short')}</text>`\n })}\n </svg>\n `\n }\n\n private renderAxis(axis: V3MaturityAxis) {\n const name = i18next.t('figure.label.axis-' + axis.key)\n if (axis.blocked) {\n return html`\n <li blocked>\n <span>${name}</span>\n <span reading>${i18next.t('figure.text.not-measurable-yet')}</span>\n <em>${i18next.t(axis.blocked)}</em>\n </li>\n `\n }\n const ratio = Math.max(0, Math.min(1, axis.ratio ?? 0))\n return html`\n <li>\n <span>${name}</span>\n <span reading>${axis.readingKey ? i18next.t(axis.readingKey) : (axis.reading ?? '')}</span>\n <div bar><i style=\"width:${Math.round(ratio * 100)}%\"></i></div>\n ${axis.because ? html`<em>${i18next.t(axis.because)}</em>` : nothing}\n </li>\n `\n }\n\n /** The budget bars. The one closest to its limit is coloured — it decided the grade. */\n private renderBudgets(report: V3Report) {\n const { score } = report\n return html`\n <section>\n <h3>${i18next.t('figure.label.budgets')}</h3>\n <ul budgets>\n ${score.budgets.map(\n use => html`\n <li>\n <span>${i18next.t('figure.label.budget-' + use.key)}</span>\n <span>${use.used.toLocaleString()} / ${limitOf(use)}</span>\n <div bar><i ?tight=${use.key === score.tightest.key} style=\"width:${Math.round(Math.min(1, use.ratio) * 100)}%\"></i></div>\n </li>\n `\n )}\n </ul>\n <p quiet>${i18next.t('figure.text.budgets-not-in-v3')}</p>\n </section>\n `\n }\n\n private renderMetrics(report: V3Report) {\n return html`\n <section>\n <h3>${i18next.t('figure.label.weight')}</h3>\n <dl metrics>\n <dt>${i18next.t('figure.label.triangles')}</dt>\n <dd>${report.cost.triangles.toLocaleString()}</dd>\n <dt>${i18next.t('figure.label.distinct-shapes')}</dt>\n <dd>${report.distinctShapes}</dd>\n <dt>${i18next.t('figure.label.distinct-materials')}</dt>\n <dd>${report.distinctMaterials}</dd>\n </dl>\n </section>\n `\n }\n\n private renderCurve() {\n return html`\n <section>\n <h3>${i18next.t('figure.label.reuse-trend')}</h3>\n <button expand @click=${() => (this.expanded = true)}>${i18next.t('figure.button.see-the-trend-chart')}</button>\n </section>\n `\n }\n\n /**\n * The trend at its own size — V2's chart: both axes logarithmic, the growing lines against the flat ones, and a\n * legend with each line's value at the last count.\n */\n private renderSheet(report: V3Report) {\n if (!this.expanded) return nothing\n const layout = curveLayout(report.curve)\n if (!layout) return nothing\n const { width, height, pad } = CURVE_SIZE\n const plotW = width - pad.left - pad.right\n const plotH = height - pad.top - pad.bottom\n const last = report.curve[report.curve.length - 1]!\n const label = (key: string) =>\n i18next.t(\n {\n triangles: 'figure.label.triangles',\n drawCalls: 'figure.label.draw-calls',\n geometries: 'figure.label.vertex-buffers',\n materials: 'figure.label.distinct-materials'\n }[key]!\n )\n\n return html`\n <div sheet @click=${() => (this.expanded = false)}>\n <figure @click=${(e: Event) => e.stopPropagation()}>\n ${svg`\n <svg viewBox=\"0 0 ${width} ${height}\" width=${width} height=${height} role=\"img\">\n <text x=${pad.left} y=\"22\" font-size=\"13\" font-weight=\"600\">${i18next.t('figure.text.trend-chart-title')}</text>\n <text x=${pad.left} y=\"38\" muted>${i18next.t('figure.text.trend-chart-lead')}</text>\n ${layout.yTicks.map(\n tick => svg`\n <line grid x1=${pad.left} y1=${tick.y.toFixed(1)} x2=${(pad.left + plotW).toFixed(1)} y2=${tick.y.toFixed(1)}></line>\n <text muted x=${pad.left - 8} y=${(tick.y + 3.5).toFixed(1)} text-anchor=\"end\">${tick.label}</text>\n `\n )}\n ${layout.xTicks.map(\n tick => svg`\n <line grid x1=${tick.x.toFixed(1)} y1=${pad.top} x2=${tick.x.toFixed(1)} y2=${(pad.top + plotH).toFixed(1)}></line>\n <text muted x=${tick.x.toFixed(1)} y=${(pad.top + plotH + 16).toFixed(1)} text-anchor=\"middle\">${tick.label}</text>\n `\n )}\n <text muted x=${(pad.left + plotW / 2).toFixed(1)} y=${height - 8} text-anchor=\"middle\">${i18next.t('figure.label.instance-count')}</text>\n ${layout.lines.map(\n line => svg`<path series=${line.key} d=${line.d} stroke-dasharray=${line.dashed ? '3 7' : 'none'}></path>`\n )}\n <g transform=\"translate(${width - pad.right + 14}, ${pad.top - 6})\">\n <text x=\"0\" y=\"0\" font-weight=\"600\">${i18next.t('figure.text.trend-at-count', { n: shortNumber(last.instances) })}</text>\n ${layout.lines.map((line, i) => {\n const y = 24 + i * 34\n return svg`\n <line series=${line.key} x1=\"0\" y1=${y - 4} x2=\"18\" y2=${y - 4} stroke-width=\"2\" stroke-dasharray=${line.dashed ? '3 7' : 'none'}></line>\n <text x=\"24\" y=${y}>${label(line.key)}</text>\n <text series=${line.key} x=\"24\" y=${y + 12} font-weight=\"600\">\n ${line.last.toLocaleString()}${line.flat ? ` · ${i18next.t('figure.text.trend-stays')}` : ''}\n </text>\n `\n })}\n ${layout.overlap !== undefined\n ? svg`<text muted x=\"0\" y=${24 + layout.lines.length * 34 + 6}>${i18next.t('figure.text.trend-flat-lines-overlap', { value: layout.overlap.toLocaleString() })}</text>`\n : nothing}\n </g>\n </svg>\n `}\n <figcaption>\n <button close @click=${() => (this.expanded = false)}>${i18next.t('figure.button.close')}</button>\n </figcaption>\n </figure>\n </div>\n `\n }\n\n private renderGate() {\n const findings = this.inspection?.findings ?? []\n const blocking = findings.filter(finding => finding.blocking)\n const advisory = findings.filter(finding => !finding.blocking)\n return html`\n <section>\n <h3>${i18next.t('figure.label.release-verdict')}</h3>\n ${this.failure\n ? html`<p failed role=\"alert\">${i18next.t('figure.text.verdict-not-received', { reason: this.failure })}</p>`\n : !this.inspection\n ? html`<p quiet>${i18next.t(this.asking ? 'figure.text.verdict-asking' : 'figure.text.verdict-waiting')}</p>`\n : blocking.length\n ? html`<p>${i18next.t('figure.text.cannot-release-now')}</p>`\n : html`<p clear>${i18next.t('figure.text.nothing-blocks-release')}</p>`}\n ${blocking.length\n ? html`<ul gate>\n <li head>${i18next.t('figure.text.must-fix-to-release')}</li>\n ${blocking.map(finding => renderGateFinding(finding, true, this.actionsFor(finding.code)))}\n </ul>`\n : nothing}\n ${advisory.length\n ? html`<ul gate>\n <li head quiet>${i18next.t('figure.text.does-not-block')}</li>\n ${advisory.map(finding => renderGateFinding(finding, false))}\n </ul>`\n : nothing}\n </section>\n `\n }\n\n /** The same way out the release panel offers for the same two findings — declare the space from the parts. */\n private actionsFor(code: string) {\n if (code !== 'part-outside-occupancy' && code !== 'occupancy-undeclared') return nothing\n /* A new figure with no parts is refused as undeclared too, but fitting needs parts to measure (seen 2026-09-24). */\n if (!this.bodies) return nothing\n return html`<button fit @click=${this.fit}>${i18next.t('figure.button.fit-base-to-parts')}</button>`\n }\n\n private fit = () => {\n this.dispatchEvent(new CustomEvent('fit-base-to-parts', { bubbles: true, composed: true }))\n }\n}\n"]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 저작 화면의 **보기 설정**.
|
|
3
|
+
*
|
|
4
|
+
* ## 저장되지 않는다
|
|
5
|
+
*
|
|
6
|
+
* 이것은 자산이 아니라 **작업대**다. 조명을 밝게 하고 바닥을 켠 것은 그 사람이 지금
|
|
7
|
+
* 보기 편한 상태일 뿐, 그 자산의 성질이 아니다. 그래서 `FigureSource` 에 안 들어간다 —
|
|
8
|
+
* `toFigureSource` 는 판에서 `width` · `height` · `depth` 와 몇 가지만 집어 가고 나머지는
|
|
9
|
+
* 버린다.
|
|
10
|
+
*
|
|
11
|
+
* 다른 사람이 같은 자산을 열면 자기 설정으로 본다. 그것이 맞다.
|
|
12
|
+
*
|
|
13
|
+
* ## 씬이 아는 이름을 그대로 쓴다
|
|
14
|
+
*
|
|
15
|
+
* 여기 이름은 전부 `model-layer` 의 상태 이름이다. 옮겨 적는 표를 두지 않는다 — 표를
|
|
16
|
+
* 두면 씬이 새 설정을 받아도 이쪽이 모른다.
|
|
17
|
+
*
|
|
18
|
+
* 값이 바뀌면 씬이 스스로 반영한다(`three-capability` 의 `onchange`). 다만 `grid` 는
|
|
19
|
+
* 한동안 3D 를 세울 때만 읽혔다 — things-scene 10.1.5 에서 고쳤다.
|
|
20
|
+
*/
|
|
21
|
+
export interface ViewSettings {
|
|
22
|
+
/**
|
|
23
|
+
* 어떤 도면에 놓인 것으로 보나 — 씬 전체의 좌표 모드.
|
|
24
|
+
*
|
|
25
|
+
* **도형의 `placement` 와 다른 것이다.** 도형의 것은 「이 종류는 바닥에 서나, 천장에
|
|
26
|
+
* 매달리나」이고, 이것은 「지금 보고 있는 도면이 어느 쪽을 기준으로 재나」다. 바닥
|
|
27
|
+
* 기준 도면에 천정 기반 OHT 를 놓으면 도면은 안 뒤집히고 OHT 가 천장 높이에 매달린다.
|
|
28
|
+
*
|
|
29
|
+
* 한동안 도형의 `placement` 를 이 자리에 흘려 넣었다. 모델러에 도형이 하나뿐이라
|
|
30
|
+
* 그럴듯해 보였지만, 그러면 도형의 성질이 씬 전체를 뒤집는다 — 도면에서는 성립할 수가
|
|
31
|
+
* 없고(도면에는 도형이 여럿이다), 저작 중에는 배치를 고를 때마다 저작자가 적어 둔
|
|
32
|
+
* 높이가 전부 다른 숫자로 보였다.
|
|
33
|
+
*
|
|
34
|
+
* 씬의 낱말 그대로다: `floor` 바닥 기준 · `space` 중심 기준(바닥 없음) · `inverted`
|
|
35
|
+
* 천장 기준. **미리보기에만 먹인다** — 편집 캔버스의 `zPos` 는 저작자가 직접 적는
|
|
36
|
+
* 숫자라 그 뜻이 보기 설정에 따라 바뀌면 안 된다.
|
|
37
|
+
*/
|
|
38
|
+
placement: 'floor' | 'space' | 'inverted';
|
|
39
|
+
/**
|
|
40
|
+
* 천장 높이 (mm). 천정 기반 도형을 미리보기에서 어디에 매달 것인가.
|
|
41
|
+
*
|
|
42
|
+
* 도형은 제가 놓일 방의 높이를 모른다. 도면은 알지만 미리보기에는 도면이 없으므로,
|
|
43
|
+
* 저작자가 가정할 값을 여기서 정한다.
|
|
44
|
+
*/
|
|
45
|
+
ceilingHeight: number;
|
|
46
|
+
/** 좌표 바탕(축 가이드). 원점과 눈금을 보인다. */
|
|
47
|
+
grid: boolean;
|
|
48
|
+
/** 축 이름표(X · Y · Z). 눈금만 두고 글자를 끌 수 있다. */
|
|
49
|
+
gridLabels: boolean;
|
|
50
|
+
/** 판의 바닥면. 좌표 바탕과 겹치므로 기본은 끈다. */
|
|
51
|
+
floor: boolean;
|
|
52
|
+
/** Environment — 반사(IBL). 금속 재질이 무엇을 비출지 정한다. */
|
|
53
|
+
environment: EnvironmentName;
|
|
54
|
+
/** Sky Color — 배경색. */
|
|
55
|
+
skyColor: string;
|
|
56
|
+
/** Key Light Intensity. */
|
|
57
|
+
dirLightIntensity: number;
|
|
58
|
+
/** Key Light — Follow Camera. 끄면 그림자 방향이 고정된다. */
|
|
59
|
+
dirLightFollowCamera: boolean;
|
|
60
|
+
/** Key Light — Cast Shadow. */
|
|
61
|
+
dirShadowEnabled: boolean;
|
|
62
|
+
/** Hemisphere Light Intensity — 그늘진 면을 들어올린다. */
|
|
63
|
+
hemiIntensity: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 환경 프리셋 — **`scene-manager` 의 `SkyPreset` 과 같은 여덟이다.**
|
|
67
|
+
*
|
|
68
|
+
* 한동안 다섯만 적었다. 씬은 여덟을 다 받는데 이쪽이 셋을 몰라서 고를 수 없었다.
|
|
69
|
+
* operato-board 의 3D 씬 속성 패널도 같은 여덟을 보인다.
|
|
70
|
+
*/
|
|
71
|
+
export declare const ENVIRONMENTS: readonly ["studio", "warehouse", "factory", "office", "home", "sunny", "cloudy", "rainy"];
|
|
72
|
+
export type EnvironmentName = (typeof ENVIRONMENTS)[number];
|
|
73
|
+
/**
|
|
74
|
+
* 씬에 그대로 넣는 보기 설정 — **좌표 기준과 천장 높이는 빼고.**
|
|
75
|
+
*
|
|
76
|
+
* 나머지는 전부 `model-layer` 의 상태 이름이라 그대로 넣으면 씬이 알아서 반응한다.
|
|
77
|
+
* 그런데 `placement` 는 편집 캔버스에 들어가면 안 되고(거기는 늘 상자 기준이다),
|
|
78
|
+
* `ceilingHeight` 는 씬이 모르는 이름이다.
|
|
79
|
+
*
|
|
80
|
+
* **rest spread 로 넘기지 않으려고 이 함수가 있다.** 캔버스가 한동안
|
|
81
|
+
* `const { grid, ..., ...light } = view` 로 나머지를 통째로 넘겼는데, 그러면 설정을
|
|
82
|
+
* 하나 더할 때마다 그것이 두 화면에 **말없이** 실린다. 새로 더한 좌표 기준이 바로
|
|
83
|
+
* 그 길로 캔버스에 들어갈 뻔했다.
|
|
84
|
+
*/
|
|
85
|
+
export declare function sceneLook(view: ViewSettings): Record<string, unknown>;
|
|
86
|
+
/**
|
|
87
|
+
* 씬의 좌표 기준 — **씬의 낱말 그대로 셋이다.**
|
|
88
|
+
*
|
|
89
|
+
* 형식의 `floor` · `center` · `ceiling` 과 짝이 맞지만 철자가 다르다. 옮겨 적는 표를 두지
|
|
90
|
+
* 않는 것이 이 파일의 규칙이므로 씬 쪽을 쓴다. 화면에는 둘 다 보인다 — 「천장 기준
|
|
91
|
+
* (inverted)」.
|
|
92
|
+
*/
|
|
93
|
+
export declare const SCENE_REFERENCES: readonly ["floor", "space", "inverted"];
|
|
94
|
+
/** 배경색 기본값. 회색이라 부품 색이 제 색으로 보인다. */
|
|
95
|
+
export declare const WORKBENCH = "#7c7c7c";
|
|
96
|
+
/**
|
|
97
|
+
* 처음 값.
|
|
98
|
+
*
|
|
99
|
+
* **지금 저작 화면이 실제로 쓰던 값 그대로다.** 설정을 만들면서 화면이 달라지면
|
|
100
|
+
* 무엇이 설정 때문이고 무엇이 원래 그랬는지 갈리지 않는다.
|
|
101
|
+
*/
|
|
102
|
+
export declare const DEFAULT_VIEW: ViewSettings;
|
|
103
|
+
/**
|
|
104
|
+
* How tall the preview board is: enough room for the tallest instance where the figure actually stands.
|
|
105
|
+
*
|
|
106
|
+
* A floor or center figure stands on the floor, so the tallest instance is the whole height. Only a
|
|
107
|
+
* ceiling figure needs the room up to the ceiling. The board used to reach the ceiling for every figure,
|
|
108
|
+
* which made a 920 tall AGV preview 4400 tall.
|
|
109
|
+
*
|
|
110
|
+
* This is an envelope, not a placement rule: where each instance goes is still the scene's
|
|
111
|
+
* (`FigureRealObject.effectiveZPos`), and the camera fits what the scene drew.
|
|
112
|
+
*/
|
|
113
|
+
export declare function previewBoardDepth(figure: {
|
|
114
|
+
placement?: 'floor' | 'ceiling' | 'center';
|
|
115
|
+
base: {
|
|
116
|
+
y: number;
|
|
117
|
+
};
|
|
118
|
+
}, ceilingHeight: number, factor: number): number;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 환경 프리셋 — **`scene-manager` 의 `SkyPreset` 과 같은 여덟이다.**
|
|
3
|
+
*
|
|
4
|
+
* 한동안 다섯만 적었다. 씬은 여덟을 다 받는데 이쪽이 셋을 몰라서 고를 수 없었다.
|
|
5
|
+
* operato-board 의 3D 씬 속성 패널도 같은 여덟을 보인다.
|
|
6
|
+
*/
|
|
7
|
+
export const ENVIRONMENTS = [
|
|
8
|
+
'studio',
|
|
9
|
+
'warehouse',
|
|
10
|
+
'factory',
|
|
11
|
+
'office',
|
|
12
|
+
'home',
|
|
13
|
+
'sunny',
|
|
14
|
+
'cloudy',
|
|
15
|
+
'rainy'
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* 씬에 그대로 넣는 보기 설정 — **좌표 기준과 천장 높이는 빼고.**
|
|
19
|
+
*
|
|
20
|
+
* 나머지는 전부 `model-layer` 의 상태 이름이라 그대로 넣으면 씬이 알아서 반응한다.
|
|
21
|
+
* 그런데 `placement` 는 편집 캔버스에 들어가면 안 되고(거기는 늘 상자 기준이다),
|
|
22
|
+
* `ceilingHeight` 는 씬이 모르는 이름이다.
|
|
23
|
+
*
|
|
24
|
+
* **rest spread 로 넘기지 않으려고 이 함수가 있다.** 캔버스가 한동안
|
|
25
|
+
* `const { grid, ..., ...light } = view` 로 나머지를 통째로 넘겼는데, 그러면 설정을
|
|
26
|
+
* 하나 더할 때마다 그것이 두 화면에 **말없이** 실린다. 새로 더한 좌표 기준이 바로
|
|
27
|
+
* 그 길로 캔버스에 들어갈 뻔했다.
|
|
28
|
+
*/
|
|
29
|
+
export function sceneLook(view) {
|
|
30
|
+
const { placement, ceilingHeight, ...look } = view;
|
|
31
|
+
return look;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 씬의 좌표 기준 — **씬의 낱말 그대로 셋이다.**
|
|
35
|
+
*
|
|
36
|
+
* 형식의 `floor` · `center` · `ceiling` 과 짝이 맞지만 철자가 다르다. 옮겨 적는 표를 두지
|
|
37
|
+
* 않는 것이 이 파일의 규칙이므로 씬 쪽을 쓴다. 화면에는 둘 다 보인다 — 「천장 기준
|
|
38
|
+
* (inverted)」.
|
|
39
|
+
*/
|
|
40
|
+
export const SCENE_REFERENCES = ['floor', 'space', 'inverted'];
|
|
41
|
+
/** 배경색 기본값. 회색이라 부품 색이 제 색으로 보인다. */
|
|
42
|
+
export const WORKBENCH = '#7c7c7c';
|
|
43
|
+
/**
|
|
44
|
+
* 처음 값.
|
|
45
|
+
*
|
|
46
|
+
* **지금 저작 화면이 실제로 쓰던 값 그대로다.** 설정을 만들면서 화면이 달라지면
|
|
47
|
+
* 무엇이 설정 때문이고 무엇이 원래 그랬는지 갈리지 않는다.
|
|
48
|
+
*/
|
|
49
|
+
export const DEFAULT_VIEW = {
|
|
50
|
+
placement: 'floor',
|
|
51
|
+
/* 공장 천장의 흔한 높이. 반도체 fab 의 OHT 레일이 대체로 이 언저리다. */
|
|
52
|
+
ceilingHeight: 4000,
|
|
53
|
+
grid: true,
|
|
54
|
+
gridLabels: true,
|
|
55
|
+
floor: false,
|
|
56
|
+
environment: 'studio',
|
|
57
|
+
skyColor: WORKBENCH,
|
|
58
|
+
dirLightIntensity: 2.0,
|
|
59
|
+
dirLightFollowCamera: true,
|
|
60
|
+
dirShadowEnabled: true,
|
|
61
|
+
hemiIntensity: 4.0
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* How tall the preview board is: enough room for the tallest instance where the figure actually stands.
|
|
65
|
+
*
|
|
66
|
+
* A floor or center figure stands on the floor, so the tallest instance is the whole height. Only a
|
|
67
|
+
* ceiling figure needs the room up to the ceiling. The board used to reach the ceiling for every figure,
|
|
68
|
+
* which made a 920 tall AGV preview 4400 tall.
|
|
69
|
+
*
|
|
70
|
+
* This is an envelope, not a placement rule: where each instance goes is still the scene's
|
|
71
|
+
* (`FigureRealObject.effectiveZPos`), and the camera fits what the scene drew.
|
|
72
|
+
*/
|
|
73
|
+
export function previewBoardDepth(figure, ceilingHeight, factor) {
|
|
74
|
+
const tallest = figure.base.y * factor;
|
|
75
|
+
const reach = figure.placement === 'ceiling' ? Math.max(ceilingHeight, tallest) : tallest;
|
|
76
|
+
return Math.round(reach * 1.1);
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=figure-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figure-view.js","sourceRoot":"","sources":["../../client/modeller/figure-view.ts"],"names":[],"mappings":"AAiEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ;IACR,WAAW;IACX,SAAS;IACT,QAAQ;IACR,MAAM;IACN,OAAO;IACP,QAAQ;IACR,OAAO;CACC,CAAA;AAGV;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS,CAAC,IAAkB;IAC1C,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;IAClD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAU,CAAA;AAEvE,qCAAqC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAA;AAElC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,SAAS,EAAE,OAAO;IAClB,iDAAiD;IACjD,aAAa,EAAE,IAAI;IACnB,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,SAAS;IACnB,iBAAiB,EAAE,GAAG;IACtB,oBAAoB,EAAE,IAAI;IAC1B,gBAAgB,EAAE,IAAI;IACtB,aAAa,EAAE,GAAG;CACnB,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAA2E,EAC3E,aAAqB,EACrB,MAAc;IAEd,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAA;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;IACzF,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAA;AAChC,CAAC","sourcesContent":["/**\n * 저작 화면의 **보기 설정**.\n *\n * ## 저장되지 않는다\n *\n * 이것은 자산이 아니라 **작업대**다. 조명을 밝게 하고 바닥을 켠 것은 그 사람이 지금\n * 보기 편한 상태일 뿐, 그 자산의 성질이 아니다. 그래서 `FigureSource` 에 안 들어간다 —\n * `toFigureSource` 는 판에서 `width` · `height` · `depth` 와 몇 가지만 집어 가고 나머지는\n * 버린다.\n *\n * 다른 사람이 같은 자산을 열면 자기 설정으로 본다. 그것이 맞다.\n *\n * ## 씬이 아는 이름을 그대로 쓴다\n *\n * 여기 이름은 전부 `model-layer` 의 상태 이름이다. 옮겨 적는 표를 두지 않는다 — 표를\n * 두면 씬이 새 설정을 받아도 이쪽이 모른다.\n *\n * 값이 바뀌면 씬이 스스로 반영한다(`three-capability` 의 `onchange`). 다만 `grid` 는\n * 한동안 3D 를 세울 때만 읽혔다 — things-scene 10.1.5 에서 고쳤다.\n */\nexport interface ViewSettings {\n /**\n * 어떤 도면에 놓인 것으로 보나 — 씬 전체의 좌표 모드.\n *\n * **도형의 `placement` 와 다른 것이다.** 도형의 것은 「이 종류는 바닥에 서나, 천장에\n * 매달리나」이고, 이것은 「지금 보고 있는 도면이 어느 쪽을 기준으로 재나」다. 바닥\n * 기준 도면에 천정 기반 OHT 를 놓으면 도면은 안 뒤집히고 OHT 가 천장 높이에 매달린다.\n *\n * 한동안 도형의 `placement` 를 이 자리에 흘려 넣었다. 모델러에 도형이 하나뿐이라\n * 그럴듯해 보였지만, 그러면 도형의 성질이 씬 전체를 뒤집는다 — 도면에서는 성립할 수가\n * 없고(도면에는 도형이 여럿이다), 저작 중에는 배치를 고를 때마다 저작자가 적어 둔\n * 높이가 전부 다른 숫자로 보였다.\n *\n * 씬의 낱말 그대로다: `floor` 바닥 기준 · `space` 중심 기준(바닥 없음) · `inverted`\n * 천장 기준. **미리보기에만 먹인다** — 편집 캔버스의 `zPos` 는 저작자가 직접 적는\n * 숫자라 그 뜻이 보기 설정에 따라 바뀌면 안 된다.\n */\n placement: 'floor' | 'space' | 'inverted'\n /**\n * 천장 높이 (mm). 천정 기반 도형을 미리보기에서 어디에 매달 것인가.\n *\n * 도형은 제가 놓일 방의 높이를 모른다. 도면은 알지만 미리보기에는 도면이 없으므로,\n * 저작자가 가정할 값을 여기서 정한다.\n */\n ceilingHeight: number\n /** 좌표 바탕(축 가이드). 원점과 눈금을 보인다. */\n grid: boolean\n /** 축 이름표(X · Y · Z). 눈금만 두고 글자를 끌 수 있다. */\n gridLabels: boolean\n /** 판의 바닥면. 좌표 바탕과 겹치므로 기본은 끈다. */\n floor: boolean\n /** Environment — 반사(IBL). 금속 재질이 무엇을 비출지 정한다. */\n environment: EnvironmentName\n /** Sky Color — 배경색. */\n skyColor: string\n /** Key Light Intensity. */\n dirLightIntensity: number\n /** Key Light — Follow Camera. 끄면 그림자 방향이 고정된다. */\n dirLightFollowCamera: boolean\n /** Key Light — Cast Shadow. */\n dirShadowEnabled: boolean\n /** Hemisphere Light Intensity — 그늘진 면을 들어올린다. */\n hemiIntensity: number\n}\n\n/**\n * 환경 프리셋 — **`scene-manager` 의 `SkyPreset` 과 같은 여덟이다.**\n *\n * 한동안 다섯만 적었다. 씬은 여덟을 다 받는데 이쪽이 셋을 몰라서 고를 수 없었다.\n * operato-board 의 3D 씬 속성 패널도 같은 여덟을 보인다.\n */\nexport const ENVIRONMENTS = [\n 'studio',\n 'warehouse',\n 'factory',\n 'office',\n 'home',\n 'sunny',\n 'cloudy',\n 'rainy'\n] as const\nexport type EnvironmentName = (typeof ENVIRONMENTS)[number]\n\n/**\n * 씬에 그대로 넣는 보기 설정 — **좌표 기준과 천장 높이는 빼고.**\n *\n * 나머지는 전부 `model-layer` 의 상태 이름이라 그대로 넣으면 씬이 알아서 반응한다.\n * 그런데 `placement` 는 편집 캔버스에 들어가면 안 되고(거기는 늘 상자 기준이다),\n * `ceilingHeight` 는 씬이 모르는 이름이다.\n *\n * **rest spread 로 넘기지 않으려고 이 함수가 있다.** 캔버스가 한동안\n * `const { grid, ..., ...light } = view` 로 나머지를 통째로 넘겼는데, 그러면 설정을\n * 하나 더할 때마다 그것이 두 화면에 **말없이** 실린다. 새로 더한 좌표 기준이 바로\n * 그 길로 캔버스에 들어갈 뻔했다.\n */\nexport function sceneLook(view: ViewSettings): Record<string, unknown> {\n const { placement, ceilingHeight, ...look } = view\n return look\n}\n\n/**\n * 씬의 좌표 기준 — **씬의 낱말 그대로 셋이다.**\n *\n * 형식의 `floor` · `center` · `ceiling` 과 짝이 맞지만 철자가 다르다. 옮겨 적는 표를 두지\n * 않는 것이 이 파일의 규칙이므로 씬 쪽을 쓴다. 화면에는 둘 다 보인다 — 「천장 기준\n * (inverted)」.\n */\nexport const SCENE_REFERENCES = ['floor', 'space', 'inverted'] as const\n\n/** 배경색 기본값. 회색이라 부품 색이 제 색으로 보인다. */\nexport const WORKBENCH = '#7c7c7c'\n\n/**\n * 처음 값.\n *\n * **지금 저작 화면이 실제로 쓰던 값 그대로다.** 설정을 만들면서 화면이 달라지면\n * 무엇이 설정 때문이고 무엇이 원래 그랬는지 갈리지 않는다.\n */\nexport const DEFAULT_VIEW: ViewSettings = {\n placement: 'floor',\n /* 공장 천장의 흔한 높이. 반도체 fab 의 OHT 레일이 대체로 이 언저리다. */\n ceilingHeight: 4000,\n grid: true,\n gridLabels: true,\n floor: false,\n environment: 'studio',\n skyColor: WORKBENCH,\n dirLightIntensity: 2.0,\n dirLightFollowCamera: true,\n dirShadowEnabled: true,\n hemiIntensity: 4.0\n}\n\n/**\n * How tall the preview board is: enough room for the tallest instance where the figure actually stands.\n *\n * A floor or center figure stands on the floor, so the tallest instance is the whole height. Only a\n * ceiling figure needs the room up to the ceiling. The board used to reach the ceiling for every figure,\n * which made a 920 tall AGV preview 4400 tall.\n *\n * This is an envelope, not a placement rule: where each instance goes is still the scene's\n * (`FigureRealObject.effectiveZPos`), and the camera fits what the scene drew.\n */\nexport function previewBoardDepth(\n figure: { placement?: 'floor' | 'ceiling' | 'center'; base: { y: number } },\n ceilingHeight: number,\n factor: number\n): number {\n const tallest = figure.base.y * factor\n const reach = figure.placement === 'ceiling' ? Math.max(ceilingHeight, tallest) : tallest\n return Math.round(reach * 1.1)\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The side panel's one look -- V2's inspector, for every element that draws in the V3 modeller's side.
|
|
3
|
+
*
|
|
4
|
+
* The side is drawn by several elements (the type field, the figure's properties, a part's values, fastening, places,
|
|
5
|
+
* motion, material, controls, clips, the environment) and each had styled its own fields: three label styles and
|
|
6
|
+
* three field heights in one column (user, 2026-09-24: "why are the styles and layout all different?"). They share
|
|
7
|
+
* this sheet now and keep only what is theirs.
|
|
8
|
+
*
|
|
9
|
+
* The vocabulary, V2's:
|
|
10
|
+
* section one titled group; the side is a stack of them
|
|
11
|
+
* h3 a group's title -- small capitals
|
|
12
|
+
* div[inline-field] a short label and its one field on one line
|
|
13
|
+
* div[field] a label above a full-width field
|
|
14
|
+
* div[form] short labels beside their fields, the fields starting on one line
|
|
15
|
+
* div[vector-row] a title, then X · Y · Z in one row of cells with the axis inside (`div[triple]` of
|
|
16
|
+
* `div[cell]`) -- three values read together, as vector tools lay them out
|
|
17
|
+
* div[pair] two controls side by side
|
|
18
|
+
* label[toggle] a checkbox and its words
|
|
19
|
+
* p[hint] · small the quiet line under a field
|
|
20
|
+
* button[act] an action under the fields it acts on
|
|
21
|
+
* [scrub] a label dragged sideways to scrub its field
|
|
22
|
+
*/
|
|
23
|
+
export declare const SidePanelStyles: import("lit").CSSResult;
|