@thoughts-on-things/vantage-mc 0.13.0 → 0.15.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/dist/{biome-RR-ydR2j.d.ts → biome-BC7FNc1u.d.ts} +30 -5
- package/dist/{chunk-CAQDMI2B.js → chunk-JBJT4HFR.js} +76 -27
- package/dist/{chunk-KGHALEXY.js → chunk-VKGUSZLE.js} +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +3 -3
- package/dist/three/index.d.ts +3 -3
- package/dist/three/index.js +2 -2
- package/dist/{viewer-CXujqMxK.d.ts → viewer-BH4shV-8.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -473,6 +473,23 @@ declare function resolveManifestPath(indexPath: string, manifest: string): strin
|
|
|
473
473
|
/** Pick the dimension a viewer should open: the requested slug when it exists,
|
|
474
474
|
* else the overworld, else the first with any tiles, else the first listed. */
|
|
475
475
|
declare function pickDimension(index: WorldIndex, slug?: string | null): WorldDimension;
|
|
476
|
+
/**
|
|
477
|
+
* The `/v1/worlds` document as a world index.
|
|
478
|
+
*
|
|
479
|
+
* A protocol connection can carry more than one world — a host that fronts a
|
|
480
|
+
* sidecar per dimension lists all three — and a client that already switches
|
|
481
|
+
* between a render's dimensions should switch between those the same way. Each
|
|
482
|
+
* descriptor may carry the same `dimension` block its manifest does; without
|
|
483
|
+
* one, the world id is all there is to show.
|
|
484
|
+
*
|
|
485
|
+
* Manifest paths are derived from the id rather than read from the descriptor's
|
|
486
|
+
* own `manifest` field, so every path this index yields is provably inside the
|
|
487
|
+
* connection's `/v1/worlds/` prefix — a hostile world list cannot walk a
|
|
488
|
+
* credentialed fetch somewhere else.
|
|
489
|
+
*
|
|
490
|
+
* @throws if the shape is not a world list this decoder understands.
|
|
491
|
+
*/
|
|
492
|
+
declare function parseServerWorlds(data: unknown): WorldIndex;
|
|
476
493
|
|
|
477
494
|
/** Fetch one file of a world render by its manifest-relative path (e.g.
|
|
478
495
|
* `tiles/t.0.0.vtile`). Reject with an `AbortError`-named error if `signal`
|
|
@@ -516,7 +533,8 @@ interface HttpWorldOptions {
|
|
|
516
533
|
label?: string;
|
|
517
534
|
}
|
|
518
535
|
interface VantageServerOptions extends Omit<HttpWorldOptions, 'base'> {
|
|
519
|
-
/**
|
|
536
|
+
/** Open one named world instead of everything the connection carries. The
|
|
537
|
+
* v1 sidecar exposes `default`. */
|
|
520
538
|
worldId?: string;
|
|
521
539
|
}
|
|
522
540
|
/** A world served over HTTP: fetches `manifest.json` at `url` and resolves
|
|
@@ -527,9 +545,16 @@ declare function worldFromUrl(url: string, base?: string): Promise<WorldSource>;
|
|
|
527
545
|
* Manifest-owned paths are confined to the manifest directory before any
|
|
528
546
|
* credential is attached. */
|
|
529
547
|
declare function worldFromHttp(url: string, options?: HttpWorldOptions): Promise<WorldSource>;
|
|
530
|
-
/**
|
|
531
|
-
*
|
|
532
|
-
*
|
|
548
|
+
/**
|
|
549
|
+
* Connect to the Vantage server protocol v1. This is the direct-server path for
|
|
550
|
+
* launchers; a host with its own player sessions can use {@link worldFromHttp}
|
|
551
|
+
* with a session-gated manifest URL instead.
|
|
552
|
+
*
|
|
553
|
+
* Without a `worldId`, the connection opens as everything it carries: the
|
|
554
|
+
* world list becomes a world index, so a host fronting one sidecar per
|
|
555
|
+
* dimension arrives as one map with a dimension switcher rather than as three
|
|
556
|
+
* addresses to add by hand. Naming a `worldId` opens that world alone.
|
|
557
|
+
*/
|
|
533
558
|
declare function worldFromVantageServer(endpoint: string, options?: VantageServerOptions): Promise<WorldSource>;
|
|
534
559
|
/**
|
|
535
560
|
* One dimension of a multi-dimension render, as its own world source.
|
|
@@ -597,4 +622,4 @@ declare function summarizeSurfaceBiomes(surface: SurfaceMap, names: string[], pa
|
|
|
597
622
|
*/
|
|
598
623
|
declare function summarizeBiomes(tile: DecodedTile, palette?: Rgb[]): BiomeEntry[];
|
|
599
624
|
|
|
600
|
-
export {
|
|
625
|
+
export { worldFromUrl as $, parseTileQuantized as A, type BiomeEntry as B, parseWorldIndex as C, type DecodedTile as D, pickDimension as E, resolveManifestPath as F, samePlayers as G, type HttpWorldOptions as H, stripNamespace as I, summarizeBiomes as J, summarizeSurfaceBiomes as K, type Lightmap as L, type ManifestAtmosphere as M, NO_PLAYERS as N, tileKey as O, type PlayerSnapshot as P, type QuantizedTile as Q, type Rgb as R, type SurfaceMap as S, TEXTURE_MAGIC as T, UV_SCALE as U, type VantageServerOptions as V, type WorldConditionalFetch as W, worldFromDirectory as X, worldFromFiles as Y, worldFromHttp as Z, worldFromIndexEntry as _, type DecodedTextureArray as a, worldFromVantageServer as a0, wrapDegrees as a1, ByteReader as b, type LowresLevel as c, type ManifestDimension as d, type ManifestTile as e, type MeshSection as f, type PlayerState as g, type QuantizedSection as h, TILE_MAGIC as i, type TextureAnimation as j, type TileMagic as k, type WorldDimension as l, type WorldFetch as m, type WorldHttpFetch as n, type WorldIndex as o, type WorldManifest as p, type WorldSource as q, angleDelta as r, biomePalette as s, canonicalQuadIndices as t, isWorldIndex as u, parseManifest as v, parsePlayers as w, parseServerWorlds as x, parseTextureArray as y, parseTile as z };
|
|
@@ -817,6 +817,41 @@ function pickDimension(index, slug) {
|
|
|
817
817
|
}
|
|
818
818
|
return dims.find((d) => d.kind === "overworld") ?? dims.find((d) => d.tiles > 0) ?? dims[0];
|
|
819
819
|
}
|
|
820
|
+
function isServerWorldId(id) {
|
|
821
|
+
return /^[A-Za-z0-9_-]{1,64}$/.test(id);
|
|
822
|
+
}
|
|
823
|
+
function parseServerWorlds(data) {
|
|
824
|
+
if (typeof data !== "object" || data === null) throw new Error("vantage: server world list is not an object");
|
|
825
|
+
const list = data["worlds"];
|
|
826
|
+
if (!Array.isArray(list) || list.length === 0) throw new Error("vantage: server listed no worlds");
|
|
827
|
+
const worldIds = /* @__PURE__ */ new Set();
|
|
828
|
+
const slugs = /* @__PURE__ */ new Set();
|
|
829
|
+
const dimensions = list.map((entry, i) => {
|
|
830
|
+
const o = typeof entry === "object" && entry !== null ? entry : {};
|
|
831
|
+
const worldId = o["id"];
|
|
832
|
+
if (typeof worldId !== "string" || !isServerWorldId(worldId)) {
|
|
833
|
+
throw new Error(`vantage: server world ${i} has an invalid id`);
|
|
834
|
+
}
|
|
835
|
+
const dim = typeof o["dimension"] === "object" && o["dimension"] !== null ? o["dimension"] : {};
|
|
836
|
+
const advertisedSlug = dim["slug"];
|
|
837
|
+
const slug = typeof advertisedSlug === "string" && SLUG_RE2.test(advertisedSlug) ? advertisedSlug : worldId.toLowerCase();
|
|
838
|
+
if (worldIds.has(worldId) || slugs.has(slug)) {
|
|
839
|
+
throw new Error(`vantage: server world ${i} has a duplicate id or slug`);
|
|
840
|
+
}
|
|
841
|
+
worldIds.add(worldId);
|
|
842
|
+
slugs.add(slug);
|
|
843
|
+
return {
|
|
844
|
+
id: typeof dim["id"] === "string" ? dim["id"] : worldId,
|
|
845
|
+
slug,
|
|
846
|
+
label: typeof dim["label"] === "string" ? dim["label"] : worldId,
|
|
847
|
+
kind: dim["kind"],
|
|
848
|
+
manifest: `${worldId}/manifest.json`,
|
|
849
|
+
tiles: 0,
|
|
850
|
+
bytes: 0
|
|
851
|
+
};
|
|
852
|
+
});
|
|
853
|
+
return parseWorldIndex({ format: 1, dimensions });
|
|
854
|
+
}
|
|
820
855
|
|
|
821
856
|
// src/core/source.ts
|
|
822
857
|
function throwIfAborted(signal) {
|
|
@@ -840,18 +875,23 @@ async function worldFromUrl(url, base) {
|
|
|
840
875
|
return worldFromHttp(url, { base });
|
|
841
876
|
}
|
|
842
877
|
async function worldFromHttp(url, options = {}) {
|
|
843
|
-
const
|
|
878
|
+
const manifestUrl = new URL(
|
|
844
879
|
url,
|
|
845
880
|
options.base ?? (typeof document !== "undefined" ? document.baseURI : void 0)
|
|
846
|
-
)
|
|
847
|
-
const manifestUrl = new URL(abs);
|
|
881
|
+
);
|
|
848
882
|
if (manifestUrl.protocol !== "http:" && manifestUrl.protocol !== "https:") {
|
|
849
883
|
throw new Error(`vantage: HTTP world requires an http(s) manifest URL`);
|
|
850
884
|
}
|
|
851
885
|
if (manifestUrl.username || manifestUrl.password) {
|
|
852
886
|
throw new Error(`vantage: HTTP world credentials belong in headers, not the manifest URL`);
|
|
853
887
|
}
|
|
854
|
-
const
|
|
888
|
+
const abs = manifestUrl.toString();
|
|
889
|
+
const { request, source } = httpTransport(new URL(".", manifestUrl), options);
|
|
890
|
+
const res = await request(abs);
|
|
891
|
+
if (!res.ok) throw new Error(`${res.status} ${res.statusText} for ${abs}`);
|
|
892
|
+
return { manifest: await res.json(), label: options.label ?? abs, ...source };
|
|
893
|
+
}
|
|
894
|
+
function httpTransport(root, options) {
|
|
855
895
|
const http = options.fetch ?? ((input, init) => fetch(input, init));
|
|
856
896
|
const headers = {};
|
|
857
897
|
for (const [name, value] of Object.entries(options.headers ?? {})) headers[name.toLowerCase()] = value;
|
|
@@ -867,31 +907,27 @@ async function worldFromHttp(url, options = {}) {
|
|
|
867
907
|
}
|
|
868
908
|
return targetUrl.toString();
|
|
869
909
|
};
|
|
870
|
-
const res = await request(abs);
|
|
871
|
-
if (!res.ok) throw new Error(`${res.status} ${res.statusText} for ${abs}`);
|
|
872
|
-
const manifest = await res.json();
|
|
873
910
|
return {
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
911
|
+
request,
|
|
912
|
+
source: {
|
|
913
|
+
fetch: async (path, signal) => {
|
|
914
|
+
const target = resolveTarget(path);
|
|
915
|
+
const r = await request(target, signal);
|
|
916
|
+
if (!r.ok) throw new Error(`${r.status} ${r.statusText} for ${target}`);
|
|
917
|
+
return r.arrayBuffer();
|
|
918
|
+
},
|
|
919
|
+
fetchConditional: async (path, etag, signal) => {
|
|
920
|
+
const target = resolveTarget(path);
|
|
921
|
+
const r = await request(target, signal, etag ? { "if-none-match": etag } : void 0);
|
|
922
|
+
if (r.status === 304) return "unchanged";
|
|
923
|
+
if (!r.ok) throw new Error(`${r.status} ${r.statusText} for ${target}`);
|
|
924
|
+
const next = r.headers.get("etag");
|
|
925
|
+
return { buffer: await r.arrayBuffer(), ...next ? { etag: next } : {} };
|
|
926
|
+
}
|
|
889
927
|
}
|
|
890
928
|
};
|
|
891
929
|
}
|
|
892
930
|
function worldFromVantageServer(endpoint, options = {}) {
|
|
893
|
-
const worldId = options.worldId ?? "default";
|
|
894
|
-
if (!/^[A-Za-z0-9_-]{1,64}$/.test(worldId)) throw new Error(`vantage: invalid server world id`);
|
|
895
931
|
const base = new URL(endpoint);
|
|
896
932
|
if (base.protocol !== "http:" && base.protocol !== "https:") {
|
|
897
933
|
throw new Error(`vantage: server endpoint must use http(s)`);
|
|
@@ -902,8 +938,21 @@ function worldFromVantageServer(endpoint, options = {}) {
|
|
|
902
938
|
base.pathname = base.pathname.endsWith("/") ? base.pathname : `${base.pathname}/`;
|
|
903
939
|
base.search = "";
|
|
904
940
|
base.hash = "";
|
|
905
|
-
const
|
|
906
|
-
return
|
|
941
|
+
const worlds = new URL("v1/worlds/", base);
|
|
942
|
+
if (options.worldId === void 0) return worldListSource(worlds, options);
|
|
943
|
+
if (!isServerWorldId(options.worldId)) throw new Error(`vantage: invalid server world id`);
|
|
944
|
+
return worldFromHttp(new URL(`${options.worldId}/manifest.json`, worlds).toString(), options);
|
|
945
|
+
}
|
|
946
|
+
async function worldListSource(worlds, options) {
|
|
947
|
+
const { request, source } = httpTransport(worlds, options);
|
|
948
|
+
const listUrl = worlds.toString().slice(0, -1);
|
|
949
|
+
const res = await request(listUrl);
|
|
950
|
+
if (!res.ok) throw new Error(`${res.status} ${res.statusText} for ${listUrl}`);
|
|
951
|
+
return {
|
|
952
|
+
manifest: parseServerWorlds(await res.json()),
|
|
953
|
+
label: options.label ?? worlds.toString(),
|
|
954
|
+
...source
|
|
955
|
+
};
|
|
907
956
|
}
|
|
908
957
|
async function worldFromIndexEntry(source, manifestPath) {
|
|
909
958
|
const slash = manifestPath.lastIndexOf("/");
|
|
@@ -1103,4 +1152,4 @@ function summarizeBiomes(tile, palette) {
|
|
|
1103
1152
|
return toEntries(counts, names, pal);
|
|
1104
1153
|
}
|
|
1105
1154
|
|
|
1106
|
-
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, NO_PLAYERS, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, angleDelta, biomePalette, canonicalQuadIndices, isGzip, isWorldIndex, maybeInflate, parseLowresTile, parseManifest, parsePlayers, parseTextureArray, parseTile, parseTileQuantized, parseWorldIndex, pickDimension, resolveManifestPath, samePlayers, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromHttp, worldFromIndexEntry, worldFromUrl, worldFromVantageServer, wrapDegrees };
|
|
1155
|
+
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, NO_PLAYERS, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, angleDelta, biomePalette, canonicalQuadIndices, isGzip, isWorldIndex, maybeInflate, parseLowresTile, parseManifest, parsePlayers, parseServerWorlds, parseTextureArray, parseTile, parseTileQuantized, parseWorldIndex, pickDimension, resolveManifestPath, samePlayers, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromHttp, worldFromIndexEntry, worldFromUrl, worldFromVantageServer, wrapDegrees };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { biomePalette, LOWRES_EMPTY, tileKey, parseLowresTile, maybeInflate, parseTileQuantized, summarizeSurfaceBiomes, parseTile, summarizeBiomes, angleDelta, NO_PLAYERS, worldFromUrl, isWorldIndex, parseWorldIndex, pickDimension, worldFromIndexEntry, parseManifest, parseTextureArray, parsePlayers, samePlayers } from './chunk-
|
|
1
|
+
import { biomePalette, LOWRES_EMPTY, tileKey, parseLowresTile, maybeInflate, parseTileQuantized, summarizeSurfaceBiomes, parseTile, summarizeBiomes, angleDelta, NO_PLAYERS, worldFromUrl, isWorldIndex, parseWorldIndex, pickDimension, worldFromIndexEntry, parseManifest, parseTextureArray, parsePlayers, samePlayers } from './chunk-JBJT4HFR.js';
|
|
2
2
|
import * as THREE2 from 'three';
|
|
3
3
|
|
|
4
4
|
var SKY_TOP = [0.3, 0.52, 0.84];
|
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, H as HttpWorldOptions, L as Lightmap, c as LowresLevel, M as ManifestAtmosphere, d as ManifestDimension, e as ManifestTile, f as MeshSection, N as NO_PLAYERS, P as PlayerSnapshot, g as PlayerState, h as QuantizedSection, Q as QuantizedTile, R as Rgb, S as SurfaceMap, T as TEXTURE_MAGIC, i as TILE_MAGIC, j as TextureAnimation, k as TileMagic, U as UV_SCALE, V as VantageServerOptions, W as WorldConditionalFetch, l as WorldDimension, m as WorldFetch, n as WorldHttpFetch, o as WorldIndex, p as WorldManifest, q as WorldSource, r as angleDelta, s as biomePalette, t as canonicalQuadIndices, u as isWorldIndex, v as parseManifest, w as parsePlayers, x as
|
|
1
|
+
export { B as BiomeEntry, b as ByteReader, a as DecodedTextureArray, D as DecodedTile, H as HttpWorldOptions, L as Lightmap, c as LowresLevel, M as ManifestAtmosphere, d as ManifestDimension, e as ManifestTile, f as MeshSection, N as NO_PLAYERS, P as PlayerSnapshot, g as PlayerState, h as QuantizedSection, Q as QuantizedTile, R as Rgb, S as SurfaceMap, T as TEXTURE_MAGIC, i as TILE_MAGIC, j as TextureAnimation, k as TileMagic, U as UV_SCALE, V as VantageServerOptions, W as WorldConditionalFetch, l as WorldDimension, m as WorldFetch, n as WorldHttpFetch, o as WorldIndex, p as WorldManifest, q as WorldSource, r as angleDelta, s as biomePalette, t as canonicalQuadIndices, u as isWorldIndex, v as parseManifest, w as parsePlayers, x as parseServerWorlds, y as parseTextureArray, z as parseTile, A as parseTileQuantized, C as parseWorldIndex, E as pickDimension, F as resolveManifestPath, G as samePlayers, I as stripNamespace, J as summarizeBiomes, K as summarizeSurfaceBiomes, O as tileKey, X as worldFromDirectory, Y as worldFromFiles, Z as worldFromHttp, _ as worldFromIndexEntry, $ as worldFromUrl, a0 as worldFromVantageServer, a1 as wrapDegrees } from '../biome-BC7FNc1u.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, NO_PLAYERS, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, angleDelta, biomePalette, canonicalQuadIndices, isGzip, isWorldIndex, maybeInflate, parseLowresTile, parseManifest, parsePlayers, parseTextureArray, parseTile, parseTileQuantized, parseWorldIndex, pickDimension, resolveManifestPath, samePlayers, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromHttp, worldFromIndexEntry, worldFromUrl, worldFromVantageServer, wrapDegrees } from '../chunk-
|
|
1
|
+
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, NO_PLAYERS, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, angleDelta, biomePalette, canonicalQuadIndices, isGzip, isWorldIndex, maybeInflate, parseLowresTile, parseManifest, parsePlayers, parseServerWorlds, parseTextureArray, parseTile, parseTileQuantized, parseWorldIndex, pickDimension, resolveManifestPath, samePlayers, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromHttp, worldFromIndexEntry, worldFromUrl, worldFromVantageServer, wrapDegrees } from '../chunk-JBJT4HFR.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 { q as WorldSource, B as BiomeEntry, l as WorldDimension } from '../biome-
|
|
4
|
-
export { D as DecodedTile, o as WorldIndex } from '../biome-
|
|
5
|
-
import { k as TileSource, T as TextureSource, S as StreamingSettings, o as ViewMode, L as LightSettings, a as DisplaySettings, e as PlayerOptions, h as TileInfo, m as VantageViewer$1 } from '../viewer-
|
|
6
|
-
export { D as DEFAULT_ORBIT_ANGLE, f as PlayerSettings, g as PlayerView, V as VANILLA_DISPLAY } from '../viewer-
|
|
3
|
+
import { q as WorldSource, B as BiomeEntry, l as WorldDimension } from '../biome-BC7FNc1u.js';
|
|
4
|
+
export { D as DecodedTile, o as WorldIndex } from '../biome-BC7FNc1u.js';
|
|
5
|
+
import { k as TileSource, T as TextureSource, S as StreamingSettings, o as ViewMode, L as LightSettings, a as DisplaySettings, e as PlayerOptions, h as TileInfo, m as VantageViewer$1 } from '../viewer-BH4shV-8.js';
|
|
6
|
+
export { D as DEFAULT_ORBIT_ANGLE, f as PlayerSettings, g as PlayerView, V as VANILLA_DISPLAY } from '../viewer-BH4shV-8.js';
|
|
7
7
|
import 'three';
|
|
8
8
|
|
|
9
9
|
interface VantageViewerProps {
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { VantageViewer, DEFAULT_ORBIT_ANGLE } from '../chunk-
|
|
2
|
-
export { DEFAULT_ORBIT_ANGLE, VANILLA_DISPLAY } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { VantageViewer, DEFAULT_ORBIT_ANGLE } from '../chunk-VKGUSZLE.js';
|
|
2
|
+
export { DEFAULT_ORBIT_ANGLE, VANILLA_DISPLAY } from '../chunk-VKGUSZLE.js';
|
|
3
|
+
import '../chunk-JBJT4HFR.js';
|
|
4
4
|
import { createContext, forwardRef, useRef, useState, useImperativeHandle, useEffect, useMemo, useContext } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
|
package/dist/three/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { R as Rgb, Q as QuantizedTile, D as DecodedTile, a as DecodedTextureArray, S as SurfaceMap } from '../biome-
|
|
3
|
-
export { B as BiomeEntry, b as ByteReader, H as HttpWorldOptions, L as Lightmap, c as LowresLevel, M as ManifestAtmosphere, d as ManifestDimension, e as ManifestTile, f as MeshSection, N as NO_PLAYERS, P as PlayerSnapshot, g as PlayerState, h as QuantizedSection, T as TEXTURE_MAGIC, i as TILE_MAGIC, j as TextureAnimation, k as TileMagic, U as UV_SCALE, V as VantageServerOptions, W as WorldConditionalFetch, l as WorldDimension, m as WorldFetch, n as WorldHttpFetch, o as WorldIndex, p as WorldManifest, q as WorldSource, r as angleDelta, s as biomePalette, t as canonicalQuadIndices, u as isWorldIndex, v as parseManifest, w as parsePlayers, x as
|
|
2
|
+
import { R as Rgb, Q as QuantizedTile, D as DecodedTile, a as DecodedTextureArray, S as SurfaceMap } from '../biome-BC7FNc1u.js';
|
|
3
|
+
export { B as BiomeEntry, b as ByteReader, H as HttpWorldOptions, L as Lightmap, c as LowresLevel, M as ManifestAtmosphere, d as ManifestDimension, e as ManifestTile, f as MeshSection, N as NO_PLAYERS, P as PlayerSnapshot, g as PlayerState, h as QuantizedSection, T as TEXTURE_MAGIC, i as TILE_MAGIC, j as TextureAnimation, k as TileMagic, U as UV_SCALE, V as VantageServerOptions, W as WorldConditionalFetch, l as WorldDimension, m as WorldFetch, n as WorldHttpFetch, o as WorldIndex, p as WorldManifest, q as WorldSource, r as angleDelta, s as biomePalette, t as canonicalQuadIndices, u as isWorldIndex, v as parseManifest, w as parsePlayers, x as parseServerWorlds, y as parseTextureArray, z as parseTile, A as parseTileQuantized, C as parseWorldIndex, E as pickDimension, F as resolveManifestPath, G as samePlayers, I as stripNamespace, J as summarizeBiomes, K as summarizeSurfaceBiomes, O as tileKey, X as worldFromDirectory, Y as worldFromFiles, Z as worldFromHttp, _ as worldFromIndexEntry, $ as worldFromUrl, a0 as worldFromVantageServer, a1 as wrapDegrees } from '../biome-BC7FNc1u.js';
|
|
4
4
|
import { LowresTile } from '../core/index.js';
|
|
5
5
|
export { LOWRES_EMPTY, LOWRES_MAGIC, isGzip, maybeInflate, parseLowresTile } from '../core/index.js';
|
|
6
|
-
export { D as DEFAULT_ORBIT_ANGLE, a as DisplaySettings, H as HeightSampler, L as LightSettings, b as LoadOptions, M as MapControls, c as MapControlsOptions, P as PlayerLayer, d as PlayerLayerOptions, e as PlayerOptions, f as PlayerSettings, g as PlayerView, S as StreamingSettings, T as TextureSource, h as TileInfo, i as TileManager, j as TileManagerOptions, k as TileSource, l as TileStats, V as VANILLA_DISPLAY, m as VantageViewer, n as VantageViewerOptions, o as ViewMode } from '../viewer-
|
|
6
|
+
export { D as DEFAULT_ORBIT_ANGLE, a as DisplaySettings, H as HeightSampler, L as LightSettings, b as LoadOptions, M as MapControls, c as MapControlsOptions, P as PlayerLayer, d as PlayerLayerOptions, e as PlayerOptions, f as PlayerSettings, g as PlayerView, S as StreamingSettings, T as TextureSource, h as TileInfo, i as TileManager, j as TileManagerOptions, k as TileSource, l as TileStats, V as VANILLA_DISPLAY, m as VantageViewer, n as VantageViewerOptions, o as ViewMode } from '../viewer-BH4shV-8.js';
|
|
7
7
|
|
|
8
8
|
/** The objects and metadata produced from a tile. */
|
|
9
9
|
interface TerrainObjects {
|
package/dist/three/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DEFAULT_ORBIT_ANGLE, MapControls, PlayerLayer, SKIN_SIZE, SKY_HORIZON, SKY_TOP, TileManager, VANILLA_DISPLAY, VantageViewer, applyCaveRange, boxFaces, buildLowresMesh, buildQuantizedTileMeshes, buildTerrain, buildTileMeshes, createLowresMaterial, createSky, createTerrainMaterial, createWaterMaterial, defaultSkinCanvas, hashId, headIconCanvas, normalizeSkin, pickBiome, setSkyColors } from '../chunk-
|
|
2
|
-
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, NO_PLAYERS, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, angleDelta, biomePalette, canonicalQuadIndices, isGzip, isWorldIndex, maybeInflate, parseLowresTile, parseManifest, parsePlayers, parseTextureArray, parseTile, parseTileQuantized, parseWorldIndex, pickDimension, resolveManifestPath, samePlayers, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromHttp, worldFromIndexEntry, worldFromUrl, worldFromVantageServer, wrapDegrees } from '../chunk-
|
|
1
|
+
export { DEFAULT_ORBIT_ANGLE, MapControls, PlayerLayer, SKIN_SIZE, SKY_HORIZON, SKY_TOP, TileManager, VANILLA_DISPLAY, VantageViewer, applyCaveRange, boxFaces, buildLowresMesh, buildQuantizedTileMeshes, buildTerrain, buildTileMeshes, createLowresMaterial, createSky, createTerrainMaterial, createWaterMaterial, defaultSkinCanvas, hashId, headIconCanvas, normalizeSkin, pickBiome, setSkyColors } from '../chunk-VKGUSZLE.js';
|
|
2
|
+
export { ByteReader, LOWRES_EMPTY, LOWRES_MAGIC, NO_PLAYERS, TEXTURE_MAGIC, TILE_MAGIC, UV_SCALE, angleDelta, biomePalette, canonicalQuadIndices, isGzip, isWorldIndex, maybeInflate, parseLowresTile, parseManifest, parsePlayers, parseServerWorlds, parseTextureArray, parseTile, parseTileQuantized, parseWorldIndex, pickDimension, resolveManifestPath, samePlayers, stripNamespace, summarizeBiomes, summarizeSurfaceBiomes, tileKey, worldFromDirectory, worldFromFiles, worldFromHttp, worldFromIndexEntry, worldFromUrl, worldFromVantageServer, wrapDegrees } from '../chunk-JBJT4HFR.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { p as WorldManifest, m as WorldFetch, R as Rgb, e as ManifestTile, c as LowresLevel, B as BiomeEntry, g as PlayerState, P as PlayerSnapshot, a as DecodedTextureArray, D as DecodedTile, q as WorldSource, l as WorldDimension } from './biome-
|
|
2
|
+
import { p as WorldManifest, m as WorldFetch, R as Rgb, e as ManifestTile, c as LowresLevel, B as BiomeEntry, g as PlayerState, P as PlayerSnapshot, a as DecodedTextureArray, D as DecodedTile, q as WorldSource, l as WorldDimension } from './biome-BC7FNc1u.js';
|
|
3
3
|
|
|
4
4
|
interface TileManagerOptions {
|
|
5
5
|
manifest: WorldManifest;
|
package/package.json
CHANGED