Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
418 changes: 418 additions & 0 deletions .agent/execplan_repo_improvements.md

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- "**"
pull_request:

jobs:
python-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: python -m pip install --upgrade pip && python -m pip install -r requirements.txt
- name: Run Python tests
run: python -m unittest discover -s tests -p 'test_*.py'

js-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- name: Install Node dependencies
run: npm ci
- name: Run JavaScript syntax checks
run: npm run check:js
- name: Run ESLint
run: npm run lint
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.venv/
checkpoints/
__pycache__/
*.pyc
checkpoints/
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ This repository now ships a two-part toolchain: a WebGL viewer in `webapp/` and
python scripts/run_frontend.py
```
Both approaches expose `http://localhost:5173` (configurable via `RGBDE_FRONTEND_PORT`).
For local performance spot checks, open `http://localhost:5173/perf-harness.html` after the frontend starts. The harness benchmarks the repository-local RGBDE fixtures and, when the backend is running, can also time one `/api/process` round trip.

4. Open the viewer in Chrome/Edge/Safari:
- Use **2D Image (JPEG or PNG) → Generate Depth** to run Depth Pro on a JPG/PNG; the backend never keeps files after responding.
Expand All @@ -60,6 +61,7 @@ This repository now ships a two-part toolchain: a WebGL viewer in `webapp/` and

### Repository Layout
- `webapp/index.html` – entry point and UI shell.
- `webapp/perf-harness.html` – lightweight local benchmark page for RGBDE decode, preprocessing, mesh generation, and optional backend round-trip timing.
- `webapp/src/geometry.js` – RGBDE decoding, depth preprocessing, mesh density selection, and pinhole projection.
- `webapp/src/rendering.js` – WebGL2 renderer, shader setup, and camera math.
- `webapp/src/app.js` – event wiring, UI bindings, and interaction logic.
Expand Down Expand Up @@ -106,6 +108,7 @@ This repository now ships a two-part toolchain: a WebGL viewer in `webapp/` and
python scripts/run_frontend.py
```
どちらの場合も `RGBDE_FRONTEND_PORT` でフロントエンドのポートを変更できます。
ローカルで処理時間をざっと確認したい場合は、フロントエンド起動後に `http://localhost:5173/perf-harness.html` を開いてください。リポジトリ同梱の RGBDE fixture を使って、デコード・前処理・メッシュ生成を計測でき、バックエンド起動中なら `/api/process` の往復時間も確認できます。

4. ブラウザ (Chrome / Edge / Safari) で `http://localhost:5173` を開き、以下を操作します。
- **2D Image (JPEG or PNG) → Generate Depth**: JPG/PNG をアップロードすると Depth Pro が実行され、生成した RGBDE が即表示されます(サーバー側の一時ファイルはレスポンス後に削除)。
Expand All @@ -127,6 +130,7 @@ This repository now ships a two-part toolchain: a WebGL viewer in `webapp/` and

### ディレクトリ構成
- `webapp/index.html` – 画面レイアウトと UI。
- `webapp/perf-harness.html` – RGBDE デコード、前処理、メッシュ生成、必要に応じてバックエンド往復時間を確認するための軽量なローカル計測ページ。
- `webapp/src/geometry.js` – RGBDE の展開、デプス前処理、メッシュ分割と投影ロジック。
- `webapp/src/rendering.js` – WebGL2 レンダラーとカメラ行列。
- `webapp/src/app.js` – UI イベントとインタラクション制御。
Expand Down
39 changes: 39 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import js from "@eslint/js";
import globals from "globals";

const webxrGlobals = {
DecompressionStream: "readonly",
OffscreenCanvas: "readonly",
XRInputSourceEvent: "readonly",
XRReferenceSpace: "readonly",
XRWebGLLayer: "readonly",
};

export default [
{
ignores: ["node_modules/**", "third_party/**"],
},
js.configs.recommended,
{
files: ["webapp/src/**/*.js"],
languageOptions: {
sourceType: "module",
globals: {
...globals.browser,
...webxrGlobals,
},
},
rules: {
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
},
},
{
files: ["scripts/check-js.mjs", "eslint.config.js"],
languageOptions: {
sourceType: "module",
globals: {
...globals.node,
},
},
},
];
Loading
Loading