mirror of
https://github.com/ruvnet/RuView
synced 2026-07-26 18:01:48 +00:00
347ad4bb11
Adds optional cinematic effects to the face-mesh demo, all toggleable via a new ?fx= URL param. Default is 'all' (texture + mesh + scan + halo). Lightweight modes available: ?fx=clean (texture only) or ?fx=points (original solid amber). - Texture: per-frame webcam → hidden 2D canvas → getImageData lookup at each landmark (and each interpolated edge sample). Splats now carry the visitor's actual skin tone, not solid amber. Sampling is mirrored on x to match the selfie convention used by the face mesh vertex placement. All on-device — no frames leave the browser. - Mesh: persistent THREE.LineSegments overlay drawn from FACEMESH_TESSELATION (~1300 edges). Translucent (opacity 0.35), amber, additive blending, depthWrite off — gives a holographic wireframe wrapping the point cloud. Geometry is updated in place each frame; only positions get re-uploaded. - Scan: vertical bright slab sweeps top→bottom every 4 seconds, amplifying splat color up to 2.6× when within ±0.08 world units of the line. Westworld-style scanning. - Halo: existing 60-particle ring around the face is now opt-in via FX_HALO. Cleaner default for the texture-mesh combination. Info panel surfaces active fx list in face-mesh mode. Synthetic fallback hides the wireframe overlay so it doesn't render against an empty figure. Workflow README updated with the new ?fx= options. Co-Authored-By: claude-flow <ruv@ruv.net>
77 lines
2.8 KiB
YAML
77 lines
2.8 KiB
YAML
name: Point Cloud Viewer → GitHub Pages
|
|
|
|
# Publishes the live 3D point cloud viewer to gh-pages/pointcloud/.
|
|
# The viewer defaults to a synthetic in-browser demo; users can append
|
|
# ?backend=<url> or ?backend=auto to point it at a real ruview-pointcloud
|
|
# server (CORS-permitting host required). See ADR-094.
|
|
#
|
|
# Uses keep_files: true to preserve the existing observatory/, pose-fusion/,
|
|
# nvsim/, and root index.html demos already on gh-pages.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'v2/crates/wifi-densepose-pointcloud/src/viewer.html'
|
|
- '.github/workflows/pointcloud-pages.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: pointcloud-pages
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout main
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Stage viewer for Pages
|
|
run: |
|
|
mkdir -p _site/pointcloud
|
|
cp v2/crates/wifi-densepose-pointcloud/src/viewer.html _site/pointcloud/index.html
|
|
# Drop a tiny README so direct browsers of the directory get context.
|
|
cat > _site/pointcloud/README.md <<'EOF'
|
|
# RuView — Live 3D Point Cloud Viewer
|
|
|
|
Hosted at: https://ruvnet.github.io/RuView/pointcloud/
|
|
|
|
## Transport modes
|
|
|
|
- Default — synthetic in-browser demo (no backend, no network calls).
|
|
- `?backend=auto` — fetch from `/api/splats` on the same origin
|
|
(only works when the viewer is served by `ruview-pointcloud serve`).
|
|
- `?backend=<url>` — fetch from `<url>/api/splats` on a CORS-permitting
|
|
host (e.g. `?backend=https://my-ruview.example.com`).
|
|
- `?live=1` — require a live backend; show an offline message instead
|
|
of falling back to the synthetic demo.
|
|
|
|
## Effect flags (face-mesh mode)
|
|
|
|
Comma-separated. Defaults to `all`.
|
|
|
|
- `?fx=all` — texture + mesh + scan + halo (cinematic default).
|
|
- `?fx=clean` — webcam-sampled colors only, no overlays.
|
|
- `?fx=points` — solid amber points, no extras (lightest mode).
|
|
- `?fx=texture,mesh,scan,halo` — pick individual effects.
|
|
|
|
See ADR-094 for the deployment design.
|
|
EOF
|
|
|
|
- name: Deploy to gh-pages/pointcloud/
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./_site/pointcloud
|
|
destination_dir: pointcloud
|
|
# CRITICAL: preserves observatory/, pose-fusion/, nvsim/, and root
|
|
# index.html already on gh-pages.
|
|
keep_files: true
|
|
commit_message: 'deploy(pointcloud): ${{ github.sha }}'
|
|
user_name: 'github-actions[bot]'
|
|
user_email: 'github-actions[bot]@users.noreply.github.com'
|