@thoughts-on-things/vantage-mc 0.3.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 CHANGED
@@ -61,6 +61,25 @@ pasting a new hash into the address bar pans there live. Pass
61
61
  `urlState={false}` if your page owns its hash (e.g. a router); the plain
62
62
  engine keeps it opt-in (`new VantageViewer(el, { urlState: true })`).
63
63
 
64
+ The viewer **renders on demand**: a frame draws only when something changed —
65
+ camera motion, tiles streaming in, a setting — plus a gentle 10 fps tick while
66
+ animated textures (water, lava) are on screen, so an idle map costs ~0 GPU/CPU
67
+ instead of a render loop. Input still draws the same frame it arrives. Pass
68
+ `renderOnDemand: false` to the engine if you drive per-frame effects off its
69
+ scene, or call `viewer.invalidate()` after mutating it externally.
70
+ `viewer.screenshot()` returns the current view as a PNG data URL (`<MapNav>`
71
+ has a button for it, next to its fullscreen toggle).
72
+
73
+ Worlds baked with `vantage render --caves full` unlock the **cave view**: a
74
+ depth slice that cuts the world open at any Y — press `C`, click `<MapNav>`'s
75
+ layers button, or drag the `<DepthSlider>` gauge that appears on the left
76
+ edge. The cut peels open with an eased reveal, a warm rim outlines the
77
+ section, unexplored rock reads as a dark chunk-gridded floor, and the slice
78
+ depth rides the URL hash (`#@x,y,z,dist,rot,tilt,sliceY`) so cave finds are
79
+ shareable links. Engine API: `viewer.setSlice(y | null)`,
80
+ `viewer.toggleSlice()`, `viewer.slice`, `viewer.sliceRange`,
81
+ `viewer.hasCaves`, and a `'slice'` event.
82
+
64
83
  Format-2 manifests carry a **lowres LOD pyramid** (`.vlr` colored
65
84
  heightfields): the viewer keeps coarse rings resident far beyond the hires
66
85
  disc — level 1 also underlays it as a loading placeholder — so the whole world
@@ -173,7 +192,7 @@ returns only the fields a given version carries (`textured`, `hasBiome`, `fluid`
173
192
  `TileInfo`, `ViewMode`. Re-exports all of `core`.
174
193
 
175
194
  **`@thoughts-on-things/vantage-mc/react`** — `<VantageViewer>`, `<BiomeLayer>`, `<SettingsPanel>`,
176
- `<LightPanel>`, `<MapNav>`, `<Reticle>`, `<Panel>`, `useVantage`,
195
+ `<LightPanel>`, `<MapNav>`, `<DepthSlider>`, `<Reticle>`, `<Panel>`, `useVantage`,
177
196
  `injectStyles`, `QUALITY_PRESETS`; types `VantageViewerProps`,
178
197
  `BiomeLayerProps`, `SettingsPanelProps`, `VantageContextValue`,
179
198
  `VantageStatus`. Re-exports the engine and core types.
@@ -268,6 +268,15 @@ interface WorldManifest {
268
268
  y: number;
269
269
  z: number;
270
270
  };
271
+ /** True when the render kept full cave geometry (`--caves full`) — the
272
+ * viewer's depth-slice cave view has real caves to reveal. */
273
+ caves?: boolean;
274
+ /** World-Y extent across all tiles (min inclusive, max exclusive) — the
275
+ * bounds for the cave view's depth slider. */
276
+ yRange?: {
277
+ min: number;
278
+ max: number;
279
+ };
271
280
  /** Biome display names indexed by the per-vertex biome id (0 = no data).
272
281
  * Globally consistent across every tile of the render. */
273
282
  biomes: string[];