Compare commits

...
7 Commits
Author SHA1 Message Date
ketle-manandClaude Opus 5.5 4458a3d6e3 release: v0.9.4 — Gallery 3D models, P-H3 Image, TextGenerate fix
- Gallery: browse GLB, glTF, VRM, PLY (mesh, point cloud, Gaussian splat)
  and SPZ with a built-in three.js viewer; thumbnails are rendered in the
  browser and stored on the server
- Read workflows saved by SaveGLB from asset.extras
- GenerateUI/Metadata/I tab: support PH3ImageConditioning (P-H3 Image
  edit and T2I templates)
- Fix TextGenerate-family widget values shifted by one when the prompt is
  linked (also affected Krea-2, Ernie and LTX-2.5 templates)
- Help (en/ja/zh), README, and DEVLOG updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:53:07 +09:00
ketle-manandClaude Opus 5.5 54940ccf87 release: v0.9.3 — Image Edit: Draw palette, shortcuts, eyedropper
- Color palette on the Draw tool's second row: Color 1/2, 20 basic colors,
  20 custom slots; registered colors are saved in the browser
- Draw shortcuts: D/E mode, X switch color, [ ] brush size, B brush picker
- Eyedropper next to Color picks a color from the canvas
- Default brush color is now black; the selected color carries over to
  new documents
- Help (en/ja/zh), README, and DEVLOG updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:49:53 +09:00
ketle-manandClaude Opus 5.5 db1e834f86 release: v0.9.2 — fix corrupted image transfers with selector event loop
- With windows_selector_event_loop enabled, Gallery previews/downloads could
  arrive corrupted (same size, one 32KB block replaced by the next block).
  Set AIOHTTP_NOSENDFILE when switching to the selector loop.
- DEVLOG updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:54:23 +09:00
ketle-manandClaude Opus 5.5 1db6fda6f1 fix: corrupted file transfers with selector event loop on Windows
With windows_selector_event_loop enabled, aiohttp FileResponse goes through
asyncio's _sendfile_fallback, which reuses a 16KB buffer while the selector
transport queues unsent data without copying. Under backpressure later reads
overwrite queued blocks, so Gallery previews/downloads arrived corrupted
(same size, shifted 32KB block). Set AIOHTTP_NOSENDFILE when switching loops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:53:22 +09:00
ketle-manandClaude Opus 5.5 6cdf4919e4 release: v0.9.1 — TagSpace: add selected tags, Open in Gallery
- Add only the tags picked in the Selection panel ("Add selected (N)")
- Tag / Gallery-image chips re-escape parentheses (no accidental emphasis)
- "Open in Gallery" for a selected Gallery point (revealInGallery)
- Manual (ja/en) renamed to v0.9.1; DEVLOG updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:50:13 +09:00
ketle-manandClaude Opus 5.5 d9fc3bfcda feat(tagspace): "Open in Gallery" for a selected Gallery point
New gallery-tab export revealInGallery(path): switches to the Gallery /
Output subtab, clears search/favorite/tag/group filters and similar mode,
expands the folder tree down to the image's folder, loads it, renders
thumbnail pages up to the image (keeping the infinite-scroll sentinel at
the end) and selects it like a normal click. Returns false for paths
outside the output folder or not in the list; TagSpace shows a toast.
Help tagspace-10 (en/ja/zh), README, manual 11-7 (ja/en, combined/ZIP
rebuilt), DEVLOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:48:49 +09:00
ketle-manandClaude Opus 5.5 410fdbc1bb feat(tagspace): add only the selected tags; escape parentheses in tag chips
- With tags picked in the Selection panel, Add becomes "Add selected (N)"
  and adds just those tags (prompt order) as one chip; with none picked it
  adds the whole item as before.
- Tags are stored unescaped, so "rapunzel (disney)" went into prompts as an
  emphasis group. Tag and Gallery-image chips now re-escape parentheses
  (\( \)), matching card prompts so duplicates still collapse.
- Help tagspace-10 (en/ja/zh), README, manual 11-7 (ja/en, combined/ZIP
  rebuilt), DEVLOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 14:44:31 +09:00
40 changed files with 10569 additions and 88 deletions
+4
View File
@@ -2,6 +2,10 @@
Condensed version-by-version index of DEVLOG.md (each line: version + one-line summary of what changed and why). Full rationale, code details, and "How to apply" lessons live in the excluded DEVLOG.md itself; this index exists so graphify can extract a queryable semantic node per release without feeding the full log to the local Ollama model. Regenerate with `python tools/generate_doc_index.py devlog` whenever DEVLOG.md changes.
- **v0.9.4(2026-11-07)** — Gallery: 3Dモデル対応(GLB / glTF / VRM / PLY / SPZ)
- **v0.9.3(2026-11-05)** — Image Edit: Drawツールのカラーパレット・ショートカット・スポイト(Comic Creator v1.67.0 から移植)
- **v0.9.2(2026-11-03)** — Selectorイベントループ有効時に画像が壊れて届く不具合を修正
- **v0.9.1(2026-11-03)** — TagSpace: 選んだタグだけを追加 / タグのカッコをエスケープして追加
- **v0.9.0(2026-11-03)** — マニュアル(画像なし配布版)を v0.9.0 に改訂
- **v0.8.14(2026-11-03)** — Fibo 2.0 Edit / FastH3 OmniRef / Pika-H3-Flex 対応(GenerateUI・Metadata・Videoタブ)
- **v0.8.13(2026-10-27)** — Edit in Mask Editor One: 送信画像をノードへ永続化(Mask Editor One v0.1.12 対応)
+82
View File
@@ -2,6 +2,88 @@
---
## v0.9.4(2026-11-07)
### Gallery: 3Dモデル対応(GLB / glTF / VRM / PLY / SPZ)
- 新規 `static/js/gallery-3d-viewer.js`: three.jsのビューア。詳細パネル・ライトボックス・比較で開き、枠がDOMから外れると自分で破棄する(WebGLコンテキストを解放)。
- 新規 `static/lib/three-viewer/`: three 0.187 / @pixiv/three-vrm 3.5.5 / @sparkjsdev/spark 2.4.0 のバンドル。Spark(2.8MB)は別チャンクで、スプラットを開くときだけ読む。再ビルド手順は同フォルダのREADME.txt。
- サムネイル: サーバーに3Dレンダラーが無いため、`/thumb` の404を合図にブラウザが描画し `/wfm/gallery/image/thumb3d` へ保存する。1件ずつ処理し、128MB超は開いたときに保存する。
- `.gltf` の外部ファイルは `/wfm/gallery/model3d/asset` で配信する(.bin/画像のみ、許可ルート内のみ)。
- PLYは `f_dc_0`/`scale_0` の有無でスプラットを判定する。`double` 属性はFloat64ArrayになりWebGLが拒否するのでFloat32へ変換する。
- `asset.extras` からSaveGLBのprompt/workflowを読む(GLBはJSONチャンクのみ読む)。
- 3DファイルはImage Edit / GenerateUI / Send to LI node / Tagger / Feederへ送れないようにした。
### P-H3 Image対応
- `PH3ImageConditioning` をGenerateUI/Metadata/Iタブに追加(`TextEncodeFibo2` と同じ扱い、negativeなし)。`_unifyPromptEnhancerText` は `TextGenerateV2` も対象にした。
### 修正: TextGenerate系の値ずれ
- `_normalizeLinkedWidgetValues` が、リンク済みpromptの空枠を持つ形式を「枠なし形式」と誤判定していた。値が1つずれても、無効なDynamicComboキーがoptions[0]へフォールバックして枠数が偶然一致するため。Krea-2 / Ernie / LTX-2.5 などでも `sampling_mode:2048` のようにずれていた。選択キーの有効性も判定に加えた。
**検証**: 3Dは実サンプルで描画・自動サムネイル・詳細・拡大・破棄・送信ガード(Image Editボタン)を確認(SPZとスプラットPLYは自作サンプル)。パストラバーサルは全て404。変換は手元の640ワークフローを修正前後で比較し、差分21件は全てTextGenerate系。うち5種類は `widgets_values_named` 等で正しい値と確認した。P-H3は編集(1024x1024、約60秒)とT2I(3360x2496、約40秒)をGenerateUIから実生成(RTX 4070 12GB、モデルロード済み)。
**未確認**: 比較表示、テーブル表示のサムネイル、128MB超のファイル、実データのスプラット、サイドパネルIタブのP-H3、Draco/Meshopt圧縮のモデル。
**補足**: KTX2圧縮テクスチャは未対応。`.gltf` を移動・削除しても外部ファイルは追従しない。GenerateUIにプロンプト強化のオン/オフ切り替えは無い。
---
## v0.9.3(2026-11-05)
### Image Edit: Drawツールのカラーパレット・ショートカット・スポイト(Comic Creator v1.67.0 から移植)
- 新規 `static/js/image-edit/DrawPalette.js`: Drawツールの2段目(`ie-tool-options`)に色1/色2、基本色20色、カスタム色20枠を表示する。右クリックで現在の色の登録・色の編集・削除(カスタム色)・初期の色に戻す(変更済みの基本色)。保存先は localStorage `ie_draw_palette_v1`。
- `image-edit-tab.js`: 色の変更を `_setDrawColor` に集約し、モードは `_setDrawMode`、サイズは `_setDrawBrushSize` / `_stepDrawBrushSize` に分離。
- ショートカット(Draw中のみ): `D` Draw / `E` Erase / `X` 色1・色2切替 / `[` `]` サイズ増減(1〜10pxは1、10〜50pxは5、50〜200pxは10刻み)/ `B` ブラシ選択の開閉。ブラシ選択の表示中は D/E/X/[/] を無効にし、Escで閉じる。他のツールからのBはこれまでどおりDrawへの切り替え。
- スポイト: WFSのDrawツールには無かったためCC版から追加。右パネルのColorの隣のボタンからキャンバスの色を拾う。Esc・再クリック・ツール切替・キャンバス外クリック・Closeで解除。
- ブラシの初期色を赤から黒に変更(色1/色2 = 黒/白)。
**CC版との違い**
- 色の引き継ぎは、Drawツールの表示時ではなく `_initCanvases` で `DrawTool` を作り直す時点で行う。
- スポイトは `ie-canvas-draw` から色を読むため、アクティブレイヤーのみの表示なら合成し直してから読む。
- 右クリックメニューを開いたままツールを切り替えても残らないよう、`_renderToolOptions` で閉じる。
**検証(Playwright、ComfyUI :8189)**: パレットからの描画色、登録と再読み込み後の保持、重複登録の通知、右クリックメニュー、基本色の復元、Color入力との連動、各ショートカット、入力欄やCtrl/Alt同時押しで反応しないこと、サイズの刻み、ブラシ選択の開閉、ブラシ未登録時の通知、Newでの色の引き継ぎ、スポイトの取得と解除、Undo履歴が増えないこと、別レイヤーの色の取得を確認。コンソールエラーなし。
**未確認**: 「色を編集…」で開くブラウザ標準のカラーピッカーの表示と、日本語キーボードでの `[` `]` の実打鍵。
**補足**: 透明部分をスポイトすると黒を拾う(CCと同じ)。描いた線から拾うと値が1ずれることがある。READMEのバージョンバッジが0.8.11のままだったので0.9.3に更新した。
---
## v0.9.2(2026-11-03)
### Selectorイベントループ有効時に画像が壊れて届く不具合を修正
- 症状: 設定「Selectorイベントループ」(`windows_selector_event_loop`)が有効だと、ギャラリーのプレビューと Download ボタンで取得した画像が壊れる(元ファイルと同サイズのまま、32KB 分のブロックが直後のブロックの内容に置き換わる)。出力フォルダのファイル自体は正常。
- 原因: Selector 方式では aiohttp の `FileResponse` が asyncio の `_sendfile_fallback` を通る。これは 16KB のバッファを使い回しながら、送り切れなかった分をトランスポートにコピーせず積むため(Python 3.12)、送信が詰まると次の読み込みで上書きされる。ギャラリーは多数の画像を同時に読むので詰まりやすい。
- 修正: `prestartup_script.py` で Selector に切り替えるとき `AIOHTTP_NOSENDFILE=1` も設定し、aiohttp がチャンクごとに新しい bytes を読んで送る経路を使うようにした(aiohttp 読み込み済みの場合はモジュール定数も上書き)。プロセス全体に効くので ComfyUI 本体の `/view` なども対象。
- 検証: 受信を遅くしたクライアントで、修正前は 5/5 回破損、修正後は 5/5 回ハッシュ一致。再起動後の実サーバー(ギャラリー配信 URL)でも 5/5 回一致。
- 壊れた応答は `Cache-Control: max-age=3600` でブラウザに残ることがあるので、更新後は再読み込み(Ctrl+F5)が必要。
---
## v0.9.1(2026-11-03)
### TagSpace: 選んだタグだけを追加 / タグのカッコをエスケープして追加
- 選択中パネルでタグを1つ以上選んでいると、「追加」ボタンが「選択したタグを追加(N)」になり、選んだタグだけ(プロンプト中の順)を1つのチップ(名前は「rapunzel(2タグ)」)として追加する。選んでいなければ従来どおり全体(カードはプロンプト全文、Gallery点は全タグ)。3D画面のダブルクリックと一覧の+は常に全体。
- 不具合修正: タグは分解時にエスケープを外している(`rapunzel \(disney\)` → `rapunzel (disney)`)ため、タグ・Gallery点のチップをそのままプロンプトに入れると `(disney)` が強調指定になっていた。プロンプトに入れるときにカッコを `\(` `\)` に戻す(表示はそのまま)。カード全文の `\(...\)` と同じ形になるので、重複除去でも1つにまとまる。
- 検証(Playwright): rapunzel カードで未選択の「追加」→全文、2つ選んで「選択したタグを追加(2)」→ `rapunzel \(disney\), braided ponytail`、一覧の+で同じタグを追加しても重複せず。
- ヘルプ(tagspace-10 英/日/中)、README、マニュアル第11章 11-7(日英、全章まとめ・ZIP 再作成)。
### TagSpace: Gallery点から「Galleryで開く」
- 選択中パネル(Gallery点)に「Galleryで開く」ボタン。`gallery-tab.js` に `revealInGallery(path)` を新設(export): ギャラリータブ/Output サブタブへ切り替え(初回はここで出力フォルダとツリーを読み込むので `state.folderTree` を待つ)→ 絞り込み(検索・お気に入り・タグ・グループ・類似表示)を「Clear filters」と同じ要領で解除 → ツリーを根から目的のフォルダまで矢印クリックで展開(子は展開時に描画される遅延描画のため)→ フォルダを選んで `await loadImages()` → 一覧で `[data-path]` の要素をクリック(通常クリックと同じ選択・詳細表示)して中央へスクロール。
- サムネイル表示は50件ずつ描くので、目的の画像まで `_appendNextPage` で描き足し、無限スクロールの目印を末尾へ戻す(全件描いたら外す)。パスは `\` / 大文字小文字の違いを無視して比較。出力フォルダ外・一覧に無い画像は false を返し、TagSpace 側でトーストを出す。
- 検証(Playwright): 検索語を入れた状態から TagSpace の Gallery 点で押す → 0.3秒でギャラリーに切り替わり、ツリー「2026-06-07」選択・一覧で目的の画像が選択されて画面内・検索欄クリア・詳細表示。456枚のフォルダの453枚目でも 0.6秒で表示(全件描画・目印も解除)。出力フォルダ外/存在しないパスは false。コンソールエラーなし。
- ヘルプ(tagspace-10 英/日/中)、README、マニュアル第11章 11-7(日英、全章まとめ・ZIP 再作成)。
---
## v0.9.0(2026-11-03)
### マニュアル(画像なし配布版)を v0.9.0 に改訂
+6 -6
View File
@@ -27,7 +27,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- Built-in AI tools (translation and more)
![Workflow Studio](https://img.shields.io/badge/ComfyUI-Custom_Node-blue)
![Version](https://img.shields.io/badge/version-0.8.11-green)
![Version](https://img.shields.io/badge/version-0.9.4-green)
## Features (tab -> feature names)
@@ -38,7 +38,7 @@ Thumbnail / Table views, Thumbnail side panel, Badge filtering, Search, Side pan
One-click capture, Auto-save as thumbnail, Embedded workflow metadata, Auto-import
### GenerateUI Tab (v0.3.5)
6-tab layout, Save button, Input tab, Multi-image I2I for Comic Creator, Model tab, Settings tab, Always-visible Raw JSON, Bypass/Mute node handling, One-click generation, Seed control, Style selector, Create Catalog / Catalog buttons, Batch type selector, Batch tab, UI-to-API conversion, Video workflow support, Eagle integration, Qwen Image 2.1 support, Ming Image support
6-tab layout, Save button, Input tab, Multi-image I2I for Comic Creator, Model tab, Settings tab, Always-visible Raw JSON, Bypass/Mute node handling, One-click generation, Seed control, Style selector, Create Catalog / Catalog buttons, Batch type selector, Batch tab, UI-to-API conversion, Video workflow support, Eagle integration, Qwen Image 2.1 support, Ming Image support, P-H3 Image support
### Feeder subtab (v0.3.5 / v0.3.42)
ImageFeeder node control, Image library, Selection management, Presets, Continuous Run loop, Index sync, Seed, WFS_GalleryFeeder node, Node & group selector, Image grid, After Gen modes, Run / Stop controls
@@ -53,7 +53,7 @@ Setting / Results / Plan JSON sub-panels, Per-column keyframes, Model column —
2-column layout, Collapsible sections, Theme selection, Theme customization, Workflows directory, Gallery output directory, Eagle connection, CivitAI Host, CivitAI API Key, Default workflow, Default Checkpoint, VRAM Management (Ollama), Video Playback Volume, Data Management, Text Size, RAW JSON Colors, GenerateUI Model Tab Highlight, Wildcard Integration, G'MIC-Qt Integration, Language
### Gallery Tab (v0.3.44)
Output / ImagePrompt / Style_Catalog / Metadata sub-tabs, Image browser, Folder tree root label, Thumbnail / Table views, Folder management, File operations, Download, MP4 video support, MP4 embedded metadata, WebM support, Embedded metadata reading fixes, Audio support, File conversion, Move To folder filter, Semantic Search, Audio waveform colors, Info tab: dimensions & duration, Multi-select, Image Compare, Prompt search, Server-side filtering, Group management, Thumbnail F button, Favorites, Detail panel, Prompt tab, Nanobanana tab, Gemini / Nano Banana nodes, MOSS-Image in GenerateUI, Faster GenerateUI Check / conversion, Partner API nodes in GenerateUI, Workflow viewer, GenUI button, Image Edit button, Send GenUI Image button, Send to LI node button, Send to LV node button, Send CC Layout / Send CC Image buttons, Search clear (✕), Clear all filters (✕ Clear), Workflow auto-save, Output folder configurable, SVG file support, PSD file support, Performance
Output / ImagePrompt / Style_Catalog / Metadata sub-tabs, Image browser, Folder tree root label, Thumbnail / Table views, Folder management, File operations, Download, MP4 video support, MP4 embedded metadata, WebM support, Embedded metadata reading fixes, Audio support, File conversion, Move To folder filter, Semantic Search, Audio waveform colors, Info tab: dimensions & duration, Multi-select, Image Compare, Prompt search, Server-side filtering, Group management, Thumbnail F button, Favorites, Detail panel, Prompt tab, Nanobanana tab, Gemini / Nano Banana nodes, MOSS-Image in GenerateUI, Faster GenerateUI Check / conversion, Partner API nodes in GenerateUI, Workflow viewer, GenUI button, Image Edit button, Send GenUI Image button, Send to LI node button, Send to LV node button, Send CC Layout / Send CC Image buttons, Search clear (✕), Clear all filters (✕ Clear), Workflow auto-save, Output folder configurable, SVG file support, PSD file support, 3D model support, Performance
### ImagePrompt Gallery subtab (v0.3.94, renamed from Style/Prompt in v0.3.95)
Visual prompt library, 3-column layout, Prompt builder (right pane), Plain-text prompt storage, ponyxlWildcardsVault format support, Seed data importer
@@ -128,10 +128,10 @@ Samples for the Feeder tab: `ws_sdxl_image_feeder_i2i` / `ws_dwpose_image_feeder
## Manual
A beginner-oriented manual (covers v0.9.0, text-only edition without screenshots) is available in [`docs/manual/`](docs/manual/):
A beginner-oriented manual (covers v0.9.1, text-only edition without screenshots) is available in [`docs/manual/`](docs/manual/):
- English: [`docs/manual/en/`](docs/manual/en/) — ZIP: `Workflow_Studio_Manual_v0.9.0_en.zip`
- 日本語: [`docs/manual/`](docs/manual/) — ZIP: `Workflow_Studio_Manual_v0.9.0.zip`
- English: [`docs/manual/en/`](docs/manual/en/) — ZIP: `Workflow_Studio_Manual_v0.9.1_en.zip`
- 日本語: [`docs/manual/`](docs/manual/) — ZIP: `Workflow_Studio_Manual_v0.9.1.zip`
---
+8 -6
View File
@@ -23,7 +23,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- Built-in AI tools (translation and more)
![Workflow Studio](https://img.shields.io/badge/ComfyUI-Custom_Node-blue)
![Version](https://img.shields.io/badge/version-0.8.11-green)
![Version](https://img.shields.io/badge/version-0.9.4-green)
## Screenshots
@@ -133,6 +133,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- **Eagle integration** — auto-save generated images to [Eagle](https://eagle.cool/) with metadata
- **Qwen Image 2.1 support** (v0.7.3) — `TextEncodeQwenImage21` (the unified T2I/Edit encoder used by Comfy-Org's Qwen-Image-2.1 workflow templates) is now recognized: its `prompt`/`negative_prompt` widgets populate the Input tab's Positive/Negative Prompt textareas and are editable like any other prompt node; its `resolution` (a pixel-budget int, not width/height) is exposed for Raw JSON editing. No extra work was needed for the model's up to 10 reference images (`image_1`…`image_10`, used for image editing) — each one arrives as an ordinary LoadImage node, so it already gets its own card in the Input tab's Image sub-panel via the existing generic LoadImage detection
- **Ming Image support** (v0.7.5) — `TextEncodeMingImageEdit` (single `prompt` widget, up to 8 optional `images.image_N` reference inputs; role taken from the sampler/guider wiring, so the empty-prompt negative instance in layer-decomposition workflows shows as Negative) and `EmptyQwenImageLayeredLatentImage` (Latent panel; `layers` kept as-is) are recognized in GenerateUI, and Gallery/Metadata/sidepanel I tab now show their prompts as Positive. The Sampler field is disabled (N/A) when the SAMPLER input comes from a node without `sampler_name` (e.g. `SamplerLCM`). **Fix:** top-level nodes whose widgets are converted to wired inputs (e.g. `EmptyLatentImage` width/height fed by `GetImageSize`) keep those values in `widgets_values`; they were not stripped outside subgraphs, shifting later values (`batch_size` became `1024`, KSampler `steps`/`cfg` misread). Also: `BasicGuider`'s `conditioning` is treated as positive, and a linked text input wins over the stale widget text in UI-format metadata
- **P-H3 Image support** (v0.9.4) — the `PH3ImageConditioning` templates (Image Edit and T2I) load and run from GenerateUI, with the prompt shown on the Input tab and read back by the Metadata tab. Width and height follow the workflow's wiring, and the prompt upsampler runs as set in the workflow
</details>
@@ -309,6 +310,7 @@ An experimental batch generator: runs the workflow currently loaded in GenerateU
- **Output folder configurable** — set the scanned output folder from Settings tab
- **SVG file support** (v0.3.77) — `.svg` files are browsable, previewable (detail panel and lightbox), and included in favorites/tags/groups/move/delete/export alongside raster formats; served as-is with no rasterized thumbnail, since `<img>` scales vector graphics natively at any size
- **PSD file support** (v0.6.0) — `.psd` files are browsable alongside other formats; thumbnails and full-size previews show every layer merged together (hidden layers excluded), rendered server-side via `psd-tools` and disk-cached; the underlying PSD file itself is never modified — only the Gallery preview is a flattened rendering
- **3D model support** (v0.9.4) — `.glb` / `.gltf` / `.vrm` / `.ply` (mesh, point cloud or Gaussian splat) / `.spz` files are browsable alongside images with a **3D** badge and open in a built-in viewer in the detail panel, lightbox and compare view (drag to rotate, right-drag to pan, wheel to zoom). Thumbnails are rendered by your browser the first time a file appears and then kept on the server (files over 128 MB get one when opened). Workflows saved by ComfyUI's SaveGLB are read like an image's. A `.gltf` using separate `.bin` or texture files needs them to stay in place: Move and Delete only affect the `.gltf` itself. KTX2-compressed textures are not supported
- **Performance** — server-side 256px JPEG thumbnail generation with disk cache (`data/thumb_cache/`); infinite-scroll paging (50 images per page, IntersectionObserver); folder-level mtime cache (60s TTL); bulk operations use single-request API endpoints
</details>
@@ -423,7 +425,7 @@ An experimental batch generator: runs the workflow currently loaded in GenerateU
- **Build / Update** — collects the cards, adds card images that are not yet indexed to the Gallery semantic index, reads the positive prompt embedded in each indexed Gallery image (followed upstream from the sampler's `positive` input, never the negative; cached in `tagspace_prompts.json`, deleted images are skipped), embeds new tags with Ollama (cached in `tagspace_tags.npz`) and projects everything to 3D with PCA. Prompts are split only at commas (and `|` `{}` `BREAK`), not at spaces; phrases over 5 words are dropped. **Tags** sets how many tags are kept — each source is ranked by how many prompts use a tag and the sources take turns, so the many Gallery prompts do not crowd out the others; **Gallery points** sets how many Gallery images are shown. Images and text form two separate clusters in the same space (modality gap), so each is centered on its own mean (images: the cards) before PCA, which makes cards and their matching tags overlap. First build: about 2.5 min for ~1,000 cards plus about 2 min to read the prompts of 29,000 Gallery images (64% had a readable positive prompt); rebuilds with caches: about 15 s
- **Choosing tags** — **All tags** uses every candidate tag instead of the Tags number (up to 20,000); **Min uses** drops tags used in fewer prompts than that (all sources combined); **Wildcards** turns wildcard files on or off as a tag source. Words found only in wildcards are most of the distinct tags (about 37,000 of 47,600 in testing), so All tags without wildcards gives about 10,400 tags (about 6,800 with Min uses 2); ~32,000 points still render at 60 fps. Wildcard YAML is read with a YAML parser, so multi-line (`- >-`) items are included; JSON fragments embedded in prompts (e.g. MOSS-Image bbox layouts) and model file names are not turned into tags
- **Explore** — drag to rotate, right-drag to pan, wheel to zoom; hover shows name, thumbnail and prompt/sources; layer checkboxes for Cards / Thumbnails / Tags / Gallery, and source checkboxes (ImagePrompt / Gallery prompts / Tagger DB / Prompt library / Wildcards) that show or hide tags by origin — a tag stays visible while any of its sources is on, and hidden tags are left out of the nearby/search lists. The search box (Enter, any language) places a marker for the text and lists the nearest items
- **Search with a card's or Gallery image's tags** — a selected card or Gallery point lists its prompt tags as buttons; pick some and search the space with them (joined in prompt order)
- **Search with a card's or Gallery image's tags** — a selected card or Gallery point lists its prompt tags as buttons; pick some and search the space with them (joined in prompt order); while tags are picked, the Add button becomes "Add selected (N)" and adds only those tags. A selected Gallery point also has **Open in Gallery**, which opens its folder in the Gallery tab with the image selected (filters are cleared)
- **Make a prompt** — click a card or tag to select it and list nearby items (clicking does not change the prompt); double-click it, press **Add** next to its name under Selection, or press **+** in the list to add it (again to remove); cards and tags are ranked separately and interleaved, so a card also shows its closest tags. Adding a Gallery point adds all tags from that image's prompt as one chip (images without readable tags cannot be added); clicking one lists similar Gallery images together with nearby tags and cards (cards, tags and searches never list Gallery images). The prompt joins the chips with duplicates removed; **Add to GenerateUI (Positive)** appends it to the loaded workflow's positive prompt, **Copy** puts it on the clipboard
- **Tagger fill** — Gallery images without a readable prompt (about a third) can be tagged with a Tagger model (ONNX models from the Tagger tab) during Build / Update — either only the sampled Gallery points or every indexed image without prompt tags. Default thresholds, rating labels dropped, results cached per image and model in `tagspace_tagger.json` (stopping keeps finished images). The tags form the **Tagger fill** source and become the tags of those Gallery points. The status shows CUDA/CPU: on the CPU it is about 0.5 s per image, so make sure `onnxruntime-gpu` is active before tagging everything
- **Glow / Twinkle** — points are drawn as glowing stars on a night-sky background (Gallery points dimmed so dense areas don't wash out); **Twinkle** makes tags, cards and Gallery points twinkle slowly with individual rhythms (selection/nearby highlights stay steady). Both are toolbar toggles; turning Glow off restores the plain dots
@@ -442,7 +444,7 @@ An experimental batch generator: runs the workflow currently loaded in GenerateU
- **New button** — create a blank canvas with custom dimensions (WxH prompt); clears all existing layers and automatically adds an empty Layer 1 (v0.3.70)
- **Tools** — Select (V), Draw (B), Text (T), Shape (S), Fill (G), Mask (🎭), Blur (≈), BG Remove (⬚), Filter (★), Inpaint (🩹); tool options bar updates per active tool
- **Select** — click to select; drag to move; drag corner handles to resize; drag circle handle to rotate; Flip H / Flip V / Rotate angle in the options bar; double-click a text layer to re-edit its content
- **Draw** — freehand brush; options: color, brush size, blend mode; paints directly onto the active draw layer while all other layers remain visible; brush cursor shown as a size-accurate circle; strokes can start from outside the canvas margin and continue past the edge; **pen tablet support** (v0.6.2) — brush size and opacity respond to pen pressure (mouse behaves exactly as before); the canvas listens for Pointer Events so pen, touch, and mouse all work through the same code path
- **Draw** — freehand brush; options: color, brush size, blend mode; paints directly onto the active draw layer while all other layers remain visible; brush cursor shown as a size-accurate circle; strokes can start from outside the canvas margin and continue past the edge; **pen tablet support** (v0.6.2) — brush size and opacity respond to pen pressure (mouse behaves exactly as before); the canvas listens for Pointer Events so pen, touch, and mouse all work through the same code path; **color palette** on the second row — Color 1/Color 2, 20 basic colors, and 20 custom slots (registered and edited colors are saved in the browser); **eyedropper** button next to Color picks a color from the canvas (`Esc` cancels); shortcuts while Draw is active: `D` Draw, `E` Erase, `X` switch Color 1/2, `[` `]` brush size, `B` open or close the brush picker (`Esc` also closes it)
- **Text** — click to place; configure font, size, bold/italic, align, and color; placed as an exact-size text layer sized to the measured bounding box; double-click to re-edit
- **Shape** — drag to draw geometric shapes (Rect / Ellipse / Line / FreeLine); options: shape type, Rounded toggle (Rect/Ellipse), Fill color, Stroke color + width, Opacity; each committed shape becomes an independent draw layer; Stroke None hidden for Line/FreeLine (stroke always active)
- **Fill** (v0.6.2) — bucket fill; click a contiguous same-color region on the active layer to flood-fill it (scanline-based, ported from the Comic Creator plugin's Image tab); **Properties pane**: Mode (Solid / Gradient) — Solid: Color picker; Gradient: Shape (Linear / Radial), a draggable color-stop Ramp (click a stop to select it, drag to reposition, +/- to add/remove stops, color swatch to edit the selected stop's color), and a Direction dial (drag to set angle/radius); both Tolerance (0–255, color-match threshold) and Opacity apply to either mode; Ramp and Direction dial are pointer-event based with pointer capture, so pen tablets work the same as mouse
@@ -595,10 +597,10 @@ Samples for the Feeder tab: `ws_sdxl_image_feeder_i2i` / `ws_dwpose_image_feeder
## Manual
A beginner-oriented manual (covers v0.9.0, text-only edition without screenshots) is available in [`docs/manual/`](docs/manual/):
A beginner-oriented manual (covers v0.9.1, text-only edition without screenshots) is available in [`docs/manual/`](docs/manual/):
- English: [`docs/manual/en/`](docs/manual/en/) — ZIP: `Workflow_Studio_Manual_v0.9.0_en.zip`
- 日本語: [`docs/manual/`](docs/manual/) — ZIP: `Workflow_Studio_Manual_v0.9.0.zip`
- English: [`docs/manual/en/`](docs/manual/en/) — ZIP: `Workflow_Studio_Manual_v0.9.1_en.zip`
- 日本語: [`docs/manual/`](docs/manual/) — ZIP: `Workflow_Studio_Manual_v0.9.1.zip`
---
+3 -3
View File
@@ -2,12 +2,12 @@
ノードが苦手でも大丈夫 ― 画像生成をもっと手軽に、もっと整理して
- 対象バージョン:Workflow Studio v0.9.0
- 対象バージョン:Workflow Studio v0.9.1
- 著者:ketle-man
- © 2026 ketle-man
このマニュアルは、Kindle版をもとにした **画像なしのテキスト版** です。
章ごとのファイルは `chapters/` フォルダ、全章をまとめたファイルは `Workflow_Studio_Manual_v0.9.0.md` です。
章ごとのファイルは `chapters/` フォルダ、全章をまとめたファイルは `Workflow_Studio_Manual_v0.9.1.md` です。
画面の例は省略しているため、実際の画面はWorkflow Studioのヘルプタブとあわせてご覧ください。
## 目次
@@ -29,4 +29,4 @@
- [13_付録](chapters/13_付録.md)
- [14_おわりに](chapters/14_おわりに.md)
全章まとめ:[Workflow_Studio_Manual_v0.9.0.md](Workflow_Studio_Manual_v0.9.0.md)
全章まとめ:[Workflow_Studio_Manual_v0.9.1.md](Workflow_Studio_Manual_v0.9.1.md)
@@ -2,12 +2,12 @@
ノードが苦手でも大丈夫 ― 画像生成をもっと手軽に、もっと整理して
- 対象バージョン:Workflow Studio v0.9.0
- 対象バージョン:Workflow Studio v0.9.1
- 著者:ketle-man
- © 2026 ketle-man
このマニュアルは、Kindle版をもとにした **画像なしのテキスト版** です。
章ごとのファイルは `chapters/` フォルダ、全章をまとめたファイルは `Workflow_Studio_Manual_v0.9.0.md` です。
章ごとのファイルは `chapters/` フォルダ、全章をまとめたファイルは `Workflow_Studio_Manual_v0.9.1.md` です。
画面の例は省略しているため、実際の画面はWorkflow Studioのヘルプタブとあわせてご覧ください。
---
@@ -143,7 +143,7 @@ ComfyUIの「自由さ」はそのままに、「分かりやすさ」と「手
## 本書の対象バージョンと環境
- **Workflow Studio**:v0.9.0
- **Workflow Studio**:v0.9.1
- **ComfyUI**:本書執筆時点の最新版
- **OS**:Windows(画面の例はWindowsのものです)
@@ -2977,6 +2977,12 @@ Workflow Studioとは別にインストールするソフトですが、両方
カードやGallery点を選ぶと、**選択中** に、そのプロンプトのタグがボタンで並びます。
タグをクリックして選び(もう一度で解除)、**選択したタグで空間検索** を押すと、選んだタグで空間を検索します。
「この画像の、髪型と服装だけに近いものを探したい」といったときに便利です。
タグを選んでいる間は、**選択中** の **追加** ボタンが **選択したタグを追加(N)** に変わり、選んだタグだけをプロンプト欄に追加できます。
タグを選んでいなければ、これまでどおり全体(カードはプロンプト全文、Gallery点はすべてのタグ)が追加されます。
Gallery点を選んでいるときは、**選択中** に **Galleryで開く** ボタンも表示されます。
押すとギャラリータブに切り替わり、その画像のフォルダが選ばれ、画像一覧でその画像が選択された状態になります(右の詳細も開きます)。
画像が一覧に必ず出るよう、ギャラリーの検索・お気に入り・タグ・グループの絞り込みは解除されます。
カードのプロンプト全文は、**プロンプト全文** を開くと読めます。
---
+1 -1
View File
@@ -129,7 +129,7 @@ ComfyUIの「自由さ」はそのままに、「分かりやすさ」と「手
## 本書の対象バージョンと環境
- **Workflow Studio**:v0.9.0
- **Workflow Studio**:v0.9.1
- **ComfyUI**:本書執筆時点の最新版
- **OS**:Windows(画面の例はWindowsのものです)
@@ -317,6 +317,12 @@ Workflow Studioとは別にインストールするソフトですが、両方
カードやGallery点を選ぶと、**選択中** に、そのプロンプトのタグがボタンで並びます。
タグをクリックして選び(もう一度で解除)、**選択したタグで空間検索** を押すと、選んだタグで空間を検索します。
「この画像の、髪型と服装だけに近いものを探したい」といったときに便利です。
タグを選んでいる間は、**選択中** の **追加** ボタンが **選択したタグを追加(N)** に変わり、選んだタグだけをプロンプト欄に追加できます。
タグを選んでいなければ、これまでどおり全体(カードはプロンプト全文、Gallery点はすべてのタグ)が追加されます。
Gallery点を選んでいるときは、**選択中** に **Galleryで開く** ボタンも表示されます。
押すとギャラリータブに切り替わり、その画像のフォルダが選ばれ、画像一覧でその画像が選択された状態になります(右の詳細も開きます)。
画像が一覧に必ず出るよう、ギャラリーの検索・お気に入り・タグ・グループの絞り込みは解除されます。
カードのプロンプト全文は、**プロンプト全文** を開くと読めます。
---
+3 -3
View File
@@ -2,12 +2,12 @@
Don't Be Afraid of Nodes - Generate Images More Easily and Keep Them Organized
- Covers: Workflow Studio v0.9.0
- Covers: Workflow Studio v0.9.1
- Author: ketle-man
- (c) 2026 ketle-man
This is the **text-only edition** (without screenshots) of the Kindle book.
Chapter files are in the `chapters/` folder; the whole book in one file is `Workflow_Studio_Manual_v0.9.0_en.md`.
Chapter files are in the `chapters/` folder; the whole book in one file is `Workflow_Studio_Manual_v0.9.1_en.md`.
Screen examples are omitted, so please use the book together with Workflow Studio's Help tab.
## Contents
@@ -29,4 +29,4 @@ Screen examples are omitted, so please use the book together with Workflow Studi
- [13_Appendix](chapters/13_Appendix.md)
- [14_Afterword](chapters/14_Afterword.md)
Whole book: [Workflow_Studio_Manual_v0.9.0_en.md](Workflow_Studio_Manual_v0.9.0_en.md)
Whole book: [Workflow_Studio_Manual_v0.9.1_en.md](Workflow_Studio_Manual_v0.9.1_en.md)
@@ -2,12 +2,12 @@
Don't Be Afraid of Nodes - Generate Images More Easily and Keep Them Organized
- Covers: Workflow Studio v0.9.0
- Covers: Workflow Studio v0.9.1
- Author: ketle-man
- (c) 2026 ketle-man
This is the **text-only edition** (without screenshots) of the Kindle book.
Chapter files are in the `chapters/` folder; the whole book in one file is `Workflow_Studio_Manual_v0.9.0_en.md`.
Chapter files are in the `chapters/` folder; the whole book in one file is `Workflow_Studio_Manual_v0.9.1_en.md`.
Screen examples are omitted, so please use the book together with Workflow Studio's Help tab.
---
@@ -143,7 +143,7 @@ It is written so that you can follow it if you know basic computer operations (c
## Version and environment covered
- **Workflow Studio**: v0.9.0
- **Workflow Studio**: v0.9.1
- **ComfyUI**: the latest version at the time of writing
- **OS**: Windows (screen examples are from Windows)
@@ -2961,6 +2961,12 @@ Choose the settings in the toolbar and press **Build / Update**.
When you select a card or Gallery point, its prompt tags are shown as buttons under **Selection**.
Click tags to choose them (click again to deselect) and press **Search with selected** to search the space with them.
This helps when you want to find things close to, say, only the hairstyle and clothing of an image.
While tags are selected, the **Add** button in **Selection** becomes **Add selected (N)** and adds only those tags to the prompt area.
With no tags selected it adds the whole item as before (a card's whole prompt, or all tags of a Gallery point).
When a Gallery point is selected, **Selection** also shows an **Open in Gallery** button.
It switches to the Gallery tab, selects the image's folder, and selects the image in the list (its details open on the right).
So that the image is sure to appear, the Gallery's search, favorite, tag and group filters are cleared.
A card's whole prompt can be read under **Full prompt**.
---
+1 -1
View File
@@ -129,7 +129,7 @@ It is written so that you can follow it if you know basic computer operations (c
## Version and environment covered
- **Workflow Studio**: v0.9.0
- **Workflow Studio**: v0.9.1
- **ComfyUI**: the latest version at the time of writing
- **OS**: Windows (screen examples are from Windows)
@@ -311,6 +311,12 @@ Choose the settings in the toolbar and press **Build / Update**.
When you select a card or Gallery point, its prompt tags are shown as buttons under **Selection**.
Click tags to choose them (click again to deselect) and press **Search with selected** to search the space with them.
This helps when you want to find things close to, say, only the hairstyle and clothing of an image.
While tags are selected, the **Add** button in **Selection** becomes **Add selected (N)** and adds only those tags to the prompt area.
With no tags selected it adds the whole item as before (a card's whole prompt, or all tags of a Gallery point).
When a Gallery point is selected, **Selection** also shows an **Open in Gallery** button.
It switches to the Gallery tab, selects the image's folder, and selects the image in the list (its details open on the right).
So that the image is sure to appear, the Gallery's search, favorite, tag and group filters are cleared.
A card's whole prompt can be read under **Full prompt**.
---
+9
View File
@@ -52,6 +52,15 @@ def _maybe_use_selector_event_loop():
print("[Workflow Studio] Using WindowsSelectorEventLoopPolicy (windows_selector_event_loop enabled)")
except Exception as e:
print(f"[WARNING] Workflow Studio: failed to switch to selector event loop: {e}")
return
# Selector方式ではloop.sendfileがasyncioの_sendfile_fallbackになるが、これは16KBバッファを
# 使い回しつつ未送信分をコピーせずトランスポートに積むため、送信が詰まると後続ブロックで
# 上書きされ画像等が壊れて届く(Python 3.12で確認)。aiohttpのsendfileを無効化し、
# チャンクごとに新しいbytesを読む自前フォールバックを使わせる
os.environ["AIOHTTP_NOSENDFILE"] = "1"
fileresponse = sys.modules.get("aiohttp.web_fileresponse")
if fileresponse is not None:
fileresponse.NOSENDFILE = True
_maybe_use_selector_event_loop()
+37 -1
View File
@@ -59,7 +59,10 @@ _init_allowed_root()
# Windowsのレジストリ依存で音声のMIMEが返らない/不統一なため明示登録する(<audio>の再生に必要)
for _ext, _mime in ((".wav", "audio/wav"), (".mp3", "audio/mpeg"), (".ogg", "audio/ogg"),
(".opus", "audio/ogg"), (".m4a", "audio/mp4"), (".flac", "audio/flac")):
(".opus", "audio/ogg"), (".m4a", "audio/mp4"), (".flac", "audio/flac"),
(".glb", "model/gltf-binary"), (".vrm", "model/gltf-binary"), (".gltf", "model/gltf+json"),
(".ply", "application/octet-stream"), (".spz", "application/octet-stream"),
(".bin", "application/octet-stream")):
mimetypes.add_type(_mime, _ext)
@@ -79,6 +82,8 @@ def setup_routes(app: web.Application):
app.router.add_get("/wfm/gallery/image/workflow", get_image_workflow)
app.router.add_get("/wfm/gallery/image/serve", serve_image)
app.router.add_get("/wfm/gallery/image/thumb", serve_thumb)
app.router.add_post("/wfm/gallery/image/thumb3d", save_model3d_thumb)
app.router.add_get("/wfm/gallery/model3d/asset", serve_model3d_asset)
app.router.add_post("/wfm/gallery/image/meta", save_image_meta)
app.router.add_get("/wfm/gallery/image-prompt/root", get_image_prompt_root)
app.router.add_post("/wfm/gallery/image/image-prompt", save_image_prompt)
@@ -386,6 +391,37 @@ async def serve_thumb(request: web.Request) -> web.Response:
})
async def save_model3d_thumb(request: web.Request) -> web.Response:
"""POST /wfm/gallery/image/thumb3d — ブラウザが描画した3Dモデルのサムネイルを保存する"""
try:
body = await request.json()
path = body.get("path", "")
image = body.get("image", "")
if not path or not image:
return web.json_response({"ok": False, "error": "path and image required"}, status=400)
loop = asyncio.get_event_loop()
result = await loop.run_in_executor(None, _service.save_model3d_thumbnail, path, image)
return web.json_response(result, status=200 if result.get("ok") else 400)
except Exception as e:
return web.json_response({"ok": False, "error": str(e)}, status=500)
async def serve_model3d_asset(request: web.Request) -> web.Response:
"""GET /wfm/gallery/model3d/asset — .gltfが参照する外部ファイル(.bin/テクスチャ)を配信する"""
path = request.rel_url.query.get("path", "")
uri = request.rel_url.query.get("uri", "")
if not path or not uri:
return web.Response(status=400)
asset = _service.serve_model3d_asset(path, uri)
if asset is None:
return web.Response(status=404)
content_type, _ = mimetypes.guess_type(str(asset))
return web.FileResponse(asset, headers={
"Content-Type": content_type or "application/octet-stream",
"Cache-Control": "max-age=3600",
})
# ──────────────────────────────────────────────────────────────
# バルク操作
# ──────────────────────────────────────────────────────────────
+118 -5
View File
@@ -14,6 +14,7 @@ import time
from collections import OrderedDict
from pathlib import Path
from typing import Any
from urllib.parse import unquote
logger = logging.getLogger(__name__)
@@ -38,9 +39,22 @@ AUDIO_WAVE_COLORS = {
".m4a": (251, 113, 133), # rose
}
# サポートする画像拡張子(動画・音声はGalleryでは静止画と同じ一覧・配信経路を共有する。
# 3Dモデル拡張子。表示はブラウザのthree.js(static/js/gallery-3d-viewer.js)で行う。
# サーバーに3Dレンダラーが無いため、サムネイルはブラウザが描画してアップロードしたものを使う。
GLTF_EXTENSIONS = {".glb", ".gltf", ".vrm"} # .vrmの実体はGLB
MODEL3D_EXTENSIONS = GLTF_EXTENSIONS | {".ply", ".spz"}
# .gltfが相対URIで参照する外部ファイルとして配信を許可する拡張子
MODEL3D_ASSET_EXTENSIONS = {".bin", ".png", ".jpg", ".jpeg", ".webp"}
# glTF JSON部の読み取り上限。base64埋め込みの巨大な.gltfはメタデータ読み取りを諦める
_GLTF_JSON_MAX = 16 * 1024 * 1024
_MODEL3D_THUMB_MAX_BYTES = 8 * 1024 * 1024
_MODEL3D_THUMB_MAX_SIDE = 2048
_MODEL3D_THUMB_SIZE = 512
# サポートする画像拡張子(動画・音声・3DはGalleryでは静止画と同じ一覧・配信経路を共有する。
# .psdはブラウザが直接レンダリングできないため、配信時に合成済みPNGへ変換する)
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".webp", ".gif", ".svg", ".psd"} | VIDEO_EXTENSIONS | AUDIO_EXTENSIONS
IMAGE_EXTENSIONS = ({".png", ".jpg", ".jpeg", ".webp", ".gif", ".svg", ".psd"}
| VIDEO_EXTENSIONS | AUDIO_EXTENSIONS | MODEL3D_EXTENSIONS)
# Canvas2D の globalCompositeOperation 文字列 -> psd_tools.constants.BlendMode 名
# (Image Edit タブの Layer.blendMode はCanvas2Dの合成モード文字列をそのまま保持している)
@@ -762,6 +776,8 @@ class GalleryService:
embedded = self._read_mp4_metadata(path)
elif ext in AUDIO_EXTENSIONS:
embedded = self._read_audio_metadata(path)
elif ext in GLTF_EXTENSIONS:
embedded = self._read_gltf_metadata(path)
dims = self._read_media_dimensions(path, ext)
saved = self.metadata_store.get(str(path))
@@ -935,6 +951,37 @@ class GalleryService:
logger.debug("Audio metadata read error: %s", e)
return result
def _read_gltf_metadata(self, path: Path) -> dict:
"""glTF/GLB/VRMのasset.extrasを読む。ComfyUIのSaveGLBはここにprompt/workflowを
JSON文字列で書き込む。GLBは先頭のJSONチャンクだけ読み、メッシュ本体は読まない。"""
try:
with open(path, "rb") as f:
if path.suffix.lower() == ".gltf":
if path.stat().st_size > _GLTF_JSON_MAX:
return {}
doc = json.loads(f.read())
else:
head = f.read(20)
if len(head) < 20 or head[:4] != b"glTF":
return {}
length, chunk_type = struct.unpack("<II", head[12:20])
if chunk_type != 0x4E4F534A or length > _GLTF_JSON_MAX: # "JSON"
return {}
doc = json.loads(f.read(length))
extras = doc.get("asset", {}).get("extras")
except (OSError, ValueError, AttributeError) as e:
logger.debug("glTF metadata read error: %s", e)
return {}
if not isinstance(extras, dict):
return {}
result = {}
for k, v in extras.items():
if isinstance(v, str):
result[k] = v
elif k in ("prompt", "workflow") and isinstance(v, dict):
result[k] = json.dumps(v)
return result
def _read_media_dimensions(self, path: Path, ext: str) -> dict:
"""画像は幅高さ、動画は幅高さ+再生時間(秒)を返す。取得できない項目はNone。"""
info: dict = {"width": None, "height": None, "duration": None}
@@ -957,7 +1004,7 @@ class GalleryService:
from psd_tools import PSDImage
psd = PSDImage.open(path)
info["width"], info["height"] = psd.width, psd.height
elif ext != ".svg":
elif ext != ".svg" and ext not in MODEL3D_EXTENSIONS:
from PIL import Image
with Image.open(path) as img:
info["width"], info["height"] = img.size
@@ -989,6 +1036,8 @@ class GalleryService:
embedded = self._read_mp4_metadata(path)
elif ext in AUDIO_EXTENSIONS:
embedded = self._read_audio_metadata(path)
elif ext in GLTF_EXTENSIONS:
embedded = self._read_gltf_metadata(path)
if embedded:
key_groups = (("workflow", "Workflow"), ("prompt", "Prompt"))
@@ -1329,8 +1378,8 @@ class GalleryService:
p = Path(img_path).resolve()
if not p.is_file() or p.suffix.lower() not in IMAGE_EXTENSIONS:
continue
if p.suffix.lower() in VIDEO_EXTENSIONS | AUDIO_EXTENSIONS:
continue # 動画・音声はPSDレイヤーにできない
if p.suffix.lower() in VIDEO_EXTENSIONS | AUDIO_EXTENSIONS | MODEL3D_EXTENSIONS:
continue # 動画・音声・3DはPSDレイヤーにできない
if not self._check_path_allowed(p):
continue
try:
@@ -1530,6 +1579,54 @@ class GalleryService:
return self._get_psd_composite_cache(p)
return p
def serve_model3d_asset(self, model_path: str, uri: str) -> Path | None:
""".gltfが相対URIで参照する外部ファイル(.bin/テクスチャ)のPathを返す。
uriはglTF仕様どおりパーセントエンコードされている。"""
try:
p = Path(model_path).resolve()
if p.suffix.lower() != ".gltf" or not p.is_file() or not self._check_path_allowed(p):
return None
target = (p.parent / unquote(uri)).resolve()
if target.suffix.lower() not in MODEL3D_ASSET_EXTENSIONS or not target.is_file():
return None
except (OSError, ValueError):
return None
if not self._check_path_allowed(target):
logger.warning("serve_model3d_asset: path not allowed: %s", target)
return None
return target
def _model3d_thumb_path(self, p: Path) -> Path:
"""ブラウザが描画した3Dサムネイル(各サイズの元画像)の保存先。"""
mtime = int(p.stat().st_mtime * 1000)
cache_dir = self.data_dir / "thumb_cache"
cache_dir.mkdir(exist_ok=True)
return cache_dir / f"{hashlib.md5(f'{p}:{mtime}:model3d'.encode()).hexdigest()}_m3d.jpg"
def save_model3d_thumbnail(self, model_path: str, image_data: str) -> dict:
"""ブラウザが描画した3Dモデルのサムネイルを保存する。"""
from io import BytesIO
from PIL import Image
p = Path(model_path).resolve()
if not p.is_file() or p.suffix.lower() not in MODEL3D_EXTENSIONS:
return {"ok": False, "error": "Not a 3D model"}
if not self._check_path_allowed(p):
return {"ok": False, "error": "Access denied"}
try:
raw, _ = _decode_image_data_url(image_data)
if len(raw) > _MODEL3D_THUMB_MAX_BYTES:
return {"ok": False, "error": "Image too large"}
with Image.open(BytesIO(raw)) as im:
if max(im.size) > _MODEL3D_THUMB_MAX_SIDE:
return {"ok": False, "error": "Image too large"}
im = im.convert("RGB")
im.thumbnail((_MODEL3D_THUMB_SIZE, _MODEL3D_THUMB_SIZE), Image.LANCZOS)
im.save(self._model3d_thumb_path(p), "JPEG", quality=85, optimize=True)
except (OSError, ValueError) as e:
return {"ok": False, "error": str(e)}
return {"ok": True}
def _get_psd_composite_cache(self, p: Path) -> Path | None:
"""PSDの全レイヤー合成結果をフル解像度PNGとしてディスクキャッシュし、そのPathを返す。"""
try:
@@ -1638,6 +1735,22 @@ class GalleryService:
if thumb_path.exists():
return thumb_path
# 3Dはブラウザが描画して保存したものを縮小して返す。未保存ならNone(404)を返し、
# それを合図にブラウザ側が描画する。
if p.suffix.lower() in MODEL3D_EXTENSIONS:
source = self._model3d_thumb_path(p)
if not source.exists():
return None
try:
from PIL import Image
with Image.open(source) as img:
img.thumbnail((width, width), Image.LANCZOS)
img.save(thumb_path, "JPEG", quality=85, optimize=True)
return thumb_path
except Exception as e:
logger.warning("serve_thumbnail: 3D thumbnail failed for %s: %s", p, e)
return None
# 音声はPillowで開けない。PyAVでデコードして波形をJPEGに描画しキャッシュする。
if p.suffix.lower() in AUDIO_EXTENSIONS:
try:
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-workflow-studio"
description = "A comprehensive workflow, asset management, and generation UI plugin for ComfyUI. Manage workflows, models, images, and prompts; batch generation and Image Feeder in the GenerateUI tab; library side panel with canvas drag & drop and AI tools."
version = "0.9.0"
version = "0.9.4"
license = { file = "LICENSE" }
requires-python = ">= 3.10"
dependencies = ["jinja2"]
+81
View File
@@ -1155,3 +1155,84 @@
.wfm-sem-danger { margin-left: auto; color: #ef4444; }
.wfm-sem-row .wfm-select { width: auto; min-width: 90px; }
/* 3Dモデルビューア */
.wfm-gallery-thumb-video-badge.wfm-gallery-thumb-video-badge--corner {
top: auto;
left: auto;
right: 4px;
bottom: 4px;
width: auto;
height: auto;
padding: 1px 5px;
border-radius: 3px;
font-size: 10px;
line-height: 14px;
transform: none;
}
.wfm-g3d-box {
position: relative;
background: #181c26;
border-radius: 4px;
overflow: hidden;
}
.wfm-gallery-detail-img.wfm-g3d-box {
width: 100%;
height: 100%;
}
.wfm-gallery-lightbox-img.wfm-g3d-box {
width: 90vw;
height: 85vh;
}
.wfm-lightbox-compare-img.wfm-g3d-box {
width: calc(92vw / var(--compare-cols, 2) - 12px);
height: 78vh;
}
.wfm-g3d-canvas {
display: block;
width: 100%;
height: 100%;
outline: none;
}
.wfm-g3d-status {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 8px;
text-align: center;
color: var(--wfm-text-secondary);
font-size: 12px;
pointer-events: none;
}
.wfm-g3d-status--error {
color: #f87171;
}
.wfm-g3d-stats {
position: absolute;
left: 6px;
bottom: 4px;
color: #cbd5e1;
font-size: 10px;
text-shadow: 0 0 3px #000;
pointer-events: none;
}
.wfm-g3d-reset {
position: absolute;
top: 4px;
right: 4px;
width: 22px;
height: 22px;
padding: 0;
border: none;
border-radius: 4px;
background: rgba(0, 0, 0, 0.5);
color: #e2e8f0;
font-size: 13px;
line-height: 22px;
cursor: pointer;
}
.wfm-g3d-reset:hover {
background: rgba(0, 0, 0, 0.75);
}
+100
View File
@@ -466,3 +466,103 @@
background: var(--wfm-border);
border-radius: 2px;
}
/* Draw tool palette */
.ie-palette-content {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 6px 14px;
}
.ie-palette-wells {
gap: 6px;
}
.ie-palette-well,
.ie-palette-swatch {
padding: 0;
border-radius: 50%;
background: var(--swatch, transparent);
cursor: pointer;
}
.ie-palette-well {
width: 26px;
height: 26px;
border: 1px solid var(--wfm-text-secondary);
}
.ie-palette-well.is-active {
outline: 2px solid var(--wfm-primary);
outline-offset: 2px;
}
.ie-palette-grid {
display: grid;
grid-template-columns: repeat(10, 16px);
grid-auto-rows: 16px;
gap: 2px;
}
.ie-palette-swatch {
width: 16px;
height: 16px;
border: 1px solid rgba(128, 128, 128, 0.7);
}
.ie-palette-swatch.is-empty {
border-color: var(--wfm-text-secondary);
opacity: 0.6;
}
.ie-palette-swatch:hover,
.ie-palette-swatch:focus-visible,
.ie-palette-well:focus-visible {
outline: 1px solid var(--wfm-text);
outline-offset: 1px;
opacity: 1;
}
.ie-palette-swatch.is-current {
outline: 2px solid var(--wfm-primary);
outline-offset: 0;
}
.ie-palette-picker {
position: fixed;
width: 1px;
height: 1px;
padding: 0;
border: 0;
opacity: 0;
pointer-events: none;
}
.ie-palette-menu {
position: fixed;
z-index: 1000;
display: flex;
flex-direction: column;
min-width: 150px;
padding: 4px;
border: 1px solid var(--wfm-border);
border-radius: 4px;
background: var(--wfm-surface);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.ie-palette-menu button {
padding: 5px 10px;
border: 0;
border-radius: 3px;
background: transparent;
color: var(--wfm-text);
font-size: 12px;
text-align: left;
cursor: pointer;
}
.ie-palette-menu button:hover {
background: var(--wfm-surface-hover);
}
+3 -1
View File
@@ -588,7 +588,7 @@ function applyI18nToHtml() {
"wfm-help-gallery-26": "helpGallery26",
"wfm-help-gallery-28": "helpGallery28", "wfm-help-gallery-29": "helpGallery29",
"wfm-help-gallery-30": "helpGallery30", "wfm-help-gallery-31": "helpGallery31",
"wfm-help-gallery-32": "helpGallery32", "wfm-help-gallery-33": "helpGallery33", "wfm-help-gallery-34": "helpGallery34", "wfm-help-gallery-35": "helpGallery35", "wfm-help-gallery-36": "helpGallery36", "wfm-help-gallery-37": "helpGallery37",
"wfm-help-gallery-32": "helpGallery32", "wfm-help-gallery-33": "helpGallery33", "wfm-help-gallery-34": "helpGallery34", "wfm-help-gallery-35": "helpGallery35", "wfm-help-gallery-36": "helpGallery36", "wfm-help-gallery-37": "helpGallery37", "wfm-help-gallery-38": "helpGallery38",
"wfm-help-gallery-card-styleprompt-title": "helpGalleryCardStyleprompt",
"wfm-help-gallery-card-stylecatalog-title": "helpGalleryCardStylecatalog",
"wfm-help-tagger-title": "helpTaggerTitle",
@@ -645,6 +645,8 @@ function applyI18nToHtml() {
"wfm-help-imageedit-26": "helpImageEdit26", "wfm-help-imageedit-27": "helpImageEdit27",
"wfm-help-imageedit-28": "helpImageEdit28", "wfm-help-imageedit-29": "helpImageEdit29",
"wfm-help-imageedit-30": "helpImageEdit30",
"wfm-help-imageedit-draw-palette": "helpImageEditDrawPalette", "wfm-help-imageedit-draw-kbd": "helpImageEditDrawKbd",
"wfm-help-imageedit-tabkbd-draw": "helpImageEditDrawKbd",
"wfm-help-imageedit-31": "helpImageEdit31", "wfm-help-imageedit-32": "helpImageEdit32",
"wfm-help-imageedit-33": "helpImageEdit33", "wfm-help-imageedit-34": "helpImageEdit34",
"wfm-help-imageedit-7b": "helpImageEdit7b", "wfm-help-imageedit-7c": "helpImageEdit7c",
+26 -8
View File
@@ -237,6 +237,13 @@ function _getDynamicComboSubNames(objectInfo, classType, widgetName, selectedKey
];
}
function _isDynamicComboKey(objectInfo, classType, widgetName, value) {
const info = objectInfo[classType];
const spec = info?.input?.required?.[widgetName] || info?.input?.optional?.[widgetName];
const options = spec?.[1]?.options;
return !Array.isArray(options) || options.some((o) => o.key === value);
}
/**
* Detect if a widget value is a frontend-only extra (like "control_after_generate").
* These values appear in widgets_values but are not in object_info inputs.
@@ -371,9 +378,15 @@ function _normalizeLinkedWidgetValues(objectInfo, nodeType, widgetsValues, isLin
const comboExpander = (name, selectedKey) => _getDynamicComboSubNames(objectInfo, nodeType, name, selectedKey);
// If skipping linked widgets already accounts for every entry, widgets_values is already in
// the modern (no dangling linked entries) format — nothing to strip.
// the modern (no dangling linked entries) format — nothing to strip. The count alone can match
// by accident: TextGenerateV2 ["", 1536, "off", true, true, "auto"] with prompt linked reads
// 1536 as sampling_mode, which falls back to the first option and swallows the rest. A selector
// that doesn't hold one of its option keys means this reading is misaligned.
const skipSim = _simulateWidgetValues(widgetNames, widgetTypes, widgetsValues, isLinkedName, true, comboExpander);
if (skipSim.consumed === widgetsValues.length) return widgetsValues;
const selectorsValid = widgetNames.every((name, i) => widgetTypes[i] !== "COMFY_DYNAMICCOMBO_V3"
|| skipSim.positions[name] < 0
|| _isDynamicComboKey(objectInfo, nodeType, name, widgetsValues[skipSim.positions[name]]));
if (skipSim.consumed === widgetsValues.length && selectorsValid) return widgetsValues;
// Otherwise it's "legacy full": recompute with every widget present to find exactly which
// indices the linked ones occupy — including any control_after_generate extra a linked
@@ -1271,8 +1284,9 @@ export const comfyWorkflow = {
// "prompt" (prompt-enhancer switch chain, Qwen Image 2.1 Turbo) is the positive text,
// a linked "negative_prompt" the negative.
// TextEncodeFibo2 (Fibo 2.0 Edit) has the same shape, its prompt arriving via a
// PreviewAny -> prompt-enhancer switch chain.
if (ct === "TextEncodeQwenImage21" || ct === "TextEncodeFibo2") {
// PreviewAny -> prompt-enhancer switch chain. PH3ImageConditioning (p-h3-image) too,
// without a negative prompt.
if (ct === "TextEncodeQwenImage21" || ct === "TextEncodeFibo2" || ct === "PH3ImageConditioning") {
if (Array.isArray(inputs.prompt)) samplerPositiveRef[inputs.prompt[0]] = true;
if (Array.isArray(inputs.negative_prompt)) samplerNegativeRef[inputs.negative_prompt[0]] = true;
}
@@ -1519,7 +1533,8 @@ export const comfyWorkflow = {
// nodes already picked up generically by the load_image_nodes pass below.
// TextEncodeFibo2 (Fibo 2.0) — same prompt/negative_prompt/images.image_N shape; its
// negative_prompt is a structured VGL JSON caption (edited as plain text here).
if (ct === "TextEncodeQwenImage21" || ct === "TextEncodeFibo2") {
// PH3ImageConditioning (p-h3-image) has prompt and images.image_N, no negative_prompt.
if (ct === "TextEncodeQwenImage21" || ct === "TextEncodeFibo2" || ct === "PH3ImageConditioning") {
if (typeof inputs.prompt === "string") {
result.prompt_nodes.push({
id, type: ct, title: `${title} [positive]`, role: "positive",
@@ -1701,8 +1716,9 @@ export const comfyWorkflow = {
// width/height are commonly wired to a ResolutionSelector-style helper node
// (array link ref) rather than a direct number — leave those as undefined so
// the settings-tab UI falls back to its default instead of rendering a link ref.
// TextEncodeFibo2 likewise (0 = Fibo 2.0's trained size for the first image's aspect).
if (ct === "TextEncodeMageFlowEdit" || ct === "TextEncodeFibo2") {
// TextEncodeFibo2 likewise (0 = Fibo 2.0's trained size for the first image's aspect),
// and PH3ImageConditioning (0 = image_1's size, or 2912 without images).
if (ct === "TextEncodeMageFlowEdit" || ct === "TextEncodeFibo2" || ct === "PH3ImageConditioning") {
result.latent_nodes.push({
id, type: ct, title,
width: typeof inputs.width === "number" ? inputs.width : undefined,
@@ -1927,7 +1943,8 @@ function _unifyPromptEnhancerText(api) {
const tgRef = sw.inputs.on_true;
if (!Array.isArray(tgRef)) continue;
const tg = api[String(tgRef[0])];
if (tg?.class_type !== "TextGenerate" || tg.inputs.prompt !== sw.inputs.on_false) continue;
if ((tg?.class_type !== "TextGenerate" && tg?.class_type !== "TextGenerateV2")
|| tg.inputs.prompt !== sw.inputs.on_false) continue;
const primId = `${swId}:wfs_prompt`;
api[primId] = {
class_type: "PrimitiveStringMultiline",
@@ -1976,6 +1993,7 @@ function _getWidgetMapping(nodeType) {
WFS_PromptText: ["positive", "negative"],
TextEncodeQwenImage21: ["prompt", "negative_prompt", "resolution"],
TextEncodeFibo2: ["prompt", "negative_prompt", "width", "height", "batch_size"],
PH3ImageConditioning: ["prompt", "width", "height"],
TextEncodeMingImageEdit: ["prompt"],
EmptyQwenImageLayeredLatentImage: ["width", "height", "layers", "batch_size"],
};
+431
View File
@@ -0,0 +1,431 @@
/**
* Gallery 3D viewer: glb / gltf / vrm / ply (mesh, point cloud, Gaussian splat) / spz.
*
* three.js is loaded the first time a 3D file is shown (static/lib/three-viewer).
* The server has no 3D renderer, so thumbnails are rendered here and uploaded
* (see ensureModelThumb); until then /thumb returns 404 and the card shows a placeholder.
*/
import { t } from "./i18n.js";
const LIB_URL = "/wfm_static/lib/three-viewer/three-viewer.js";
const DRACO_PATH = "/wfm_static/lib/three-viewer/draco/";
// Sentinel base for relative URIs in .gltf files; rewritten to the asset route on load.
const ASSET_BASE = "/__wfm3d__/";
const BACKGROUND = 0x181c26;
const THUMB_SIZE = 512;
const THUMB_TIMEOUT_MS = 60_000;
// Larger files only get a thumbnail when opened, not while scrolling the grid.
const AUTO_THUMB_MAX_BYTES = 128 * 1024 * 1024;
// Splats are sorted asynchronously and spring bones settle over time, so keep drawing
// for a while after each change instead of only once.
const SETTLE_FRAMES = 60;
const MODEL3D_EXTENSIONS = [".glb", ".gltf", ".vrm", ".ply", ".spz"];
export function isModel3dFile(img) {
const source = (img?.ext || img?.filename || img?.path || "").toLowerCase();
return MODEL3D_EXTENSIONS.some((ext) => source.endsWith(ext));
}
export function model3dExtLabel(img) {
const source = (img?.ext || img?.filename || img?.path || "").toLowerCase();
return (MODEL3D_EXTENSIONS.find((ext) => source.endsWith(ext)) || "").slice(1).toUpperCase();
}
let _libPromise = null;
function loadLib() {
if (!_libPromise) {
_libPromise = import(LIB_URL).catch((e) => {
_libPromise = null;
throw e;
});
}
return _libPromise;
}
const serveUrl = (path) => `/wfm/gallery/image/serve?path=${encodeURIComponent(path)}`;
const assetUrl = (path, uri) => `/wfm/gallery/model3d/asset?path=${encodeURIComponent(path)}&uri=${encodeURIComponent(uri)}`;
async function fetchBytes(url, signal, onProgress) {
const res = await fetch(url, { signal });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const total = Number(res.headers.get("Content-Length")) || 0;
if (!total || !res.body || !onProgress) return res.arrayBuffer();
const out = new Uint8Array(total);
const reader = res.body.getReader();
let received = 0;
for (;;) {
const { done, value } = await reader.read();
if (done) break;
out.set(value, received);
received += value.length;
onProgress(received / total);
}
return out.buffer.slice(0, received);
}
// 3DGS exports are .ply too; they are told apart by their per-splat properties.
function isSplatPly(buffer) {
const head = new TextDecoder("latin1").decode(new Uint8Array(buffer, 0, Math.min(buffer.byteLength, 8192)));
const end = head.indexOf("end_header");
const header = end >= 0 ? head.slice(0, end) : head;
return /property\s+\w+\s+f_dc_0\b/.test(header) || /property\s+\w+\s+scale_0\b/.test(header);
}
function countGeometry(root) {
let vertices = 0;
let triangles = 0;
root.traverse((o) => {
const g = o.geometry;
if (!g?.attributes?.position) return;
vertices += g.attributes.position.count;
if (o.isMesh) triangles += (g.index ? g.index.count : g.attributes.position.count) / 3;
});
return { vertices, triangles: Math.round(triangles) };
}
async function loadGltf(lib, img, buffer, isVrm) {
const manager = new lib.THREE.LoadingManager();
manager.setURLModifier((url) => (url.startsWith(ASSET_BASE) ? assetUrl(img.path, url.slice(ASSET_BASE.length)) : url));
const loader = new lib.GLTFLoader(manager);
const draco = new lib.DRACOLoader(manager).setDecoderPath(DRACO_PATH);
loader.setDRACOLoader(draco);
loader.setMeshoptDecoder(lib.MeshoptDecoder);
if (isVrm) loader.register((parser) => new lib.VRMLoaderPlugin(parser));
let gltf;
try {
gltf = await loader.parseAsync(buffer, ASSET_BASE);
} finally {
draco.dispose();
}
const vrm = gltf.userData?.vrm;
if (vrm) lib.VRMUtils.rotateVRM0(vrm); // VRM 0.x faces -Z
const object = vrm ? vrm.scene : gltf.scene;
const mixer = gltf.animations?.length ? new lib.THREE.AnimationMixer(object) : null;
if (mixer) mixer.clipAction(gltf.animations[0]).play();
return {
object,
animated: !!mixer,
settles: !!vrm,
update: (dt) => { mixer?.update(dt); vrm?.update(dt); },
stats: countGeometry(object),
};
}
function loadPlyGeometry(lib, buffer) {
const { THREE } = lib;
const geometry = new lib.PLYLoader().parse(buffer);
// "property double" (e.g. Open3D) comes back as a Float64Array, which WebGL rejects.
for (const [name, attr] of Object.entries(geometry.attributes)) {
if (attr.array instanceof Float64Array) {
geometry.setAttribute(name, new THREE.BufferAttribute(Float32Array.from(attr.array), attr.itemSize, attr.normalized));
}
}
const hasColor = !!geometry.attributes.color;
if (!geometry.index) {
geometry.computeBoundingSphere();
const material = new THREE.PointsMaterial({
size: geometry.boundingSphere.radius / 300,
vertexColors: hasColor,
color: hasColor ? 0xffffff : 0xb8c0cc,
});
const object = new THREE.Points(geometry, material);
return { object, stats: countGeometry(object) };
}
if (!geometry.attributes.normal) geometry.computeVertexNormals();
const material = new THREE.MeshStandardMaterial({
vertexColors: hasColor,
color: hasColor ? 0xffffff : 0xb8c0cc,
roughness: 0.7,
side: THREE.DoubleSide,
});
const object = new THREE.Mesh(geometry, material);
return { object, stats: countGeometry(object) };
}
async function loadSplat(lib, stage, img, buffer) {
const { SparkRenderer, SplatMesh } = await lib.loadSpark();
const spark = new SparkRenderer({ renderer: stage.renderer });
stage.scene.add(spark);
const mesh = new SplatMesh({ fileBytes: new Uint8Array(buffer), fileName: img.filename || img.path });
await mesh.initialized;
mesh.quaternion.set(1, 0, 0, 0); // splats are stored Y-down
return {
object: mesh,
splat: true,
settles: true,
box: mesh.getBoundingBox(true),
stats: { splats: mesh.packedSplats?.numSplats ?? mesh.numSplats ?? 0 },
dispose: () => { mesh.dispose(); spark.dispose(); },
};
}
async function loadInto(lib, stage, img, signal, onProgress) {
const buffer = await fetchBytes(serveUrl(img.path), signal, onProgress);
const name = (img.filename || img.path).toLowerCase();
if (name.endsWith(".spz")) return loadSplat(lib, stage, img, buffer);
if (name.endsWith(".ply")) {
return isSplatPly(buffer) ? loadSplat(lib, stage, img, buffer) : loadPlyGeometry(lib, buffer);
}
return loadGltf(lib, img, buffer, name.endsWith(".vrm"));
}
function createStage(lib, canvas) {
const { THREE } = lib;
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, preserveDrawingBuffer: false });
renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2));
const scene = new THREE.Scene();
scene.background = new THREE.Color(BACKGROUND);
const pmrem = new THREE.PMREMGenerator(renderer);
const envTarget = pmrem.fromScene(new lib.RoomEnvironment(), 0.04);
pmrem.dispose();
scene.environment = envTarget.texture;
scene.environmentIntensity = 0.8;
const sun = new THREE.DirectionalLight(0xffffff, 1.2);
sun.position.set(2, 4, 3);
scene.add(sun);
const camera = new THREE.PerspectiveCamera(35, 1, 0.01, 1000);
return { renderer, scene, camera, envTarget };
}
function frameObject(lib, stage, model) {
const { THREE } = lib;
const { camera, scene } = stage;
scene.add(model.object);
model.object.updateMatrixWorld(true);
const box = model.box
? model.box.clone().applyMatrix4(model.object.matrixWorld)
: new THREE.Box3().setFromObject(model.object);
if (box.isEmpty()) box.set(new THREE.Vector3(-1, -1, -1), new THREE.Vector3(1, 1, 1));
const center = box.getCenter(new THREE.Vector3());
const radius = Math.max(box.getSize(new THREE.Vector3()).length() / 2, 1e-4);
const distance = (radius / Math.sin(THREE.MathUtils.degToRad(camera.fov / 2))) * 1.05;
camera.near = distance / 500;
camera.far = distance * 50;
camera.position.copy(center).add(new THREE.Vector3(0.35, 0.2, 1).normalize().multiplyScalar(distance));
camera.lookAt(center);
camera.updateProjectionMatrix();
return center;
}
function disposeStage(stage, model) {
try { model?.dispose?.(); } catch { /* already gone */ }
model?.object?.traverse?.((o) => {
o.geometry?.dispose?.();
for (const m of [].concat(o.material || [])) {
for (const v of Object.values(m)) if (v?.isTexture) v.dispose();
m.dispose?.();
}
});
stage.envTarget.dispose();
stage.renderer.dispose();
stage.renderer.forceContextLoss(); // browsers only allow ~16 live contexts
}
function formatStats(stats) {
const n = (v) => Number(v).toLocaleString();
if (stats.splats != null) return t("gallery3dStatsSplats", n(stats.splats));
if (!stats.triangles) return t("gallery3dStatsPoints", n(stats.vertices));
return t("gallery3dStatsMesh", n(stats.vertices), n(stats.triangles));
}
// Center-crop the canvas to a square JPEG. Must run right after render() in the same task,
// because the drawing buffer is not preserved.
function captureJpeg(canvas) {
const out = document.createElement("canvas");
out.width = out.height = THUMB_SIZE;
const side = Math.min(canvas.width, canvas.height);
out.getContext("2d").drawImage(
canvas, (canvas.width - side) / 2, (canvas.height - side) / 2, side, side, 0, 0, THUMB_SIZE, THUMB_SIZE,
);
return out.toDataURL("image/jpeg", 0.85);
}
async function uploadThumb(path, image) {
const res = await fetch("/wfm/gallery/image/thumb3d", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ path, image }),
});
return res.ok;
}
/**
* Interactive viewer inside `container`. It disposes itself once `container` leaves the
* DOM, so callers can simply replace or remove the element.
* `onReady(capture)` fires after the model is drawn; capture() returns a thumbnail data URL.
*/
export function mountModelViewer(container, img, { onReady } = {}) {
container.classList.add("wfm-g3d");
container.innerHTML = `
<canvas class="wfm-g3d-canvas"></canvas>
<div class="wfm-g3d-status">${t("gallery3dLoading")}</div>
<div class="wfm-g3d-stats"></div>
<button type="button" class="wfm-g3d-reset" title="${t("gallery3dResetView")}">⟲</button>`;
const canvas = container.querySelector(".wfm-g3d-canvas");
const status = container.querySelector(".wfm-g3d-status");
const statsEl = container.querySelector(".wfm-g3d-stats");
const resetBtn = container.querySelector(".wfm-g3d-reset");
const abort = new AbortController();
let stage = null;
let model = null;
let controls = null;
let resizeObserver = null;
let frameId = 0;
let closed = false;
const close = () => {
if (closed) return;
closed = true;
abort.abort();
cancelAnimationFrame(frameId);
resizeObserver?.disconnect();
controls?.dispose();
if (stage) disposeStage(stage, model);
};
const fail = (e) => {
if (closed || e?.name === "AbortError") return;
console.error("[WFS] 3D viewer:", img.path, e);
status.textContent = t("gallery3dLoadFailed");
status.classList.add("wfm-g3d-status--error");
status.style.display = "";
close();
};
(async () => {
const lib = await loadLib();
if (closed) return;
stage = createStage(lib, canvas);
const { renderer, scene, camera } = stage;
model = await loadInto(lib, stage, img, abort.signal, (p) => {
status.textContent = `${t("gallery3dLoading")} ${Math.round(p * 100)}%`;
});
if (closed) {
disposeStage(stage, model);
return;
}
const center = frameObject(lib, stage, model);
const home = camera.position.clone();
controls = new lib.OrbitControls(camera, canvas);
controls.target.copy(center);
controls.enableDamping = true;
controls.update();
let dirty = SETTLE_FRAMES;
const invalidate = () => { dirty = SETTLE_FRAMES; };
controls.addEventListener("change", invalidate);
resetBtn.addEventListener("click", () => {
camera.position.copy(home);
controls.target.copy(center);
controls.update();
invalidate();
});
const resize = () => {
const w = container.clientWidth;
const h = container.clientHeight;
if (!w || !h) return;
renderer.setSize(w, h, false);
camera.aspect = w / h;
camera.updateProjectionMatrix();
invalidate();
};
resizeObserver = new ResizeObserver(resize);
resizeObserver.observe(container);
resize();
renderer.render(scene, camera); // surface a model that cannot be drawn as a load failure
status.style.display = "none";
statsEl.textContent = formatStats(model.stats);
onReady?.(() => {
renderer.render(scene, camera);
return captureJpeg(canvas);
});
let last = performance.now();
const tick = () => {
if (!container.isConnected) {
close();
return;
}
frameId = requestAnimationFrame(tick);
const now = performance.now();
const dt = (now - last) / 1000;
last = now;
if (!container.clientWidth) return; // hidden tab
controls.update();
if (!model.animated && dirty <= 0) return;
dirty -= 1;
try {
model.update?.(dt);
renderer.render(scene, camera);
} catch (e) {
fail(e);
}
};
tick();
})().catch(fail);
return { close };
}
async function renderThumb(img) {
const lib = await loadLib();
const canvas = document.createElement("canvas");
const stage = createStage(lib, canvas);
stage.renderer.setPixelRatio(1);
stage.renderer.setSize(THUMB_SIZE, THUMB_SIZE, false);
const abort = new AbortController();
const timer = setTimeout(() => abort.abort(), THUMB_TIMEOUT_MS);
let model = null;
try {
model = await loadInto(lib, stage, img, abort.signal);
frameObject(lib, stage, model);
model.update?.(0);
for (let i = 0; model.splat && i < SETTLE_FRAMES; i++) {
stage.renderer.render(stage.scene, stage.camera);
await new Promise((r) => requestAnimationFrame(r));
}
stage.renderer.render(stage.scene, stage.camera);
return captureJpeg(canvas);
} finally {
clearTimeout(timer);
disposeStage(stage, model);
}
}
const _thumbJobs = new Map(); // path -> Promise<boolean>, also remembers failures for this session
let _thumbQueue = Promise.resolve();
/**
* Render and store the thumbnail of a 3D file, one file at a time.
* `isWanted()` is checked when the job's turn comes, so cards scrolled away or replaced by
* a folder change cost nothing. Resolves true once the server has the thumbnail.
*/
export function ensureModelThumb(img, isWanted = () => true) {
if (_thumbJobs.has(img.path)) return _thumbJobs.get(img.path);
if (img.size > AUTO_THUMB_MAX_BYTES) return Promise.resolve(false);
const job = _thumbQueue.then(async () => {
if (!isWanted()) {
_thumbJobs.delete(img.path);
return false;
}
try {
return await uploadThumb(img.path, await renderThumb(img));
} catch (e) {
console.warn("[WFS] 3D thumbnail failed:", img.path, e);
return false;
}
});
_thumbJobs.set(img.path, job);
_thumbQueue = job;
return job;
}
/** Store a thumbnail captured from an open viewer (covers files too large for ensureModelThumb). */
export function saveModelThumb(img, capture) {
const job = uploadThumb(img.path, capture()).catch(() => false);
_thumbJobs.set(img.path, job);
return job;
}
+167 -6
View File
@@ -15,6 +15,7 @@ import { callLLM, loadAiSettings, isValidBackendUrl } from "./ai-tab.js";
import { initImagePromptTab, activateImagePromptTab } from "./image-prompt-tab.js";
import { initStyleCatalogTab, activateStyleCatalogTab } from "./style-catalog-tab.js";
import { applyStoredVideoVolume } from "./settings-tab.js";
import { isModel3dFile, model3dExtLabel, mountModelViewer, ensureModelThumb, saveModelThumb } from "./gallery-3d-viewer.js";
import { initSemantic, refreshSemanticDots, getSemanticMode, isSemanticOn, fetchSemanticImages, semanticCountLabel, setSemanticCountText, semanticErrorMessage, exitSimilarMode } from "./gallery-semantic.js";
// ── 定数 ─────────────────────────────────────────────────────
@@ -80,9 +81,11 @@ export function isAudioFile(img) {
}
// プレビュー/ライトボックス/比較用のメディア要素HTML。音声は波形画像+<audio controls>。
// 3Dは空の枠だけ返し、挿入後に mountModelViewers() がビューアを起動する。
function mediaElementHtml(img, { imgClass, videoAttrs = "controls", audioAttrs = "controls", title = "" }) {
const src = API.serveImage(img.path);
const titleAttr = title ? ` title="${title}"` : "";
if (isModel3dFile(img)) return `<div class="${imgClass} wfm-g3d-box" data-path="${escapeHtml(img.path)}"${titleAttr}></div>`;
if (isVideoFile(img)) return `<video src="${src}" class="${imgClass}" ${videoAttrs}${titleAttr}></video>`;
if (isAudioFile(img)) {
return `<div class="wfm-gallery-audio-box">
@@ -93,6 +96,56 @@ function mediaElementHtml(img, { imgClass, videoAttrs = "controls", audioAttrs =
return `<img src="${src}" class="${imgClass}" alt="${escapeHtml(img.filename)}"${titleAttr}>`;
}
// root内の3D枠でビューアを起動する。枠がDOMから外れるとビューアは自分で破棄される。
function mountModelViewers(root, imgs) {
root.querySelectorAll(".wfm-g3d-box").forEach((box) => {
const img = imgs.find((im) => im.path === box.dataset.path);
if (!img) return;
mountModelViewer(box, img, {
onReady: (capture) => {
// グリッドの自動描画はサイズ上限があるため、開いたときにも保存しておく
if (_modelThumbMissing.delete(img.path)) {
saveModelThumb(img, capture).then((ok) => { if (ok) refreshModelThumb(img.path); });
}
},
});
});
}
// サムネイルが無く、開いたときに保存する3Dファイルのパス
const _modelThumbMissing = new Set();
function refreshModelThumb(path) {
document.querySelectorAll(".wfm-gallery-thumb-img[data-model3d]").forEach((el) => {
if (el.dataset.model3d === path) el.dispatchEvent(new CustomEvent("wfm-model3d-thumb"));
});
}
// サムネイル未作成の3Dファイル: プレースホルダーを出し、描画できたら差し替える
function setupModelThumb(card, imgEl, img) {
imgEl.dataset.model3d = img.path;
const placeholder = document.createElement("div");
placeholder.className = "wfm-gallery-thumb-placeholder";
placeholder.textContent = model3dExtLabel(img);
const show = () => {
placeholder.remove();
imgEl.style.display = "";
imgEl.src = `${API.thumb(img.path)}&t=${Date.now()}`;
};
imgEl.addEventListener("wfm-model3d-thumb", show);
imgEl.onerror = () => {
if (placeholder.isConnected) return;
imgEl.style.display = "none";
card.insertBefore(placeholder, imgEl.nextSibling);
_modelThumbMissing.add(img.path);
ensureModelThumb(img, () => card.isConnected).then((ok) => {
if (!ok) return;
_modelThumbMissing.delete(img.path);
refreshModelThumb(img.path);
});
};
}
// ComfyUI Comic Creater からiframe越しに画像を受け取り、Generate UIのImage入力スロットへ直接セットする(I2I連携)。
// Comic Creater側の「I2Iへ送る」ボタンから
// iframe.contentWindow._wfmReceiveImageForI2I(blob, name, workflowData?, workflowFilename?) として呼ばれる。
@@ -740,13 +793,16 @@ function createThumbCard(img) {
placeholder.textContent = "?";
card.insertBefore(placeholder, imgEl.nextSibling);
};
const isModel3d = isModel3dFile(img);
if (isModel3d) setupModelThumb(card, imgEl, img);
card.appendChild(imgEl);
// 動画ファイルは再生アイコンバッジを重ねて表示(サムネイル自体は先頭フレームのJPEG)
if (isVideoFile(img) || isAudioFile(img)) {
if (isVideoFile(img) || isAudioFile(img) || isModel3d) {
const playBadge = document.createElement("div");
playBadge.className = "wfm-gallery-thumb-video-badge";
playBadge.textContent = isAudioFile(img) ? "♪" : "▶";
playBadge.textContent = isModel3d ? "3D" : isAudioFile(img) ? "♪" : "▶";
playBadge.classList.toggle("wfm-gallery-thumb-video-badge--corner", isModel3d);
card.appendChild(playBadge);
}
@@ -779,7 +835,7 @@ function createThumbCard(img) {
e.stopPropagation();
await toggleFeederGroupInPlace(img, feederBtn);
});
card.appendChild(feederBtn);
if (!isModel3d) card.appendChild(feederBtn); // Feederノードは画像しか読めない
// クリック: 詳細表示 / Ctrl+クリック: 複数選択 / Shift+クリック: 範囲選択 / Alt+クリック: Metadataタブで開く
card.addEventListener("click", (e) => {
@@ -869,6 +925,18 @@ function createTable(images) {
const tdThumb = document.createElement("td");
tdThumb.innerHTML = `<img src="${API.thumb(img.path, 128)}" class="wfm-gallery-table-thumb" loading="lazy" alt="">`;
if (isModel3dFile(img)) {
const thumbEl = tdThumb.firstElementChild;
thumbEl.onerror = () => {
thumbEl.style.visibility = "hidden";
ensureModelThumb(img, () => thumbEl.isConnected).then((ok) => {
if (!ok) return;
thumbEl.onerror = null;
thumbEl.style.visibility = "";
thumbEl.src = `${API.thumb(img.path, 128)}&t=${Date.now()}`;
});
};
}
const tdName = document.createElement("td");
tdName.className = "wfm-gallery-table-name";
@@ -1074,8 +1142,9 @@ async function loadImageDetail(img) {
${mediaElementHtml(img, { imgClass: "wfm-gallery-detail-img", title: "Double-click to enlarge" })}
</div>
`;
const previewMediaEl = preview.querySelector(isVideo ? "video" : "img");
const previewMediaEl = preview.querySelector(isModel3dFile(img) ? ".wfm-g3d-box" : isVideo ? "video" : "img");
previewMediaEl.addEventListener("dblclick", () => openLightbox(img));
mountModelViewers(preview, [img]);
if (isVideo) applyStoredVideoVolume(previewMediaEl);
if (isAudio) applyStoredVideoVolume(preview.querySelector("audio"));
@@ -1870,6 +1939,13 @@ function imageByPath(path) {
return map.get(path);
}
// 画像を前提とする送信先へ3Dファイルを渡さない
function rejectModel3d() {
if (!isModel3dFile(state.selectedImage)) return false;
showToast(t("gallery3dNotImage"), "info");
return true;
}
function isConvertible(img) {
return !!img && (isAudioFile(img) || isVideoFile(img));
}
@@ -2104,6 +2180,7 @@ function openLightbox(img) {
}
});
document.body.appendChild(overlay);
mountModelViewers(overlay, [img]);
if (isVideoFile(img)) applyStoredVideoVolume(overlay.querySelector("video"));
if (isAudioFile(img)) applyStoredVideoVolume(overlay.querySelector("audio"));
}
@@ -2118,7 +2195,7 @@ function openCompare(paths) {
overlay.className = "wfm-gallery-lightbox wfm-lightbox-compare";
const itemsHtml = imgs.map(img => {
const mediaHtml = isAudioFile(img)
const mediaHtml = isAudioFile(img) || isModel3dFile(img)
? mediaElementHtml(img, { imgClass: "wfm-lightbox-compare-img" })
: isVideoFile(img)
? `<video src="${API.serveImage(img.path)}" class="wfm-lightbox-compare-img" controls></video>`
@@ -2143,9 +2220,89 @@ function openCompare(paths) {
}
});
document.body.appendChild(overlay);
mountModelViewers(overlay, imgs);
overlay.querySelectorAll("video, audio").forEach(applyStoredVideoVolume);
}
// ── 他のタブから画像を表示する ────────────────────────────────
const _normPath = (p) => (p || "").replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
/**
* Output サブタブで path の画像を表示する(TagSpace の Gallery 点から呼ぶ)。
* 絞り込み(検索・お気に入り・タグ・グループ・類似表示)を解除し、フォルダツリーを
* 親から順に展開してフォルダを選び、一覧でその画像を選択して詳細を開く。
* 戻り値: 表示できたら true(出力フォルダ外・一覧に無いときは false)
*/
export async function revealInGallery(path) {
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
document.querySelector('.wfm-tab[data-tab="gallery"]')?.click(); // 初回はここで出力フォルダとツリーを読み込む
document.querySelector('.wfm-gallery-subtab-btn[data-gallery-subtab="output"]')?.click();
for (let i = 0; i < 100 && !state.folderTree; i++) await wait(100);
if (!state.folderTree) return false;
const target = _normPath(path);
const folder = target.slice(0, target.lastIndexOf("/"));
// ツリーの根から目的のフォルダまでのノードを集める
const chain = [];
let node = state.folderTree;
if (folder !== _normPath(node.abs_path) && !folder.startsWith(_normPath(node.abs_path) + "/")) return false;
while (node) {
chain.push(node);
if (_normPath(node.abs_path) === folder) break;
node = (node.children || []).find((c) => folder === _normPath(c.abs_path) || folder.startsWith(_normPath(c.abs_path) + "/"));
}
const leaf = chain[chain.length - 1];
if (_normPath(leaf.abs_path) !== folder) return false;
// 絞り込みの解除(「Clear filters」ボタンと同じ。再読み込みは下で1回だけ行う)
clearTimeout(_searchDebounceTimer);
state.search = "";
state.favoriteOnly = false;
state.tagFilter = "";
state.groupFilter = "";
const searchInput = document.getElementById("wfm-gallery-search");
if (searchInput) searchInput.value = "";
const tagSel = document.getElementById("wfm-gallery-tag-filter");
if (tagSel) tagSel.value = "";
const groupSel = document.getElementById("wfm-gallery-group-filter");
if (groupSel) groupSel.value = "";
document.getElementById("wfm-gallery-fav-btn")?.classList.remove("active");
exitSimilarMode();
// ツリーを親から順に展開(子ノードは展開時に描画される)
const itemOf = (abs) => [...document.querySelectorAll(".wfm-gallery-tree-item")].find((el) => _normPath(el.dataset.path) === _normPath(abs));
for (const n of chain.slice(0, -1)) {
const arrow = itemOf(n.abs_path)?.querySelector(".wfm-gallery-tree-arrow");
if (arrow && arrow.dataset.expanded !== "true" && arrow.style.visibility !== "hidden") arrow.click();
}
const item = itemOf(leaf.abs_path);
document.querySelectorAll(".wfm-gallery-tree-item.selected").forEach((el) => el.classList.remove("selected"));
item?.classList.add("selected");
item?.scrollIntoView({ block: "nearest" });
state.currentFolder = leaf.abs_path;
state.selectedImages.clear();
state.lastSelectionIndex = -1;
updateBulkBar();
await loadImages();
const idx = state.images.findIndex((img) => _normPath(img.path) === target);
if (idx === -1) return false;
// サムネイル表示は50件ずつ描くので、目的の画像まで描き足す
const grid = document.getElementById("wfm-gallery-grid");
if (state.viewMode === "thumb" && _renderedCount <= idx) {
while (_renderedCount <= idx) _appendNextPage(grid);
// 無限スクロールの目印を末尾へ戻す(全件描いたら外す)。_attachScrollSentinel と同じ扱い
if (_renderedCount >= state.images.length) _disconnectScrollObserver();
else { const s = document.getElementById("wfm-gallery-scroll-sentinel"); if (s) grid.appendChild(s); }
}
const el = [...grid.querySelectorAll("[data-path]")].find((e) => _normPath(e.dataset.path) === target);
if (!el) return false;
el.click(); // 通常のクリックと同じ選択・詳細表示
el.scrollIntoView({ block: "center" });
return true;
}
// ── outputパス取得 ────────────────────────────────────────────
async function detectOutputPath() {
@@ -2228,6 +2385,7 @@ function bindEvents() {
showToast("Please select an image first", "info");
return;
}
if (rejectModel3d()) return;
if (!window._wfmImageEditTab) return;
const path = state.selectedImage.path;
const name = (state.selectedImage.filename || "gallery-image").replace(/\.[^.]+$/, "");
@@ -2257,6 +2415,7 @@ function bindEvents() {
showToast(t("gallerySelectImageFirst"), "info");
return;
}
if (rejectModel3d()) return;
if (!comfyUI.currentAnalysis) {
showToast(t("noWorkflowLoaded"), "info");
return;
@@ -2294,6 +2453,7 @@ function bindEvents() {
showToast(t("gallerySelectImageFirst"), "info");
return;
}
if (rejectModel3d()) return;
if (!window.opener || typeof window.opener.wfmSendImageToSelectedNode !== "function") {
showToast(t("sendToLiNodeNoOpener"), "error");
return;
@@ -2606,7 +2766,7 @@ function bindEvents() {
if (!window._wfmImageEditTab) return;
const allPaths = [...state.selectedImages];
const paths = allPaths.filter(p => !isVideoFile({ path: p }) && !isAudioFile({ path: p }));
const paths = allPaths.filter(p => !isVideoFile({ path: p }) && !isAudioFile({ path: p }) && !isModel3dFile({ path: p }));
if (paths.length === 0) {
showToast(t("editLayersNoImages"), "error");
return;
@@ -2667,6 +2827,7 @@ function bindEvents() {
showToast(t("gallerySelectImageFirst"), "error");
return;
}
if (rejectModel3d()) return;
const { openImageInTaggerTab } = await import("./tagger-tab.js");
openImageInTaggerTab(state.selectedImage);
});
+93 -3
View File
@@ -790,6 +790,10 @@ const LANGUAGES = {
tsPickSearch: (n) => `Search with selected (${n})`,
tsPickClear: "Deselect",
tsFullPrompt: "Full prompt",
tsAddPicked: (n) => `Add selected (${n})`,
tsOpenInGallery: "Open in Gallery",
tsRevealFailed: "Could not show this image in the Gallery (it is outside the Gallery output folder or no longer exists)",
tsChipPicked: (name, n) => `${name} (${n} tags)`,
tsListEmpty: "Select an item or search to list nearby cards and tags.",
tsBuilderTitle: "Prompt",
tsChipsEmpty: "Double-click cards or tags in the space, or use Add / + in the panels, to add them.",
@@ -1162,6 +1166,14 @@ const LANGUAGES = {
helpGallery28: "Create PSD bulk button: combines all selected images into a single layered PSD file and downloads it — each image becomes its own layer (named after the file), positioned top-left on a canvas sized to the largest selected image; the last selected image ends up on top Convert... bulk button (shown when audio/video files are selected): converts audio files — or extracts the audio track of videos — to FLAC / MP3 / Opus / M4A / WAV (bitrate, sample rate, channels selectable) into the same folder as new files; prompt/workflow tags are carried over for formats that can hold them (WAV cannot), favorite/tags/memo/groups can be carried over, and the originals can optionally be deleted afterwards.",
helpGallery29: "Edit as Layers bulk button: switches to the Image Edit tab and opens all selected images at once, each as an independent layer (video files in the selection are skipped); the last selected image ends up on top",
helpGallery30: "PSD files: thumbnails and full-size previews show all layers merged together (hidden layers excluded); the underlying PSD file itself is left untouched — only the preview shown in Gallery is a flattened rendering",
helpGallery38: "3D models: GLB, glTF, VRM, PLY (mesh, point cloud or Gaussian splat) and SPZ are listed with a \"3D\" badge and open in a built-in viewer (drag to rotate, right-drag to pan, wheel to zoom, ⟲ to reset; double-click to enlarge). Thumbnails are rendered by your browser the first time a file appears and are then kept on the server; files over 128 MB get one when opened. The workflow saved by ComfyUI's SaveGLB is read like an image's. A .gltf that uses separate .bin or texture files needs them to stay in place: Move and Delete only affect the .gltf itself. 3D files cannot be sent to Image Edit, GenerateUI, Tagger or Feeder.",
gallery3dLoading: "Loading 3D model...",
gallery3dLoadFailed: "Could not display this 3D file",
gallery3dResetView: "Reset view",
gallery3dNotImage: "3D files cannot be sent here",
gallery3dStatsPoints: (n) => `${n} points`,
gallery3dStatsMesh: (v, f) => `${v} vertices / ${f} triangles`,
gallery3dStatsSplats: (n) => `${n} splats`,
helpGallery12: "Metadata button (green, in the detail panel tab bar): opens the selected image in the Metadata tab for full embedded-data inspection; Alt+click on any image thumbnail has the same effect",
helpGallery13: "Load GenUI button (blue, in the detail panel tab bar): loads the embedded ComfyUI workflow from the selected image directly into the GenerateUI tab and switches to it; shows a warning toast if no workflow is embedded or the format is not supported",
helpGallery14: "Tagger button (purple, in the detail panel action row): opens the selected image directly in the Tagger tab's Single mode for instant tagging",
@@ -1185,7 +1197,7 @@ const LANGUAGES = {
helpTagSpaceCardUse: "Choosing Tags & Making a Prompt",
helpTagSpace1: "TagSpace places WFS's own data in the EmbeddingGemma 2 vector space and shows it in 3D: Cards (ImagePrompt images with their prompt, shown as thumbnails), Tags (words split out of ImagePrompt prompts, the positive prompts embedded in Gallery images, wildcards, the Tagger DB and the Prompt library, colored by source) and Gallery points (a sample of indexed Gallery images as a faint background, each carrying the tags from its own prompt). Nearby items have similar meanings",
helpTagSpace2: "Requirements: Ollama running with EmbeddingGemma 2 (Gallery > Semantic settings > Model). If the Gallery semantic index was made with Gemini, rebuild it with EmbeddingGemma 2 first",
helpTagSpace10: "Search with a card's or Gallery image's tags: when a card or Gallery point is selected, its prompt tags are shown as buttons (a card's full prompt is under \"Full prompt\"; card tags appear after Build / Update). Click tags to choose them (click again to deselect) and press \"Search with selected\" to search the space with those tags joined in prompt order — the same as typing them into the search box. The choice is kept until another item is selected",
helpTagSpace10: "Search with a card's or Gallery image's tags: when a card or Gallery point is selected, its prompt tags are shown as buttons (a card's full prompt is under \"Full prompt\"; card tags appear after Build / Update). Click tags to choose them (click again to deselect) and press \"Search with selected\" to search the space with those tags joined in prompt order — the same as typing them into the search box. The choice is kept until another item is selected. While tags are selected, the Add button becomes \"Add selected (N)\" and adds only those tags (in prompt order) as one chip; with none selected it adds the whole item as before. For a Gallery point, \"Open in Gallery\" opens the Gallery tab with the image's folder selected and the image selected in the list (search and other filters are cleared)",
helpTagSpace9: "Choosing how many tags: \"All tags\" uses every candidate tag instead of the Tags number (up to 20,000). \"Min uses\" drops tags used in fewer prompts than this, counted over all sources — 2 removes one-off typos and fragments. \"Wildcards\" turns wildcard files on or off as a tag source: words found only in wildcards make up most of the distinct tags (about 37,000 of 47,600 in testing), so turning it off with All tags gives about 10,400 tags (about 6,800 with Min uses 2). The status line shows the number of candidates when only part of them is used. New tags are embedded once (the first build with many new tags takes a few extra minutes)",
helpTagSpace3: "Build / Update: collects the cards, adds card images that are not yet indexed to the Gallery semantic index, reads the positive prompt embedded in each indexed Gallery image (followed upstream from the sampler's positive input, never the negative; cached in tagspace_prompts.json so only new or changed images are read again), embeds new tags with Ollama (cached in tagspace_tags.npz) and projects everything to 3D with PCA. Tags: how many tags to keep — each source is ranked by how many prompts use a tag and the sources take turns, so the many Gallery prompts do not crowd out the other sources; Gallery points: how many Gallery images to show (0 = none). Prompts are split only at commas (and | { } BREAK), not at spaces; long sentences (over 5 words) are skipped. Images and text are centered separately before PCA so cards and their matching tags overlap. The first build took about 2.5 minutes for the cards plus about 3 minutes to read the prompts of 29,000 Gallery images; rebuilds with caches take seconds",
helpTagSpace4: "Navigation: drag to rotate, right-drag to pan, wheel to zoom. Hover shows the name, thumbnail and prompt/sources; the checkboxes show or hide Cards, Thumbnails, Tags and Gallery. The source checkboxes (ImagePrompt / Gallery prompts / Tagger DB / Prompt library / Wildcards) show or hide tags by where they came from — a tag stays visible while any of its sources is on and takes the color of its first visible source; hidden tags are also left out of the nearby and search lists. The choices are remembered",
@@ -1383,6 +1395,24 @@ const LANGUAGES = {
helpImageEditGmicInstall2: "Extract the zip to any folder (e.g. C:\\tools\\gmic); no installer required",
helpImageEditGmicInstall3: "Open Settings → G'MIC-Qt Executable Path, enter the full path to gmic_qt.exe (e.g. C:\\tools\\gmic\\gmic_qt.exe), then click Save",
helpImageEditTabKbdTitle: "Image Edit Tab Shortcuts",
imageEditPaletteColor1: "Color 1",
imageEditPaletteColor2: "Color 2",
imageEditPaletteBase: "Basic",
imageEditPaletteCustom: "Custom",
imageEditPaletteAddTitle: "Register the current color in the next empty custom slot",
imageEditPaletteEmptyTitle: "Click to register the current color; right-click to choose a color",
imageEditPaletteSwatchTitle: "Click to use; right-click to register or edit",
imageEditPaletteRegisterCurrent: "Register current color",
imageEditPaletteEditColor: "Edit color…",
imageEditPalettePickColor: "Choose color to register…",
imageEditPaletteDelete: "Delete",
imageEditPaletteResetBase: "Restore default color",
imageEditPaletteExists: "This color is already registered",
imageEditPaletteFull: "All custom color slots are full. Right-click a slot to overwrite or delete it",
imageEditNoAbrBrushes: "No brushes available. Import ABR brushes in Mask Editor One",
helpImageEditDrawPalette: "Draw color palette (second row): Color 1/Color 2, 20 basic colors, and 20 custom slots. Click a color to paint with it. Use + or click an empty slot to register the current color; right-click a color to register, edit, or delete it (basic colors can be changed and restored). Registered colors are saved per browser. The eyedropper button next to Color picks a color from the canvas (Esc cancels)",
imageEditPixelColorFail: "Could not read pixel color",
helpImageEditDrawKbd: "While Draw is active: D Draw / E Erase / X switch Color 1/2 / [ ] brush size / B open or close the brush picker (Esc also closes it)",
helpShortcutsTitle: "Keyboard Shortcuts",
helpShortcuts1: "Escape: Close modal/panel",
helpShortcuts2: "Enter: Confirm rename, send chat",
@@ -2595,6 +2625,10 @@ const LANGUAGES = {
tsPickSearch: (n) => `選択したタグで空間検索(${n})`,
tsPickClear: "選択解除",
tsFullPrompt: "プロンプト全文",
tsAddPicked: (n) => `選択したタグを追加(${n})`,
tsOpenInGallery: "Galleryで開く",
tsRevealFailed: "この画像をGalleryで表示できませんでした(GalleryのOutputフォルダの外にあるか、画像が見つかりません)",
tsChipPicked: (name, n) => `${name}(${n}タグ)`,
tsListEmpty: "要素を選ぶか検索すると、近いカードやタグを一覧表示します。",
tsBuilderTitle: "プロンプト",
tsChipsEmpty: "空間のカードやタグをダブルクリックするか、「追加」・一覧の+で追加できます。",
@@ -2967,6 +3001,14 @@ const LANGUAGES = {
helpGallery28: "「PSD作成」一括操作ボタン:選択中の全画像を1つのレイヤー付きPSDファイルにまとめてダウンロードする — 各画像はファイル名を冠した独立レイヤーとなり、選択画像中の最大サイズに合わせたキャンバスに左上基準で配置される;最後に選択した画像が最前面になる 変換...一括ボタン(音声/動画を選択すると表示):音声ファイル(動画は音声トラックを抽出)をFLAC / MP3 / Opus / M4A / WAVへ変換して同じフォルダに別ファイルで保存します(ビットレート・サンプルレート・チャンネル指定可)。prompt/workflowタグはタグを持てる形式で引き継がれ(WAVは対象外)、お気に入り・タグ・メモ・グループの引き継ぎや、変換後の元ファイル削除も選べます。",
helpGallery29: "「レイヤーとして編集」一括操作ボタン:Image Editタブに切り替え、選択中の全画像を一度に開き、それぞれ独立したレイヤーとして展開する(選択中に動画ファイルが含まれる場合はスキップされる);最後に選択した画像が最前面になる",
helpGallery30: "PSDファイル:サムネイル・フルサイズプレビューは全レイヤーを合成した結果を表示する(非表示レイヤーは除外される);元のPSDファイル自体は変更されず、Gallery上のプレビューのみが合成済みの表示になる",
helpGallery38: "3Dモデル:GLB・glTF・VRM・PLY(メッシュ/点群/ガウシアンスプラット)・SPZは「3D」バッジ付きで一覧に並び、内蔵ビューアで表示します(ドラッグで回転、右ドラッグで移動、ホイールでズーム、⟲で視点リセット、ダブルクリックで拡大)。サムネイルは初回表示時にブラウザが描画してサーバーに保存します(128MBを超えるファイルは開いたときに保存)。ComfyUIのSaveGLBが保存したワークフローは画像と同じように読み取れます。外部の.binやテクスチャを参照する.gltfは、それらの位置を変えないでください(移動・削除の対象は.gltf本体のみです)。3DファイルはImage Edit・GenerateUI・Tagger・Feederへは送れません。",
gallery3dLoading: "3Dモデルを読み込み中...",
gallery3dLoadFailed: "この3Dファイルは表示できません",
gallery3dResetView: "視点をリセット",
gallery3dNotImage: "3Dファイルはここへ送れません",
gallery3dStatsPoints: (n) => `${n} 点`,
gallery3dStatsMesh: (v, f) => `頂点 ${v} / 三角形 ${f}`,
gallery3dStatsSplats: (n) => `${n} スプラット`,
helpGallery12: "Metadataボタン(緑、詳細パネルのタブバー内):選択画像をMetadataタブで開いて埋め込みデータを詳細確認。画像サムネイルのAlt+クリックでも同じ操作が可能",
helpGallery13: "Load GenUIボタン(青、詳細パネルのタブバー内):選択画像に埋め込まれたComfyUIワークフローをGenerateUIタブへ直接読み込んで切り替え。ワークフローが埋め込まれていない場合や非対応形式の場合は警告トーストを表示",
helpGallery14: "Taggerボタン(紫、詳細パネルのアクション行):選択画像をTaggerタブのSingleモードで直接開き、即座にタグ付けを開始できる",
@@ -2990,7 +3032,7 @@ const LANGUAGES = {
helpTagSpaceCardUse: "タグを選んでプロンプトを作る",
helpTagSpace1: "TagSpaceは、WFS内のデータをEmbeddingGemma 2のベクトル空間に置いて3Dで表示します。カード(ImagePromptの画像とそのプロンプト。サムネイルで表示)、タグ(ImagePromptのプロンプト・Gallery画像に埋め込まれたPositiveプロンプト・ワイルドカード・Tagger DB・Promptライブラリの文を分解した語。出典ごとに色分け)、Gallery点(索引済みのGallery画像の一部を薄い背景として表示。それぞれ自分のプロンプト由来のタグを持つ)の3種類です。近くにあるものほど意味が近くなります",
helpTagSpace2: "必要なもの:OllamaとEmbeddingGemma 2(Gallery > セマンティック設定 > モデル設定)。Galleryのセマンティック索引をGeminiで作っている場合は、先にEmbeddingGemma 2で作り直してください",
helpTagSpace10: "カード・Gallery画像のタグで空間検索:カードやGallery点を選ぶと、プロンプトのタグがボタンで表示されます(カードのプロンプト全文は「プロンプト全文」で表示。カードのタグは「作成 / 更新」後に表示されます)。タグをクリックして選び(もう一度で解除)、「選択したタグで空間検索」を押すと、選んだタグをプロンプトの順につないだ文で空間を検索します(検索欄に入力した場合と同じ)。選択は別の要素を選ぶまで保持されます",
helpTagSpace10: "カード・Gallery画像のタグで空間検索:カードやGallery点を選ぶと、プロンプトのタグがボタンで表示されます(カードのプロンプト全文は「プロンプト全文」で表示。カードのタグは「作成 / 更新」後に表示されます)。タグをクリックして選び(もう一度で解除)、「選択したタグで空間検索」を押すと、選んだタグをプロンプトの順につないだ文で空間を検索します(検索欄に入力した場合と同じ)。選択は別の要素を選ぶまで保持されます。タグを選んでいる間は「追加」ボタンが「選択したタグを追加(N)」に変わり、選んだタグだけを(プロンプトの順で)1つのチップとして追加します。選んでいなければ、これまでどおり全体を追加します。Gallery点では「Galleryで開く」で、ギャラリータブのその画像のフォルダを開き、一覧でその画像を選んだ状態にします(検索などの絞り込みは解除されます)",
helpTagSpace9: "タグの選び方:「全タグ」をオンにすると「タグ数」の代わりに候補のタグをすべて使います(上限2万件)。「最低出現回数」は、全出典を合わせてその回数未満しか使われていないタグを除きます(2にすると1回だけの表記ゆれや断片が消えます)。「ワイルドカード」はワイルドカードをタグの材料に含めるかどうかです。ワイルドカードにしか出てこない語がタグの種類の大半を占めるため(検証環境では4.76万種中約3.7万種)、オフにして全タグにすると約1.04万種(最低出現回数2なら約6,800種)になります。候補の一部だけを使ったときは、状態表示に候補数も出ます。新しいタグは一度だけ埋め込みます(新しいタグが多い初回の作成は数分長くかかります)",
helpTagSpace3: "「作成 / 更新」:カードを集め、まだ索引にないカード画像をGalleryのセマンティック索引に追加し、索引済みのGallery画像に埋め込まれたPositiveプロンプトを読み取り(サンプラーのpositive入力から上流をたどり、negative側はたどらない。tagspace_prompts.jsonにキャッシュし、2回目以降は新しい画像・変更された画像だけを読む)、新しいタグをOllamaで埋め込み(tagspace_tags.npzにキャッシュ)、PCAで3Dに投影します。「タグ数」は残すタグの数で、出典ごとに「そのタグを使った文の数」で順位を付け、出典を順番に取るので、数の多いGalleryのプロンプトだけで埋まることはありません。「Gallery点数」は表示するGallery画像の数(0で表示なし)。プロンプトはカンマ(と | { } BREAK)でだけ区切り、スペースでは区切りません。5語を超える文章は除きます。画像とテキストはそれぞれ中心をそろえてから投影し、カードと対応するタグが重なるようにしています。初回はカードの準備に約2.5分、Gallery画像2.9万枚のプロンプト読み取りに約3分かかりました。キャッシュがあれば数秒です",
helpTagSpace4: "操作:ドラッグで回転、右ドラッグで移動、ホイールでズーム。カーソルを合わせると名前・サムネイル・プロンプト/出典を表示します。チェックボックスでカード・サムネイル・タグ・Galleryの表示を切り替えます。出典のチェックボックス(ImagePrompt/Galleryのプロンプト/Tagger DB/Promptライブラリ/ワイルドカード)では、タグを出典ごとに表示・非表示にできます。出典のどれか1つがONならそのタグは表示され、色は表示中の出典のうち最初のものになります。非表示のタグは近くの要素・検索結果の一覧からも除かれます。選択は保存されます",
@@ -3188,6 +3230,24 @@ const LANGUAGES = {
helpImageEditGmicInstall2: "zipを任意のフォルダに解凍する(例: C:\\tools\\gmic);インストーラー不要",
helpImageEditGmicInstall3: "設定タブ → G'MIC-Qt Executable Path に gmic_qt.exe のフルパスを入力(例: C:\\tools\\gmic\\gmic_qt.exe)して Save をクリック",
helpImageEditTabKbdTitle: "Image Edit タブのショートカット",
imageEditPaletteColor1: "色1",
imageEditPaletteColor2: "色2",
imageEditPaletteBase: "基本色",
imageEditPaletteCustom: "カスタム",
imageEditPaletteAddTitle: "現在の色をカスタム色の空き枠に登録します",
imageEditPaletteEmptyTitle: "クリックで現在の色を登録・右クリックで色を指定",
imageEditPaletteSwatchTitle: "クリックで使用・右クリックで登録/編集",
imageEditPaletteRegisterCurrent: "現在の色を登録",
imageEditPaletteEditColor: "色を編集…",
imageEditPalettePickColor: "色を指定して登録…",
imageEditPaletteDelete: "削除",
imageEditPaletteResetBase: "初期の色に戻す",
imageEditPaletteExists: "この色は登録済みです",
imageEditPaletteFull: "カスタム色の枠がいっぱいです。右クリックで上書きするか削除してください",
imageEditNoAbrBrushes: "ブラシがありません。Mask Editor OneでABRブラシをインポートしてください",
helpImageEditDrawPalette: "Drawのカラーパレット(2段目):色1/色2、基本色20色、カスタム色20枠。色をクリックするとその色で描けます。「+」か空き枠のクリックで現在の色を登録し、色の上で右クリックすると登録・編集・削除ができます(基本色も変更でき、初期の色に戻せます)。登録した色はブラウザごとに保存されます。Colorの隣のスポイトボタンでキャンバスから色を拾えます(Escで取り消し)",
imageEditPixelColorFail: "ピクセルの色を取得できませんでした",
helpImageEditDrawKbd: "Drawツール中:D Draw / E Erase / X 色1・色2の切り替え / [ ] ブラシサイズ / B ブラシ選択の開閉(Escでも閉じます)",
helpShortcutsTitle: "キーボード操作",
helpShortcuts1: "Escape:モーダル・パネルを閉じる",
helpShortcuts2: "Enter:名前変更の確定、チャット送信",
@@ -4400,6 +4460,10 @@ const LANGUAGES = {
tsPickSearch: (n) => `用所选标签搜索空间(${n})`,
tsPickClear: "取消选择",
tsFullPrompt: "完整提示词",
tsAddPicked: (n) => `添加所选标签(${n})`,
tsOpenInGallery: "在Gallery中打开",
tsRevealFailed: "无法在Gallery中显示该图像(位于Gallery的Output文件夹之外,或图像不存在)",
tsChipPicked: (name, n) => `${name}(${n}个标签)`,
tsListEmpty: "选择元素或搜索后,会列出附近的卡片和标签。",
tsBuilderTitle: "提示词",
tsChipsEmpty: "双击空间中的卡片或标签,或使用“添加”·列表中的+即可添加。",
@@ -4772,6 +4836,14 @@ const LANGUAGES = {
helpGallery28: "「创建PSD」批量操作按钮:将所有选中的图像合并为一个带图层的PSD文件并下载 — 每张图像成为独立图层(以文件名命名),以左上对齐方式放置在按所选最大图像尺寸创建的画布上;最后选中的图像位于最上层 转换...批量按钮(选中音频/视频时显示):将音频文件(视频则提取音轨)转换为FLAC / MP3 / Opus / M4A / WAV并保存为同文件夹内的新文件(可选比特率、采样率、声道);prompt/workflow标签会在支持标签的格式中继承(WAV除外),也可继承收藏/标签/备注/分组,并可选择转换后删除原文件。",
helpGallery29: "「作为图层编辑」批量操作按钮:切换到Image Edit标签并一次性打开所有选中的图像,每张作为独立图层(所选内容中的视频文件会被跳过);最后选中的图像位于最上层",
helpGallery30: "PSD文件:缩略图与完整预览显示所有图层合并后的效果(隐藏图层不参与合并);原始PSD文件本身不会被修改,Gallery中显示的仅是合并渲染后的预览",
helpGallery38: "3D模型:GLB、glTF、VRM、PLY(网格、点云或高斯泼溅)和SPZ以“3D”徽标列出,并在内置查看器中显示(拖动旋转、右键拖动平移、滚轮缩放、⟲重置视角、双击放大)。缩略图在文件首次显示时由浏览器渲染并保存到服务器(超过128MB的文件在打开时保存)。ComfyUI的SaveGLB保存的工作流可像图像一样读取。引用外部.bin或纹理的.gltf请保持这些文件的位置不变(移动和删除只作用于.gltf本身)。3D文件不能发送到Image Edit、GenerateUI、Tagger或Feeder。",
gallery3dLoading: "正在加载3D模型...",
gallery3dLoadFailed: "无法显示此3D文件",
gallery3dResetView: "重置视角",
gallery3dNotImage: "3D文件不能发送到此处",
gallery3dStatsPoints: (n) => `${n} 个点`,
gallery3dStatsMesh: (v, f) => `顶点 ${v} / 三角形 ${f}`,
gallery3dStatsSplats: (n) => `${n} 个泼溅`,
helpGallery12: "Metadata按钮(绿色,位于详情面板标签栏):在Metadata标签中打开所选图像以全面查看嵌入数据;Alt+点击任意图像缩略图效果相同",
helpGallery13: "Load GenUI按钮(蓝色,位于详情面板标签栏):将所选图像中嵌入的ComfyUI工作流直接加载到GenerateUI标签并切换过去;如果没有嵌入工作流或格式不受支持,则显示警告提示",
helpGallery14: "Tagger按钮(紫色,位于详情面板操作行):将所选图像直接在Tagger标签的Single模式中打开,即可立即进行标注",
@@ -4795,7 +4867,7 @@ const LANGUAGES = {
helpTagSpaceCardUse: "选择标签并生成提示词",
helpTagSpace1: "TagSpace将WFS内的数据放入EmbeddingGemma 2的向量空间并以3D显示:卡片(ImagePrompt的图像及其提示词,以缩略图显示)、标签(从ImagePrompt提示词、Gallery图像中嵌入的Positive提示词、通配符、Tagger DB和Prompt库的文本中拆分出的词,按来源着色)以及Gallery点(已索引的部分Gallery图像,作为淡色背景,各自带有来自其提示词的标签)。距离越近,含义越相近",
helpTagSpace2: "需要:运行中的Ollama与EmbeddingGemma 2(Gallery > 语义设置 > 模型设置)。如果Gallery语义索引是用Gemini创建的,请先用EmbeddingGemma 2重建",
helpTagSpace10: "用卡片或Gallery图像的标签搜索空间:选择卡片或Gallery点后,其提示词标签以按钮显示(卡片的完整提示词在“完整提示词”中显示;卡片标签在“创建 / 更新”后显示)。点击标签进行选择(再次点击取消),按“用所选标签搜索空间”即可将所选标签按提示词顺序连接后搜索空间(与在搜索框中输入相同)。在选择其他元素之前会保留所选内容",
helpTagSpace10: "用卡片或Gallery图像的标签搜索空间:选择卡片或Gallery点后,其提示词标签以按钮显示(卡片的完整提示词在“完整提示词”中显示;卡片标签在“创建 / 更新”后显示)。点击标签进行选择(再次点击取消),按“用所选标签搜索空间”即可将所选标签按提示词顺序连接后搜索空间(与在搜索框中输入相同)。在选择其他元素之前会保留所选内容。选择了标签时,“添加”按钮会变为“添加所选标签(N)”,只将所选标签(按提示词顺序)作为一个标签块添加;未选择时与以前一样添加整体。对于Gallery点,“在Gallery中打开”会打开Gallery标签页中该图像所在的文件夹,并在列表中选中该图像(搜索等筛选会被清除)",
helpTagSpace9: "标签的选择:勾选“全部标签”后不再使用“标签数”,而是使用所有候选标签(上限2万个)。“最少出现次数”会排除在所有来源合计中使用次数少于该值的标签(设为2可去除只出现一次的拼写差异和片段)。“通配符”决定是否将通配符作为标签来源。只出现在通配符中的词占了标签种类的大部分(测试环境中4.76万种中约3.7万种),关闭后使用全部标签约为1.04万种(最少出现次数为2时约6,800种)。只使用部分候选时,状态栏会显示候选数量。新标签只嵌入一次(新标签较多的首次创建会多花几分钟)",
helpTagSpace3: "“创建 / 更新”:收集卡片,将尚未索引的卡片图像加入Gallery语义索引,读取已索引Gallery图像中嵌入的Positive提示词(从采样器的positive输入向上追溯,不追溯negative;缓存于tagspace_prompts.json,之后只读取新增或更改的图像),用Ollama嵌入新标签(缓存于tagspace_tags.npz),再用PCA投影到3D。“标签数”为保留的标签数量:每个来源按“使用该标签的文本数”排序,各来源轮流选取,因此不会被数量众多的Gallery提示词占满;“Gallery点数”为显示的Gallery图像数量(0为不显示)。提示词只按逗号(以及 | { } BREAK)拆分,不按空格拆分,超过5个词的句子会被排除。图像与文本分别对齐中心后再投影,使卡片与对应标签重叠。首次创建时,卡片准备约2.5分钟,读取2.9万张Gallery图像的提示词约3分钟;有缓存时只需几秒",
helpTagSpace4: "操作:拖动旋转,右键拖动平移,滚轮缩放。悬停时显示名称、缩略图以及提示词/来源;复选框可切换卡片、缩略图、标签和Gallery的显示。来源复选框(ImagePrompt/Gallery提示词/Tagger DB/Prompt库/通配符)可按来源显示或隐藏标签:只要标签的任一来源为开启就会显示,颜色取显示中来源的第一个;隐藏的标签也会从附近元素和搜索结果列表中排除。所选内容会被保存",
@@ -4993,6 +5065,24 @@ const LANGUAGES = {
helpImageEditGmicInstall2: "将zip解压到任意文件夹(如 C:\\tools\\gmic);无需安装程序",
helpImageEditGmicInstall3: "打开设置 → G'MIC-Qt Executable Path,输入 gmic_qt.exe 的完整路径(如 C:\\tools\\gmic\\gmic_qt.exe),点击 Save",
helpImageEditTabKbdTitle: "图像编辑选项卡快捷键",
imageEditPaletteColor1: "颜色1",
imageEditPaletteColor2: "颜色2",
imageEditPaletteBase: "基本色",
imageEditPaletteCustom: "自定义",
imageEditPaletteAddTitle: "将当前颜色登记到自定义颜色的空位",
imageEditPaletteEmptyTitle: "单击登记当前颜色,右键指定颜色",
imageEditPaletteSwatchTitle: "单击使用,右键登记或编辑",
imageEditPaletteRegisterCurrent: "登记当前颜色",
imageEditPaletteEditColor: "编辑颜色…",
imageEditPalettePickColor: "指定颜色并登记…",
imageEditPaletteDelete: "删除",
imageEditPaletteResetBase: "恢复初始颜色",
imageEditPaletteExists: "此颜色已登记",
imageEditPaletteFull: "自定义颜色已满。请右键覆盖或删除",
imageEditNoAbrBrushes: "没有可用画笔。请在 Mask Editor One 中导入 ABR 画笔",
helpImageEditDrawPalette: "Draw调色板(第二行):颜色1/颜色2、20种基本色和20个自定义颜色位。单击颜色即可用该颜色绘制。使用“+”或单击空位可登记当前颜色;在颜色上右键可登记、编辑或删除(基本色也可修改并恢复初始颜色)。登记的颜色按浏览器分别保存。使用Color旁的吸管按钮可从画布取色(按Esc取消)",
imageEditPixelColorFail: "无法读取像素颜色",
helpImageEditDrawKbd: "Draw工具使用中:D Draw / E Erase / X 切换颜色1/2 / [ ] 笔刷大小 / B 打开或关闭笔刷选择(也可按Esc关闭)",
helpShortcutsTitle: "键盘操作",
helpShortcuts1: "Escape:关闭弹窗/面板",
helpShortcuts2: "Enter:确认重命名、发送聊天",
+140 -26
View File
@@ -6,6 +6,7 @@
import { LayerManager, Layer } from "./image-edit/LayerManager.js";
import { DrawTool } from "./image-edit/DrawTool.js";
import { DrawPalette } from "./image-edit/DrawPalette.js";
import { TextTool, TEXT_FONTS } from "./image-edit/TextTool.js";
import { SelectTool } from "./image-edit/SelectTool.js";
import { ShapeTool } from "./image-edit/ShapeTool.js";
@@ -20,10 +21,22 @@ import { MaskEditorOneBridge } from "./image-edit/MaskEditorOneBridge.js";
import { InpaintI2IActions } from "./image-edit/InpaintI2IActions.js";
import { FileExport } from "./image-edit/FileExport.js";
import { showToast } from "./app.js";
import { t as tr } from "./i18n.js";
import { comfyUI } from "./comfyui-client.js";
import { comfyEditor } from "./comfyui-editor.js";
import { comfyWorkflow } from "./comfyui-workflow.js";
// Draw Tool: スポイト(Eyedropper)アイコン。ボタンとカスタムカーソルの両方で使い回す。
const EYEDROPPER_ICON_PATH = "M20.71 5.63l-2.34-2.34a1 1 0 0 0-1.41 0L14.7 5.55 12 8.24 3 17.24V21h3.76l9-9 2.69-2.69 2.26-2.26a1 1 0 0 0 0-1.41zM6.34 19H5v-1.34l8.06-8.06 1.41 1.41L6.34 19z";
const EYEDROPPER_ICON_SVG =
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14" fill="currentColor"><path d="${EYEDROPPER_ICON_PATH}"/></svg>`;
function _eyedropperCursorCss() {
const svg = `<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'>`
+ `<path d='${EYEDROPPER_ICON_PATH}' fill='%23ffffff' stroke='%23000000' stroke-width='1'/></svg>`;
return `url("data:image/svg+xml,${svg}") 2 22, crosshair`;
}
const TOOL_DEFS = [
{ id: "select", icon: "▲", label: "Select", ready: true },
{ id: "draw", icon: "✏", label: "Draw", ready: true },
@@ -49,6 +62,11 @@ class ImageEditTab {
this._layerMgr = null;
this._activeTool = "select";
this._drawTool = new DrawTool(null);
this._eyedropperActive = false; // Drawツールのスポイト(色抽出)モード
this._drawPalette = new DrawPalette({
onColorChange: hex => this._setDrawColor(hex),
toast: showToast,
});
this._textTool = new TextTool(null);
this._selectTool = new SelectTool();
this._zoom = 1.0;
@@ -196,6 +214,7 @@ class ImageEditTab {
_updateBrushCursor(e) {
const el = this._brushCursorEl;
if (!el) return;
this._lastBrushCursorEvent = e; // キー操作でサイズを変えたときに再描画するため保持
const tool = this._activeTool;
const size = tool === "draw"
? this._drawTool?.brushSize
@@ -226,6 +245,79 @@ class ImageEditTab {
if (this._brushCursorEl) this._brushCursorEl.style.display = "none";
}
// ── Draw: スポイト(Eyedropper) ─────────────────
_setEyedropperActive(active) {
this._eyedropperActive = active;
const drawCanvas = document.getElementById("ie-canvas-draw");
const overlay = document.getElementById("ie-canvas-overlay");
const cursor = active ? _eyedropperCursorCss() : "";
if (drawCanvas) drawCanvas.style.cursor = cursor;
if (overlay) overlay.style.cursor = cursor;
if (active) this._hideBrushCursor();
document.getElementById("ie-draw-eyedropper")?.classList.toggle("ie-opt-active", active);
}
_pickColorAt(x, y) {
const canvas = document.getElementById("ie-canvas-draw");
const px = Math.floor(x), py = Math.floor(y);
if (!canvas || px < 0 || py < 0 || px >= canvas.width || py >= canvas.height) {
this._setEyedropperActive(false);
return;
}
try {
// 見えている色を拾うため、アクティブレイヤーのみの表示なら合成し直す
if (!this._compositeMode) this._updateCompositeView();
const [r, g, b] = canvas.getContext("2d").getImageData(px, py, 1, 1).data;
const hex = "#" + [r, g, b].map(v => v.toString(16).padStart(2, "0")).join("");
this._setDrawColor(hex);
this._drawPalette.syncColor(hex);
} catch {
showToast(tr("imageEditPixelColorFail"), "error");
}
this._setEyedropperActive(false);
}
_setDrawMode(mode) {
this._drawTool.mode = mode;
this._drawTool._stamp = null;
this._renderDrawProps();
}
_setDrawBrushSize(size) {
this._drawTool.brushSize = size;
this._drawTool._stamp = null;
const slider = document.getElementById("ie-draw-size");
if (slider) slider.value = size;
const label = document.getElementById("ie-draw-size-lbl");
if (label) label.textContent = size + "px";
if (this._lastBrushCursorEvent && !this._eyedropperActive) {
this._updateBrushCursor(this._lastBrushCursorEvent);
}
}
/** [ / ] キー: サイズが大きいほど刻みを粗くする */
_stepDrawBrushSize(direction) {
const size = this._drawTool.brushSize;
const base = direction < 0 ? size - 1 : size;
const step = base < 10 ? 1 : base < 50 ? 5 : 10;
this._setDrawBrushSize(Math.min(200, Math.max(1, size + direction * step)));
}
/** Drawツール中のBキー: ブラシ選択モーダルを開閉する */
_toggleDrawBrushPicker() {
if (this._abrAvailable) this._openAbrBrushPickerForDraw();
else showToast(tr("imageEditNoAbrBrushes"), "info");
}
_setDrawColor(hex) {
this._drawTool.color = hex;
this._drawTool._stamp = null;
this._drawTool._imgStamp = null;
const input = document.getElementById("ie-draw-color");
if (input) input.value = hex;
}
// ── ツールボタン ──────────────────────────────
_setupToolButtons() {
@@ -240,6 +332,7 @@ class ImageEditTab {
_setActiveTool(toolId) {
this._hideBrushCursor();
if (this._eyedropperActive) this._setEyedropperActive(false);
if (this._activeTool === "draw") this._drawTool?.deactivate();
if (this._activeTool === "text") this._textTool?.deactivate();
if (this._activeTool === "select") this._selectTool?.deactivate();
@@ -306,6 +399,7 @@ class ImageEditTab {
_renderToolOptions(toolId) {
const el = document.getElementById("ie-tool-options");
if (!el) return;
this._drawPalette.closeMenu();
el.innerHTML = "";
if (toolId === "select" && this._selectTool) {
@@ -355,6 +449,7 @@ class ImageEditTab {
} else if (toolId === "draw" && this._drawTool) {
el.innerHTML = "";
this._drawPalette.render(el);
this._renderDrawProps();
} else if (toolId === "fill" && this._fillTool) {
@@ -873,18 +968,22 @@ class ImageEditTab {
<div class="ie-props-row">
<label>Mode</label>
<div style="display:flex;gap:4px;">
<button class="wfm-btn wfm-btn-sm${t.mode === "draw" ? " ie-opt-active" : ""}" id="ie-draw-mode-draw" style="flex:1;">Draw</button>
<button class="wfm-btn wfm-btn-sm${t.mode === "erase" ? " ie-opt-active" : ""}" id="ie-draw-mode-erase" style="flex:1;">Erase</button>
<button class="wfm-btn wfm-btn-sm${t.mode === "draw" ? " ie-opt-active" : ""}" id="ie-draw-mode-draw" title="Draw (D)" style="flex:1;">Draw</button>
<button class="wfm-btn wfm-btn-sm${t.mode === "erase" ? " ie-opt-active" : ""}" id="ie-draw-mode-erase" title="Erase (E)" style="flex:1;">Erase</button>
</div>
</div>
<div class="ie-props-row">
<label>Color</label>
<input type="color" id="ie-draw-color" value="${t.color}"
style="width:36px;height:24px;padding:0;border:1px solid var(--wfm-border);cursor:pointer;border-radius:3px;flex-shrink:0;">
<div style="display:flex;gap:4px;align-items:center;">
<input type="color" id="ie-draw-color" value="${t.color}"
style="width:36px;height:24px;padding:0;border:1px solid var(--wfm-border);cursor:pointer;border-radius:3px;flex-shrink:0;">
<button class="wfm-btn wfm-btn-sm${this._eyedropperActive ? " ie-opt-active" : ""}" id="ie-draw-eyedropper"
title="Eyedropper" style="flex-shrink:0;width:auto;height:24px;padding:2px 6px;display:flex;align-items:center;justify-content:center;">${EYEDROPPER_ICON_SVG}</button>
</div>
</div>
<div class="ie-props-row">
<label>Size</label>
<input type="range" id="ie-draw-size" min="1" max="200" value="${t.brushSize}">
<label title="[ / ]">Size</label>
<input type="range" id="ie-draw-size" min="1" max="200" value="${t.brushSize}" title="[ / ]">
<span id="ie-draw-size-lbl">${t.brushSize}px</span>
</div>
<div class="ie-props-row">
@@ -906,7 +1005,7 @@ class ImageEditTab {
<label>Brush</label>
<span style="font-size:11px;color:var(--wfm-text-secondary);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"
title="${t.brushName ?? "Circle"}">${t.brushName ?? "Circle"}</span>
<button class="wfm-btn wfm-btn-sm" id="ie-draw-select-brush" style="font-size:10px;padding:1px 6px;flex-shrink:0;" ${this._abrAvailable ? "" : "disabled"}>Select</button>
<button class="wfm-btn wfm-btn-sm" id="ie-draw-select-brush" title="B" style="font-size:10px;padding:1px 6px;flex-shrink:0;" ${this._abrAvailable ? "" : "disabled"}>Select</button>
${t.brushImage ? `<button class="wfm-btn wfm-btn-sm" id="ie-draw-clear-brush" style="font-size:10px;padding:1px 5px;flex-shrink:0;">✕</button>` : ""}
</div>
${t.brushImage ? `
@@ -933,25 +1032,17 @@ class ImageEditTab {
</div>` : ""}
`;
document.getElementById("ie-draw-mode-draw")?.addEventListener("click", () => {
this._drawTool.mode = "draw";
this._drawTool._stamp = null;
this._renderDrawProps();
});
document.getElementById("ie-draw-mode-erase")?.addEventListener("click", () => {
this._drawTool.mode = "erase";
this._drawTool._stamp = null;
this._renderDrawProps();
});
document.getElementById("ie-draw-mode-draw")?.addEventListener("click", () => this._setDrawMode("draw"));
document.getElementById("ie-draw-mode-erase")?.addEventListener("click", () => this._setDrawMode("erase"));
document.getElementById("ie-draw-color")?.addEventListener("input", e => {
this._drawTool.color = e.target.value;
this._drawTool._stamp = null;
this._drawTool._imgStamp = null;
this._setDrawColor(e.target.value);
this._drawPalette.syncColor(e.target.value);
});
document.getElementById("ie-draw-eyedropper")?.addEventListener("click", () => {
this._setEyedropperActive(!this._eyedropperActive);
});
document.getElementById("ie-draw-size")?.addEventListener("input", e => {
this._drawTool.brushSize = parseInt(e.target.value);
document.getElementById("ie-draw-size-lbl").textContent = e.target.value + "px";
this._drawTool._stamp = null;
this._setDrawBrushSize(parseInt(e.target.value));
});
document.getElementById("ie-draw-hard")?.addEventListener("input", e => {
this._drawTool.hardness = parseInt(e.target.value) / 100;
@@ -1461,7 +1552,9 @@ class ImageEditTab {
}
// Draw/Mask: update brush cursor and continue stroke outside canvas
const tool = this._activeTool;
if (tool === "draw" || tool === "mask") {
if (this._eyedropperActive) {
this._hideBrushCursor();
} else if (tool === "draw" || tool === "mask") {
this._updateBrushCursor(e);
const isDrawing = tool === "draw"
? this._drawTool?._drawing
@@ -1514,6 +1607,11 @@ class ImageEditTab {
// PointerEvent.pressure: pen -> actual pressure, mouse -> 0.5 while a button is held.
const pressure = e.pressure || 0.5;
if (this._eyedropperActive) {
this._pickColorAt(pos.x, pos.y);
return;
}
if (this._activeTool === "draw" && this._drawTool) {
const activeLayer = this._layerMgr.activeLayer;
if (!activeLayer) return;
@@ -1781,6 +1879,7 @@ class ImageEditTab {
// 現在のドキュメントを閉じ、未保存の変更を破棄してプレースホルダー表示に戻す
_closeDocument() {
if (this._eyedropperActive) this._setEyedropperActive(false);
if (!this._layerMgr) return;
if (!confirm("Close the current document? Unsaved changes will be lost.")) return;
@@ -1848,6 +1947,8 @@ class ImageEditTab {
this._layerMgr.on("change", () => this._refreshLayerList());
this._drawTool = new DrawTool(null);
// 新規ドキュメントでも選択中の色を引き継ぐ(パレットを色の正とする)
this._drawTool.color = this._drawPalette.currentColor;
this._drawTool.onChange(() => {
// layer.canvas に直接描くため sync 不要
this._updateCompositeView();
@@ -2458,6 +2559,9 @@ class ImageEditTab {
const wrap = document.getElementById("ie-canvas-wrap");
if (wrap && !this._panning) wrap.style.cursor = "grab";
}
if (e.key === "Escape" && this._eyedropperActive) this._setEyedropperActive(false);
const brushPicker = document.getElementById("wfm-abr-picker-overlay");
if (e.key === "Escape") brushPicker?.remove();
if (e.ctrlKey && e.key === "z") { e.preventDefault(); this._undo(); }
if (e.ctrlKey && e.key === "y") { e.preventDefault(); this._redo(); }
if (this._activeTool === "mask" && this._maskSubtool === "vector") {
@@ -2465,10 +2569,20 @@ class ImageEditTab {
}
if (!e.ctrlKey && !e.target.closest("input, textarea, select")) {
if (e.key === "v") this._setActiveTool("select");
if (e.key === "b") this._setActiveTool("draw");
if (e.key === "b") {
if (this._activeTool === "draw") this._toggleDrawBrushPicker();
else this._setActiveTool("draw");
}
if (e.key === "t") this._setActiveTool("text");
if (e.key === "s") this._setActiveTool("shape");
if (e.key === "g") this._setActiveTool("fill");
if (this._activeTool === "draw" && !brushPicker && !e.altKey && !e.metaKey) {
if (e.key === "d") this._setDrawMode("draw");
if (e.key === "e") this._setDrawMode("erase");
if (e.key === "x") this._drawPalette.toggleWell();
if (e.key === "[") this._stepDrawBrushSize(-1);
if (e.key === "]") this._stepDrawBrushSize(1);
}
// Delete/Backspaceで選択オブジェクト削除
if ((e.key === "Delete" || e.key === "Backspace") && this._activeTool === "select") {
const layer = this._selectTool?.getSelectedLayer();
@@ -2929,7 +3043,7 @@ class ImageEditTab {
return null;
};
const currentColor = this._drawTool?.color ?? "#ff0000";
const currentColor = this._drawTool?.color ?? "#000000";
const hex = currentColor.replace("#", "");
const cr = parseInt(hex.slice(0, 2), 16);
const cg = parseInt(hex.slice(2, 4), 16);
+235
View File
@@ -0,0 +1,235 @@
/**
* Image Edit Tab - Draw Tool color palette
* Drawツールの2段目(ie-tool-options)に並べるカラーパレット。
* 色1/色2の切替、基本色、カスタム色の登録を担当する。
* 基本色・カスタム色はユーザー設定として localStorage に保存する(作品データには含めない)。
*/
import { t } from "../i18n.js";
const STORAGE_KEY = "ie_draw_palette_v1";
const CUSTOM_SLOTS = 20;
const DEFAULT_BASE = [
"#000000", "#7f7f7f", "#880015", "#ed1c24", "#ff7f27", "#fff200", "#22b14c", "#00a2e8", "#3f48cc", "#a349a4",
"#ffffff", "#c3c3c3", "#b97a57", "#ffaec9", "#ffc90e", "#efe4b0", "#b5e61d", "#99d9ea", "#7092be", "#c8bfe7",
];
function normalizeHex(value) {
if (typeof value !== "string") return null;
const hex = value.toLowerCase();
return /^#[0-9a-f]{6}$/.test(hex) ? hex : null;
}
function loadPalette() {
let saved = null;
try { saved = JSON.parse(localStorage.getItem(STORAGE_KEY)); } catch { /* 破損時は初期値 */ }
return {
base: DEFAULT_BASE.map((c, i) => normalizeHex(saved?.base?.[i]) ?? c),
custom: Array.from({ length: CUSTOM_SLOTS }, (_, i) => normalizeHex(saved?.custom?.[i])),
};
}
export class DrawPalette {
/**
* @param {object} opts
* @param {(hex: string) => void} opts.onColorChange ブラシ色を変更する
* @param {(msg: string, type?: string) => void} opts.toast
*/
constructor({ onColorChange, toast }) {
this._onColorChange = onColorChange;
this._toast = toast;
this._wells = ["#000000", "#ffffff"];
this._activeWell = 0;
Object.assign(this, loadPalette());
this._content = null;
this._picker = null;
this._pickerTarget = null;
this._menu = null;
this._closeMenuOnOutside = e => { if (!this._menu?.contains(e.target)) this.closeMenu(); };
this._closeMenuOnEscape = e => { if (e.key === "Escape") this.closeMenu(); };
}
get currentColor() { return this._wells[this._activeWell]; }
/** ie-tool-options へパレットを描画する */
render(container) {
this.closeMenu();
const root = document.createElement("div");
root.className = "ie-palette";
this._content = document.createElement("div");
this._content.className = "ie-palette-content";
this._picker = document.createElement("input");
this._picker.type = "color";
this._picker.className = "ie-palette-picker";
this._picker.tabIndex = -1;
root.append(this._content, this._picker);
container.appendChild(root);
root.addEventListener("click", e => this._onClick(e));
root.addEventListener("contextmenu", e => this._onContextMenu(e));
this._picker.addEventListener("input", () => this._onPickerInput());
this._refresh();
}
/** スポイト・カラー入力などパレット外で変わった色を反映する */
syncColor(color) {
const hex = normalizeHex(color);
if (!hex) return;
this._wells[this._activeWell] = hex;
this._refresh();
}
/** 色1/色2を切り替える */
toggleWell() {
this._selectWell(1 - this._activeWell);
}
closeMenu() {
if (!this._menu) return;
this._menu.remove();
this._menu = null;
document.removeEventListener("pointerdown", this._closeMenuOnOutside, true);
document.removeEventListener("keydown", this._closeMenuOnEscape, true);
}
_refresh() {
if (!this._content?.isConnected) return;
const wells = this._wells.map((color, i) => {
const label = t(i === 0 ? "imageEditPaletteColor1" : "imageEditPaletteColor2");
return `<button type="button" class="ie-palette-well${i === this._activeWell ? " is-active" : ""}"
data-well="${i}" style="--swatch:${color}" title="${label} (X): ${color}" aria-label="${label}"></button>`;
}).join("");
this._content.innerHTML = `
<div class="ie-opt-group ie-palette-wells">${wells}</div>
<div class="ie-opt-group">
<label>${t("imageEditPaletteBase")}</label>
<div class="ie-palette-grid">${this._swatches("base")}</div>
</div>
<div class="ie-opt-group">
<label>${t("imageEditPaletteCustom")}</label>
<div class="ie-palette-grid">${this._swatches("custom")}</div>
<button type="button" class="wfm-btn wfm-btn-sm" data-palette-add
title="${t("imageEditPaletteAddTitle")}">+</button>
</div>`;
}
_swatches(kind) {
return this[kind].map((color, i) => {
const attrs = `data-kind="${kind}" data-index="${i}"`;
if (!color) {
const title = t("imageEditPaletteEmptyTitle");
return `<button type="button" class="ie-palette-swatch is-empty" ${attrs} title="${title}" aria-label="${title}"></button>`;
}
const current = color === this.currentColor ? " is-current" : "";
const title = `${color} — ${t("imageEditPaletteSwatchTitle")}`;
return `<button type="button" class="ie-palette-swatch${current}" ${attrs}
style="--swatch:${color}" title="${title}" aria-label="${color}"></button>`;
}).join("");
}
_onClick(e) {
const well = e.target.closest("[data-well]");
if (well) {
this._selectWell(Number(well.dataset.well));
return;
}
if (e.target.closest("[data-palette-add]")) {
this._addCurrent();
return;
}
const swatch = e.target.closest("[data-kind]");
if (!swatch) return;
const { kind, index } = swatch.dataset;
const color = this[kind][index];
if (color) this._applyColor(color);
else this._setSlot(kind, index, this.currentColor);
}
_onContextMenu(e) {
const swatch = e.target.closest("[data-kind]");
if (!swatch) return;
e.preventDefault();
this._openMenu(swatch, e.clientX, e.clientY);
}
_selectWell(index) {
this._activeWell = index;
this._applyColor(this.currentColor);
}
_applyColor(color) {
this._wells[this._activeWell] = color;
this._onColorChange(color);
this._refresh();
}
_addCurrent() {
const color = this.currentColor;
if (this.custom.includes(color)) {
this._toast(t("imageEditPaletteExists"), "info");
return;
}
const index = this.custom.indexOf(null);
if (index < 0) {
this._toast(t("imageEditPaletteFull"), "error");
return;
}
this._setSlot("custom", index, color);
}
_setSlot(kind, index, color) {
this[kind][index] = color;
try {
localStorage.setItem(STORAGE_KEY, JSON.stringify({ base: this.base, custom: this.custom }));
} catch { /* 保存できなくてもこのセッション中は使える */ }
this._refresh();
}
_openMenu(swatch, x, y) {
this.closeMenu();
const { kind, index } = swatch.dataset;
const color = this[kind][index];
const items = [
["imageEditPaletteRegisterCurrent", () => this._setSlot(kind, index, this.currentColor)],
[color ? "imageEditPaletteEditColor" : "imageEditPalettePickColor", () => this._openPicker(kind, index, x, y)],
];
if (kind === "custom" && color) {
items.push(["imageEditPaletteDelete", () => this._setSlot(kind, index, null)]);
}
if (kind === "base" && color !== DEFAULT_BASE[index]) {
items.push(["imageEditPaletteResetBase", () => this._setSlot(kind, index, DEFAULT_BASE[index])]);
}
const menu = document.createElement("div");
menu.className = "ie-palette-menu";
for (const [key, action] of items) {
const button = document.createElement("button");
button.type = "button";
button.textContent = t(key);
button.addEventListener("click", () => { this.closeMenu(); action(); });
menu.appendChild(button);
}
this._content.closest("#wfm-tab-image-edit").appendChild(menu);
menu.style.left = `${Math.min(x, window.innerWidth - menu.offsetWidth - 4)}px`;
menu.style.top = `${Math.min(y, window.innerHeight - menu.offsetHeight - 4)}px`;
this._menu = menu;
document.addEventListener("pointerdown", this._closeMenuOnOutside, true);
document.addEventListener("keydown", this._closeMenuOnEscape, true);
}
_openPicker(kind, index, x, y) {
this._pickerTarget = { kind, index };
this._picker.value = this[kind][index] ?? this.currentColor;
this._picker.style.left = `${x}px`;
this._picker.style.top = `${y}px`;
this._picker.click();
}
_onPickerInput() {
const { kind, index } = this._pickerTarget;
this._setSlot(kind, index, this._picker.value);
this._applyColor(this._picker.value);
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ export class DrawTool {
this.brushSize = 20;
this.hardness = 0.8; // 0.0 = very soft, 1.0 = hard edge
this.opacity = 1.0;
this.color = "#ff0000";
this.color = "#000000";
this.mode = "draw"; // "draw" | "erase"
this.spacing = 0.25; // stamp interval as fraction of brushSize (image brush only)
this.angle = 0; // degrees [0, 359]
+1 -1
View File
@@ -672,7 +672,7 @@ function extractPromptsAPI(wf) {
const srcNode = wf[String(val[0])];
// TextEncodeFibo2(Fibo 2.0)も同形。promptはPreviewAny→プロンプト強化スイッチ経由でリンクされる。
if (srcNode?.class_type === "TextEncodeMageFlowEdit" || srcNode?.class_type === "TextEncodeBooguEdit"
|| srcNode?.class_type === "TextEncodeFibo2") {
|| srcNode?.class_type === "TextEncodeFibo2" || srcNode?.class_type === "PH3ImageConditioning") {
const raw = isPos ? srcNode.inputs?.prompt : srcNode.inputs?.negative_prompt;
const text = Array.isArray(raw) ? resolveLinkedText(wf, raw[0], raw[1] ?? 0) : raw;
if (text && typeof text === "string") { if (isPos) pos.add(text); else neg.add(text); }
+35 -7
View File
@@ -12,6 +12,7 @@ import { escapeHtml } from "./util.js";
import { comfyUI } from "./comfyui-client.js";
import { comfyEditor } from "./comfyui-editor.js";
import { semanticErrorMessage } from "./gallery-semantic.js";
import { revealInGallery } from "./gallery-tab.js";
const API = {
status: "/wfm/tagspace/status",
@@ -203,7 +204,13 @@ function bindShell() {
});
$("wfm-ts-detail").addEventListener("click", (e) => {
const id = e.target.closest("[data-ts-toggle]")?.dataset.tsToggle;
if (id) return toggleChip(id);
if (id) return toggleChip(id, pickedTags(state.items.get(id)));
const reveal = e.target.closest("[data-ts-reveal]")?.dataset.tsReveal;
if (reveal) {
hideZoom();
revealInGallery(reveal).then((ok) => { if (!ok) showToast(t("tsRevealFailed"), "error"); });
return;
}
const tag = e.target.closest("[data-ts-pick]")?.dataset.tsPick;
if (tag != null) {
const set = state.picked.tags;
@@ -860,11 +867,17 @@ function renderDetail() {
: it.kind === "tag" ? `<div class="wfm-ts-muted">${escapeHtml(sourcesText(it))}</div>`
: (it.tags?.length ? tagPicker(it) : `<div class="wfm-ts-detail-text">${escapeHtml(t("tsImageNoTags"))}</div>`) +
`<div class="wfm-ts-muted wfm-ts-path">${escapeHtml(it.id)}</div>`;
// タグを選んでいるときは「選択したタグを追加」(選んだタグだけ)、選んでいなければ全体を追加する
const nPicked = pickedTags(it).length;
const btnLabel = inChips ? t("tsRemove") : nPicked ? t("tsAddPicked", nPicked) : t("tsAdd");
const btn = !canAdd(it) ? ""
: `<button class="wfm-btn wfm-btn-sm ${inChips ? "" : "wfm-btn-primary"}" data-ts-toggle="${escapeHtml(it.id)}">${escapeHtml(t(inChips ? "tsRemove" : "tsAdd"))}</button>`;
: `<button class="wfm-btn wfm-btn-sm ${inChips ? "" : "wfm-btn-primary"}" data-ts-toggle="${escapeHtml(it.id)}">${escapeHtml(btnLabel)}</button>`;
// Gallery点は、ギャラリータブでその画像を表示するボタンも置く
const reveal = it.kind === "image"
? `<button class="wfm-btn wfm-btn-sm" data-ts-reveal="${escapeHtml(it.id)}">${escapeHtml(t("tsOpenInGallery"))}</button>` : "";
// 追加/削除ボタンは見出し行に置く(本文が長くてもスクロールせずに押せる)
box.innerHTML = `<div class="wfm-ts-detail-head"><span class="wfm-ts-detail-title"><b>${escapeHtml(itemTitle(it))}</b> ` +
`<span class="wfm-ts-muted">${escapeHtml(t(`tsKind_${it.kind}`))}</span></span>${btn}</div>${thumb}${body}`;
`<span class="wfm-ts-muted">${escapeHtml(t(`tsKind_${it.kind}`))}</span></span>${reveal}${btn}</div>${thumb}${body}`;
}
/** カード・Gallery画像のプロンプトのタグ: クリックで選び、選んだタグで空間検索する */
@@ -950,18 +963,33 @@ function canAdd(it) {
return !!it && (it.kind !== "image" || it.tags?.length > 0);
}
function chipText(it) {
return it.kind === "card" ? it.prompt : it.kind === "image" ? it.tags.join(", ") : it.label;
/** タグをプロンプトに入れる形にする。タグは分解時にエスケープを外しているので、
* カッコを \( \) に戻す(そのままだと "rapunzel (disney)" の (disney) が強調指定になる) */
function promptTag(tag) {
return tag.replace(/[()]/g, "\\$&");
}
function toggleChip(id) {
function chipText(it) {
return it.kind === "card" ? it.prompt : it.kind === "image" ? it.tags.map(promptTag).join(", ") : promptTag(it.label);
}
/** 選択中パネルで選んだタグ(プロンプトの順)。その要素のものでなければ空 */
function pickedTags(it) {
if (!it || state.picked.id !== it.id || !it.tags?.length) return [];
return it.tags.filter((tg) => state.picked.tags.has(tg));
}
/** チップの追加/削除。tags を渡すと、全体ではなくそのタグだけを1つのチップとして追加する */
function toggleChip(id, tags = []) {
const i = state.chips.findIndex((c) => c.id === id);
if (i >= 0) {
state.chips.splice(i, 1);
} else {
const it = state.items.get(id);
if (!canAdd(it)) return;
state.chips.push({ id, kind: it.kind, label: itemTitle(it), text: chipText(it) });
state.chips.push(tags.length
? { id, kind: it.kind, label: t("tsChipPicked", itemTitle(it), tags.length), text: tags.map(promptTag).join(", ") }
: { id, kind: it.kind, label: itemTitle(it), text: chipText(it) });
}
refreshChips();
}
+70
View File
@@ -0,0 +1,70 @@
three.js r187 - MIT, Copyright 2010-2026 three.js authors
The MIT License
Copyright © 2010-2026 three.js authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
=== @pixiv/three-vrm 3.5.5 ===
Copyright (c) 2019-2026 pixiv Inc.
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=== @sparkjsdev/spark 2.4.0 ===
The MIT License
Copyright © 2025 WORLD LABS TECHNOLOGIES, INC.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+8
View File
@@ -0,0 +1,8 @@
Gallery 3D viewer bundle (glb / gltf / vrm / ply / spz).
three 0.187.0, @pixiv/three-vrm 3.5.5, @sparkjsdev/spark 2.4.0 (see LICENSE)
Source entry: entry.js.txt (rename to entry.js to rebuild)
Built with:
esbuild entry.js --bundle --format=esm --splitting --minify --target=es2022 \
--outdir=out --entry-names=three-viewer --chunk-names=chunk-[hash]
Spark is a separate chunk, loaded only when a Gaussian splat is opened.
draco/ is copied from three/examples/jsm/libs/draco/gltf.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,116 @@
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(h){var n=0;return function(){return n<h.length?{done:!1,value:h[n++]}:{done:!0}}};$jscomp.arrayIterator=function(h){return{next:$jscomp.arrayIteratorImpl(h)}};$jscomp.makeIterator=function(h){var n="undefined"!=typeof Symbol&&Symbol.iterator&&h[Symbol.iterator];return n?n.call(h):$jscomp.arrayIterator(h)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.getGlobal=function(h){h=["object"==typeof globalThis&&globalThis,h,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<h.length;++n){var k=h[n];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(h,n,k){if(h==Array.prototype||h==Object.prototype)return h;h[n]=k.value;return h};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";
var $jscomp$lookupPolyfilledValue=function(h,n){var k=$jscomp.propertyToPolyfillSymbol[n];if(null==k)return h[n];k=h[k];return void 0!==k?k:h[n]};$jscomp.polyfill=function(h,n,k,p){n&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(h,n,k,p):$jscomp.polyfillUnisolated(h,n,k,p))};
$jscomp.polyfillUnisolated=function(h,n,k,p){k=$jscomp.global;h=h.split(".");for(p=0;p<h.length-1;p++){var l=h[p];if(!(l in k))return;k=k[l]}h=h[h.length-1];p=k[h];n=n(p);n!=p&&null!=n&&$jscomp.defineProperty(k,h,{configurable:!0,writable:!0,value:n})};
$jscomp.polyfillIsolated=function(h,n,k,p){var l=h.split(".");h=1===l.length;p=l[0];p=!h&&p in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<l.length-1;y++){var f=l[y];if(!(f in p))return;p=p[f]}l=l[l.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?p[l]:null;n=n(k);null!=n&&(h?$jscomp.defineProperty($jscomp.polyfills,l,{configurable:!0,writable:!0,value:n}):n!==k&&(void 0===$jscomp.propertyToPolyfillSymbol[l]&&(k=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+k+"$"+l),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[l],{configurable:!0,writable:!0,value:n})))};
$jscomp.polyfill("Promise",function(h){function n(){this.batch_=null}function k(f){return f instanceof l?f:new l(function(q,u){q(f)})}if(h&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return h;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)};
var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q<f.length;++q){var u=f[q];f[q]=null;try{u()}catch(A){this.asyncThrow_(A)}}}this.batch_=null};n.prototype.asyncThrow_=function(f){this.asyncExecuteFunction(function(){throw f;})};var l=function(f){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var q=this.createResolveAndReject_();
try{f(q.resolve,q.reject)}catch(u){q.reject(u)}};l.prototype.createResolveAndReject_=function(){function f(A){return function(F){u||(u=!0,A.call(q,F))}}var q=this,u=!1;return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};l.prototype.resolveTo_=function(f){if(f===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof l)this.settleSameAsPromise_(f);else{a:switch(typeof f){case "object":var q=null!=f;break a;case "function":q=!0;break a;default:q=!1}q?this.resolveToNonPromiseObj_(f):
this.fulfill_(f)}};l.prototype.resolveToNonPromiseObj_=function(f){var q=void 0;try{q=f.then}catch(u){this.reject_(u);return}"function"==typeof q?this.settleSameAsThenable_(q,f):this.fulfill_(f)};l.prototype.reject_=function(f){this.settle_(2,f)};l.prototype.fulfill_=function(f){this.settle_(1,f)};l.prototype.settle_=function(f,q){if(0!=this.state_)throw Error("Cannot settle("+f+", "+q+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=q;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
this.executeOnSettledCallbacks_()};l.prototype.scheduleUnhandledRejectionCheck_=function(){var f=this;p(function(){if(f.notifyUnhandledRejection_()){var q=$jscomp.global.console;"undefined"!==typeof q&&q.error(f.result_)}},1)};l.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var f=$jscomp.global.CustomEvent,q=$jscomp.global.Event,u=$jscomp.global.dispatchEvent;if("undefined"===typeof u)return!0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}):
"function"===typeof q?f=new q("unhandledrejection",{cancelable:!0}):(f=$jscomp.global.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.result_;return u(f)};l.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)y.asyncExecute(this.onSettledCallbacks_[f]);this.onSettledCallbacks_=null}};var y=new n;l.prototype.settleSameAsPromise_=function(f){var q=this.createResolveAndReject_();
f.callWhenSettled_(q.resolve,q.reject)};l.prototype.settleSameAsThenable_=function(f,q){var u=this.createResolveAndReject_();try{f.call(q,u.resolve,u.reject)}catch(A){u.reject(A)}};l.prototype.then=function(f,q){function u(w,B){return"function"==typeof w?function(R){try{A(w(R))}catch(Z){F(Z)}}:B}var A,F,v=new l(function(w,B){A=w;F=B});this.callWhenSettled_(u(f,A),u(q,F));return v};l.prototype.catch=function(f){return this.then(void 0,f)};l.prototype.callWhenSettled_=function(f,q){function u(){switch(A.state_){case 1:f(A.result_);
break;case 2:q(A.result_);break;default:throw Error("Unexpected state: "+A.state_);}}var A=this;null==this.onSettledCallbacks_?y.asyncExecute(u):this.onSettledCallbacks_.push(u);this.isRejectionHandled_=!0};l.resolve=k;l.reject=function(f){return new l(function(q,u){u(f)})};l.race=function(f){return new l(function(q,u){for(var A=$jscomp.makeIterator(f),F=A.next();!F.done;F=A.next())k(F.value).callWhenSettled_(q,u)})};l.all=function(f){var q=$jscomp.makeIterator(f),u=q.next();return u.done?k([]):new l(function(A,
F){function v(R){return function(Z){w[R]=Z;B--;0==B&&A(w)}}var w=[],B=0;do w.push(void 0),B++,k(u.value).callWhenSettled_(v(w.length-1),F),u=q.next();while(!u.done)})};return l},"es6","es3");$jscomp.owns=function(h,n){return Object.prototype.hasOwnProperty.call(h,n)};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(h,n){for(var k=1;k<arguments.length;k++){var p=arguments[k];if(p)for(var l in p)$jscomp.owns(p,l)&&(h[l]=p[l])}return h};
$jscomp.polyfill("Object.assign",function(h){return h||$jscomp.assign},"es6","es3");$jscomp.checkStringArgs=function(h,n,k){if(null==h)throw new TypeError("The 'this' value for String.prototype."+k+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+k+" must not be a regular expression");return h+""};
$jscomp.polyfill("String.prototype.startsWith",function(h){return h?h:function(n,k){var p=$jscomp.checkStringArgs(this,n,"startsWith");n+="";var l=p.length,y=n.length;k=Math.max(0,Math.min(k|0,p.length));for(var f=0;f<y&&k<l;)if(p[k++]!=n[f++])return!1;return f>=y}},"es6","es3");
$jscomp.polyfill("Array.prototype.copyWithin",function(h){function n(k){k=Number(k);return Infinity===k||-Infinity===k?k:k|0}return h?h:function(k,p,l){var y=this.length;k=n(k);p=n(p);l=void 0===l?y:n(l);k=0>k?Math.max(y+k,0):Math.min(k,y);p=0>p?Math.max(y+p,0):Math.min(p,y);l=0>l?Math.max(y+l,0):Math.min(l,y);if(k<p)for(;p<l;)p in this?this[k++]=this[p++]:(delete this[k++],p++);else for(l=Math.min(l,y+p-k),k+=l-p;l>p;)--l in this?this[--k]=this[l]:delete this[--k];return this}},"es6","es3");
$jscomp.typedArrayCopyWithin=function(h){return h?h:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
var DracoDecoderModule=function(){var h="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(h=h||__filename);return function(n){function k(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b){if(e){var c=ia;var d=e+b;for(b=e;c[b]&&!(b>=d);)++b;if(16<b-e&&c.buffer&&ra)c=ra.decode(c.subarray(e,b));else{for(d="";e<b;){var g=c[e++];if(g&128){var t=c[e++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|t);else{var aa=c[e++]&
63;g=224==(g&240)?(g&15)<<12|t<<6|aa:(g&7)<<18|t<<12|aa<<6|c[e++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}c=d}}else c="";return c}function l(){var e=ja.buffer;a.HEAP8=W=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ia=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=Y=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function y(e){if(a.onAbort)a.onAbort(e);
e="Aborted("+e+")";da(e);sa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function f(e){try{if(e==P&&ea)return new Uint8Array(ea);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){y(b)}}function q(){if(!ea&&(ta||fa)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return f(P)});
if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return f(P)})}function u(e){for(;0<e.length;)e.shift()(a)}function A(e){this.excPtr=e;this.ptr=e-24;this.set_type=function(b){Y[this.ptr+4>>2]=b};this.get_type=function(){return Y[this.ptr+4>>2]};this.set_destructor=function(b){Y[this.ptr+8>>2]=b};this.get_destructor=function(){return Y[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){W[this.ptr+
12>>0]=b?1:0};this.get_caught=function(){return 0!=W[this.ptr+12>>0]};this.set_rethrown=function(b){W[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=W[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){Y[this.ptr+
16>>2]=b};this.get_adjusted_ptr=function(){return Y[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ua(this.get_type()))return Y[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function F(){function e(){if(!la&&(la=!0,a.calledRun=!0,!sa)){va=!0;u(oa);wa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)xa.unshift(a.postRun.shift());u(xa)}}if(!(0<ba)){if(a.preRun)for("function"==
typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)ya.unshift(a.preRun.shift());u(ya);0<ba||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);e()},1)):e())}}function v(){}function w(e){return(e||v).__cache__}function B(e,b){var c=w(b),d=c[e];if(d)return d;d=Object.create((b||v).prototype);d.ptr=e;return c[e]=d}function R(e){if("string"===typeof e){for(var b=0,c=0;c<e.length;++c){var d=e.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=
d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0<d){d=c+d-1;for(var g=0;g<e.length;++g){var t=e.charCodeAt(g);if(55296<=t&&57343>=t){var aa=e.charCodeAt(++g);t=65536+((t&1023)<<10)|aa&1023}if(127>=t){if(c>=d)break;b[c++]=t}else{if(2047>=t){if(c+1>=d)break;b[c++]=192|t>>6}else{if(65535>=t){if(c+2>=d)break;b[c++]=224|t>>12}else{if(c+3>=d)break;b[c++]=240|t>>18;b[c++]=128|t>>12&63}b[c++]=128|t>>6&63}b[c++]=128|t&63}}b[c]=0}e=r.alloc(b,W);r.copy(b,W,e);return e}return e}function Z(e){if("object"===
typeof e){var b=r.alloc(e,W);r.copy(e,W,b);return b}return e}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=za();w(S)[this.ptr]=this}function Q(){this.ptr=Aa();w(Q)[this.ptr]=this}function V(){this.ptr=Ba();w(V)[this.ptr]=this}function x(){this.ptr=Ca();w(x)[this.ptr]=this}function D(){this.ptr=Da();w(D)[this.ptr]=this}function G(){this.ptr=Ea();w(G)[this.ptr]=this}function H(){this.ptr=Fa();w(H)[this.ptr]=this}function E(){this.ptr=Ga();w(E)[this.ptr]=
this}function T(){this.ptr=Ha();w(T)[this.ptr]=this}function C(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=Ia();w(I)[this.ptr]=this}function J(){this.ptr=Ja();w(J)[this.ptr]=this}function K(){this.ptr=Ka();w(K)[this.ptr]=this}function L(){this.ptr=La();w(L)[this.ptr]=this}function M(){this.ptr=Ma();w(M)[this.ptr]=this}function N(){this.ptr=Na();w(N)[this.ptr]=this}function O(){this.ptr=Oa();w(O)[this.ptr]=this}function z(){this.ptr=Pa();w(z)[this.ptr]=this}function m(){this.ptr=
Qa();w(m)[this.ptr]=this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},wa,ka;a.ready=new Promise(function(e,b){wa=e;ka=b});var Ra=!1,Sa=!1;a.onRuntimeInitialized=function(){Ra=!0;if(Sa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Sa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3<e.length?!1:1==e[0]&&0<=e[1]&&5>=e[1]?!0:0!=e[0]||10<
e[1]?!1:!0};var Ta=Object.assign({},a),ta="object"==typeof window,fa="function"==typeof importScripts,Ua="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,U="";if(Ua){var Va=require("fs"),pa=require("path");U=fa?pa.dirname(U)+"/":__dirname+"/";var Wa=function(e,b){e=e.startsWith("file://")?new URL(e):pa.normalize(e);return Va.readFileSync(e,b?void 0:"utf8")};var ma=function(e){e=Wa(e,!0);e.buffer||(e=new Uint8Array(e));return e};var na=function(e,
b,c){e=e.startsWith("file://")?new URL(e):pa.normalize(e);Va.readFile(e,function(d,g){d?c(d):b(g.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);a.inspect=function(){return"[Emscripten Module object]"}}else if(ta||fa)fa?U=self.location.href:"undefined"!=typeof document&&document.currentScript&&(U=document.currentScript.src),h&&(U=h),U=0!==U.indexOf("blob:")?U.substr(0,U.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Wa=function(e){var b=new XMLHttpRequest;b.open("GET",
e,!1);b.send(null);return b.responseText},fa&&(ma=function(e){var b=new XMLHttpRequest;b.open("GET",e,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),na=function(e,b,c){var d=new XMLHttpRequest;d.open("GET",e,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};a.print||console.log.bind(console);var da=a.printErr||console.warn.bind(console);Object.assign(a,Ta);Ta=null;var ea;a.wasmBinary&&
(ea=a.wasmBinary);"object"!=typeof WebAssembly&&y("no native wasm support detected");var ja,sa=!1,ra="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,W,ia,ca,Y,ya=[],oa=[],xa=[],va=!1,ba=0,qa=null,ha=null;var P="draco_decoder_gltf.wasm";P.startsWith("data:application/octet-stream;base64,")||(P=k(P));var pd=0,qd={b:function(e,b,c){(new A(e)).init(b,c);pd++;throw e;},a:function(){y("")},d:function(e,b,c){ia.copyWithin(e,b,b+c)},c:function(e){var b=ia.length;e>>>=0;if(2147483648<e)return!1;
for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);l();var t=1;break a}catch(aa){}t=void 0}if(t)return!0}return!1}};(function(){function e(g,t){a.asm=g.exports;ja=a.asm.e;l();oa.unshift(a.asm.f);ba--;a.monitorRunDependencies&&a.monitorRunDependencies(ba);0==ba&&(null!==qa&&(clearInterval(qa),qa=null),ha&&(g=ha,ha=null,g()))}function b(g){e(g.instance)}
function c(g){return q().then(function(t){return WebAssembly.instantiate(t,d)}).then(function(t){return t}).then(g,function(t){da("failed to asynchronously prepare wasm: "+t);y(t)})}var d={a:qd};ba++;a.monitorRunDependencies&&a.monitorRunDependencies(ba);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return ea||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||
P.startsWith("file://")||Ua||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(t){da("wasm streaming compile failed: "+t);da("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ka);return{}})();var Xa=a._emscripten_bind_VoidPtr___destroy___0=function(){return(Xa=a._emscripten_bind_VoidPtr___destroy___0=a.asm.h).apply(null,arguments)},za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=
function(){return(za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.i).apply(null,arguments)},Ya=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(Ya=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.j).apply(null,arguments)},Za=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Za=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.k).apply(null,arguments)},Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
a.asm.l).apply(null,arguments)},$a=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return($a=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.m).apply(null,arguments)},ab=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(ab=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.n).apply(null,arguments)},Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=
a.asm.o).apply(null,arguments)},bb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(bb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.p).apply(null,arguments)},Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.q).apply(null,arguments)},cb=a._emscripten_bind_PointAttribute_size_0=function(){return(cb=a._emscripten_bind_PointAttribute_size_0=a.asm.r).apply(null,arguments)},db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=
function(){return(db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.s).apply(null,arguments)},eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(eb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.t).apply(null,arguments)},fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(fb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.u).apply(null,arguments)},gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(gb=a._emscripten_bind_PointAttribute_num_components_0=
a.asm.v).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(hb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.w).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(ib=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.x).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(jb=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.y).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_unique_id_0=
function(){return(kb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.z).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(lb=a._emscripten_bind_PointAttribute___destroy___0=a.asm.A).apply(null,arguments)},Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.B).apply(null,arguments)},mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=
function(){return(mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.C).apply(null,arguments)},nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.D).apply(null,arguments)},ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.E).apply(null,arguments)},pb=
a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(pb=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.F).apply(null,arguments)},qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.G).apply(null,arguments)},Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=
a.asm.H).apply(null,arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.I).apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.J).apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(tb=
a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.K).apply(null,arguments)},Fa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Fa=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.L).apply(null,arguments)},ub=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(ub=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.M).apply(null,arguments)},vb=a._emscripten_bind_PointCloud_num_points_0=function(){return(vb=a._emscripten_bind_PointCloud_num_points_0=a.asm.N).apply(null,
arguments)},wb=a._emscripten_bind_PointCloud___destroy___0=function(){return(wb=a._emscripten_bind_PointCloud___destroy___0=a.asm.O).apply(null,arguments)},Ga=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ga=a._emscripten_bind_Mesh_Mesh_0=a.asm.P).apply(null,arguments)},xb=a._emscripten_bind_Mesh_num_faces_0=function(){return(xb=a._emscripten_bind_Mesh_num_faces_0=a.asm.Q).apply(null,arguments)},yb=a._emscripten_bind_Mesh_num_attributes_0=function(){return(yb=a._emscripten_bind_Mesh_num_attributes_0=
a.asm.R).apply(null,arguments)},zb=a._emscripten_bind_Mesh_num_points_0=function(){return(zb=a._emscripten_bind_Mesh_num_points_0=a.asm.S).apply(null,arguments)},Ab=a._emscripten_bind_Mesh___destroy___0=function(){return(Ab=a._emscripten_bind_Mesh___destroy___0=a.asm.T).apply(null,arguments)},Ha=a._emscripten_bind_Metadata_Metadata_0=function(){return(Ha=a._emscripten_bind_Metadata_Metadata_0=a.asm.U).apply(null,arguments)},Bb=a._emscripten_bind_Metadata___destroy___0=function(){return(Bb=a._emscripten_bind_Metadata___destroy___0=
a.asm.V).apply(null,arguments)},Cb=a._emscripten_bind_Status_code_0=function(){return(Cb=a._emscripten_bind_Status_code_0=a.asm.W).apply(null,arguments)},Db=a._emscripten_bind_Status_ok_0=function(){return(Db=a._emscripten_bind_Status_ok_0=a.asm.X).apply(null,arguments)},Eb=a._emscripten_bind_Status_error_msg_0=function(){return(Eb=a._emscripten_bind_Status_error_msg_0=a.asm.Y).apply(null,arguments)},Fb=a._emscripten_bind_Status___destroy___0=function(){return(Fb=a._emscripten_bind_Status___destroy___0=
a.asm.Z).apply(null,arguments)},Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm._).apply(null,arguments)},Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.$).apply(null,arguments)},Hb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Hb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.aa).apply(null,arguments)},Ib=
a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ib=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ba).apply(null,arguments)},Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.ca).apply(null,arguments)},Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.da).apply(null,arguments)},Kb=a._emscripten_bind_DracoInt8Array_size_0=
function(){return(Kb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ea).apply(null,arguments)},Lb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Lb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.fa).apply(null,arguments)},Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ga).apply(null,arguments)},Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=
a.asm.ha).apply(null,arguments)},Nb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Nb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.ia).apply(null,arguments)},Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ja).apply(null,arguments)},La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.ka).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=
function(){return(Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.la).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Qb=a._emscripten_bind_DracoInt16Array_size_0=a.asm.ma).apply(null,arguments)},Rb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Rb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.na).apply(null,arguments)},Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=
a.asm.oa).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.pa).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Tb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.qa).apply(null,arguments)},Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ra).apply(null,arguments)},Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=
function(){return(Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.sa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.ta).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt32Array_size_0=function(){return(Wb=a._emscripten_bind_DracoInt32Array_size_0=a.asm.ua).apply(null,arguments)},Xb=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Xb=a._emscripten_bind_DracoInt32Array___destroy___0=
a.asm.va).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.wa).apply(null,arguments)},Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.xa).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(Zb=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.ya).apply(null,arguments)},$b=a._emscripten_bind_DracoUInt32Array___destroy___0=
function(){return($b=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.za).apply(null,arguments)},Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Aa).apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ba).apply(null,arguments)},bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=
a.asm.Ca).apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.Da).apply(null,arguments)},dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ea).apply(null,arguments)},ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Fa).apply(null,
arguments)},fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ga).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ha).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(hc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.Ia).apply(null,arguments)},Qa=a._emscripten_bind_Decoder_Decoder_0=
function(){return(Qa=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ja).apply(null,arguments)},ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Ka).apply(null,arguments)},jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.La).apply(null,arguments)},kc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(kc=a._emscripten_bind_Decoder_GetAttributeId_2=
a.asm.Ma).apply(null,arguments)},lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.Na).apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Oa).apply(null,arguments)},nc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(nc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Pa).apply(null,arguments)},
oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Qa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(pc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ra).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Sa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=
function(){return(rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Ta).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Ua).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Va).apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(uc=
a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Wa).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.Xa).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.Ya).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=
a.asm.Za).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm._a).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.$a).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=
a.asm.ab).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.bb).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.cb).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=
a.asm.db).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.eb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.fb).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=
a.asm.gb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.hb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.ib).apply(null,arguments)},Jc=a._emscripten_bind_Decoder___destroy___0=function(){return(Jc=a._emscripten_bind_Decoder___destroy___0=a.asm.jb).apply(null,arguments)},Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=
function(){return(Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.kb).apply(null,arguments)},Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.lb).apply(null,arguments)},Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=
a.asm.mb).apply(null,arguments)},Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.nb).apply(null,arguments)},Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.ob).apply(null,arguments)},Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
a.asm.pb).apply(null,arguments)},Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.qb).apply(null,arguments)},Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.rb).apply(null,arguments)},Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=
a.asm.sb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.tb).apply(null,arguments)},Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.ub).apply(null,arguments)},Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=
a.asm.vb).apply(null,arguments)},Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.wb).apply(null,arguments)},Xc=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(Xc=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.xb).apply(null,arguments)},Yc=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(Yc=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.yb).apply(null,arguments)},Zc=
a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Zc=a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.zb).apply(null,arguments)},$c=a._emscripten_enum_draco_DataType_DT_INT16=function(){return($c=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Ab).apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(ad=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Bb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INT32=
a.asm.Cb).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(cd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Db).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(dd=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Eb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(ed=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Fb).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=
function(){return(fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Gb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Hb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(hd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Ib).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=
a.asm.Jb).apply(null,arguments)},jd=a._emscripten_enum_draco_StatusCode_OK=function(){return(jd=a._emscripten_enum_draco_StatusCode_OK=a.asm.Kb).apply(null,arguments)},kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Lb).apply(null,arguments)},ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Mb).apply(null,arguments)},md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
function(){return(md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=a.asm.Nb).apply(null,arguments)},nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Ob).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Pb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Qb).apply(null,arguments)};
a._free=function(){return(a._free=a.asm.Rb).apply(null,arguments)};var ua=function(){return(ua=a.asm.Sb).apply(null,arguments)};a.___start_em_js=11660;a.___stop_em_js=11758;var la;ha=function b(){la||F();la||(ha=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();F();v.prototype=Object.create(v.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=w;a.wrapPointer=B;a.castObject=function(b,
c){return B(b.ptr,c)};a.NULL=B(0);a.destroy=function(b){if(!b.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";b.__destroy__();delete w(b.__class__)[b.ptr]};a.compare=function(b,c){return b.ptr===c.ptr};a.getPointer=function(b){return b.ptr};a.getClass=function(b){return b.__class__};var r={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(r.needed){for(var b=0;b<r.temps.length;b++)a._free(r.temps[b]);r.temps.length=0;a._free(r.buffer);r.buffer=0;r.size+=
r.needed;r.needed=0}r.buffer||(r.size+=128,r.buffer=a._malloc(r.size),r.buffer||y(void 0));r.pos=0},alloc:function(b,c){r.buffer||y(void 0);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;r.pos+b>=r.size?(0<b||y(void 0),r.needed+=b,c=a._malloc(b),r.temps.push(c)):(c=r.buffer+r.pos,r.pos+=b);return c},copy:function(b,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;g<b.length;g++)c[d+g]=b[g]}};X.prototype=Object.create(v.prototype);X.prototype.constructor=
X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){Xa(this.ptr)};S.prototype=Object.create(v.prototype);S.prototype.constructor=S;S.prototype.__class__=S;S.__cache__={};a.DecoderBuffer=S;S.prototype.Init=S.prototype.Init=function(b,c){var d=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);Ya(d,b,c)};S.prototype.__destroy__=S.prototype.__destroy__=function(){Za(this.ptr)};Q.prototype=Object.create(v.prototype);
Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.AttributeTransformData=Q;Q.prototype.transform_type=Q.prototype.transform_type=function(){return $a(this.ptr)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){ab(this.ptr)};V.prototype=Object.create(v.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){bb(this.ptr)};x.prototype=Object.create(v.prototype);x.prototype.constructor=
x;x.prototype.__class__=x;x.__cache__={};a.PointAttribute=x;x.prototype.size=x.prototype.size=function(){return cb(this.ptr)};x.prototype.GetAttributeTransformData=x.prototype.GetAttributeTransformData=function(){return B(db(this.ptr),Q)};x.prototype.attribute_type=x.prototype.attribute_type=function(){return eb(this.ptr)};x.prototype.data_type=x.prototype.data_type=function(){return fb(this.ptr)};x.prototype.num_components=x.prototype.num_components=function(){return gb(this.ptr)};x.prototype.normalized=
x.prototype.normalized=function(){return!!hb(this.ptr)};x.prototype.byte_stride=x.prototype.byte_stride=function(){return ib(this.ptr)};x.prototype.byte_offset=x.prototype.byte_offset=function(){return jb(this.ptr)};x.prototype.unique_id=x.prototype.unique_id=function(){return kb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){lb(this.ptr)};D.prototype=Object.create(v.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.AttributeQuantizationTransform=
D;D.prototype.InitFromAttribute=D.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!mb(c,b)};D.prototype.quantization_bits=D.prototype.quantization_bits=function(){return nb(this.ptr)};D.prototype.min_value=D.prototype.min_value=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return ob(c,b)};D.prototype.range=D.prototype.range=function(){return pb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){qb(this.ptr)};G.prototype=
Object.create(v.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.AttributeOctahedronTransform=G;G.prototype.InitFromAttribute=G.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!rb(c,b)};G.prototype.quantization_bits=G.prototype.quantization_bits=function(){return sb(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){tb(this.ptr)};H.prototype=Object.create(v.prototype);H.prototype.constructor=H;H.prototype.__class__=
H;H.__cache__={};a.PointCloud=H;H.prototype.num_attributes=H.prototype.num_attributes=function(){return ub(this.ptr)};H.prototype.num_points=H.prototype.num_points=function(){return vb(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){wb(this.ptr)};E.prototype=Object.create(v.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.Mesh=E;E.prototype.num_faces=E.prototype.num_faces=function(){return xb(this.ptr)};E.prototype.num_attributes=E.prototype.num_attributes=
function(){return yb(this.ptr)};E.prototype.num_points=E.prototype.num_points=function(){return zb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){Ab(this.ptr)};T.prototype=Object.create(v.prototype);T.prototype.constructor=T;T.prototype.__class__=T;T.__cache__={};a.Metadata=T;T.prototype.__destroy__=T.prototype.__destroy__=function(){Bb(this.ptr)};C.prototype=Object.create(v.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Status=C;C.prototype.code=
C.prototype.code=function(){return Cb(this.ptr)};C.prototype.ok=C.prototype.ok=function(){return!!Db(this.ptr)};C.prototype.error_msg=C.prototype.error_msg=function(){return p(Eb(this.ptr))};C.prototype.__destroy__=C.prototype.__destroy__=function(){Fb(this.ptr)};I.prototype=Object.create(v.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoFloat32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gb(c,
b)};I.prototype.size=I.prototype.size=function(){return Hb(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Ib(this.ptr)};J.prototype=Object.create(v.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoInt8Array=J;J.prototype.GetValue=J.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Jb(c,b)};J.prototype.size=J.prototype.size=function(){return Kb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Lb(this.ptr)};
K.prototype=Object.create(v.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoUInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Mb(c,b)};K.prototype.size=K.prototype.size=function(){return Nb(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Ob(this.ptr)};L.prototype=Object.create(v.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=
L;L.prototype.GetValue=L.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Pb(c,b)};L.prototype.size=L.prototype.size=function(){return Qb(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){Rb(this.ptr)};M.prototype=Object.create(v.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoUInt16Array=M;M.prototype.GetValue=M.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Sb(c,b)};
M.prototype.size=M.prototype.size=function(){return Tb(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=function(){Ub(this.ptr)};N.prototype=Object.create(v.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Vb(c,b)};N.prototype.size=N.prototype.size=function(){return Wb(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){Xb(this.ptr)};
O.prototype=Object.create(v.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.DracoUInt32Array=O;O.prototype.GetValue=O.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Yb(c,b)};O.prototype.size=O.prototype.size=function(){return Zb(this.ptr)};O.prototype.__destroy__=O.prototype.__destroy__=function(){$b(this.ptr)};z.prototype=Object.create(v.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.MetadataQuerier=
z;z.prototype.HasEntry=z.prototype.HasEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return!!ac(d,b,c)};z.prototype.GetIntEntry=z.prototype.GetIntEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return bc(d,b,c)};z.prototype.GetIntEntryArray=z.prototype.GetIntEntryArray=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===
typeof c?c.ptr:R(c);d&&"object"===typeof d&&(d=d.ptr);cc(g,b,c,d)};z.prototype.GetDoubleEntry=z.prototype.GetDoubleEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return dc(d,b,c)};z.prototype.GetStringEntry=z.prototype.GetStringEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return p(ec(d,b,c))};z.prototype.NumEntries=z.prototype.NumEntries=function(b){var c=this.ptr;
b&&"object"===typeof b&&(b=b.ptr);return fc(c,b)};z.prototype.GetEntryName=z.prototype.GetEntryName=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return p(gc(d,b,c))};z.prototype.__destroy__=z.prototype.__destroy__=function(){hc(this.ptr)};m.prototype=Object.create(v.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.Decoder=m;m.prototype.DecodeArrayToPointCloud=m.prototype.DecodeArrayToPointCloud=function(b,c,d){var g=
this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(ic(g,b,c,d),C)};m.prototype.DecodeArrayToMesh=m.prototype.DecodeArrayToMesh=function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(jc(g,b,c,d),C)};m.prototype.GetAttributeId=m.prototype.GetAttributeId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
(c=c.ptr);return kc(d,b,c)};m.prototype.GetAttributeIdByName=m.prototype.GetAttributeIdByName=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return lc(d,b,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);d=d&&"object"===typeof d?d.ptr:R(d);return mc(g,b,c,d)};m.prototype.GetAttribute=
m.prototype.GetAttribute=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(nc(d,b,c),x)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(oc(d,b,c),x)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return B(pc(c,b),T)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=
function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(qc(d,b,c),T)};m.prototype.GetFaceFromMesh=m.prototype.GetFaceFromMesh=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!rc(g,b,c,d)};m.prototype.GetTriangleStripsFromMesh=m.prototype.GetTriangleStripsFromMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);
return sc(d,b,c)};m.prototype.GetTrianglesUInt16Array=m.prototype.GetTrianglesUInt16Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!tc(g,b,c,d)};m.prototype.GetTrianglesUInt32Array=m.prototype.GetTrianglesUInt32Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!uc(g,b,c,d)};m.prototype.GetAttributeFloat=m.prototype.GetAttributeFloat=
function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!vc(g,b,c,d)};m.prototype.GetAttributeFloatForAllPoints=m.prototype.GetAttributeFloatForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!wc(g,b,c,d)};m.prototype.GetAttributeIntForAllPoints=m.prototype.GetAttributeIntForAllPoints=function(b,c,d){var g=this.ptr;
b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!xc(g,b,c,d)};m.prototype.GetAttributeInt8ForAllPoints=m.prototype.GetAttributeInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!yc(g,b,c,d)};m.prototype.GetAttributeUInt8ForAllPoints=m.prototype.GetAttributeUInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=
b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(g,b,c,d)};m.prototype.GetAttributeInt16ForAllPoints=m.prototype.GetAttributeInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(g,b,c,d)};m.prototype.GetAttributeUInt16ForAllPoints=m.prototype.GetAttributeUInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Bc(g,b,c,d)};m.prototype.GetAttributeInt32ForAllPoints=m.prototype.GetAttributeInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(g,b,c,d)};m.prototype.GetAttributeUInt32ForAllPoints=m.prototype.GetAttributeUInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===
typeof d&&(d=d.ptr);return!!Dc(g,b,c,d)};m.prototype.GetAttributeDataArrayForAllPoints=m.prototype.GetAttributeDataArrayForAllPoints=function(b,c,d,g,t){var aa=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);g&&"object"===typeof g&&(g=g.ptr);t&&"object"===typeof t&&(t=t.ptr);return!!Ec(aa,b,c,d,g,t)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Fc(c,
b)};m.prototype.GetEncodedGeometryType_Deprecated=m.prototype.GetEncodedGeometryType_Deprecated=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gc(c,b)};m.prototype.DecodeBufferToPointCloud=m.prototype.DecodeBufferToPointCloud=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(Hc(d,b,c),C)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===
typeof c&&(c=c.ptr);return B(Ic(d,b,c),C)};m.prototype.__destroy__=m.prototype.__destroy__=function(){Jc(this.ptr)};(function(){function b(){a.ATTRIBUTE_INVALID_TRANSFORM=Kc();a.ATTRIBUTE_NO_TRANSFORM=Lc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Mc();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Nc();a.INVALID=Oc();a.POSITION=Pc();a.NORMAL=Qc();a.COLOR=Rc();a.TEX_COORD=Sc();a.GENERIC=Tc();a.INVALID_GEOMETRY_TYPE=Uc();a.POINT_CLOUD=Vc();a.TRIANGULAR_MESH=Wc();a.DT_INVALID=Xc();a.DT_INT8=Yc();a.DT_UINT8=Zc();a.DT_INT16=
$c();a.DT_UINT16=ad();a.DT_INT32=bd();a.DT_UINT32=cd();a.DT_INT64=dd();a.DT_UINT64=ed();a.DT_FLOAT32=fd();a.DT_FLOAT64=gd();a.DT_BOOL=hd();a.DT_TYPES_COUNT=id();a.OK=jd();a.DRACO_ERROR=kd();a.IO_ERROR=ld();a.INVALID_PARAMETER=md();a.UNSUPPORTED_VERSION=nd();a.UNKNOWN_VERSION=od()}va?b():oa.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(b){if(b.__class__&&b.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b);
if(8>b.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
+9
View File
@@ -0,0 +1,9 @@
export * as THREE from "three";
export { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
export { RoomEnvironment } from "three/examples/jsm/environments/RoomEnvironment.js";
export { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
export { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader.js";
export { PLYLoader } from "three/examples/jsm/loaders/PLYLoader.js";
export { MeshoptDecoder } from "three/examples/jsm/libs/meshopt_decoder.module.js";
export { VRMLoaderPlugin, VRMUtils } from "@pixiv/three-vrm";
export const loadSpark = () => import("@sparkjsdev/spark");
File diff suppressed because one or more lines are too long
+5 -1
View File
@@ -1832,6 +1832,7 @@
<li id="wfm-help-gallery-10">Workflow auto-save: images generated in the Generate UI tab automatically have their workflow saved to gallery metadata and shown in the JSON tab</li>
<li id="wfm-help-gallery-11">Supports PNG (tEXt/iTXt), JPEG, WebP, GIF, MP4, WebM, PSD, and audio (WAV, MP3, OGG, M4A, FLAC, Opus — waveform thumbnail, built-in player, prompt/workflow tags written by ComfyUI's SaveAudio nodes); workflow extraction reads ComfyUI prompt/workflow keys embedded in PNG metadata (including chunks appended after IEND by ComfyUI-Custom-Scripts), WebP EXIF, or MP4/WebM container tags (as written by SaveVideo, e.g. MiniMax H3 output); the Prompt tab also reads A1111 / Forge / Fooocus <code>parameters</code> text when no workflow is embedded. Audio waveform thumbnails are colored by format (MP3 blue, WAV green, FLAC amber, OGG/Opus purple, M4A rose) so formats can be told apart at a glance; the detail panel shows the waveform with the player below it.</li>
<li id="wfm-help-gallery-30">PSD files: thumbnails and full-size previews show all layers merged together (hidden layers excluded); the underlying PSD file itself is left untouched — only the preview shown in Gallery is a flattened rendering</li>
<li id="wfm-help-gallery-38">3D models: GLB, glTF, VRM, PLY (mesh, point cloud or Gaussian splat) and SPZ are listed with a "3D" badge and open in a built-in viewer (drag to rotate, right-drag to pan, wheel to zoom, ⟲ to reset; double-click to enlarge). Thumbnails are rendered by your browser the first time a file appears and are then kept on the server; files over 128 MB get one when opened. The workflow saved by ComfyUI's SaveGLB is read like an image's. A .gltf that uses separate .bin or texture files needs them to stay in place: Move and Delete only affect the .gltf itself. 3D files cannot be sent to Image Edit, GenerateUI, Tagger or Feeder.</li>
</ul>
</div>
</div>
@@ -2022,7 +2023,7 @@
<ul>
<li id="wfm-help-tagspace-4">Navigation: drag to rotate, right-drag to pan, wheel to zoom. Hover shows the name, thumbnail and prompt/sources; the checkboxes show or hide Cards, Thumbnails, Tags and Gallery. The source checkboxes (ImagePrompt / Gallery prompts / Tagger DB / Prompt library / Wildcards) show or hide tags by where they came from — a tag stays visible while any of its sources is on and takes the color of its first visible source; hidden tags are also left out of the nearby and search lists. The choices are remembered</li>
<li id="wfm-help-tagspace-5">Click a card or tag to select it and list nearby items (clicking only selects — it does not change the prompt). To add it to the Prompt panel, double-click it, press Add next to its name under Selection, or press + in the list (double-click / press again to remove) — cards and tags are ranked separately and listed alternately, so a card also shows its closest tags. Adding a Gallery point adds all tags from that image's prompt as one chip (images without readable tags cannot be added); clicking one lists similar Gallery images (round thumbnails) together with nearby tags and cards; selecting a card or tag, or searching, never lists Gallery images. Use + in the list to add, click a row to move to it. The search box (Enter, any language) places a white marker for the text and lists the nearest items</li>
<li id="wfm-help-tagspace-10">Search with a card's or Gallery image's tags: when a card or Gallery point is selected, its prompt tags are shown as buttons (a card's full prompt is under &quot;Full prompt&quot;; card tags appear after Build / Update). Click tags to choose them (click again to deselect) and press &quot;Search with selected&quot; to search the space with those tags joined in prompt order — the same as typing them into the search box. The choice is kept until another item is selected</li>
<li id="wfm-help-tagspace-10">Search with a card's or Gallery image's tags: when a card or Gallery point is selected, its prompt tags are shown as buttons (a card's full prompt is under &quot;Full prompt&quot;; card tags appear after Build / Update). Click tags to choose them (click again to deselect) and press &quot;Search with selected&quot; to search the space with those tags joined in prompt order — the same as typing them into the search box. The choice is kept until another item is selected. While tags are selected, the Add button becomes &quot;Add selected (N)&quot; and adds only those tags (in prompt order) as one chip; with none selected it adds the whole item as before. For a Gallery point, &quot;Open in Gallery&quot; opens the Gallery tab with the image's folder selected and the image selected in the list (search and other filters are cleared)</li>
<li id="wfm-help-tagspace-6">Prompt panel: a card adds its whole prompt, a tag adds the tag, a Gallery image adds its prompt tags. The text joins them with duplicates removed (case and spacing ignored). "Add to GenerateUI (Positive)" appends it to the positive prompt of the workflow loaded in GenerateUI; Copy puts it on the clipboard</li>
<li id="wfm-help-tagspace-7">Tagger fill: about a third of Gallery images have no readable positive prompt (imported or edited images, prompts made only of LoRA tags or long sentences). Choose a Tagger model (ONNX models from the Tagger tab) next to "Tagger fill" to tag those images on Build / Update: "Gallery points only" tags just the sampled Gallery points, "All images without a prompt" tags every indexed image that lacks prompt tags. Default thresholds are used (WD 0.35 / character 0.85, PixAI its recommended values) and rating labels are dropped. Results are cached in tagspace_tagger.json per image and model, so later builds only tag new images; stopping keeps what was done. The tags become the "Tagger fill" source (shown/hidden like the others) and the tags of those Gallery points, marked "(Tagger fill)". The status shows whether the model runs on CUDA or CPU — on the CPU it takes about 0.5 s per image, so check that onnxruntime-gpu is active (see Troubleshooting) before tagging all images</li>
<li id="wfm-help-tagspace-8">Display: "Glow" draws points as glowing stars on a night-sky background (dense areas brighten; Gallery points are drawn dimmer so they don't wash out to white) — turn it off for the plain dots and the normal background. "Twinkle" (works with Glow) makes tags, cards and Gallery points slowly twinkle, each with its own rhythm; the selection and nearby highlights stay steady. Hover over the image under Selection or the thumbnails in the Nearby list to see an enlarged preview (clicking a list row changes the selection, so hovering lets you check images first). The Add / Remove button sits on the title row of Selection and stays visible while the text scrolls</li>
@@ -2050,6 +2051,7 @@
<ul>
<li id="wfm-help-imageedit-4">Select (V): click to select a layer; drag to move; drag corner handles to resize; drag the circle above the top edge to rotate; double-click a text layer to re-edit its content; Tool Options bar shows Flip H / Flip V / Rotate field</li>
<li id="wfm-help-imageedit-5">Draw (B): freehand brush drawing onto the active draw layer; Tool Options: color, brush size, blend mode; Properties pane includes a MASK EDITOR ONE (COLOR) section for ABR image brushes — always visible, header text is green when brushes are available, gray when none are imported yet; Select is disabled until at least one brush exists</li>
<li id="wfm-help-imageedit-draw-palette">Draw color palette (second row): Color 1/Color 2, 20 basic colors, and 20 custom slots. Click a color to paint with it. Use + or click an empty slot to register the current color; right-click a color to register, edit, or delete it (basic colors can be changed and restored). Registered colors are saved per browser. The eyedropper button next to Color picks a color from the canvas (Esc cancels)</li>
<li id="wfm-help-imageedit-6">Text (T): click on the canvas to place a text input overlay; configure font family, size, bold/italic, align, color in the Tool Options bar; click OK to place the text as an exact-size Text layer; double-click an existing text layer with the Select tool to re-edit</li>
<li id="wfm-help-imageedit-7">Shape (S): draw geometric shapes onto the canvas; each committed shape becomes an independent draw layer; Tool Options: Shape type (Rect / Ellipse / Line / FreeLine), Rounded checkbox (Rect / Ellipse only), Fill color + None toggle (hidden for Line / FreeLine), Stroke color + width + None toggle (None hidden for Line / FreeLine where stroke is always active), Opacity slider, ↩ Undo button; drag to draw — a blue dashed outline previews the shape; release to commit</li>
<li id="wfm-help-imageedit-7a2">Fill (G): bucket fill — click a contiguous same-color region on the active layer to flood-fill it with a solid color or a linear/radial gradient; Tool Options: Mode (Solid / Gradient), Color (solid) or Shape + Ramp (drag stops to reposition, click a stop then use the color swatch, +/- to add/remove) + Direction dial (drag to set angle/radius, gradient), Tolerance (color-match threshold), Opacity</li>
@@ -2156,6 +2158,7 @@
<li id="wfm-help-imageedit-24">T: Text tool</li>
<li id="wfm-help-imageedit-25">S: Shape tool</li>
<li id="wfm-help-imageedit-25b">G: Fill tool</li>
<li id="wfm-help-imageedit-draw-kbd">While Draw is active: D Draw / E Erase / X switch Color 1/2 / [ ] brush size / B open or close the brush picker (Esc also closes it)</li>
<li id="wfm-help-imageedit-26">Delete: Delete selected layer (requires 2+ layers)</li>
<li id="wfm-help-imageedit-27">Ctrl+Z / Ctrl+Y: Undo / Redo</li>
<li id="wfm-help-imageedit-28">Space + drag: Pan canvas</li>
@@ -2208,6 +2211,7 @@
<li id="wfm-help-imageedit-tabkbd-3">T: Text tool</li>
<li id="wfm-help-imageedit-tabkbd-4">S: Shape tool</li>
<li id="wfm-help-imageedit-tabkbd-4b">G: Fill tool</li>
<li id="wfm-help-imageedit-tabkbd-draw">While Draw is active: D Draw / E Erase / X switch Color 1/2 / [ ] brush size / B open or close the brush picker (Esc also closes it)</li>
<li id="wfm-help-imageedit-tabkbd-5">Delete: Delete selected layer (requires 2+ layers)</li>
<li id="wfm-help-imageedit-tabkbd-6">Ctrl+Z / Ctrl+Y: Undo / Redo</li>
<li id="wfm-help-imageedit-tabkbd-7">Space + drag: Pan canvas</li>
+1 -1
View File
@@ -3603,7 +3603,7 @@ function _extractPromptsAPI(wf) {
const srcNode = wf[String(val[0])];
// TextEncodeFibo2(Fibo 2.0)も同形。promptはPreviewAny→プロンプト強化スイッチ経由でリンクされる。
if (srcNode?.class_type === "TextEncodeMageFlowEdit" || srcNode?.class_type === "TextEncodeBooguEdit"
|| srcNode?.class_type === "TextEncodeFibo2") {
|| srcNode?.class_type === "TextEncodeFibo2" || srcNode?.class_type === "PH3ImageConditioning") {
const raw = isPos ? srcNode.inputs?.prompt : srcNode.inputs?.negative_prompt;
const txt = Array.isArray(raw) ? _resolveLinkedText(wf, raw[0], raw[1] ?? 0) : raw;
if (txt && typeof txt === "string") { if (isPos) pos.add(txt); else neg.add(txt); }