尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证just some fun stuff
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
A little ghost that is genuinely one sheet of simulated cloth, hovering over an
isometric grey floor. Push it around and the fabric does what fabric does.
npm install also fetches a 77 MB ffmpeg binary and Playwright's browsers, for
the capture scripts further down. They are declared as optional dependencies so
that a slow or blocked download cannot fail the install — if they do not arrive
the app still runs, and only the capture scripts are unavailable.查看完整 README ↗A little ghost that is genuinely one sheet of simulated cloth, hovering over an isometric grey floor. Push it around and the fabric does what fabric does.
npm install
npm run dev # http://localhost:5183
npm install also fetches a 77 MB ffmpeg binary and Playwright's browsers, for
the capture scripts further down. They are declared as optional dependencies so
that a slow or blocked download cannot fail the install — if they do not arrive
the app still runs, and only the capture scripts are unavailable.
Do not reach for --omit=optional to skip them: Rollup and esbuild ship their
native binaries as optional dependencies too, so that flag leaves Vite unable to
start.
W A S D or arrows to move · space to hop · or press and drag to lead it
around. On touch, drag to steer and tap to hop.
The ghost is a polar grid of particles — a hemispherical head flowing into a flared, scalloped skirt — solved with verlet integration and position-based distance constraints. Nothing about it is rigged or keyframed.
Three things take it from "falling rag" to "fabric with something under it":
Shape memory with a fast falloff. Every particle is pulled toward the pose the body dictates, hard through the head and released by the time the skirt starts. Without it the sheet collapses; with the falloff spread too wide the skirt snaps back before any trailing motion is visible. In an early version it returned to rest in about 65 ms, which read as no cloth at all.
Aerodynamic force along the surface normal, not isotropic drag. A sheet only feels air along its normal, and modelling it that way yields lift as well as drag: as the skirt swings back its surfaces tilt, the normal picks up a downward component, and the reaction billows the fabric upward. Isotropic drag can only push it backwards and down, which reads as a wet towel.
Outward pressure, standing in for the air trapped under the sheet, so the ghost stays inflated instead of flattening when dragged sideways.
The bottom edge is finished with a rolled hem built from the simulated edge each frame rather than simulated itself. A cut edge has no thickness, so nothing along it catches light and the outline reads as a flat cardboard silhouette; rolling the last rows under gives it a rounded profile that shades like real fabric. A hem barely affects how a sheet moves, so generating it costs the solver nothing and it can never unroll.
The eyes are painted into the fabric's UV space inside the material's fragment shader — they are not separate meshes. So they deform with the cloth for free, stay glued to the sheet, and cost nothing to move.
The shape is a band of half-thickness uOpen wrapped around a centre line that
uCurve bows and uTilt slopes. Clipping an ellipse with straight lids leaves
hard corners the moment the eye narrows; measuring distance from a bent centre
line keeps the contour rounded at every openness. Those three numbers cover the
whole range:
| open | tilt | curve | |
|---|---|---|---|
| neutral | 1.0 | 0 | 0 |
| blink / closed | → 0 | — | — |
| determined (moving fast) | 0.84 | −0.32 | 0.08 |
| happy squint (idle) | 0.26 | 0 | 0.85 |
| startled (airborne) | 1.0 | — | — (eyes scale up evenly) |
On top of that:
b6ebe61 if you want it back.npm run shot # scripted route, stills at exact moments, cloth diagnostics
npm run eyes # renders the expression presets side by side
npm run record # records the scripted route to MP4
npm run standalone # bundles everything into one self-contained HTML file
All of them step the simulation by hand rather than by requestAnimationFrame,
and the RNG is seeded in test mode, so a run is reproducible frame for frame —
otherwise every render would blink in a different place.
npm run shot prints hemLag and hemSpread: how far the hem is trailing the
body and how much of it has lifted. Tuning cloth by measurement rather than by
squinting at renders is what made the snap-back problem obvious — the stills all
looked plausible.
Rendering happens through headless Chromium. On a machine with a GPU this is
near real time; in a container without one, WebGL falls back to CPU rasterisation
and a frame takes a couple of seconds. The output is identical either way. Force
GPU mode with LAB_GPU=1.
index.html the landing page
src/ghost/
cloth.js verlet + PBD solver, aerodynamics, pressure
ghost.js rest pose, body motion, eye rig and expressions
ground.js isometric floor and grid
input.js keyboard, pointer and touch steering
main.js scene, camera, lighting, loop
capture/ headless harnesses
scripts/ single-file bundler
The feel constants live at the top of src/ghost/ghost.js: maxSpeed,
accelTime, turnRate, hoverHeight, and the cloth's gravity, drag,
aero and windStrength in cloth.js. They were set without anyone actually
playing it, so expect to want a pass once you have hands on it.