@thoughts-on-things/vantage-mc 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/dist/{biome-CO419Coy.d.ts → biome-uodZHCCI.d.ts} +66 -12
- package/dist/{chunk-576KSRE6.js → chunk-HGHIERQW.js} +499 -50
- package/dist/{chunk-TC3HQWAD.js → chunk-ILHVIGCI.js} +223 -10
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/react/index.d.ts +24 -7
- package/dist/react/index.js +246 -9
- package/dist/three/index.d.ts +14 -5
- package/dist/three/index.js +2 -2
- package/dist/{viewer-D8UWlNNc.d.ts → viewer-Ba31QN1M.d.ts} +97 -7
- package/package.json +2 -1
|
@@ -11,8 +11,16 @@ var TILE_MAGIC = {
|
|
|
11
11
|
/** + a top-down surface map for O(ray) biome picking. */
|
|
12
12
|
VTL5: "VTL5",
|
|
13
13
|
/** Quantized vertices: u16 positions (bbox transform) + u16 layer/biome. */
|
|
14
|
-
VTL6: "VTL6"
|
|
14
|
+
VTL6: "VTL6",
|
|
15
|
+
/** Compact quads: no index array (canonical quad topology is derived),
|
|
16
|
+
* delta-coded u16 positions, i16 fixed-point UV. */
|
|
17
|
+
VTL7: "VTL7",
|
|
18
|
+
/** + a per-tile lightmap atlas: the greedy vertex tail samples baked
|
|
19
|
+
* light/AO from a texture instead of vertices, so lighting gradients no
|
|
20
|
+
* longer fragment greedy merges (~23% fewer vertices). */
|
|
21
|
+
VTL8: "VTL8"
|
|
15
22
|
};
|
|
23
|
+
var UV_SCALE = 128;
|
|
16
24
|
var TEXTURE_MAGIC = "VTA1";
|
|
17
25
|
var ByteReader = class {
|
|
18
26
|
constructor(buffer, off = 0) {
|
|
@@ -83,6 +91,47 @@ var ByteReader = class {
|
|
|
83
91
|
};
|
|
84
92
|
|
|
85
93
|
// src/core/tile.ts
|
|
94
|
+
function canonicalQuadIndices(vertexCount) {
|
|
95
|
+
const out = new Uint32Array(vertexCount / 4 * 6);
|
|
96
|
+
for (let b = 0, o = 0; b < vertexCount; b += 4) {
|
|
97
|
+
out[o++] = b;
|
|
98
|
+
out[o++] = b + 1;
|
|
99
|
+
out[o++] = b + 2;
|
|
100
|
+
out[o++] = b;
|
|
101
|
+
out[o++] = b + 2;
|
|
102
|
+
out[o++] = b + 3;
|
|
103
|
+
}
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
function decodeDeltaPositions(zz, vertexCount) {
|
|
107
|
+
const out = new Uint16Array(3 * vertexCount);
|
|
108
|
+
let px = 0, py = 0, pz = 0;
|
|
109
|
+
for (let i = 0; i < vertexCount; i++) {
|
|
110
|
+
let z = zz[i * 3];
|
|
111
|
+
px = px + (z >>> 1 ^ -(z & 1)) & 65535;
|
|
112
|
+
out[i * 3] = px;
|
|
113
|
+
z = zz[i * 3 + 1];
|
|
114
|
+
py = py + (z >>> 1 ^ -(z & 1)) & 65535;
|
|
115
|
+
out[i * 3 + 1] = py;
|
|
116
|
+
z = zz[i * 3 + 2];
|
|
117
|
+
pz = pz + (z >>> 1 ^ -(z & 1)) & 65535;
|
|
118
|
+
out[i * 3 + 2] = pz;
|
|
119
|
+
}
|
|
120
|
+
return out;
|
|
121
|
+
}
|
|
122
|
+
function decodeDeltaPairs(zz) {
|
|
123
|
+
const out = new Uint16Array(zz.length);
|
|
124
|
+
let pu = 0, pv = 0;
|
|
125
|
+
for (let i = 0; i * 2 < zz.length; i++) {
|
|
126
|
+
let z = zz[i * 2];
|
|
127
|
+
pu = pu + (z >>> 1 ^ -(z & 1)) & 65535;
|
|
128
|
+
out[i * 2] = pu;
|
|
129
|
+
z = zz[i * 2 + 1];
|
|
130
|
+
pv = pv + (z >>> 1 ^ -(z & 1)) & 65535;
|
|
131
|
+
out[i * 2 + 1] = pv;
|
|
132
|
+
}
|
|
133
|
+
return out;
|
|
134
|
+
}
|
|
86
135
|
function expandNormals(packed, vertexCount) {
|
|
87
136
|
const out = new Float32Array(3 * vertexCount);
|
|
88
137
|
for (let i = 0; i < vertexCount; i++) {
|
|
@@ -171,18 +220,147 @@ function readQuantizedSectionRaw(r) {
|
|
|
171
220
|
const layer = r.u16a(vertexCount);
|
|
172
221
|
const biome = r.u16a(vertexCount);
|
|
173
222
|
r.align4();
|
|
174
|
-
return { vertexCount, indexCount, positions, posMin, posScale, uv, colors, normals, layer, biome, indices };
|
|
223
|
+
return { vertexCount, indexCount, positions, posMin, posScale, uv, uvScale: 1, colors, normals, layer, biome, indices };
|
|
224
|
+
}
|
|
225
|
+
function readCompactSectionRaw(r) {
|
|
226
|
+
const vertexCount = r.u32();
|
|
227
|
+
const uv = r.i16a(2 * vertexCount);
|
|
228
|
+
const colors = r.u8a(4 * vertexCount);
|
|
229
|
+
const normals = r.i8a(4 * vertexCount);
|
|
230
|
+
const bbox = r.f32(6);
|
|
231
|
+
const posMin = [bbox[0], bbox[1], bbox[2]];
|
|
232
|
+
const posScale = [bbox[3], bbox[4], bbox[5]];
|
|
233
|
+
const positions = decodeDeltaPositions(r.u16a(3 * vertexCount), vertexCount);
|
|
234
|
+
const layer = r.u16a(vertexCount);
|
|
235
|
+
const biome = r.u16a(vertexCount);
|
|
236
|
+
r.align4();
|
|
237
|
+
return {
|
|
238
|
+
vertexCount,
|
|
239
|
+
indexCount: vertexCount / 4 * 6,
|
|
240
|
+
positions,
|
|
241
|
+
posMin,
|
|
242
|
+
posScale,
|
|
243
|
+
uv,
|
|
244
|
+
uvScale: 1 / UV_SCALE,
|
|
245
|
+
colors,
|
|
246
|
+
normals,
|
|
247
|
+
layer,
|
|
248
|
+
biome,
|
|
249
|
+
indices: null
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function readLitSectionRaw(r) {
|
|
253
|
+
const vertexCount = r.u32();
|
|
254
|
+
const lmStart = r.u32();
|
|
255
|
+
const uv = r.i16a(2 * vertexCount);
|
|
256
|
+
const colors = r.u8a(4 * vertexCount);
|
|
257
|
+
const normals = r.i8a(4 * vertexCount);
|
|
258
|
+
const bbox = r.f32(6);
|
|
259
|
+
const posMin = [bbox[0], bbox[1], bbox[2]];
|
|
260
|
+
const posScale = [bbox[3], bbox[4], bbox[5]];
|
|
261
|
+
const positions = decodeDeltaPositions(r.u16a(3 * vertexCount), vertexCount);
|
|
262
|
+
const layer = r.u16a(vertexCount);
|
|
263
|
+
const biome = r.u16a(vertexCount);
|
|
264
|
+
const lmuv = decodeDeltaPairs(r.u16a(2 * (vertexCount - lmStart)));
|
|
265
|
+
r.align4();
|
|
266
|
+
return {
|
|
267
|
+
vertexCount,
|
|
268
|
+
indexCount: vertexCount / 4 * 6,
|
|
269
|
+
positions,
|
|
270
|
+
posMin,
|
|
271
|
+
posScale,
|
|
272
|
+
uv,
|
|
273
|
+
uvScale: 1 / UV_SCALE,
|
|
274
|
+
colors,
|
|
275
|
+
normals,
|
|
276
|
+
layer,
|
|
277
|
+
biome,
|
|
278
|
+
indices: null,
|
|
279
|
+
lmStart,
|
|
280
|
+
lmuv
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function readLightmap(r) {
|
|
284
|
+
const width = r.u32();
|
|
285
|
+
const height = r.u32();
|
|
286
|
+
const n = width * height;
|
|
287
|
+
if (n === 0) return void 0;
|
|
288
|
+
const sky = r.u8a(n);
|
|
289
|
+
const blk = r.u8a(n);
|
|
290
|
+
const ao = r.u8a(n);
|
|
291
|
+
const pixels = new Uint8Array(4 * n);
|
|
292
|
+
for (let i = 0; i < n; i++) {
|
|
293
|
+
pixels[i * 4 + 0] = sky[i];
|
|
294
|
+
pixels[i * 4 + 1] = blk[i];
|
|
295
|
+
pixels[i * 4 + 2] = ao[i];
|
|
296
|
+
pixels[i * 4 + 3] = 255;
|
|
297
|
+
}
|
|
298
|
+
return { width, height, pixels };
|
|
299
|
+
}
|
|
300
|
+
function expandSection(raw) {
|
|
301
|
+
const { vertexCount, indexCount } = raw;
|
|
302
|
+
const positions = new Float32Array(3 * vertexCount);
|
|
303
|
+
const uv = new Float32Array(2 * vertexCount);
|
|
304
|
+
const layer = new Float32Array(vertexCount);
|
|
305
|
+
const biome = new Float32Array(vertexCount);
|
|
306
|
+
const [mnx, mny, mnz] = raw.posMin;
|
|
307
|
+
const [scx, scy, scz] = raw.posScale;
|
|
308
|
+
for (let i = 0; i < vertexCount; i++) {
|
|
309
|
+
positions[i * 3 + 0] = mnx + raw.positions[i * 3 + 0] * scx;
|
|
310
|
+
positions[i * 3 + 1] = mny + raw.positions[i * 3 + 1] * scy;
|
|
311
|
+
positions[i * 3 + 2] = mnz + raw.positions[i * 3 + 2] * scz;
|
|
312
|
+
uv[i * 2 + 0] = raw.uv[i * 2 + 0] * raw.uvScale;
|
|
313
|
+
uv[i * 2 + 1] = raw.uv[i * 2 + 1] * raw.uvScale;
|
|
314
|
+
layer[i] = raw.layer[i];
|
|
315
|
+
biome[i] = raw.biome[i];
|
|
316
|
+
}
|
|
317
|
+
return {
|
|
318
|
+
vertexCount,
|
|
319
|
+
indexCount,
|
|
320
|
+
positions,
|
|
321
|
+
uv,
|
|
322
|
+
layer,
|
|
323
|
+
biome,
|
|
324
|
+
colors: raw.colors,
|
|
325
|
+
normals: expandNormals(raw.normals, vertexCount),
|
|
326
|
+
light: extractLight(raw.normals, vertexCount),
|
|
327
|
+
indices: canonicalQuadIndices(vertexCount),
|
|
328
|
+
...raw.lmStart !== void 0 ? { lmStart: raw.lmStart, lmuv: raw.lmuv } : {}
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
function readCompactSection(r) {
|
|
332
|
+
return expandSection(readCompactSectionRaw(r));
|
|
333
|
+
}
|
|
334
|
+
function bakeVertexLight(sec, lm) {
|
|
335
|
+
const { lmStart, lmuv } = sec;
|
|
336
|
+
if (lmStart === void 0 || !lmuv || lmStart >= sec.vertexCount) return;
|
|
337
|
+
const colors = sec.colors.slice();
|
|
338
|
+
const light = sec.light;
|
|
339
|
+
for (let i = lmStart; i < sec.vertexCount; i++) {
|
|
340
|
+
const k = i - lmStart;
|
|
341
|
+
const u = lmuv[k * 2] - 1 >> 1;
|
|
342
|
+
const v = lmuv[k * 2 + 1] - 1 >> 1;
|
|
343
|
+
const o = (v * lm.width + u) * 4;
|
|
344
|
+
const sky = Math.round(lm.pixels[o] / 17);
|
|
345
|
+
const blk = Math.round(lm.pixels[o + 1] / 17);
|
|
346
|
+
light[i] = sky << 4 | blk;
|
|
347
|
+
colors[i * 4 + 3] = lm.pixels[o + 2];
|
|
348
|
+
}
|
|
349
|
+
sec.colors = colors;
|
|
175
350
|
}
|
|
176
351
|
function parseTileQuantized(buffer) {
|
|
177
352
|
const r = new ByteReader(buffer);
|
|
178
|
-
|
|
353
|
+
const magic = r.magic();
|
|
354
|
+
if (magic !== TILE_MAGIC.VTL6 && magic !== TILE_MAGIC.VTL7 && magic !== TILE_MAGIC.VTL8) return null;
|
|
179
355
|
r.off = 4;
|
|
180
356
|
const version = r.u32();
|
|
181
|
-
const
|
|
182
|
-
const
|
|
357
|
+
const readSection = magic === TILE_MAGIC.VTL8 ? readLitSectionRaw : magic === TILE_MAGIC.VTL7 ? readCompactSectionRaw : readQuantizedSectionRaw;
|
|
358
|
+
const solid = readSection(r);
|
|
359
|
+
const fluid = readSection(r);
|
|
360
|
+
const lightmap = magic === TILE_MAGIC.VTL8 ? readLightmap(r) : void 0;
|
|
183
361
|
const surface = readSurface(r);
|
|
184
362
|
const biomeNames = readLegend(r);
|
|
185
|
-
return { magic
|
|
363
|
+
return { magic, version, solid, fluid, surface, biomeNames, ...lightmap ? { lightmap } : {} };
|
|
186
364
|
}
|
|
187
365
|
function readSurface(r) {
|
|
188
366
|
const width = r.u32();
|
|
@@ -209,6 +387,32 @@ function parseTile(buffer) {
|
|
|
209
387
|
const magic = r.magic();
|
|
210
388
|
r.off = 4;
|
|
211
389
|
const version = r.u32();
|
|
390
|
+
if (magic === TILE_MAGIC.VTL8) {
|
|
391
|
+
const solid = expandSection(readLitSectionRaw(r));
|
|
392
|
+
const fluid = expandSection(readLitSectionRaw(r));
|
|
393
|
+
const lightmap = readLightmap(r);
|
|
394
|
+
if (lightmap) bakeVertexLight(solid, lightmap);
|
|
395
|
+
const surface = readSurface(r);
|
|
396
|
+
const biomeNames = readLegend(r);
|
|
397
|
+
return {
|
|
398
|
+
magic,
|
|
399
|
+
version,
|
|
400
|
+
textured: true,
|
|
401
|
+
hasBiome: true,
|
|
402
|
+
...solid,
|
|
403
|
+
biomeNames,
|
|
404
|
+
fluid,
|
|
405
|
+
surface,
|
|
406
|
+
...lightmap ? { lightmap } : {}
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
if (magic === TILE_MAGIC.VTL7) {
|
|
410
|
+
const solid = readCompactSection(r);
|
|
411
|
+
const fluid = readCompactSection(r);
|
|
412
|
+
const surface = readSurface(r);
|
|
413
|
+
const biomeNames = readLegend(r);
|
|
414
|
+
return { magic, version, textured: true, hasBiome: true, ...solid, biomeNames, fluid, surface };
|
|
415
|
+
}
|
|
212
416
|
if (magic === TILE_MAGIC.VTL6) {
|
|
213
417
|
const solid = readQuantizedSection(r);
|
|
214
418
|
const fluid = readQuantizedSection(r);
|
|
@@ -270,7 +474,7 @@ function parseTile(buffer) {
|
|
|
270
474
|
indices
|
|
271
475
|
};
|
|
272
476
|
}
|
|
273
|
-
throw new Error(`vantage: unrecognized tile magic "${magic}" (expected VTL1\
|
|
477
|
+
throw new Error(`vantage: unrecognized tile magic "${magic}" (expected VTL1\u2013VTL7)`);
|
|
274
478
|
}
|
|
275
479
|
|
|
276
480
|
// src/core/texture.ts
|
|
@@ -309,8 +513,8 @@ function parseManifest(data) {
|
|
|
309
513
|
if (typeof data !== "object" || data === null) throw new Error("vantage: manifest is not an object");
|
|
310
514
|
const m = data;
|
|
311
515
|
const format = m["format"];
|
|
312
|
-
if (format !== 1 && format !== 2) {
|
|
313
|
-
throw new Error(`vantage: unsupported manifest format ${String(format)} (expected 1
|
|
516
|
+
if (format !== 1 && format !== 2 && format !== 3 && format !== 4) {
|
|
517
|
+
throw new Error(`vantage: unsupported manifest format ${String(format)} (expected 1..4)`);
|
|
314
518
|
}
|
|
315
519
|
const tileChunks = m["tileChunks"];
|
|
316
520
|
const tileBlocks = m["tileBlocks"];
|
|
@@ -361,12 +565,21 @@ function parseManifest(data) {
|
|
|
361
565
|
if (typeof s === "object" && s !== null && typeof s["x"] === "number" && typeof s["y"] === "number" && typeof s["z"] === "number") {
|
|
362
566
|
spawn = { x: s["x"], y: s["y"], z: s["z"] };
|
|
363
567
|
}
|
|
568
|
+
let yRange;
|
|
569
|
+
const yr = m["yRange"];
|
|
570
|
+
if (typeof yr === "object" && yr !== null && typeof yr["min"] === "number" && typeof yr["max"] === "number" && yr["min"] < yr["max"]) {
|
|
571
|
+
yRange = { min: yr["min"], max: yr["max"] };
|
|
572
|
+
}
|
|
573
|
+
const maxSectionVerts = m["maxSectionVerts"];
|
|
364
574
|
return {
|
|
365
575
|
format,
|
|
366
576
|
tileChunks,
|
|
367
577
|
tileBlocks,
|
|
368
578
|
textures,
|
|
579
|
+
...typeof maxSectionVerts === "number" && maxSectionVerts > 0 ? { maxSectionVerts } : {},
|
|
369
580
|
...spawn ? { spawn } : {},
|
|
581
|
+
...m["caves"] === true ? { caves: true } : {},
|
|
582
|
+
...yRange ? { yRange } : {},
|
|
370
583
|
...lowres ? { lowres } : {},
|
|
371
584
|
biomes,
|
|
372
585
|
tiles: parsedTiles
|
|
@@ -571,4 +784,4 @@ function summarizeBiomes(tile, palette) {
|
|
|
571
784
|
return toEntries(counts, names, pal);
|
|
572
785
|
}
|
|
573
786
|
|
|
574
|
-
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, TEXTURE_MAGIC, TILE_MAGIC, biomePalette, isGzip, maybeInflate, parseLowresTile, parseManifest, parseTextureArray, parseTile, parseTileQuantized, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromUrl };
|
|
787
|
+
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, biomePalette, canonicalQuadIndices, isGzip, maybeInflate, parseLowresTile, parseManifest, parseTextureArray, parseTile, parseTileQuantized, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromUrl };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BiomeEntry, b as ByteReader, a as DecodedTextureArray, D as DecodedTile, L as LowresLevel, M as ManifestTile,
|
|
1
|
+
export { B as BiomeEntry, b as ByteReader, a as DecodedTextureArray, D as DecodedTile, L as Lightmap, c as LowresLevel, M as ManifestTile, d as MeshSection, e as QuantizedSection, Q as QuantizedTile, R as Rgb, S as SurfaceMap, T as TEXTURE_MAGIC, f as TILE_MAGIC, g as TextureAnimation, h as TileMagic, U as UV_SCALE, W as WorldFetch, i as WorldManifest, j as WorldSource, k as biomePalette, l as canonicalQuadIndices, p as parseManifest, m as parseTextureArray, n as parseTile, o as parseTileQuantized, s as stripNamespace, q as summarizeBiomes, r as summarizeSurfaceBiomes, t as tileKey, w as worldFromDirectory, u as worldFromFiles, v as worldFromUrl } from '../biome-uodZHCCI.js';
|
|
2
2
|
|
|
3
3
|
declare const LOWRES_MAGIC = "VLR1";
|
|
4
4
|
/** Height sentinel for samples with no terrain (unpopulated chunks). */
|
package/dist/core/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, TEXTURE_MAGIC, TILE_MAGIC, biomePalette, isGzip, maybeInflate, parseLowresTile, parseManifest, parseTextureArray, parseTile, parseTileQuantized, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromUrl } from '../chunk-
|
|
1
|
+
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, biomePalette, canonicalQuadIndices, isGzip, maybeInflate, parseLowresTile, parseManifest, parseTextureArray, parseTile, parseTileQuantized, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromUrl } from '../chunk-ILHVIGCI.js';
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export { D as DecodedTile } from '../biome-
|
|
5
|
-
import { g as TileSource, T as TextureSource, S as StreamingSettings, k as ViewMode, L as LightSettings, a as DisplaySettings, d as TileInfo, i as VantageViewer$1 } from '../viewer-
|
|
6
|
-
export { D as DEFAULT_ORBIT_ANGLE, V as VANILLA_DISPLAY } from '../viewer-
|
|
3
|
+
import { j as WorldSource, B as BiomeEntry } from '../biome-uodZHCCI.js';
|
|
4
|
+
export { D as DecodedTile } from '../biome-uodZHCCI.js';
|
|
5
|
+
import { g as TileSource, T as TextureSource, S as StreamingSettings, k as ViewMode, L as LightSettings, a as DisplaySettings, d as TileInfo, i as VantageViewer$1 } from '../viewer-Ba31QN1M.js';
|
|
6
|
+
export { D as DEFAULT_ORBIT_ANGLE, V as VANILLA_DISPLAY } from '../viewer-Ba31QN1M.js';
|
|
7
7
|
import 'three';
|
|
8
8
|
|
|
9
9
|
interface VantageViewerProps {
|
|
@@ -126,9 +126,26 @@ interface MapNavProps {
|
|
|
126
126
|
home?: boolean;
|
|
127
127
|
/** Show the centred-coordinate readout. Default `true`. */
|
|
128
128
|
coords?: boolean;
|
|
129
|
+
/** Show the cave-view (depth slice) toggle. Default `true` — hidden
|
|
130
|
+
* automatically unless the world was baked with `--caves full`. */
|
|
131
|
+
caves?: boolean;
|
|
132
|
+
/** Show the screenshot (PNG download) button. Default `true`. */
|
|
133
|
+
screenshot?: boolean;
|
|
134
|
+
/** Show the fullscreen toggle. Default `true` (hidden automatically where
|
|
135
|
+
* the Fullscreen API is unavailable, e.g. iPhone Safari). */
|
|
136
|
+
fullscreen?: boolean;
|
|
129
137
|
className?: string;
|
|
130
138
|
}
|
|
131
|
-
declare function MapNav({ compass, tilt, fly, zoom, home, coords, className }: MapNavProps): react.JSX.Element | null;
|
|
139
|
+
declare function MapNav({ compass, tilt, fly, zoom, home, coords, caves, screenshot, fullscreen, className, }: MapNavProps): react.JSX.Element | null;
|
|
140
|
+
|
|
141
|
+
interface DepthSliderProps {
|
|
142
|
+
/** Key that toggles the cave view. Default `'c'`; pass `null` to disable. */
|
|
143
|
+
toggleKey?: string | null;
|
|
144
|
+
/** World-Y step for the `[` / `]` nudge keys. Default `4`. */
|
|
145
|
+
step?: number;
|
|
146
|
+
className?: string;
|
|
147
|
+
}
|
|
148
|
+
declare function DepthSlider({ toggleKey, step, className }: DepthSliderProps): react.JSX.Element | null;
|
|
132
149
|
|
|
133
150
|
interface ReticleProps {
|
|
134
151
|
className?: string;
|
|
@@ -153,8 +170,8 @@ interface VantageContextValue {
|
|
|
153
170
|
/** Access the viewer engine and live state. Must be used under `<VantageViewer>`. */
|
|
154
171
|
declare function useVantage(): VantageContextValue;
|
|
155
172
|
|
|
156
|
-
declare const CSS = "\n.vtg-root {\n position: relative; width: 100%; height: 100%; overflow: hidden;\n background: #0d1015; color-scheme: dark;\n --vtg-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n --vtg-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n --vtg-accent: #5b9bff;\n --vtg-text: #e6eefb;\n --vtg-muted: #93a9cc;\n --vtg-dim: #6f86ab;\n --vtg-line: rgba(132, 170, 230, 0.16);\n}\n.vtg-canvas { position: absolute; inset: 0; }\n/* Constrain the GL canvas to its container. The renderer keeps a high-res\n drawing buffer (devicePixelRatio \u00D7 renderScale) via setSize(\u2026, false), which\n leaves the canvas's intrinsic attribute size large; without an explicit\n display size that size leaks into layout and overflows. width/height:100%\n pins the *displayed* size to the container while the buffer stays crisp. */\n.vtg-canvas > canvas { display: block; width: 100%; height: 100%; }\n\n.vtg-glass {\n background: linear-gradient(180deg, rgba(18, 24, 35, 0.72), rgba(11, 15, 22, 0.7));\n border: 1px solid rgba(140, 178, 238, 0.18);\n border-radius: 13px;\n backdrop-filter: blur(16px) saturate(1.3);\n -webkit-backdrop-filter: blur(16px) saturate(1.3);\n box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);\n}\n\n.vtg-status {\n position: absolute; inset: 0; display: grid; place-content: center; text-align: center;\n font: 13px var(--vtg-sans); color: var(--vtg-muted); padding: 2rem;\n}\n.vtg-status.vtg-error { color: #ffb4b4; }\n\n/* --- panels --------------------------------------------------------------- */\n.vtg-panel {\n position: absolute; top: 16px; right: 16px; width: 240px; max-height: calc(100% - 32px);\n display: flex; flex-direction: column; overflow: hidden;\n font: 13px/1.45 var(--vtg-sans); color: var(--vtg-text);\n animation: vtg-rise 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;\n}\n.vtg-panel header {\n padding: 11px 13px; display: flex; align-items: center; gap: 9px;\n user-select: none; flex: none;\n}\n.vtg-panel:not(.vtg-collapsed) header { border-bottom: 1px solid var(--vtg-line); }\n.vtg-panel header.vtg-click { cursor: pointer; }\n.vtg-panel header.vtg-click:hover .vtg-title { color: #fff; }\n.vtg-chev {\n font-size: 9px; color: var(--vtg-dim); width: 10px; flex: none; text-align: center;\n transition: transform 0.18s ease, color 0.16s;\n}\n.vtg-panel header.vtg-click:hover .vtg-chev { color: var(--vtg-muted); }\n.vtg-title {\n display: flex; align-items: center; gap: 7px;\n font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;\n color: var(--vtg-text); transition: color 0.16s;\n}\n.vtg-title .vtg-ico { color: var(--vtg-accent); font-size: 12px; opacity: 0.9; }\n.vtg-head-extra { margin-left: auto; display: flex; align-items: center; gap: 6px; }\n.vtg-body { overflow: hidden; display: flex; flex-direction: column; min-height: 0; }\n\n.vtg-toggle {\n font: 600 11px var(--vtg-sans); padding: 3px 12px; border-radius: 999px;\n border: 1px solid rgba(132, 170, 230, 0.38); background: rgba(40, 60, 90, 0.4);\n color: var(--vtg-muted); cursor: pointer;\n transition: background 0.16s, color 0.16s, border-color 0.16s;\n}\n.vtg-toggle:hover { border-color: rgba(132, 170, 230, 0.7); color: var(--vtg-text); }\n.vtg-toggle.vtg-on { background: var(--vtg-accent); border-color: var(--vtg-accent); color: #07101f; }\n\n/* --- biome legend --------------------------------------------------------- */\n.vtg-legend { overflow-y: auto; padding: 7px; scrollbar-width: thin; scrollbar-color: rgba(132,170,230,0.3) transparent; }\n.vtg-row {\n display: flex; align-items: center; gap: 9px; padding: 5px 8px;\n border-radius: 7px; cursor: pointer; white-space: nowrap;\n transition: background 0.16s, opacity 0.16s, box-shadow 0.16s;\n}\n.vtg-row:hover { background: rgba(132, 170, 230, 0.12); }\n.vtg-row.vtg-sel { background: rgba(91, 155, 255, 0.26); }\n.vtg-row.vtg-hover { box-shadow: inset 0 0 0 1px rgba(143, 182, 232, 0.75); }\n.vtg-row.vtg-dim { opacity: 0.34; }\n.vtg-chip { width: 13px; height: 13px; border-radius: 4px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); }\n.vtg-name { overflow: hidden; text-overflow: ellipsis; }\n.vtg-pct { margin-left: auto; color: var(--vtg-dim); font: 11px var(--vtg-mono); font-variant-numeric: tabular-nums; }\n\n/* --- segmented toggle (render mode) --------------------------------------- */\n.vtg-seg { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(40, 60, 90, 0.4); border: 1px solid rgba(132, 170, 230, 0.28); }\n.vtg-seg button {\n font: 600 10px var(--vtg-sans); letter-spacing: 0.04em; text-transform: uppercase;\n padding: 3px 10px; border-radius: 999px; border: none; background: transparent; color: var(--vtg-muted);\n cursor: pointer; transition: background 0.16s, color 0.16s;\n}\n.vtg-seg button:hover { color: var(--vtg-text); }\n.vtg-seg button.vtg-seg-on { background: var(--vtg-accent); color: #07101f; }\n.vtg-seg-full { display: flex; }\n.vtg-seg-full button { flex: 1; text-align: center; padding: 4px 0; }\n\n/* --- sliders -------------------------------------------------------------- */\n.vtg-sliders { padding: 13px; display: flex; flex-direction: column; gap: 13px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(132,170,230,0.3) transparent; }\n.vtg-slider { display: flex; flex-direction: column; gap: 7px; cursor: pointer; }\n.vtg-slider-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--vtg-muted); font-size: 12px; }\n.vtg-slider-row b { color: var(--vtg-text); font: 600 11px var(--vtg-mono); font-variant-numeric: tabular-nums; }\n.vtg-slider input[type=range] {\n -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px;\n background: rgba(132, 170, 230, 0.25); outline: none; cursor: pointer;\n}\n.vtg-slider input[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%;\n background: var(--vtg-accent); cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);\n transition: transform 0.12s;\n}\n.vtg-slider input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.18); }\n.vtg-slider input[type=range]::-moz-range-thumb {\n width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--vtg-accent);\n cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);\n}\n\n/* --- hover-to-identify tooltip -------------------------------------------- */\n.vtg-tip {\n position: fixed; display: flex; align-items: center; gap: 8px;\n padding: 6px 10px; pointer-events: none; z-index: 10;\n font: 12px/1 var(--vtg-sans); color: var(--vtg-text);\n background: rgba(13, 17, 25, 0.88); border: 1px solid var(--vtg-line); border-radius: 8px;\n backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);\n}\n.vtg-tip .vtg-chip { width: 12px; height: 12px; border-radius: 3px; }\n\n/* --- navigation cluster (compass \u00B7 zoom \u00B7 home \u00B7 coords) ------------------ */\n.vtg-nav {\n position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);\n display: flex; align-items: center; gap: 6px; padding: 6px;\n animation: vtg-rise 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;\n}\n.vtg-navbtn {\n width: 30px; height: 30px; flex: none; display: grid; place-items: center;\n border-radius: 9px; border: 1px solid transparent; background: transparent;\n color: var(--vtg-muted); cursor: pointer; padding: 0;\n transition: background 0.15s, color 0.15s, border-color 0.15s;\n}\n.vtg-navbtn:hover { background: rgba(132, 170, 230, 0.14); color: var(--vtg-text); border-color: var(--vtg-line); }\n.vtg-navbtn:active { background: rgba(91, 155, 255, 0.26); }\n.vtg-navbtn svg { width: 16px; height: 16px; display: block; }\n.vtg-navbtn-text { width: auto; min-width: 30px; padding: 0 8px; font: 700 11px var(--vtg-mono); letter-spacing: 0.03em; }\n.vtg-navbtn.vtg-on { background: var(--vtg-accent); border-color: var(--vtg-accent); color: #07101f; }\n.vtg-navbtn.vtg-on:hover { background: var(--vtg-accent); color: #07101f; }\n.vtg-nav-sep { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--vtg-line); }\n\n.vtg-compass {\n position: relative; width: 34px; height: 34px; flex: none; border-radius: 50%;\n border: 1px solid var(--vtg-line); background: rgba(20, 28, 40, 0.5);\n cursor: pointer; display: grid; place-items: center;\n transition: border-color 0.16s, background 0.16s;\n}\n.vtg-compass:hover { border-color: rgba(132, 170, 230, 0.5); background: rgba(30, 42, 60, 0.6); }\n.vtg-compass svg { width: 30px; height: 30px; }\n.vtg-compass .vtg-n { fill: #ff6a6a; }\n.vtg-compass .vtg-s { fill: #c2d2ee; }\n.vtg-compass .vtg-cn { fill: var(--vtg-dim); font: 700 6px var(--vtg-sans); }\n\n.vtg-coords {\n display: flex; align-items: center; gap: 8px; padding: 0 10px 0 6px;\n font: 11px var(--vtg-mono); color: var(--vtg-muted); font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n.vtg-coords b { color: var(--vtg-dim); font-weight: 600; margin-right: 1px; }\n\n/* --- centre reticle (navigation reference) -------------------------------- */\n.vtg-reticle {\n position: absolute; left: 50%; top: 50%; width: 30px; height: 30px;\n transform: translate(-50%, -50%); pointer-events: none; z-index: 4;\n}\n.vtg-ret-ring {\n position: absolute; inset: 0; border-radius: 50%;\n border: 1.5px solid rgba(180, 205, 240, 0.28); transform: scale(0.62);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);\n transition: border-color 0.2s ease, transform 0.2s ease;\n}\n.vtg-ret-dot {\n position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px;\n border-radius: 50%; background: rgba(238, 244, 255, 0.85);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 0, 0, 0.55);\n transition: background 0.2s ease;\n}\n.vtg-reticle-on .vtg-ret-ring { border-color: rgba(143, 182, 232, 0.85); transform: scale(1); }\n.vtg-reticle-on .vtg-ret-dot { background: #fff; }\n\n@keyframes vtg-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }\n.vtg-nav { animation-name: vtg-rise-x; }\n@keyframes vtg-rise-x { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }\n";
|
|
173
|
+
declare const CSS = "\n.vtg-root {\n position: relative; width: 100%; height: 100%; overflow: hidden;\n background: #0d1015; color-scheme: dark;\n --vtg-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n --vtg-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n --vtg-accent: #5b9bff;\n --vtg-text: #e6eefb;\n --vtg-muted: #93a9cc;\n --vtg-dim: #6f86ab;\n --vtg-line: rgba(132, 170, 230, 0.16);\n}\n.vtg-canvas { position: absolute; inset: 0; }\n/* Constrain the GL canvas to its container. The renderer keeps a high-res\n drawing buffer (devicePixelRatio \u00D7 renderScale) via setSize(\u2026, false), which\n leaves the canvas's intrinsic attribute size large; without an explicit\n display size that size leaks into layout and overflows. width/height:100%\n pins the *displayed* size to the container while the buffer stays crisp. */\n.vtg-canvas > canvas { display: block; width: 100%; height: 100%; }\n\n.vtg-glass {\n background: linear-gradient(180deg, rgba(18, 24, 35, 0.72), rgba(11, 15, 22, 0.7));\n border: 1px solid rgba(140, 178, 238, 0.18);\n border-radius: 13px;\n backdrop-filter: blur(16px) saturate(1.3);\n -webkit-backdrop-filter: blur(16px) saturate(1.3);\n box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);\n}\n\n.vtg-status {\n position: absolute; inset: 0; display: grid; place-content: center; text-align: center;\n font: 13px var(--vtg-sans); color: var(--vtg-muted); padding: 2rem;\n}\n.vtg-status.vtg-error { color: #ffb4b4; }\n\n/* --- panels --------------------------------------------------------------- */\n.vtg-panel {\n position: absolute; top: 16px; right: 16px; width: 240px; max-height: calc(100% - 32px);\n display: flex; flex-direction: column; overflow: hidden;\n font: 13px/1.45 var(--vtg-sans); color: var(--vtg-text);\n animation: vtg-rise 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;\n}\n.vtg-panel header {\n padding: 11px 13px; display: flex; align-items: center; gap: 9px;\n user-select: none; flex: none;\n}\n.vtg-panel:not(.vtg-collapsed) header { border-bottom: 1px solid var(--vtg-line); }\n.vtg-panel header.vtg-click { cursor: pointer; }\n.vtg-panel header.vtg-click:hover .vtg-title { color: #fff; }\n.vtg-chev {\n font-size: 9px; color: var(--vtg-dim); width: 10px; flex: none; text-align: center;\n transition: transform 0.18s ease, color 0.16s;\n}\n.vtg-panel header.vtg-click:hover .vtg-chev { color: var(--vtg-muted); }\n.vtg-title {\n display: flex; align-items: center; gap: 7px;\n font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;\n color: var(--vtg-text); transition: color 0.16s;\n}\n.vtg-title .vtg-ico { color: var(--vtg-accent); font-size: 12px; opacity: 0.9; }\n.vtg-head-extra { margin-left: auto; display: flex; align-items: center; gap: 6px; }\n.vtg-body { overflow: hidden; display: flex; flex-direction: column; min-height: 0; }\n\n.vtg-toggle {\n font: 600 11px var(--vtg-sans); padding: 3px 12px; border-radius: 999px;\n border: 1px solid rgba(132, 170, 230, 0.38); background: rgba(40, 60, 90, 0.4);\n color: var(--vtg-muted); cursor: pointer;\n transition: background 0.16s, color 0.16s, border-color 0.16s;\n}\n.vtg-toggle:hover { border-color: rgba(132, 170, 230, 0.7); color: var(--vtg-text); }\n.vtg-toggle.vtg-on { background: var(--vtg-accent); border-color: var(--vtg-accent); color: #07101f; }\n\n/* --- biome legend --------------------------------------------------------- */\n.vtg-legend { overflow-y: auto; padding: 7px; scrollbar-width: thin; scrollbar-color: rgba(132,170,230,0.3) transparent; }\n.vtg-row {\n display: flex; align-items: center; gap: 9px; padding: 5px 8px;\n border-radius: 7px; cursor: pointer; white-space: nowrap;\n transition: background 0.16s, opacity 0.16s, box-shadow 0.16s;\n}\n.vtg-row:hover { background: rgba(132, 170, 230, 0.12); }\n.vtg-row.vtg-sel { background: rgba(91, 155, 255, 0.26); }\n.vtg-row.vtg-hover { box-shadow: inset 0 0 0 1px rgba(143, 182, 232, 0.75); }\n.vtg-row.vtg-dim { opacity: 0.34; }\n.vtg-chip { width: 13px; height: 13px; border-radius: 4px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); }\n.vtg-name { overflow: hidden; text-overflow: ellipsis; }\n.vtg-pct { margin-left: auto; color: var(--vtg-dim); font: 11px var(--vtg-mono); font-variant-numeric: tabular-nums; }\n\n/* --- segmented toggle (render mode) --------------------------------------- */\n.vtg-seg { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(40, 60, 90, 0.4); border: 1px solid rgba(132, 170, 230, 0.28); }\n.vtg-seg button {\n font: 600 10px var(--vtg-sans); letter-spacing: 0.04em; text-transform: uppercase;\n padding: 3px 10px; border-radius: 999px; border: none; background: transparent; color: var(--vtg-muted);\n cursor: pointer; transition: background 0.16s, color 0.16s;\n}\n.vtg-seg button:hover { color: var(--vtg-text); }\n.vtg-seg button.vtg-seg-on { background: var(--vtg-accent); color: #07101f; }\n.vtg-seg-full { display: flex; }\n.vtg-seg-full button { flex: 1; text-align: center; padding: 4px 0; }\n\n/* --- sliders -------------------------------------------------------------- */\n.vtg-sliders { padding: 13px; display: flex; flex-direction: column; gap: 13px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(132,170,230,0.3) transparent; }\n.vtg-slider { display: flex; flex-direction: column; gap: 7px; cursor: pointer; }\n.vtg-slider-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--vtg-muted); font-size: 12px; }\n.vtg-slider-row b { color: var(--vtg-text); font: 600 11px var(--vtg-mono); font-variant-numeric: tabular-nums; }\n.vtg-slider input[type=range] {\n -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px;\n background: rgba(132, 170, 230, 0.25); outline: none; cursor: pointer;\n}\n.vtg-slider input[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%;\n background: var(--vtg-accent); cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);\n transition: transform 0.12s;\n}\n.vtg-slider input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.18); }\n.vtg-slider input[type=range]::-moz-range-thumb {\n width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--vtg-accent);\n cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);\n}\n\n/* --- hover-to-identify tooltip -------------------------------------------- */\n.vtg-tip {\n position: fixed; display: flex; align-items: center; gap: 8px;\n padding: 6px 10px; pointer-events: none; z-index: 10;\n font: 12px/1 var(--vtg-sans); color: var(--vtg-text);\n background: rgba(13, 17, 25, 0.88); border: 1px solid var(--vtg-line); border-radius: 8px;\n backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);\n}\n.vtg-tip .vtg-chip { width: 12px; height: 12px; border-radius: 3px; }\n\n/* --- navigation cluster (compass \u00B7 zoom \u00B7 home \u00B7 coords) ------------------ */\n.vtg-nav {\n position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);\n display: flex; align-items: center; gap: 6px; padding: 6px;\n animation: vtg-rise 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;\n}\n.vtg-navbtn {\n width: 30px; height: 30px; flex: none; display: grid; place-items: center;\n border-radius: 9px; border: 1px solid transparent; background: transparent;\n color: var(--vtg-muted); cursor: pointer; padding: 0;\n transition: background 0.15s, color 0.15s, border-color 0.15s;\n}\n.vtg-navbtn:hover { background: rgba(132, 170, 230, 0.14); color: var(--vtg-text); border-color: var(--vtg-line); }\n.vtg-navbtn:active { background: rgba(91, 155, 255, 0.26); }\n.vtg-navbtn svg { width: 16px; height: 16px; display: block; }\n.vtg-navbtn-text { width: auto; min-width: 30px; padding: 0 8px; font: 700 11px var(--vtg-mono); letter-spacing: 0.03em; }\n.vtg-navbtn.vtg-on { background: var(--vtg-accent); border-color: var(--vtg-accent); color: #07101f; }\n.vtg-navbtn.vtg-on:hover { background: var(--vtg-accent); color: #07101f; }\n.vtg-nav-sep { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--vtg-line); }\n\n.vtg-compass {\n position: relative; width: 34px; height: 34px; flex: none; border-radius: 50%;\n border: 1px solid var(--vtg-line); background: rgba(20, 28, 40, 0.5);\n cursor: pointer; display: grid; place-items: center;\n transition: border-color 0.16s, background 0.16s;\n}\n.vtg-compass:hover { border-color: rgba(132, 170, 230, 0.5); background: rgba(30, 42, 60, 0.6); }\n.vtg-compass svg { width: 30px; height: 30px; }\n.vtg-compass .vtg-n { fill: #ff6a6a; }\n.vtg-compass .vtg-s { fill: #c2d2ee; }\n.vtg-compass .vtg-cn { fill: var(--vtg-dim); font: 700 6px var(--vtg-sans); }\n\n.vtg-coords {\n display: flex; align-items: center; gap: 8px; padding: 0 10px 0 6px;\n font: 11px var(--vtg-mono); color: var(--vtg-muted); font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n.vtg-coords b { color: var(--vtg-dim); font-weight: 600; margin-right: 1px; }\n\n/* --- cave-view depth gauge ------------------------------------------------- */\n.vtg-depth {\n position: absolute; left: 16px; top: 50%; transform: translateY(-50%);\n display: flex; flex-direction: column; align-items: center; gap: 8px;\n padding: 10px 8px; width: 58px;\n animation: vtg-rise-y 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;\n}\n.vtg-depth-val {\n font: 11px var(--vtg-mono); color: var(--vtg-text); font-variant-numeric: tabular-nums;\n display: flex; flex-direction: column; align-items: center; line-height: 1.3;\n}\n.vtg-depth-val b { color: var(--vtg-dim); font-weight: 600; font-size: 9px; letter-spacing: 0.08em; }\n/* The interactive rail: the thumb and landmark labels hang outside the track,\n so the rail stays unclipped while the track clips its own paint. */\n.vtg-depth-rail {\n position: relative; width: 14px; height: min(320px, 38vh);\n cursor: ns-resize; touch-action: none;\n}\n.vtg-depth-rail:focus-visible { outline: 2px solid var(--vtg-accent); outline-offset: 4px; border-radius: 7px; }\n.vtg-depth-track {\n position: absolute; inset: 0; border-radius: 7px; overflow: hidden; pointer-events: none;\n /* A core sample: sky, grass, stone, deepslate, bedrock. */\n background: linear-gradient(180deg, #6f9bce 0%, #6e9150 12%, #6e6f74 48%, #3e424b 76%, #16181d 100%);\n border: 1px solid var(--vtg-line);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);\n}\n/* The stratum the slice removed: struck through with hazard stripes. */\n.vtg-depth-cut {\n position: absolute; inset: 0 0 auto 0;\n background: repeating-linear-gradient(-45deg, rgba(10, 13, 19, 0.75) 0 4px, rgba(24, 30, 42, 0.55) 4px 8px);\n}\n.vtg-depth-thumb {\n position: absolute; left: -3px; right: -3px; height: 0; pointer-events: none;\n}\n.vtg-depth-thumb::before {\n content: ''; position: absolute; left: 0; right: 0; top: -1.5px; height: 3px;\n background: var(--vtg-accent); border-radius: 2px;\n box-shadow: 0 0 6px rgba(91, 155, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.vtg-depth-mark {\n position: absolute; left: 0; right: 0; height: 0; pointer-events: none;\n}\n.vtg-depth-mark i { position: absolute; left: -4px; width: 4px; top: -0.5px; height: 1px; background: rgba(230, 238, 251, 0.55); }\n.vtg-depth-mark span {\n position: absolute; left: 17px; top: -5px; font: 9px var(--vtg-mono); color: var(--vtg-dim);\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);\n}\n.vtg-depth-close {\n width: 24px; height: 24px; flex: none; display: grid; place-items: center;\n border-radius: 7px; border: 1px solid transparent; background: transparent;\n color: var(--vtg-muted); cursor: pointer; padding: 0;\n transition: background 0.15s, color 0.15s, border-color 0.15s;\n}\n.vtg-depth-close:hover { background: rgba(132, 170, 230, 0.14); color: var(--vtg-text); border-color: var(--vtg-line); }\n.vtg-depth-close svg { width: 13px; height: 13px; display: block; }\n@keyframes vtg-rise-y { from { opacity: 0; transform: translate(-8px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }\n\n/* --- centre reticle (navigation reference) -------------------------------- */\n.vtg-reticle {\n position: absolute; left: 50%; top: 50%; width: 30px; height: 30px;\n transform: translate(-50%, -50%); pointer-events: none; z-index: 4;\n}\n.vtg-ret-ring {\n position: absolute; inset: 0; border-radius: 50%;\n border: 1.5px solid rgba(180, 205, 240, 0.28); transform: scale(0.62);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);\n transition: border-color 0.2s ease, transform 0.2s ease;\n}\n.vtg-ret-dot {\n position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px;\n border-radius: 50%; background: rgba(238, 244, 255, 0.85);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 0, 0, 0.55);\n transition: background 0.2s ease;\n}\n.vtg-reticle-on .vtg-ret-ring { border-color: rgba(143, 182, 232, 0.85); transform: scale(1); }\n.vtg-reticle-on .vtg-ret-dot { background: #fff; }\n\n@keyframes vtg-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }\n.vtg-nav { animation-name: vtg-rise-x; }\n@keyframes vtg-rise-x { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }\n";
|
|
157
174
|
/** Inject the component stylesheet once. No-op on the server or after the first call. */
|
|
158
175
|
declare function injectStyles(): void;
|
|
159
176
|
|
|
160
|
-
export { BiomeEntry, BiomeLayer, type BiomeLayerProps, CSS, DisplaySettings, LightPanel, type LightPanelProps, LightSettings, MapNav, type MapNavProps, Panel, type PanelProps, QUALITY_PRESETS, type QualityPreset, Reticle, type ReticleProps, SettingsPanel, type SettingsPanelProps, StreamingSettings, TextureSource, TileInfo, TileSource, type VantageContextValue, VantageViewer$1 as VantageEngine, type VantageStatus, VantageViewer, type VantageViewerProps, ViewMode, injectStyles, useVantage };
|
|
177
|
+
export { BiomeEntry, BiomeLayer, type BiomeLayerProps, CSS, DepthSlider, type DepthSliderProps, DisplaySettings, LightPanel, type LightPanelProps, LightSettings, MapNav, type MapNavProps, Panel, type PanelProps, QUALITY_PRESETS, type QualityPreset, Reticle, type ReticleProps, SettingsPanel, type SettingsPanelProps, StreamingSettings, TextureSource, TileInfo, TileSource, type VantageContextValue, VantageViewer$1 as VantageEngine, type VantageStatus, VantageViewer, type VantageViewerProps, ViewMode, injectStyles, useVantage };
|