@thoughts-on-things/vantage-mc 0.7.0 → 0.9.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 +7 -1
- package/dist/{biome-CelByWgf.d.ts → biome-B6l-1yx4.d.ts} +15 -3
- package/dist/{chunk-F5RGBOVF.js → chunk-E7Y7K6NH.js} +919 -36
- package/dist/{chunk-QQJHRHBC.js → chunk-LZCXJU4U.js} +32 -13
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/react/index.d.ts +9 -7
- package/dist/react/index.js +18 -15
- package/dist/three/index.d.ts +8 -4
- package/dist/three/index.js +2 -2
- package/dist/{viewer-DYu-AUUt.d.ts → viewer-BgXAqYhr.d.ts} +121 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -55,7 +55,13 @@ applied live (`viewer.setStreaming` re-plans in place, no reload). Or set the
|
|
|
55
55
|
ring up-front with
|
|
56
56
|
`streaming={{ viewDistance: 1024, maxTiles: 128, maxBytes: 512 * 1024 * 1024 }}`.
|
|
57
57
|
`maxTiles` is a count guard; `maxBytes` is the stronger residency limit for
|
|
58
|
-
worlds whose tile complexity varies widely.
|
|
58
|
+
worlds whose tile complexity varies widely. When a budget cuts the ring short,
|
|
59
|
+
admission stays a contiguous nearest-first disc and the fog wall hugs the real
|
|
60
|
+
frontier, so limits read as distance haze rather than missing tiles. Evicted
|
|
61
|
+
tiles also keep their compressed payloads in a client-side cache
|
|
62
|
+
(`tileCacheBytes`, default 192 MiB), so panning back over explored terrain
|
|
63
|
+
rebuilds instantly instead of re-fetching — on a `vantage server`, instead of
|
|
64
|
+
re-baking.
|
|
59
65
|
|
|
60
66
|
The camera also lives in the URL hash (`#@x,y,z,dist,rot,tilt`), so **every
|
|
61
67
|
view is a shareable deep link**: the hash follows the camera (debounced,
|
|
@@ -22,6 +22,11 @@ declare const TILE_MAGIC: {
|
|
|
22
22
|
/** VTL8 geometry + a losslessly packed RG8 lightmap (sky/block nibbles,
|
|
23
23
|
* full-byte AO), stored as gzip-friendly planes. */
|
|
24
24
|
readonly VTL9: "VTL9";
|
|
25
|
+
/** VTL9 + the cave partition: cave-dark quads (faces only sky-light-0,
|
|
26
|
+
* non-water cells can see) sit at the END of each lighting segment, with
|
|
27
|
+
* the boundaries in the section header — a viewer can draw a surface-only
|
|
28
|
+
* prefix while the camera is above ground. ("A" = 10.) */
|
|
29
|
+
readonly VTLA: "VTLA";
|
|
25
30
|
};
|
|
26
31
|
type TileMagic = (typeof TILE_MAGIC)[keyof typeof TILE_MAGIC];
|
|
27
32
|
/** VTL7 UV fixed-point steps per texture unit (uv = stored / UV_SCALE). */
|
|
@@ -163,6 +168,12 @@ interface QuantizedSection {
|
|
|
163
168
|
/** VTL8+: the tail's lightmap UVs in half-texel units, `2 * (vertexCount -
|
|
164
169
|
* lmStart)` values (delta coding already undone). */
|
|
165
170
|
lmuv?: Uint16Array;
|
|
171
|
+
/** VTLA+: first cave-dark vertex of the vertex-lit head `[0, lmStart)`.
|
|
172
|
+
* Vertices from here to `lmStart` face only sky-light-0 (non-water) cells —
|
|
173
|
+
* a renderer may skip them while the camera is above ground. */
|
|
174
|
+
caveStart?: number;
|
|
175
|
+
/** VTLA+: first cave-dark vertex of the atlas-lit tail `[lmStart, V)`. */
|
|
176
|
+
caveLmStart?: number;
|
|
166
177
|
}
|
|
167
178
|
/** A tile's baked light+AO atlas. VTL8 expands its planar payload to RGBA;
|
|
168
179
|
* VTL9 interleaves its packed-light/AO planes into a compact RG8 upload. */
|
|
@@ -174,9 +185,9 @@ interface Lightmap {
|
|
|
174
185
|
/** RGBA bytes when unpacked; interleaved packed-light/AO bytes otherwise. */
|
|
175
186
|
pixels: Uint8Array<ArrayBuffer>;
|
|
176
187
|
}
|
|
177
|
-
/** A VTL6/7/8/9 tile decoded without dequantization (see {@link QuantizedSection}). */
|
|
188
|
+
/** A VTL6/7/8/9/A tile decoded without dequantization (see {@link QuantizedSection}). */
|
|
178
189
|
interface QuantizedTile {
|
|
179
|
-
magic: 'VTL6' | 'VTL7' | 'VTL8' | 'VTL9';
|
|
190
|
+
magic: 'VTL6' | 'VTL7' | 'VTL8' | 'VTL9' | 'VTLA';
|
|
180
191
|
version: number;
|
|
181
192
|
solid: QuantizedSection;
|
|
182
193
|
fluid: QuantizedSection;
|
|
@@ -259,7 +270,8 @@ interface LowresLevel {
|
|
|
259
270
|
/** A parsed `manifest.json` for a tiled world render. */
|
|
260
271
|
interface WorldManifest {
|
|
261
272
|
/** Manifest schema version (1 = hires tiles only, 2 adds `lowres`,
|
|
262
|
-
* 3 = VTL7 compact tiles, 4 = lightmaps, 5 = packed RG8 lightmaps
|
|
273
|
+
* 3 = VTL7 compact tiles, 4 = lightmaps, 5 = packed RG8 lightmaps,
|
|
274
|
+
* 6 = VTLA cave-partitioned tiles). */
|
|
263
275
|
format: number;
|
|
264
276
|
/** Largest per-section vertex count across every tile (format 3+) — sizes
|
|
265
277
|
* the renderer's one shared quad index buffer before the first tile lands. */
|