Destroy: fibrous alpha-tested damage edges, Burn and Water tools with cursors, Roll up, size-dependent debris that settles on the floor, wall-clock burn timing; rename Tear apart to Destroy; ink model text reads its coverage from the manifest
Browse files- README.md +1 -1
- app.js +28 -6
- damage.js +40 -26
- data/gpu.json +2 -2
- index.html +1 -1
- polish.js +7 -2
- scrolls/PHerc0139/manifest.json +4 -4
- style.css +19 -0
README.md
CHANGED
|
@@ -26,7 +26,7 @@ PHerc. 139 is a papyrus roll carbonized when Vesuvius buried Herculaneum in 79 C
|
|
| 26 |
- **Shapes**: the 9.362 µm tifxyz meshes of the 37 traced windings (`w023` to `w059`), decimated to 579,450 vertices.
|
| 27 |
- **X-ray layer**: the CT intensity on each surface, from the public 9.362 µm surface volumes.
|
| 28 |
- **Published ink (2.4 µm), amber**: the Vesuvius Challenge's public ink detection on the 2.4 µm scan. In 3D it is drawn through a local-contrast filter so letter-sized strokes stand out. The close-up view shows the published preview without filtering, downscaled to 2,400 px on its long side and re-saved as JPEG.
|
| 29 |
-
- **Our ink model (9 µm), cyan**:
|
| 30 |
|
| 31 |
Unrolling lays the windings end to end, outermost first. Each traced winding runs a little past one full turn, so roughly a tenth of the 2.8 m strip repeats surface from its neighbour.
|
| 32 |
|
|
|
|
| 26 |
- **Shapes**: the 9.362 µm tifxyz meshes of the 37 traced windings (`w023` to `w059`), decimated to 579,450 vertices.
|
| 27 |
- **X-ray layer**: the CT intensity on each surface, from the public 9.362 µm surface volumes.
|
| 28 |
- **Published ink (2.4 µm), amber**: the Vesuvius Challenge's public ink detection on the 2.4 µm scan. In 3D it is drawn through a local-contrast filter so letter-sized strokes stand out. The close-up view shows the published preview without filtering, downscaled to 2,400 px on its long side and re-saved as JPEG.
|
| 29 |
+
- **Our ink model (9 µm), cyan**: inked by running the public [`scrollprize/ink_9um`](https://huggingface.co/scrollprize/ink_9um) model (seed 42, step 75000) on the 9.362 µm scan. So far we have run the public `scrollprize/ink_9um` model on Hugging Face ZeroGPU over windings `w046` to `w051`. More windings are added as daily free GPU runs allow, so this layer is a work in progress and will grow. The first batch was 37,141 patches in 57 s of measured GPU time. The page reads the covered windings from the manifest, so its text updates as windings are added. The 9.362 µm scan is about four times coarser than the 2.4 µm one, so this layer is noisier. `w047` and `w050` ran with patch overlap 0.5; the other four ran with 0.25 or 0.2, and their 128 px patch grid shows as faint square tiles. Per-run records (checkpoint sha256, villa commit, requested and measured GPU seconds) are in `data/gpu/receipts/`; `data/gpu.json` is the summary the page reads.
|
| 30 |
|
| 31 |
Unrolling lays the windings end to end, outermost first. Each traced winding runs a little past one full turn, so roughly a tenth of the 2.8 m strip repeats surface from its neighbour.
|
| 32 |
|
app.js
CHANGED
|
@@ -120,6 +120,20 @@ const ORDER = peelOrder(MAN);
|
|
| 120 |
const IDS = ORDER.map((w) => w.id);
|
| 121 |
const L_CT = roleOf(MAN, 'ct'), L_INK = roleOf(MAN, 'ink'), L_OV = roleOf(MAN, 'overlay');
|
| 122 |
const OV_IDS = new Set(L_OV ? layerWindings(L_OV, IDS) : []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
const D = (TRUSTED && MAN.display) || null;
|
| 124 |
$('loader').querySelector('.mono').textContent = D?.loaderKicker || `${MAN.name.toUpperCase()} · LOCAL FILE`;
|
| 125 |
|
|
@@ -350,7 +364,7 @@ varying vec3 vW;
|
|
| 350 |
void main() {
|
| 351 |
vec2 auv = uAtlas.xy + vLocal * (uAtlas.zw - uAtlas.xy);
|
| 352 |
if (texture2D(uCT, auv).r < 0.012) discard;
|
| 353 |
-
if (uDmgOn > 0.5
|
| 354 |
gl_FragColor = uPickW > 0.5 ? vec4(vW, 1.0) : vec4(uId / 255.0, vLocal, 1.0);
|
| 355 |
}`;
|
| 356 |
const FRAG_D = injectFrag(FRAG, 'vec3 n = normalize(vN);');
|
|
@@ -491,7 +505,7 @@ const stripZ = -(Rmax + 3.5);
|
|
| 491 |
for (const m of meshes) m.userData.own.uFlatO.value.z = stripZ;
|
| 492 |
let groundY = Infinity;
|
| 493 |
for (const m of meshes) groundY = Math.min(groundY, m.userData.own.uFlatO.value.y - m.userData.w.heightMM);
|
| 494 |
-
groundY -=
|
| 495 |
const damage = createDamage({ THREE, scene, meshes, MOBILE, ground: () => groundY, uDmgT: shared.uDmgT });
|
| 496 |
|
| 497 |
// ---------------------------------------------------------------- tear apart (just for fun)
|
|
@@ -1097,13 +1111,19 @@ function applyTool(first) {
|
|
| 1097 |
} else if (act.tool === 'crush') {
|
| 1098 |
// hold to press harder: a wider bite, and as the outer wrap gives way the next pick lands on the wrap beneath
|
| 1099 |
const hold = (now - act.t0) / 1000;
|
| 1100 |
-
const r =
|
|
|
|
|
|
|
|
|
|
| 1101 |
damage.crush(h.m, h.u, h.v, r, 0.5 + 0.15 * Math.min(hold, 2));
|
| 1102 |
damage.debris(h.world, r, MOBILE ? 2 : 4);
|
| 1103 |
} else if (act.tool === 'burn') {
|
| 1104 |
if (first) damage.ignite(h.m, h.u, h.v, h.world);
|
| 1105 |
} else if (act.tool === 'water') {
|
| 1106 |
-
|
|
|
|
|
|
|
|
|
|
| 1107 |
damage.drops(h.world, first ? 3 : 1);
|
| 1108 |
}
|
| 1109 |
}
|
|
@@ -1163,7 +1183,8 @@ $('loader').classList.add('gone');
|
|
| 1163 |
setTimeout(() => $('loader').remove(), 1200);
|
| 1164 |
|
| 1165 |
function frame() {
|
| 1166 |
-
const
|
|
|
|
| 1167 |
shared.uTime.value += dt;
|
| 1168 |
const now = performance.now();
|
| 1169 |
|
|
@@ -1188,7 +1209,7 @@ function frame() {
|
|
| 1188 |
if (target <= 0) setRolling(false);
|
| 1189 |
}
|
| 1190 |
if (act && (act.tool === 'crush' || act.tool === 'water') && now - act.tick > (act.tool === 'crush' ? 70 : 90)) { act.tick = now; applyTool(false); }
|
| 1191 |
-
damage.update(dt, shared.uTime.value);
|
| 1192 |
if (playing) {
|
| 1193 |
setTarget(target + dt / DURATION, 'play');
|
| 1194 |
if (target >= 1) setPlaying(false);
|
|
@@ -1254,6 +1275,7 @@ requestAnimationFrame(() => loadOverlay());
|
|
| 1254 |
|
| 1255 |
// camera hooks for the keyboard shortcuts in polish.js
|
| 1256 |
window.unrollView = {
|
|
|
|
| 1257 |
reset() {
|
| 1258 |
introDone(); autoplayAt = 0;
|
| 1259 |
if (mode === 'overview') flyTo(...overview(), 1.4);
|
|
|
|
| 120 |
const IDS = ORDER.map((w) => w.id);
|
| 121 |
const L_CT = roleOf(MAN, 'ct'), L_INK = roleOf(MAN, 'ink'), L_OV = roleOf(MAN, 'overlay');
|
| 122 |
const OV_IDS = new Set(L_OV ? layerWindings(L_OV, IDS) : []);
|
| 123 |
+
// the overlay's coverage is read from its winding list, so the text grows by itself as windings are added
|
| 124 |
+
if (L_OV) {
|
| 125 |
+
const ids = [...OV_IDS].sort();
|
| 126 |
+
const runs = [];
|
| 127 |
+
for (const id of ids) {
|
| 128 |
+
const n = +id.replace(/\D/g, ''), r = runs[runs.length - 1];
|
| 129 |
+
if (r && n === r.n1 + 1) { r.n1 = n; r.b = id; } else runs.push({ n0: n, n1: n, a: id, b: id });
|
| 130 |
+
}
|
| 131 |
+
const span = runs.map((r) => (r.a === r.b ? r.a : `${r.a} to ${r.b}`));
|
| 132 |
+
const list = span.length > 1 ? `${span.slice(0, -1).join(', ')} and ${span[span.length - 1]}` : span[0] || '';
|
| 133 |
+
const words = ['no', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve'];
|
| 134 |
+
const count = words[ids.length] || String(ids.length);
|
| 135 |
+
for (const k of ['aboutHtml', 'title', 'hint']) if (typeof L_OV[k] === 'string') L_OV[k] = L_OV[k].replaceAll('{windings}', list).replaceAll('{count}', count);
|
| 136 |
+
}
|
| 137 |
const D = (TRUSTED && MAN.display) || null;
|
| 138 |
$('loader').querySelector('.mono').textContent = D?.loaderKicker || `${MAN.name.toUpperCase()} · LOCAL FILE`;
|
| 139 |
|
|
|
|
| 364 |
void main() {
|
| 365 |
vec2 auv = uAtlas.xy + vLocal * (uAtlas.zw - uAtlas.xy);
|
| 366 |
if (texture2D(uCT, auv).r < 0.012) discard;
|
| 367 |
+
if (uDmgOn > 0.5) { float r = texture2D(uDmg, vLocal).r; if (r > 0.004 && dField(r, dFib(vLocal * uDmgMM), vLocal * uDmgMM) > 0.5) discard; }
|
| 368 |
gl_FragColor = uPickW > 0.5 ? vec4(vW, 1.0) : vec4(uId / 255.0, vLocal, 1.0);
|
| 369 |
}`;
|
| 370 |
const FRAG_D = injectFrag(FRAG, 'vec3 n = normalize(vN);');
|
|
|
|
| 505 |
for (const m of meshes) m.userData.own.uFlatO.value.z = stripZ;
|
| 506 |
let groundY = Infinity;
|
| 507 |
for (const m of meshes) groundY = Math.min(groundY, m.userData.own.uFlatO.value.y - m.userData.w.heightMM);
|
| 508 |
+
groundY -= 8; // the same floor as the flat sandbox, so its crumbs and dust land on one surface
|
| 509 |
const damage = createDamage({ THREE, scene, meshes, MOBILE, ground: () => groundY, uDmgT: shared.uDmgT });
|
| 510 |
|
| 511 |
// ---------------------------------------------------------------- tear apart (just for fun)
|
|
|
|
| 1111 |
} else if (act.tool === 'crush') {
|
| 1112 |
// hold to press harder: a wider bite, and as the outer wrap gives way the next pick lands on the wrap beneath
|
| 1113 |
const hold = (now - act.t0) / 1000;
|
| 1114 |
+
const r = 2.2 + 1.8 * Math.min(hold, 2.5);
|
| 1115 |
+
if (!act.first) act.first = h.m;
|
| 1116 |
+
// the wraps a press has broken through to sit in shadow and crushed fibre: a crater, not a clean drill hole
|
| 1117 |
+
if (h.m !== act.first) damage.bruise(h.m, h.u, h.v, r * 1.3);
|
| 1118 |
damage.crush(h.m, h.u, h.v, r, 0.5 + 0.15 * Math.min(hold, 2));
|
| 1119 |
damage.debris(h.world, r, MOBILE ? 2 : 4);
|
| 1120 |
} else if (act.tool === 'burn') {
|
| 1121 |
if (first) damage.ignite(h.m, h.u, h.v, h.world);
|
| 1122 |
} else if (act.tool === 'water') {
|
| 1123 |
+
// pouring: the longer you hold, the wider the wet patch; amounts follow wall time so slow frames pour the same
|
| 1124 |
+
const hold = (now - act.t0) / 1000, gap = Math.min(0.5, (now - (act.wt || now - 90)) / 1000);
|
| 1125 |
+
act.wt = now;
|
| 1126 |
+
damage.wetAt(h.m, h.u, h.v, 3 + 2 * Math.min(hold, 3), first ? 0.45 : Math.min(1, 0.22 * gap / 0.09));
|
| 1127 |
damage.drops(h.world, first ? 3 : 1);
|
| 1128 |
}
|
| 1129 |
}
|
|
|
|
| 1183 |
setTimeout(() => $('loader').remove(), 1200);
|
| 1184 |
|
| 1185 |
function frame() {
|
| 1186 |
+
const rawDt = clock.getDelta();
|
| 1187 |
+
const dt = Math.min(0.05, rawDt);
|
| 1188 |
shared.uTime.value += dt;
|
| 1189 |
const now = performance.now();
|
| 1190 |
|
|
|
|
| 1209 |
if (target <= 0) setRolling(false);
|
| 1210 |
}
|
| 1211 |
if (act && (act.tool === 'crush' || act.tool === 'water') && now - act.tick > (act.tool === 'crush' ? 70 : 90)) { act.tick = now; applyTool(false); }
|
| 1212 |
+
damage.update(dt, shared.uTime.value, Math.min(0.5, rawDt));
|
| 1213 |
if (playing) {
|
| 1214 |
setTarget(target + dt / DURATION, 'play');
|
| 1215 |
if (target >= 1) setPlaying(false);
|
|
|
|
| 1275 |
|
| 1276 |
// camera hooks for the keyboard shortcuts in polish.js
|
| 1277 |
window.unrollView = {
|
| 1278 |
+
damageStats: () => damage.stats(),
|
| 1279 |
reset() {
|
| 1280 |
introDone(); autoplayAt = 0;
|
| 1281 |
if (mode === 'overview') flyTo(...overview(), 1.4);
|
damage.js
CHANGED
|
@@ -16,6 +16,11 @@ float dFib(vec2 mm) {
|
|
| 16 |
vec2 p = mm * vec2(0.7, 6.5);
|
| 17 |
return 0.5 * dNoise(p) + 0.3 * dNoise(p * 2.13 + 3.7) + 0.2 * dNoise(mm * 6.0 + 11.0);
|
| 18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
`;
|
| 20 |
// after the surface normal is known: alpha test against the field
|
| 21 |
export const DMG_CUT = /* glsl */`
|
|
@@ -23,24 +28,25 @@ export const DMG_CUT = /* glsl */`
|
|
| 23 |
if (uDmgOn > 0.5) {
|
| 24 |
dd = texture2D(uDmg, vLocal);
|
| 25 |
dFibV = dFib(vLocal * uDmgMM);
|
| 26 |
-
dTh = dd.r
|
| 27 |
if (dTh > 0.5) discard;
|
| 28 |
}
|
| 29 |
`;
|
| 30 |
// before the final colour: charred band, lifted lip and its shadow, cracks, wet gloss, embers
|
| 31 |
export const DMG_EDGE = /* glsl */`
|
| 32 |
if (uDmgOn > 0.5) {
|
| 33 |
-
float charK = smoothstep(0.
|
| 34 |
-
float lipK = smoothstep(0.
|
| 35 |
float shadow = smoothstep(0.38, 0.7, texture2D(uDmg, vLocal + vec2(-0.3, 0.45) / uDmgMM).r) * (1.0 - charK);
|
| 36 |
col *= 1.0 + 0.32 * lipK;
|
| 37 |
-
col *= 1.0 - 0.
|
|
|
|
| 38 |
float crack = dd.g * smoothstep(0.35, 0.75, dFibV + dd.g * 0.35);
|
| 39 |
-
col = mix(col, vec3(0.
|
| 40 |
float wet = dd.a;
|
| 41 |
-
col *= 1.0 - 0.
|
| 42 |
vec3 dH = normalize(normalize(vec3(-0.35, 0.75, 0.55)) + normalize(cameraPosition - vW));
|
| 43 |
-
col += wet * pow(abs(dot(normalize(vN), dH)),
|
| 44 |
float flick = 0.7 + 0.3 * sin(uDmgT * 2.3 + dFibV * 23.0) * sin(uDmgT * 1.1 + dFibV * 7.0);
|
| 45 |
float emb = dd.b * flick;
|
| 46 |
col += vec3(1.0, 0.30, 0.05) * emb * (0.6 + 2.0 * charK) * 1.6;
|
|
@@ -123,10 +129,14 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 123 |
line(k, u + a0, v + b0, u + a1, v + b1, 0.22, 1, 0.9, 0.25);
|
| 124 |
}
|
| 125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
function tear(m, u0, v0, u1, v1) {
|
| 127 |
const k = mask(m);
|
| 128 |
const wet = at(k, u1, v1, 3);
|
| 129 |
-
line(k, u0, v0, u1, v1, 0.
|
| 130 |
line(k, u0, v0, u1, v1, 1.1, 1, 0.35, 0.6);
|
| 131 |
}
|
| 132 |
function wetAt(m, u, v, rMM, amount) {
|
|
@@ -143,13 +153,13 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 143 |
const k = mask(m);
|
| 144 |
k.world = world.clone();
|
| 145 |
k.burnR = 0;
|
| 146 |
-
for (let i = 0; i <
|
| 147 |
}
|
| 148 |
function addEmber(k, u, v, gen) {
|
| 149 |
if (emberCount >= EMAX || u < 0 || v < 0 || u > 1 || v > 1) return;
|
| 150 |
if (at(k, u, v, 3) > 0.35) return; // too wet to catch
|
| 151 |
if (at(k, u, v, 0) > 0.6) return; // already gone
|
| 152 |
-
k.embers.push({ u, v, gen, life:
|
| 153 |
emberCount++;
|
| 154 |
}
|
| 155 |
|
|
@@ -169,7 +179,7 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 169 |
void main() { vC = aCol; vec4 mv = modelViewMatrix * vec4(position, 1.0); gl_Position = projectionMatrix * mv;
|
| 170 |
gl_PointSize = aCol.a <= 0.0 ? 0.0 : max(1.0, aSize * uScale / -mv.z); }`,
|
| 171 |
fragmentShader: /* glsl */`varying vec4 vC;
|
| 172 |
-
void main() { float d = length(gl_PointCoord - 0.5) * 2.0; float a = smoothstep(1.0, 0.
|
| 173 |
});
|
| 174 |
const points = new THREE.Points(pGeo, pMat);
|
| 175 |
points.frustumCulled = false;
|
|
@@ -251,27 +261,29 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 251 |
// ------------------------------------------------------------ update
|
| 252 |
const tmpM = new THREE.Matrix4(), tmpQ = new THREE.Quaternion(), tmpE = new THREE.Euler(), tmpS = new THREE.Vector3(), tmpP = new THREE.Vector3();
|
| 253 |
let burnTick = 0, wetTick = 0, upTick = 0, decayTick = 0;
|
| 254 |
-
function update(dt, time) {
|
| 255 |
shared.uDmgT.value = time;
|
| 256 |
// burning: slow ember creep, faster along the fibres, char behind it, smoke and ash above
|
| 257 |
-
burnTick +=
|
| 258 |
if (burnTick > 0.1) {
|
| 259 |
const h = burnTick; burnTick = 0;
|
|
|
|
| 260 |
for (const k of masks.values()) {
|
| 261 |
if (!k.embers.length) continue;
|
| 262 |
const keep = [];
|
| 263 |
for (const e of k.embers) {
|
| 264 |
e.age += h; e.life -= h; e.next -= h;
|
| 265 |
-
blob(k, e.u, e.v,
|
| 266 |
-
blob(k, e.u, e.v,
|
| 267 |
-
|
| 268 |
-
|
|
|
|
| 269 |
const along = Math.random() < 0.7, s = 0.6 + Math.random() * 0.8, a = Math.random() < 0.5 ? -1 : 1;
|
| 270 |
-
const [du, dv] = mmToUV(k, along ? a * s * 1.
|
| 271 |
-
if (Math.random() < 0.
|
| 272 |
}
|
| 273 |
if (e.life > 0) keep.push(e);
|
| 274 |
-
else { blob(k, e.u, e.v, 1.
|
| 275 |
}
|
| 276 |
k.embers = keep;
|
| 277 |
if (k.world && keep.length) {
|
|
@@ -279,7 +291,7 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 279 |
for (let i = 0; i < Math.min(3, keep.length / 6 + 1); i++) {
|
| 280 |
const g = 0.16 + Math.random() * 0.1;
|
| 281 |
spawnP(2, k.world.x + (Math.random() - 0.5) * spread, k.world.y + (Math.random() - 0.5) * spread * 0.6, k.world.z + 1,
|
| 282 |
-
(Math.random() - 0.5) * 6, 8 + Math.random() * 6, 4 + Math.random() * 4,
|
| 283 |
}
|
| 284 |
if (Math.random() < 0.6) spawnP(1, k.world.x + (Math.random() - 0.5) * spread, k.world.y + (Math.random() - 0.5) * spread * 0.6, k.world.z + 1,
|
| 285 |
(Math.random() - 0.5) * 8, 12 + Math.random() * 10, 3, 0.5 + Math.random() * 0.6, 6, 0.32, 0.30, 0.28, 0.85);
|
|
@@ -288,7 +300,7 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 288 |
}
|
| 289 |
}
|
| 290 |
// ember glow cools where nothing burns any more
|
| 291 |
-
decayTick +=
|
| 292 |
if (decayTick > 0.25) {
|
| 293 |
const f = Math.exp(-decayTick * 0.6); decayTick = 0;
|
| 294 |
for (const k of masks.values()) {
|
|
@@ -299,11 +311,12 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 299 |
}
|
| 300 |
}
|
| 301 |
// soaked spots slowly dissolve and delaminate
|
| 302 |
-
wetTick +=
|
| 303 |
if (wetTick > 0.4) {
|
| 304 |
wetTick = 0;
|
| 305 |
for (const k of masks.values()) for (const w of k.wet) {
|
| 306 |
w.t += 0.4;
|
|
|
|
| 307 |
if (w.t < 2.5 || at(k, w.u, w.v, 3) < 0.55 || Math.random() > 0.35) continue;
|
| 308 |
const a = Math.random() * 6.283, r = Math.random() * w.r * 0.8;
|
| 309 |
const [du, dv] = mmToUV(k, Math.cos(a) * r, Math.sin(a) * r);
|
|
@@ -356,7 +369,7 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 356 |
pLife[i] = pAge[i] + 6 + Math.random() * 4;
|
| 357 |
continue;
|
| 358 |
}
|
| 359 |
-
if (t === 2) { pSize[i] += dt * 2.
|
| 360 |
else if (t === 4) pCol[i * 4 + 3] = fade;
|
| 361 |
else if (t !== 3) pCol[i * 4 + 3] = Math.min(0.8, fade * 1.6) * (t === 0 ? 0.75 : 0.9);
|
| 362 |
}
|
|
@@ -408,10 +421,11 @@ export function createDamage({ THREE, scene, meshes, MOBILE, ground, uDmgT }) {
|
|
| 408 |
pCol.fill(0); fLive.fill(0); fMesh.count = 0; fHead = 0; puddles.length = 0; qMesh.count = 0;
|
| 409 |
}
|
| 410 |
const blankTex = new THREE.DataTexture(new Uint8Array(4), 1, 1); blankTex.needsUpdate = true;
|
| 411 |
-
const
|
|
|
|
| 412 |
// map a material-space hit (mm) from the flat sandbox onto the same mask
|
| 413 |
function crushMM(m, xMM, yMM, rMM) { const w = m.userData.w; crush(m, xMM / w.widthMM, yMM / w.heightMM, rMM, 1.0); }
|
| 414 |
function tearMM(m, ax, ay, bx, by) { const w = m.userData.w; const k = mask(m); line(k, ax / w.widthMM, ay / w.heightMM, bx / w.widthMM, by / w.heightMM, 0.28, 0, 0.75, 0.3); line(k, ax / w.widthMM, ay / w.heightMM, bx / w.widthMM, by / w.heightMM, 0.8, 1, 0.3, 0.4); }
|
| 415 |
const objects = [points, fMesh, qMesh];
|
| 416 |
-
return { objects, shared, blankTex, crush, tear, wetAt, ignite, debris, drops, update, reset, stats, crushMM, tearMM, wetness: (m, u, v) => (masks.has(m) ? at(masks.get(m), u, v, 3) : 0), dust: (x, y, z) => debris({ x, y, z }, 1.5, 0, 'tear') || spawnP(0, x, y, z, (Math.random() - 0.5) * 30, 8 + Math.random() * 12, 8 + Math.random() * 15, 0.3 + Math.random() * 0.4, 6, 0.13, 0.1, 0.08, 0.75) };
|
| 417 |
}
|
|
|
|
| 16 |
vec2 p = mm * vec2(0.7, 6.5);
|
| 17 |
return 0.5 * dNoise(p) + 0.3 * dNoise(p * 2.13 + 3.7) + 0.2 * dNoise(mm * 6.0 + 11.0);
|
| 18 |
}
|
| 19 |
+
// the damage field the alpha test uses: smooth mask, fibre noise, and a coarser ragged term for tufts and bites
|
| 20 |
+
float dField(float r, float fib, vec2 mm) {
|
| 21 |
+
float g = smoothstep(0.05, 0.35, r); // no noise far from damage, so no stray pinholes
|
| 22 |
+
return r * 1.1 + ((fib - 0.5) * 0.7 + (dNoise(mm * vec2(0.9, 1.6) + 5.3) - 0.5) * 0.3) * g;
|
| 23 |
+
}
|
| 24 |
`;
|
| 25 |
// after the surface normal is known: alpha test against the field
|
| 26 |
export const DMG_CUT = /* glsl */`
|
|
|
|
| 28 |
if (uDmgOn > 0.5) {
|
| 29 |
dd = texture2D(uDmg, vLocal);
|
| 30 |
dFibV = dFib(vLocal * uDmgMM);
|
| 31 |
+
dTh = dd.r > 0.004 ? dField(dd.r, dFibV, vLocal * uDmgMM) : 0.0;
|
| 32 |
if (dTh > 0.5) discard;
|
| 33 |
}
|
| 34 |
`;
|
| 35 |
// before the final colour: charred band, lifted lip and its shadow, cracks, wet gloss, embers
|
| 36 |
export const DMG_EDGE = /* glsl */`
|
| 37 |
if (uDmgOn > 0.5) {
|
| 38 |
+
float charK = smoothstep(0.16, 0.495, dTh);
|
| 39 |
+
float lipK = smoothstep(0.08, 0.2, dTh) * (1.0 - charK);
|
| 40 |
float shadow = smoothstep(0.38, 0.7, texture2D(uDmg, vLocal + vec2(-0.3, 0.45) / uDmgMM).r) * (1.0 - charK);
|
| 41 |
col *= 1.0 + 0.32 * lipK;
|
| 42 |
+
col *= 1.0 - 0.6 * shadow;
|
| 43 |
+
col *= 1.0 - 0.45 * smoothstep(0.1, 0.5, dd.g);
|
| 44 |
float crack = dd.g * smoothstep(0.35, 0.75, dFibV + dd.g * 0.35);
|
| 45 |
+
col = mix(col, vec3(0.010, 0.007, 0.005) * (0.6 + 0.8 * dFibV), clamp(charK * 0.97 + crack * 0.9, 0.0, 1.0));
|
| 46 |
float wet = dd.a;
|
| 47 |
+
col *= 1.0 - 0.8 * wet;
|
| 48 |
vec3 dH = normalize(normalize(vec3(-0.35, 0.75, 0.55)) + normalize(cameraPosition - vW));
|
| 49 |
+
col += wet * (pow(abs(dot(normalize(vN), dH)), 40.0) * vec3(0.9, 0.85, 0.78) + pow(1.0 - abs(dot(normalize(vN), normalize(cameraPosition - vW))), 4.0) * vec3(0.12, 0.12, 0.13));
|
| 50 |
float flick = 0.7 + 0.3 * sin(uDmgT * 2.3 + dFibV * 23.0) * sin(uDmgT * 1.1 + dFibV * 7.0);
|
| 51 |
float emb = dd.b * flick;
|
| 52 |
col += vec3(1.0, 0.30, 0.05) * emb * (0.6 + 2.0 * charK) * 1.6;
|
|
|
|
| 129 |
line(k, u + a0, v + b0, u + a1, v + b1, 0.22, 1, 0.9, 0.25);
|
| 130 |
}
|
| 131 |
}
|
| 132 |
+
function bruise(m, u, v, rMM) {
|
| 133 |
+
const k = mask(m);
|
| 134 |
+
blob(k, u, v, rMM, 1, 0.22, 1.3);
|
| 135 |
+
}
|
| 136 |
function tear(m, u0, v0, u1, v1) {
|
| 137 |
const k = mask(m);
|
| 138 |
const wet = at(k, u1, v1, 3);
|
| 139 |
+
line(k, u0, v0, u1, v1, 0.6 + wet * 0.5, 0, 0.9, 0.45);
|
| 140 |
line(k, u0, v0, u1, v1, 1.1, 1, 0.35, 0.6);
|
| 141 |
}
|
| 142 |
function wetAt(m, u, v, rMM, amount) {
|
|
|
|
| 153 |
const k = mask(m);
|
| 154 |
k.world = world.clone();
|
| 155 |
k.burnR = 0;
|
| 156 |
+
for (let i = 0; i < 7; i++) { const a = i * 0.9, [du, dv] = mmToUV(k, Math.cos(a) * 0.8, Math.sin(a) * 0.5); addEmber(k, u + du, v + dv, 0); }
|
| 157 |
}
|
| 158 |
function addEmber(k, u, v, gen) {
|
| 159 |
if (emberCount >= EMAX || u < 0 || v < 0 || u > 1 || v > 1) return;
|
| 160 |
if (at(k, u, v, 3) > 0.35) return; // too wet to catch
|
| 161 |
if (at(k, u, v, 0) > 0.6) return; // already gone
|
| 162 |
+
k.embers.push({ u, v, gen, life: 4 + Math.random() * 4, age: 0, next: 0.3 + Math.random() * 0.6 });
|
| 163 |
emberCount++;
|
| 164 |
}
|
| 165 |
|
|
|
|
| 179 |
void main() { vC = aCol; vec4 mv = modelViewMatrix * vec4(position, 1.0); gl_Position = projectionMatrix * mv;
|
| 180 |
gl_PointSize = aCol.a <= 0.0 ? 0.0 : max(1.0, aSize * uScale / -mv.z); }`,
|
| 181 |
fragmentShader: /* glsl */`varying vec4 vC;
|
| 182 |
+
void main() { float d = length(gl_PointCoord - 0.5) * 2.0; float a = smoothstep(1.0, 0.0, d) * smoothstep(1.0, 0.0, d) * vC.a * 1.3; if (a < 0.01) discard; gl_FragColor = vec4(vC.rgb, a); }`,
|
| 183 |
});
|
| 184 |
const points = new THREE.Points(pGeo, pMat);
|
| 185 |
points.frustumCulled = false;
|
|
|
|
| 261 |
// ------------------------------------------------------------ update
|
| 262 |
const tmpM = new THREE.Matrix4(), tmpQ = new THREE.Quaternion(), tmpE = new THREE.Euler(), tmpS = new THREE.Vector3(), tmpP = new THREE.Vector3();
|
| 263 |
let burnTick = 0, wetTick = 0, upTick = 0, decayTick = 0;
|
| 264 |
+
function update(dt, time, wall = dt) {
|
| 265 |
shared.uDmgT.value = time;
|
| 266 |
// burning: slow ember creep, faster along the fibres, char behind it, smoke and ash above
|
| 267 |
+
burnTick += wall;
|
| 268 |
if (burnTick > 0.1) {
|
| 269 |
const h = burnTick; burnTick = 0;
|
| 270 |
+
const q = h / 0.1; // per-tick amounts are tuned for 0.1 s; scale so slow frames burn at the same speed
|
| 271 |
for (const k of masks.values()) {
|
| 272 |
if (!k.embers.length) continue;
|
| 273 |
const keep = [];
|
| 274 |
for (const e of k.embers) {
|
| 275 |
e.age += h; e.life -= h; e.next -= h;
|
| 276 |
+
blob(k, e.u, e.v, 1.4, 2, Math.min(1, 0.22 * q));
|
| 277 |
+
blob(k, e.u, e.v, 2.6, 2, Math.min(1, 0.05 * q));
|
| 278 |
+
blob(k, e.u, e.v, 0.8, 0, Math.min(1, (e.age > 1.2 ? 0.05 : 0.01) * q));
|
| 279 |
+
for (let rep = 0; rep < 3 && e.next <= 0 && e.gen < 40; rep++) {
|
| 280 |
+
e.next += 0.25 + Math.random() * 0.45;
|
| 281 |
const along = Math.random() < 0.7, s = 0.6 + Math.random() * 0.8, a = Math.random() < 0.5 ? -1 : 1;
|
| 282 |
+
const [du, dv] = mmToUV(k, along ? a * s * 1.9 : (Math.random() - 0.5) * s * 1.4, along ? (Math.random() - 0.5) * s * 0.6 : a * s * 1.0);
|
| 283 |
+
if (Math.random() < 0.97 - e.gen * 0.01) addEmber(k, e.u + du, e.v + dv, e.gen + 1);
|
| 284 |
}
|
| 285 |
if (e.life > 0) keep.push(e);
|
| 286 |
+
else { blob(k, e.u, e.v, 1.3, 0, 0.6); emberCount--; if (k.world && Math.random() < 0.5) spawnF(k.world.x + (Math.random() - 0.5) * 6, k.world.y + (Math.random() - 0.5) * 4, k.world.z + 0.3, (Math.random() - 0.5) * 10, 5, 4, 0.3 + Math.random() * 0.4); }
|
| 287 |
}
|
| 288 |
k.embers = keep;
|
| 289 |
if (k.world && keep.length) {
|
|
|
|
| 291 |
for (let i = 0; i < Math.min(3, keep.length / 6 + 1); i++) {
|
| 292 |
const g = 0.16 + Math.random() * 0.1;
|
| 293 |
spawnP(2, k.world.x + (Math.random() - 0.5) * spread, k.world.y + (Math.random() - 0.5) * spread * 0.6, k.world.z + 1,
|
| 294 |
+
(Math.random() - 0.5) * 6, 8 + Math.random() * 6, 4 + Math.random() * 4, 3 + Math.random() * 3, 4 + Math.random() * 3, g * 1.8, g * 1.75, g * 1.7, 0.5);
|
| 295 |
}
|
| 296 |
if (Math.random() < 0.6) spawnP(1, k.world.x + (Math.random() - 0.5) * spread, k.world.y + (Math.random() - 0.5) * spread * 0.6, k.world.z + 1,
|
| 297 |
(Math.random() - 0.5) * 8, 12 + Math.random() * 10, 3, 0.5 + Math.random() * 0.6, 6, 0.32, 0.30, 0.28, 0.85);
|
|
|
|
| 300 |
}
|
| 301 |
}
|
| 302 |
// ember glow cools where nothing burns any more
|
| 303 |
+
decayTick += wall;
|
| 304 |
if (decayTick > 0.25) {
|
| 305 |
const f = Math.exp(-decayTick * 0.6); decayTick = 0;
|
| 306 |
for (const k of masks.values()) {
|
|
|
|
| 311 |
}
|
| 312 |
}
|
| 313 |
// soaked spots slowly dissolve and delaminate
|
| 314 |
+
wetTick += wall;
|
| 315 |
if (wetTick > 0.4) {
|
| 316 |
wetTick = 0;
|
| 317 |
for (const k of masks.values()) for (const w of k.wet) {
|
| 318 |
w.t += 0.4;
|
| 319 |
+
if (w.t < 6) blob(k, w.u, w.v, w.r * (1 + w.t * 0.08), 3, 0.05, 1.6); // water wicks out along the fibres
|
| 320 |
if (w.t < 2.5 || at(k, w.u, w.v, 3) < 0.55 || Math.random() > 0.35) continue;
|
| 321 |
const a = Math.random() * 6.283, r = Math.random() * w.r * 0.8;
|
| 322 |
const [du, dv] = mmToUV(k, Math.cos(a) * r, Math.sin(a) * r);
|
|
|
|
| 369 |
pLife[i] = pAge[i] + 6 + Math.random() * 4;
|
| 370 |
continue;
|
| 371 |
}
|
| 372 |
+
if (t === 2) { pSize[i] += dt * 2.6; pCol[i * 4 + 3] = 0.42 * fade * Math.min(1, pAge[i] * 2); }
|
| 373 |
else if (t === 4) pCol[i * 4 + 3] = fade;
|
| 374 |
else if (t !== 3) pCol[i * 4 + 3] = Math.min(0.8, fade * 1.6) * (t === 0 ? 0.75 : 0.9);
|
| 375 |
}
|
|
|
|
| 421 |
pCol.fill(0); fLive.fill(0); fMesh.count = 0; fHead = 0; puddles.length = 0; qMesh.count = 0;
|
| 422 |
}
|
| 423 |
const blankTex = new THREE.DataTexture(new Uint8Array(4), 1, 1); blankTex.needsUpdate = true;
|
| 424 |
+
const belowFloor = () => { const G = ground(); let n = 0, sleeping = 0; for (let i = 0; i < PMAX; i++) if (pCol[i * 4 + 3] > 0) { if (pPos[i * 3 + 1] < G - 0.01) n++; if (pSleep[i]) sleeping++; } return { n, sleeping }; };
|
| 425 |
+
const stats = () => ({ floor: belowFloor(), masks: masks.size, embers: emberCount, particles: [...pCol].filter((_, i) => i % 4 === 3).filter((a) => a > 0).length, shards: fLive.reduce((a, b) => a + b, 0), puddles: puddles.length });
|
| 426 |
// map a material-space hit (mm) from the flat sandbox onto the same mask
|
| 427 |
function crushMM(m, xMM, yMM, rMM) { const w = m.userData.w; crush(m, xMM / w.widthMM, yMM / w.heightMM, rMM, 1.0); }
|
| 428 |
function tearMM(m, ax, ay, bx, by) { const w = m.userData.w; const k = mask(m); line(k, ax / w.widthMM, ay / w.heightMM, bx / w.widthMM, by / w.heightMM, 0.28, 0, 0.75, 0.3); line(k, ax / w.widthMM, ay / w.heightMM, bx / w.widthMM, by / w.heightMM, 0.8, 1, 0.3, 0.4); }
|
| 429 |
const objects = [points, fMesh, qMesh];
|
| 430 |
+
return { objects, shared, blankTex, bruise, crush, tear, wetAt, ignite, debris, drops, update, reset, stats, crushMM, tearMM, wetness: (m, u, v) => (masks.has(m) ? at(masks.get(m), u, v, 3) : 0), dust: (x, y, z) => debris({ x, y, z }, 1.5, 0, 'tear') || spawnP(0, x, y, z, (Math.random() - 0.5) * 30, 8 + Math.random() * 12, 8 + Math.random() * 15, 0.3 + Math.random() * 0.4, 6, 0.13, 0.1, 0.08, 0.75) };
|
| 431 |
}
|
data/gpu.json
CHANGED
|
@@ -74,5 +74,5 @@
|
|
| 74 |
"calls": 8,
|
| 75 |
"device": "NVIDIA RTX PRO 6000 Blackwell Server Edition MIG 2g.48gb"
|
| 76 |
},
|
| 77 |
-
"about": "<b>Our ink model (9 \u00b5m)</b>, the cyan band, is ours.
|
| 78 |
-
}
|
|
|
|
| 74 |
"calls": 8,
|
| 75 |
"device": "NVIDIA RTX PRO 6000 Blackwell Server Edition MIG 2g.48gb"
|
| 76 |
},
|
| 77 |
+
"about": "<b>Our ink model (9 \u00b5m)</b>, the cyan band, is ours. So far we have run the public <a href=\"https://huggingface.co/scrollprize/ink_9um\" target=\"_blank\" rel=\"noopener\">scrollprize/ink_9um</a> model on Hugging Face ZeroGPU over windings w046 to w051. More windings are added as daily free GPU runs allow, so this layer is a work in progress and will grow. The first batch was 37,141 patches in 57 s of measured GPU time on half an NVIDIA RTX PRO 6000 Blackwell. It reads the 9.362 \u00b5m scan, about four times coarser than the 2.4 \u00b5m scan behind the amber layer, so its ink map is noisier. w047 and w050 ran with patch overlap 0.5; w046, w048, w049 and w051 ran with less overlap, so their 128 px patch grid shows as faint square tiles. That grid is a stitching artifact, not ink. Click a cyan winding to compare the two maps."
|
| 78 |
+
}
|
index.html
CHANGED
|
@@ -185,7 +185,7 @@ if (!/(^|[#&])s=/.test(location.hash)) ['scrolls/index.json', 'scrolls/PHerc0139
|
|
| 185 |
|
| 186 |
<section id="about" class="sheet about" hidden>
|
| 187 |
<div class="sheet-head">
|
| 188 |
-
<div><div class="mono dim">ABOUT</div><h2>What you
|
| 189 |
<button class="icon" id="aClose" aria-label="Close">✕</button>
|
| 190 |
</div>
|
| 191 |
<div class="about-body">
|
|
|
|
| 185 |
|
| 186 |
<section id="about" class="sheet about" hidden>
|
| 187 |
<div class="sheet-head">
|
| 188 |
+
<div><div class="mono dim">ABOUT</div><h2>What you’re looking at</h2></div>
|
| 189 |
<button class="icon" id="aClose" aria-label="Close">✕</button>
|
| 190 |
</div>
|
| 191 |
<div class="about-body">
|
polish.js
CHANGED
|
@@ -8,8 +8,9 @@ const KEYS = [
|
|
| 8 |
['1 2 3', 'X-ray, published ink, our ink model'],
|
| 9 |
['R', 'Read the current winding close up'],
|
| 10 |
['V', 'Reset the camera view'],
|
| 11 |
-
['
|
| 12 |
-
['
|
|
|
|
| 13 |
['F', 'Full screen'],
|
| 14 |
['I', 'About this page'],
|
| 15 |
['?', 'Show or hide this help'],
|
|
@@ -68,6 +69,10 @@ addEventListener('keydown', (e) => {
|
|
| 68 |
case 'v': window.unrollView?.reset(); break;
|
| 69 |
case 't': click('btnTear'); break;
|
| 70 |
case 'c': click('btnCrush'); break;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
case 'i': click('btnInfo'); break;
|
| 72 |
case 'f':
|
| 73 |
if (document.fullscreenElement) document.exitFullscreen?.();
|
|
|
|
| 8 |
['1 2 3', 'X-ray, published ink, our ink model'],
|
| 9 |
['R', 'Read the current winding close up'],
|
| 10 |
['V', 'Reset the camera view'],
|
| 11 |
+
['U', 'Roll it back up (again to stop)'],
|
| 12 |
+
['T', 'Destroy on or off'],
|
| 13 |
+
['X C B W', 'Destroy tools: Tear, Crush, Burn, Water'],
|
| 14 |
['F', 'Full screen'],
|
| 15 |
['I', 'About this page'],
|
| 16 |
['?', 'Show or hide this help'],
|
|
|
|
| 69 |
case 'v': window.unrollView?.reset(); break;
|
| 70 |
case 't': click('btnTear'); break;
|
| 71 |
case 'c': click('btnCrush'); break;
|
| 72 |
+
case 'x': click('toolTear'); break;
|
| 73 |
+
case 'b': click('toolBurn'); break;
|
| 74 |
+
case 'w': click('toolWater'); break;
|
| 75 |
+
case 'u': click('btnRollUp'); break;
|
| 76 |
case 'i': click('btnInfo'); break;
|
| 77 |
case 'f':
|
| 78 |
if (document.fullscreenElement) document.exitFullscreen?.();
|
scrolls/PHerc0139/manifest.json
CHANGED
|
@@ -61,14 +61,14 @@
|
|
| 61 |
"hi": "data/hi/{id}_gpu.jpg",
|
| 62 |
"stats": "data/gpu.json",
|
| 63 |
"sizeHint": 150000,
|
| 64 |
-
"title": "Lower resolution comparison: the open ink_9um model run by us on free Hugging Face GPU, on the coarser 9.4 µm scan (about 4x coarser than 2.4 µm), for
|
| 65 |
-
"hint": "Our ink model (9 µm): open ink_9um model on the 9.4 µm scan, about 4x coarser,
|
| 66 |
"closeupLabel": "Our ink model (9 µm)",
|
| 67 |
"readoutLabel": "OUR INK",
|
| 68 |
"bandTitle": "Windings inked by our ink model (9 µm)",
|
| 69 |
"source": "scrollprize/ink_9um (seed 42, step 75000) run on Hugging Face ZeroGPU; per-run receipts in data/gpu/receipts/",
|
| 70 |
"resolutionUM": 9.362,
|
| 71 |
-
"aboutHtml": "<b>Our ink model (9 µm)</b>, the cyan band, is ours.
|
| 72 |
}
|
| 73 |
],
|
| 74 |
"credits": {
|
|
@@ -105,4 +105,4 @@
|
|
| 105 |
"footer": "data: Vesuvius Challenge, CC BY-NC 4.0 (creativecommons.org/licenses/by-nc/4.0)"
|
| 106 |
}
|
| 107 |
}
|
| 108 |
-
}
|
|
|
|
| 61 |
"hi": "data/hi/{id}_gpu.jpg",
|
| 62 |
"stats": "data/gpu.json",
|
| 63 |
"sizeHint": 150000,
|
| 64 |
+
"title": "Lower resolution comparison: the open ink_9um model run by us on free Hugging Face GPU, on the coarser 9.4 µm scan (about 4x coarser than 2.4 µm), for {count} windings so far. It looks blurrier and shows patch seams. It's here to show what an open model can recover from cheaper, more widely available scans, as a reproducible baseline you can check against the published result.",
|
| 65 |
+
"hint": "Our ink model (9 µm): open ink_9um model on the 9.4 µm scan, about 4x coarser, {count} windings so far. Blurrier, with patch seams; a reproducible baseline to check against the published layer.",
|
| 66 |
"closeupLabel": "Our ink model (9 µm)",
|
| 67 |
"readoutLabel": "OUR INK",
|
| 68 |
"bandTitle": "Windings inked by our ink model (9 µm)",
|
| 69 |
"source": "scrollprize/ink_9um (seed 42, step 75000) run on Hugging Face ZeroGPU; per-run receipts in data/gpu/receipts/",
|
| 70 |
"resolutionUM": 9.362,
|
| 71 |
+
"aboutHtml": "<b>Our ink model (9 µm)</b>, the cyan band, is ours. So far we have run the public <a href=\"https://huggingface.co/scrollprize/ink_9um\" target=\"_blank\" rel=\"noopener\">scrollprize/ink_9um</a> model on Hugging Face ZeroGPU over windings {windings}. More windings are added as daily free GPU runs allow, so this layer is a work in progress and will grow. The first batch was 37,141 patches in 57 s of measured GPU time on half an NVIDIA RTX PRO 6000 Blackwell. It reads the 9.362 µm scan, about four times coarser than the 2.4 µm scan behind the amber layer, so its ink map is noisier. w047 and w050 ran with patch overlap 0.5; w046, w048, w049 and w051 ran with less overlap, so their 128 px patch grid shows as faint square tiles. That grid is a stitching artifact, not ink. It is included at lower resolution on purpose: it shows what an open model can recover from cheaper, more widely available scans, as a reproducible baseline you can check against the published result. Click a cyan winding to compare the two maps."
|
| 72 |
}
|
| 73 |
],
|
| 74 |
"credits": {
|
|
|
|
| 105 |
"footer": "data: Vesuvius Challenge, CC BY-NC 4.0 (creativecommons.org/licenses/by-nc/4.0)"
|
| 106 |
}
|
| 107 |
}
|
| 108 |
+
}
|
style.css
CHANGED
|
@@ -238,3 +238,22 @@ kbd { display: inline-block; min-width: 20px; padding: 2px 6px; border: 1px soli
|
|
| 238 |
.o-list li > span:last-child { display: flex; gap: 6px; }
|
| 239 |
.mu { text-transform: none; }
|
| 240 |
@media (min-width: 721px) { .hud.tr .seg[role=tablist] .chip { letter-spacing: .07em; padding: 8px 11px; } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
.o-list li > span:last-child { display: flex; gap: 6px; }
|
| 239 |
.mu { text-transform: none; }
|
| 240 |
@media (min-width: 721px) { .hud.tr .seg[role=tablist] .chip { letter-spacing: .07em; padding: 8px 11px; } }
|
| 241 |
+
|
| 242 |
+
/* Destroy mode: tool cursors (a fist for Crush, squeezed while pressed; a flame for Burn; a droplet for Water) */
|
| 243 |
+
body.destroy.tool-tear #gl { cursor: crosshair; }
|
| 244 |
+
body.destroy.tool-crush #gl { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='%23f3e6cf' stroke='%231a120c' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6 13c0-2 1.4-3.2 3-3.2s2.8 1.1 2.8 2.6c0-1.9 1.3-3 2.9-3s2.8 1.1 2.8 2.8c.1-1.6 1.4-2.6 2.9-2.6 1.6 0 2.8 1.2 2.8 2.9v.9c.4-.7 1.2-1.1 2-1.1 1.4 0 2.3 1 2.3 2.5v5.2c0 4.7-3.7 8.1-8.6 8.1h-3.4C10 28.1 6 24.6 6 20.4z'/%3E%3Cpath d='M11.8 12.4v3.6M17.5 12.2v3.6M23.2 12.5v3.4M6.4 17.4c2.3-1.6 5.4-1.6 7.4.4' fill='none'/%3E%3C/g%3E%3C/svg%3E") 16 11, pointer; }
|
| 245 |
+
body.destroy.tool-crush.pressing #gl, body.destroy.tool-crush #gl:active { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='-1 -4 34 38'%3E%3Cg fill='%23f3e6cf' stroke='%231a120c' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6 13c0-2 1.4-3.2 3-3.2s2.8 1.1 2.8 2.6c0-1.9 1.3-3 2.9-3s2.8 1.1 2.8 2.8c.1-1.6 1.4-2.6 2.9-2.6 1.6 0 2.8 1.2 2.8 2.9v.9c.4-.7 1.2-1.1 2-1.1 1.4 0 2.3 1 2.3 2.5v5.2c0 4.7-3.7 8.1-8.6 8.1h-3.4C10 28.1 6 24.6 6 20.4z'/%3E%3Cpath d='M11.8 12.4v3.6M17.5 12.2v3.6M23.2 12.5v3.4M6.4 17.4c2.3-1.6 5.4-1.6 7.4.4' fill='none'/%3E%3C/g%3E%3C/svg%3E") 16 12, pointer; }
|
| 246 |
+
body.destroy.tool-burn #gl { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 3c1 5 7.5 8 7.5 15.5a7.5 7.5 0 0 1-15 0c0-4.2 2-6.5 3.2-8.6.4 3 1.8 4.3 3 4.4-1-4.2 0-8.3 1.3-11.3z' fill='%23ff8a2a' stroke='%231a120c' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M16 15c.6 3 3.6 4.4 3.6 7.6a3.6 3.6 0 0 1-7.2 0c0-2.2 2-4.4 3.6-7.6z' fill='%23ffd56a'/%3E%3C/svg%3E") 16 4, pointer; }
|
| 247 |
+
body.destroy.tool-water #gl { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 3C12.4 9.6 8 13.8 8 19.4a8 8 0 0 0 16 0C24 13.8 19.6 9.6 16 3z' fill='%2378b8e8' stroke='%230c1620' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M12.4 19.6a3.8 3.8 0 0 0 3 3.6' fill='none' stroke='%23e8f6ff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 16 27, pointer; }
|
| 248 |
+
.touch-pop { position: fixed; z-index: 8; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none; background: center / contain no-repeat; animation: pop .65s ease-out forwards; }
|
| 249 |
+
.touch-pop.crush { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='-1 -4 34 38'%3E%3Cg fill='%23f3e6cf' stroke='%231a120c' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6 13c0-2 1.4-3.2 3-3.2s2.8 1.1 2.8 2.6c0-1.9 1.3-3 2.9-3s2.8 1.1 2.8 2.8c.1-1.6 1.4-2.6 2.9-2.6 1.6 0 2.8 1.2 2.8 2.9v.9c.4-.7 1.2-1.1 2-1.1 1.4 0 2.3 1 2.3 2.5v5.2c0 4.7-3.7 8.1-8.6 8.1h-3.4C10 28.1 6 24.6 6 20.4z'/%3E%3Cpath d='M11.8 12.4v3.6M17.5 12.2v3.6M23.2 12.5v3.4M6.4 17.4c2.3-1.6 5.4-1.6 7.4.4' fill='none'/%3E%3C/g%3E%3C/svg%3E"); }
|
| 250 |
+
.touch-pop.burn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 3c1 5 7.5 8 7.5 15.5a7.5 7.5 0 0 1-15 0c0-4.2 2-6.5 3.2-8.6.4 3 1.8 4.3 3 4.4-1-4.2 0-8.3 1.3-11.3z' fill='%23ff8a2a' stroke='%231a120c' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M16 15c.6 3 3.6 4.4 3.6 7.6a3.6 3.6 0 0 1-7.2 0c0-2.2 2-4.4 3.6-7.6z' fill='%23ffd56a'/%3E%3C/svg%3E"); }
|
| 251 |
+
.touch-pop.water { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 3C12.4 9.6 8 13.8 8 19.4a8 8 0 0 0 16 0C24 13.8 19.6 9.6 16 3z' fill='%2378b8e8' stroke='%230c1620' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M12.4 19.6a3.8 3.8 0 0 0 3 3.6' fill='none' stroke='%23e8f6ff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
|
| 252 |
+
.touch-pop.tear { display: none; }
|
| 253 |
+
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 25% { transform: scale(1.05); opacity: 1 } 100% { transform: scale(.9); opacity: 0 } }
|
| 254 |
+
.chip.tool.on { background: var(--fg); color: var(--bg); }
|
| 255 |
+
.chip:disabled { opacity: .35; cursor: default; }
|
| 256 |
+
.roll-up { flex: none; border: 1px solid var(--line-strong); background: var(--panel); color: var(--fg); min-height: 34px; }
|
| 257 |
+
.roll-up.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
|
| 258 |
+
@media (max-width: 720px) { .roll-up { padding: 8px; font-size: 10px; } }
|
| 259 |
+
@media (max-width: 720px) { body.destroy #readout { display: none; } }
|