minerender 2.1.0-alpha.144 → 2.1.0-alpha.146
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/browser/esm/env/browser/BrowserEnv.mjs +11 -4
- package/dist/browser/esm/env/browser/BrowserEnv.mjs.map +1 -1
- package/dist/browser/esm/index.browser.d.mts +14 -2
- package/dist/browser/esm/index.browser.mjs.map +1 -1
- package/dist/browser/esm/world/SectionWorker.mjs +8 -2
- package/dist/browser/esm/world/SectionWorker.mjs.map +1 -1
- package/dist/browser/index.d.ts +14 -2
- package/dist/browser/index.js +119 -106
- package/dist/browser/index.js.map +1 -1
- package/dist/bundle.js +129 -116
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.d.mts +1 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +21 -4
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +21 -4
- package/dist/node/index.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// src/env/browser/BrowserEnv.ts
|
|
2
2
|
import { Env } from "../../Env.mjs";
|
|
3
|
+
import { logger } from "../../util/log.mjs";
|
|
3
4
|
import { BrowserCache } from "./BrowserCache.mjs";
|
|
4
5
|
import { probeImageSize } from "./probeImageSize.mjs";
|
|
6
|
+
var log = logger("BrowserEnv");
|
|
5
7
|
function lazyLocalForage(options) {
|
|
6
8
|
let instance;
|
|
7
9
|
const store = () => instance ?? (instance = import("localforage").then((module) => module.default.createInstance(options)));
|
|
@@ -17,7 +19,8 @@ function lazyLocalForage(options) {
|
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
var BrowserEnv = class {
|
|
20
|
-
constructor() {
|
|
22
|
+
constructor(options = {}) {
|
|
23
|
+
this.options = options;
|
|
21
24
|
this.name = "browser";
|
|
22
25
|
}
|
|
23
26
|
createCanvas(width, height) {
|
|
@@ -46,14 +49,18 @@ var BrowserEnv = class {
|
|
|
46
49
|
createWorker(name) {
|
|
47
50
|
if (name !== "section" || typeof Worker === "undefined") return void 0;
|
|
48
51
|
try {
|
|
52
|
+
const sectionWorker = this.options.sectionWorker;
|
|
53
|
+
if (typeof sectionWorker === "function") return sectionWorker();
|
|
54
|
+
if (sectionWorker !== void 0) return new Worker(sectionWorker, { type: "module" });
|
|
49
55
|
return new Worker(new URL("./section.worker.mjs", import.meta.url), { type: "module" });
|
|
50
|
-
} catch {
|
|
56
|
+
} catch (error) {
|
|
57
|
+
log.warn("Could not start the section worker, so sections build on the main thread. Pass sectionWorker to registerBrowserEnv to load it from another URL.", error);
|
|
51
58
|
return void 0;
|
|
52
59
|
}
|
|
53
60
|
}
|
|
54
61
|
};
|
|
55
|
-
function registerBrowserEnv() {
|
|
56
|
-
const env = new BrowserEnv();
|
|
62
|
+
function registerBrowserEnv(options) {
|
|
63
|
+
const env = new BrowserEnv(options);
|
|
57
64
|
Env.register(env);
|
|
58
65
|
return env;
|
|
59
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/env/browser/BrowserEnv.ts"],"sourcesContent":["import { Env, EnvProvider, ImageSizeInfo } from \"../../Env\";\nimport type { CompatCanvas, CompatImage } from \"../../canvas/CanvasCompat\";\nimport type { PersistentCache } from \"../../cache/PersistentCache\";\nimport { BrowserCache } from \"./BrowserCache\";\nimport { probeImageSize } from \"./probeImageSize\";\n\n/** A LocalForage that imports the library and opens the store on the first call. */\nfunction lazyLocalForage(options: LocalForageOptions): LocalForage {\n let instance: Promise<LocalForage> | undefined;\n const store = () => instance ??= import(\"localforage\").then(module => module.default.createInstance(options));\n return {\n ready: (...args: Parameters<LocalForage[\"ready\"]>) => store().then(value => value.ready(...args)),\n getItem: (...args: Parameters<LocalForage[\"getItem\"]>) => store().then(value => value.getItem(...args)),\n setItem: (...args: Parameters<LocalForage[\"setItem\"]>) => store().then(value => value.setItem(...args)),\n removeItem: (...args: Parameters<LocalForage[\"removeItem\"]>) => store().then(value => value.removeItem(...args)),\n clear: (...args: Parameters<LocalForage[\"clear\"]>) => store().then(value => value.clear(...args)),\n length: (...args: Parameters<LocalForage[\"length\"]>) => store().then(value => value.length(...args)),\n keys: (...args: Parameters<LocalForage[\"keys\"]>) => store().then(value => value.keys(...args)),\n iterate: (...args: Parameters<LocalForage[\"iterate\"]>) => store().then(value => value.iterate(...args))\n } as LocalForage;\n}\n\n/**\n * {@link EnvProvider} backed by the DOM. Uses nothing outside of standard browser APIs and\n * localforage, so it stays free of Node polyfills.\n */\nexport class BrowserEnv implements EnvProvider {\n\n public readonly name = \"browser\";\n\n createCanvas(width: number, height: number): CompatCanvas {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n\n createImage(width?: number, height?: number): CompatImage {\n const image = document.createElement(\"img\");\n image.crossOrigin = \"anonymous\";\n if (width) image.width = width;\n if (height) image.height = height;\n return image;\n }\n\n imageSize(data: Uint8Array): ImageSizeInfo {\n return probeImageSize(data);\n }\n\n openCache(name: string, version: number): PersistentCache {\n return new BrowserCache(lazyLocalForage({\n // IndexedDB schema upgrades retain records; each cache generation needs its own database.\n name: name + version,\n version: version\n }));\n }\n\n createWorker(name: \"section\"): Worker | undefined {\n if (name !== \"section\" || typeof Worker === \"undefined\") return undefined;\n try {\n // Keep the literal URL so bundlers emit the worker file next to the entry.\n return new Worker(new URL(\"./section.worker.mjs\", import.meta.url), { type: \"module\" });\n } catch {\n
|
|
1
|
+
{"version":3,"sources":["../../../../../src/env/browser/BrowserEnv.ts"],"sourcesContent":["import { Env, EnvProvider, ImageSizeInfo } from \"../../Env\";\nimport type { CompatCanvas, CompatImage } from \"../../canvas/CanvasCompat\";\nimport type { PersistentCache } from \"../../cache/PersistentCache\";\nimport { logger } from \"../../util/log\";\nimport { BrowserCache } from \"./BrowserCache\";\nimport { probeImageSize } from \"./probeImageSize\";\n\nconst log = logger(\"BrowserEnv\");\n\n/** Settings for {@link BrowserEnv} and {@link registerBrowserEnv}. */\nexport interface BrowserEnvOptions {\n /**\n * Section worker script, as a URL, or a function that creates the worker.\n * Set it when the bundle has no `import.meta.url`, such as the script-tag build: serve\n * `minerender/section.worker` from the page's origin and pass its URL.\n * Register before creating a world; the worker starts on the first section build.\n */\n sectionWorker?: string | URL | (() => Worker);\n}\n\n/** A LocalForage that imports the library and opens the store on the first call. */\nfunction lazyLocalForage(options: LocalForageOptions): LocalForage {\n let instance: Promise<LocalForage> | undefined;\n const store = () => instance ??= import(\"localforage\").then(module => module.default.createInstance(options));\n return {\n ready: (...args: Parameters<LocalForage[\"ready\"]>) => store().then(value => value.ready(...args)),\n getItem: (...args: Parameters<LocalForage[\"getItem\"]>) => store().then(value => value.getItem(...args)),\n setItem: (...args: Parameters<LocalForage[\"setItem\"]>) => store().then(value => value.setItem(...args)),\n removeItem: (...args: Parameters<LocalForage[\"removeItem\"]>) => store().then(value => value.removeItem(...args)),\n clear: (...args: Parameters<LocalForage[\"clear\"]>) => store().then(value => value.clear(...args)),\n length: (...args: Parameters<LocalForage[\"length\"]>) => store().then(value => value.length(...args)),\n keys: (...args: Parameters<LocalForage[\"keys\"]>) => store().then(value => value.keys(...args)),\n iterate: (...args: Parameters<LocalForage[\"iterate\"]>) => store().then(value => value.iterate(...args))\n } as LocalForage;\n}\n\n/**\n * {@link EnvProvider} backed by the DOM. Uses nothing outside of standard browser APIs and\n * localforage, so it stays free of Node polyfills.\n */\nexport class BrowserEnv implements EnvProvider {\n\n public readonly name = \"browser\";\n\n constructor(public readonly options: BrowserEnvOptions = {}) {}\n\n createCanvas(width: number, height: number): CompatCanvas {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n\n createImage(width?: number, height?: number): CompatImage {\n const image = document.createElement(\"img\");\n image.crossOrigin = \"anonymous\";\n if (width) image.width = width;\n if (height) image.height = height;\n return image;\n }\n\n imageSize(data: Uint8Array): ImageSizeInfo {\n return probeImageSize(data);\n }\n\n openCache(name: string, version: number): PersistentCache {\n return new BrowserCache(lazyLocalForage({\n // IndexedDB schema upgrades retain records; each cache generation needs its own database.\n name: name + version,\n version: version\n }));\n }\n\n createWorker(name: \"section\"): Worker | undefined {\n if (name !== \"section\" || typeof Worker === \"undefined\") return undefined;\n try {\n const sectionWorker = this.options.sectionWorker;\n if (typeof sectionWorker === \"function\") return sectionWorker();\n if (sectionWorker !== undefined) return new Worker(sectionWorker, { type: \"module\" });\n // Keep the literal URL so bundlers emit the worker file next to the entry.\n return new Worker(new URL(\"./section.worker.mjs\", import.meta.url), { type: \"module\" });\n } catch (error) {\n log.warn(\"Could not start the section worker, so sections build on the main thread. Pass sectionWorker to registerBrowserEnv to load it from another URL.\", error);\n return undefined;\n }\n }\n\n}\n\n/** Installs the browser provider. The browser package entry calls this automatically. */\nexport function registerBrowserEnv(options?: BrowserEnvOptions): BrowserEnv {\n const env = new BrowserEnv(options);\n Env.register(env);\n return env;\n}\n"],"mappings":";AAAA,SAAS,WAAuC;AAGhD,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAE/B,IAAM,MAAM,OAAO,YAAY;AAc/B,SAAS,gBAAgB,SAA0C;AAC/D,MAAI;AACJ,QAAM,QAAQ,MAAM,wBAAa,OAAO,aAAa,EAAE,KAAK,YAAU,OAAO,QAAQ,eAAe,OAAO,CAAC;AAC5G,SAAO;AAAA,IACH,OAAO,IAAI,SAA2C,MAAM,EAAE,KAAK,WAAS,MAAM,MAAM,GAAG,IAAI,CAAC;AAAA,IAChG,SAAS,IAAI,SAA6C,MAAM,EAAE,KAAK,WAAS,MAAM,QAAQ,GAAG,IAAI,CAAC;AAAA,IACtG,SAAS,IAAI,SAA6C,MAAM,EAAE,KAAK,WAAS,MAAM,QAAQ,GAAG,IAAI,CAAC;AAAA,IACtG,YAAY,IAAI,SAAgD,MAAM,EAAE,KAAK,WAAS,MAAM,WAAW,GAAG,IAAI,CAAC;AAAA,IAC/G,OAAO,IAAI,SAA2C,MAAM,EAAE,KAAK,WAAS,MAAM,MAAM,GAAG,IAAI,CAAC;AAAA,IAChG,QAAQ,IAAI,SAA4C,MAAM,EAAE,KAAK,WAAS,MAAM,OAAO,GAAG,IAAI,CAAC;AAAA,IACnG,MAAM,IAAI,SAA0C,MAAM,EAAE,KAAK,WAAS,MAAM,KAAK,GAAG,IAAI,CAAC;AAAA,IAC7F,SAAS,IAAI,SAA6C,MAAM,EAAE,KAAK,WAAS,MAAM,QAAQ,GAAG,IAAI,CAAC;AAAA,EAC1G;AACJ;AAMO,IAAM,aAAN,MAAwC;AAAA,EAI3C,YAA4B,UAA6B,CAAC,GAAG;AAAjC;AAF5B,SAAgB,OAAO;AAAA,EAEuC;AAAA,EAE9D,aAAa,OAAe,QAA8B;AACtD,UAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,WAAO,QAAQ;AACf,WAAO,SAAS;AAChB,WAAO;AAAA,EACX;AAAA,EAEA,YAAY,OAAgB,QAA8B;AACtD,UAAM,QAAQ,SAAS,cAAc,KAAK;AAC1C,UAAM,cAAc;AACpB,QAAI,MAAO,OAAM,QAAQ;AACzB,QAAI,OAAQ,OAAM,SAAS;AAC3B,WAAO;AAAA,EACX;AAAA,EAEA,UAAU,MAAiC;AACvC,WAAO,eAAe,IAAI;AAAA,EAC9B;AAAA,EAEA,UAAU,MAAc,SAAkC;AACtD,WAAO,IAAI,aAAa,gBAAgB;AAAA;AAAA,MAEpC,MAAM,OAAO;AAAA,MACb;AAAA,IACJ,CAAC,CAAC;AAAA,EACN;AAAA,EAEA,aAAa,MAAqC;AAC9C,QAAI,SAAS,aAAa,OAAO,WAAW,YAAa,QAAO;AAChE,QAAI;AACA,YAAM,gBAAgB,KAAK,QAAQ;AACnC,UAAI,OAAO,kBAAkB,WAAY,QAAO,cAAc;AAC9D,UAAI,kBAAkB,OAAW,QAAO,IAAI,OAAO,eAAe,EAAE,MAAM,SAAS,CAAC;AAEpF,aAAO,IAAI,OAAO,IAAI,IAAI,wBAAwB,YAAY,GAAG,GAAG,EAAE,MAAM,SAAS,CAAC;AAAA,IAC1F,SAAS,OAAO;AACZ,UAAI,KAAK,mJAAmJ,KAAK;AACjK,aAAO;AAAA,IACX;AAAA,EACJ;AAEJ;AAGO,SAAS,mBAAmB,SAAyC;AACxE,QAAM,MAAM,IAAI,WAAW,OAAO;AAClC,MAAI,SAAS,GAAG;AAChB,SAAO;AACX;","names":[]}
|
|
@@ -4429,12 +4429,24 @@ declare class WorldStreamer {
|
|
|
4429
4429
|
private key;
|
|
4430
4430
|
}
|
|
4431
4431
|
|
|
4432
|
+
/** Settings for {@link BrowserEnv} and {@link registerBrowserEnv}. */
|
|
4433
|
+
interface BrowserEnvOptions {
|
|
4434
|
+
/**
|
|
4435
|
+
* Section worker script, as a URL, or a function that creates the worker.
|
|
4436
|
+
* Set it when the bundle has no `import.meta.url`, such as the script-tag build: serve
|
|
4437
|
+
* `minerender/section.worker` from the page's origin and pass its URL.
|
|
4438
|
+
* Register before creating a world; the worker starts on the first section build.
|
|
4439
|
+
*/
|
|
4440
|
+
sectionWorker?: string | URL | (() => Worker);
|
|
4441
|
+
}
|
|
4432
4442
|
/**
|
|
4433
4443
|
* {@link EnvProvider} backed by the DOM. Uses nothing outside of standard browser APIs and
|
|
4434
4444
|
* localforage, so it stays free of Node polyfills.
|
|
4435
4445
|
*/
|
|
4436
4446
|
declare class BrowserEnv implements EnvProvider {
|
|
4447
|
+
readonly options: BrowserEnvOptions;
|
|
4437
4448
|
readonly name = "browser";
|
|
4449
|
+
constructor(options?: BrowserEnvOptions);
|
|
4438
4450
|
createCanvas(width: number, height: number): CompatCanvas;
|
|
4439
4451
|
createImage(width?: number, height?: number): CompatImage;
|
|
4440
4452
|
imageSize(data: Uint8Array): ImageSizeInfo;
|
|
@@ -4442,7 +4454,7 @@ declare class BrowserEnv implements EnvProvider {
|
|
|
4442
4454
|
createWorker(name: "section"): Worker | undefined;
|
|
4443
4455
|
}
|
|
4444
4456
|
/** Installs the browser provider. The browser package entry calls this automatically. */
|
|
4445
|
-
declare function registerBrowserEnv(): BrowserEnv;
|
|
4457
|
+
declare function registerBrowserEnv(options?: BrowserEnvOptions): BrowserEnv;
|
|
4446
4458
|
|
|
4447
4459
|
/**
|
|
4448
4460
|
* {@link PersistentCache} backed by localforage (IndexedDB / WebSQL / localStorage).
|
|
@@ -4472,4 +4484,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
|
|
|
4472
4484
|
*/
|
|
4473
4485
|
declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
|
|
4474
4486
|
|
|
4475
|
-
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilEntityChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BinaryAsset, type Biome, type BiomeColorKind, Biomes, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsMode, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DecoratedPotSide, DecoratedPots, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidQuads, type FluidRules, type FluidSample, type FluidSampler, type FlyAction, FlyControls, type FlyControlsEventMap, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, ItemDefaults, ItemGlint, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, type LogHandler, type LogLevel, type LogThreshold, type Logger, Logging, type LoggingOptions, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderData, type MineRenderDataManifest, type MineRenderDatasets, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenameKind, Renames, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SCENE_DOCUMENT_MAX_BYTES, SKIN_PARTS, type SavedLightSample, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneItemContext, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionFluidInput, type SectionFluidKind, type SectionFluids, type SectionGeometryInput, type SectionGeometryPage, type SectionLightData, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldBlockIntersection, type WorldChunkSource, type WorldEntityIntersection, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, copySectionLight, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, decodeSceneDocument, encodeSceneDocument, entityAnimationTime, estimateBytesUsed, fluidKindOf, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isFlyControls, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isResourceLocation, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, logger, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, probeImageSize, registerBrowserEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sampleSectionLight, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, validateAnimationWeights, yieldToEventLoop };
|
|
4487
|
+
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilEntityChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BinaryAsset, type Biome, type BiomeColorKind, Biomes, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, type BrowserEnvOptions, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsMode, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DecoratedPotSide, DecoratedPots, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidQuads, type FluidRules, type FluidSample, type FluidSampler, type FlyAction, FlyControls, type FlyControlsEventMap, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, ItemDefaults, ItemGlint, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, type LogHandler, type LogLevel, type LogThreshold, type Logger, Logging, type LoggingOptions, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderData, type MineRenderDataManifest, type MineRenderDatasets, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenameKind, Renames, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SCENE_DOCUMENT_MAX_BYTES, SKIN_PARTS, type SavedLightSample, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneItemContext, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionFluidInput, type SectionFluidKind, type SectionFluids, type SectionGeometryInput, type SectionGeometryPage, type SectionLightData, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldBlockIntersection, type WorldChunkSource, type WorldEntityIntersection, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, copySectionLight, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, decodeSceneDocument, encodeSceneDocument, entityAnimationTime, estimateBytesUsed, fluidKindOf, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isFlyControls, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isResourceLocation, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, logger, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, probeImageSize, registerBrowserEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sampleSectionLight, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, validateAnimationWeights, yieldToEventLoop };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/index.browser.ts"],"sourcesContent":["// Browser entry point. Built to dist/browser/ and dist/bundle.js.\n//\n// The register import must stay first: it installs the browser EnvProvider before any other\n// module body runs.\nimport \"./env/browser/register\";\n\nexport * from \"./index\";\nexport { BrowserEnv, registerBrowserEnv } from \"./env/browser/BrowserEnv\";\nexport { BrowserCache } from \"./env/browser/BrowserCache\";\nexport { probeImageSize } from \"./env/browser/probeImageSize\";\n"],"mappings":";AAIA,OAAO;AAEP,cAAc;AACd,SAAS,YAAY,0BAA0B;
|
|
1
|
+
{"version":3,"sources":["../../../src/index.browser.ts"],"sourcesContent":["// Browser entry point. Built to dist/browser/ and dist/bundle.js.\n//\n// The register import must stay first: it installs the browser EnvProvider before any other\n// module body runs.\nimport \"./env/browser/register\";\n\nexport * from \"./index\";\nexport { BrowserEnv, registerBrowserEnv } from \"./env/browser/BrowserEnv\";\nexport type { BrowserEnvOptions } from \"./env/browser/BrowserEnv\";\nexport { BrowserCache } from \"./env/browser/BrowserCache\";\nexport { probeImageSize } from \"./env/browser/probeImageSize\";\n"],"mappings":";AAIA,OAAO;AAEP,cAAc;AACd,SAAS,YAAY,0BAA0B;AAE/C,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;","names":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/world/SectionWorker.ts
|
|
2
2
|
import { Env } from "../Env.mjs";
|
|
3
|
+
import { logger } from "../util/log.mjs";
|
|
4
|
+
var log = logger("SectionWorker");
|
|
3
5
|
var _SectionWorker = class _SectionWorker {
|
|
4
6
|
constructor(worker) {
|
|
5
7
|
this.worker = worker;
|
|
@@ -13,8 +15,12 @@ var _SectionWorker = class _SectionWorker {
|
|
|
13
15
|
if (reply.type === "pages") pending.resolve(reply.pages);
|
|
14
16
|
else pending.reject(new Error(reply.message));
|
|
15
17
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
const fallBack = (message) => {
|
|
19
|
+
log.warn(`${message}, so sections build on the main thread`);
|
|
20
|
+
this.fail(message);
|
|
21
|
+
};
|
|
22
|
+
worker.addEventListener("error", (event) => fallBack(event.message || "Section worker failed"));
|
|
23
|
+
worker.addEventListener("messageerror", () => fallBack("Section worker message could not be deserialized"));
|
|
18
24
|
}
|
|
19
25
|
/** The shared worker, or undefined when the environment has none or a previous worker failed. */
|
|
20
26
|
static shared() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/world/SectionWorker.ts"],"sourcesContent":["import { Env } from \"../Env\";\nimport type { SectionGeometryInput, SectionGeometryPage } from \"./SectionGeometry\";\n\n/** Runs section geometry builds in the environment's shared worker. */\nexport class SectionWorker {\n private static initialized = false;\n private static instance: SectionWorker | undefined;\n private nextId = 0;\n private readonly pending = new Map<number, {\n resolve: (pages: SectionGeometryPage[]) => void;\n reject: (error: Error) => void;\n }>();\n\n private constructor(private worker: Worker | undefined) {\n worker!.addEventListener(\"message\", (event: MessageEvent<\n { id: number; type: \"pages\"; pages: SectionGeometryPage[] } |\n { id: number; type: \"error\"; message: string }\n >) => {\n const reply = event.data;\n const pending = this.pending.get(reply.id);\n if (!pending) return;\n this.pending.delete(reply.id);\n if (reply.type === \"pages\") pending.resolve(reply.pages);\n else pending.reject(new Error(reply.message));\n });\n // A failed worker or an undeliverable message leaves the pending builds unanswerable, so stop using it.\n worker!.addEventListener(\"error\", event =>
|
|
1
|
+
{"version":3,"sources":["../../../../src/world/SectionWorker.ts"],"sourcesContent":["import { Env } from \"../Env\";\nimport { logger } from \"../util/log\";\nimport type { SectionGeometryInput, SectionGeometryPage } from \"./SectionGeometry\";\n\nconst log = logger(\"SectionWorker\");\n\n/** Runs section geometry builds in the environment's shared worker. */\nexport class SectionWorker {\n private static initialized = false;\n private static instance: SectionWorker | undefined;\n private nextId = 0;\n private readonly pending = new Map<number, {\n resolve: (pages: SectionGeometryPage[]) => void;\n reject: (error: Error) => void;\n }>();\n\n private constructor(private worker: Worker | undefined) {\n worker!.addEventListener(\"message\", (event: MessageEvent<\n { id: number; type: \"pages\"; pages: SectionGeometryPage[] } |\n { id: number; type: \"error\"; message: string }\n >) => {\n const reply = event.data;\n const pending = this.pending.get(reply.id);\n if (!pending) return;\n this.pending.delete(reply.id);\n if (reply.type === \"pages\") pending.resolve(reply.pages);\n else pending.reject(new Error(reply.message));\n });\n // A failed worker or an undeliverable message leaves the pending builds unanswerable, so stop using it.\n const fallBack = (message: string) => {\n log.warn(`${message}, so sections build on the main thread`);\n this.fail(message);\n };\n worker!.addEventListener(\"error\", event => fallBack(event.message || \"Section worker failed\"));\n worker!.addEventListener(\"messageerror\", () => fallBack(\"Section worker message could not be deserialized\"));\n }\n\n /** The shared worker, or undefined when the environment has none or a previous worker failed. */\n public static shared(): SectionWorker | undefined {\n if (!this.initialized) {\n this.initialized = true;\n const worker = Env.provider.createWorker?.(\"section\");\n if (worker) this.instance = new SectionWorker(worker);\n }\n return this.instance;\n }\n\n /** Builds geometry without transferring the input buffers away from the caller. */\n public build(input: SectionGeometryInput): Promise<SectionGeometryPage[]> {\n if (!this.worker) return Promise.reject(new Error(\"Section worker terminated\"));\n return new Promise((resolve, reject) => {\n const id = this.nextId++;\n this.pending.set(id, { resolve, reject });\n this.worker!.postMessage({ id, type: \"build\", input });\n });\n }\n\n /** Rejects pending builds, terminates the worker, and makes shared() return undefined. */\n public terminate(): void {\n this.fail(\"Section worker terminated\");\n }\n\n private fail(message: string): void {\n const error = new Error(message);\n for (const pending of this.pending.values()) pending.reject(error);\n this.pending.clear();\n this.worker?.terminate();\n this.worker = undefined;\n SectionWorker.instance = undefined;\n }\n}\n"],"mappings":";AAAA,SAAS,WAAW;AACpB,SAAS,cAAc;AAGvB,IAAM,MAAM,OAAO,eAAe;AAG3B,IAAM,iBAAN,MAAM,eAAc;AAAA,EASf,YAAoB,QAA4B;AAA5B;AAN5B,SAAQ,SAAS;AACjB,SAAiB,UAAU,oBAAI,IAG5B;AAGC,WAAQ,iBAAiB,WAAW,CAAC,UAG/B;AACF,YAAM,QAAQ,MAAM;AACpB,YAAM,UAAU,KAAK,QAAQ,IAAI,MAAM,EAAE;AACzC,UAAI,CAAC,QAAS;AACd,WAAK,QAAQ,OAAO,MAAM,EAAE;AAC5B,UAAI,MAAM,SAAS,QAAS,SAAQ,QAAQ,MAAM,KAAK;AAAA,UAClD,SAAQ,OAAO,IAAI,MAAM,MAAM,OAAO,CAAC;AAAA,IAChD,CAAC;AAED,UAAM,WAAW,CAAC,YAAoB;AAClC,UAAI,KAAK,GAAG,OAAO,wCAAwC;AAC3D,WAAK,KAAK,OAAO;AAAA,IACrB;AACA,WAAQ,iBAAiB,SAAS,WAAS,SAAS,MAAM,WAAW,uBAAuB,CAAC;AAC7F,WAAQ,iBAAiB,gBAAgB,MAAM,SAAS,kDAAkD,CAAC;AAAA,EAC/G;AAAA;AAAA,EAGA,OAAc,SAAoC;AAC9C,QAAI,CAAC,KAAK,aAAa;AACnB,WAAK,cAAc;AACnB,YAAM,SAAS,IAAI,SAAS,eAAe,SAAS;AACpD,UAAI,OAAQ,MAAK,WAAW,IAAI,eAAc,MAAM;AAAA,IACxD;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA,EAGO,MAAM,OAA6D;AACtE,QAAI,CAAC,KAAK,OAAQ,QAAO,QAAQ,OAAO,IAAI,MAAM,2BAA2B,CAAC;AAC9E,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpC,YAAM,KAAK,KAAK;AAChB,WAAK,QAAQ,IAAI,IAAI,EAAE,SAAS,OAAO,CAAC;AACxC,WAAK,OAAQ,YAAY,EAAE,IAAI,MAAM,SAAS,MAAM,CAAC;AAAA,IACzD,CAAC;AAAA,EACL;AAAA;AAAA,EAGO,YAAkB;AACrB,SAAK,KAAK,2BAA2B;AAAA,EACzC;AAAA,EAEQ,KAAK,SAAuB;AAChC,UAAM,QAAQ,IAAI,MAAM,OAAO;AAC/B,eAAW,WAAW,KAAK,QAAQ,OAAO,EAAG,SAAQ,OAAO,KAAK;AACjE,SAAK,QAAQ,MAAM;AACnB,SAAK,QAAQ,UAAU;AACvB,SAAK,SAAS;AACd,mBAAc,WAAW;AAAA,EAC7B;AACJ;AA/Da,eACM,cAAc;AAD1B,IAAM,gBAAN;","names":[]}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -4429,12 +4429,24 @@ declare class WorldStreamer {
|
|
|
4429
4429
|
private key;
|
|
4430
4430
|
}
|
|
4431
4431
|
|
|
4432
|
+
/** Settings for {@link BrowserEnv} and {@link registerBrowserEnv}. */
|
|
4433
|
+
interface BrowserEnvOptions {
|
|
4434
|
+
/**
|
|
4435
|
+
* Section worker script, as a URL, or a function that creates the worker.
|
|
4436
|
+
* Set it when the bundle has no `import.meta.url`, such as the script-tag build: serve
|
|
4437
|
+
* `minerender/section.worker` from the page's origin and pass its URL.
|
|
4438
|
+
* Register before creating a world; the worker starts on the first section build.
|
|
4439
|
+
*/
|
|
4440
|
+
sectionWorker?: string | URL | (() => Worker);
|
|
4441
|
+
}
|
|
4432
4442
|
/**
|
|
4433
4443
|
* {@link EnvProvider} backed by the DOM. Uses nothing outside of standard browser APIs and
|
|
4434
4444
|
* localforage, so it stays free of Node polyfills.
|
|
4435
4445
|
*/
|
|
4436
4446
|
declare class BrowserEnv implements EnvProvider {
|
|
4447
|
+
readonly options: BrowserEnvOptions;
|
|
4437
4448
|
readonly name = "browser";
|
|
4449
|
+
constructor(options?: BrowserEnvOptions);
|
|
4438
4450
|
createCanvas(width: number, height: number): CompatCanvas;
|
|
4439
4451
|
createImage(width?: number, height?: number): CompatImage;
|
|
4440
4452
|
imageSize(data: Uint8Array): ImageSizeInfo;
|
|
@@ -4442,7 +4454,7 @@ declare class BrowserEnv implements EnvProvider {
|
|
|
4442
4454
|
createWorker(name: "section"): Worker | undefined;
|
|
4443
4455
|
}
|
|
4444
4456
|
/** Installs the browser provider. The browser package entry calls this automatically. */
|
|
4445
|
-
declare function registerBrowserEnv(): BrowserEnv;
|
|
4457
|
+
declare function registerBrowserEnv(options?: BrowserEnvOptions): BrowserEnv;
|
|
4446
4458
|
|
|
4447
4459
|
/**
|
|
4448
4460
|
* {@link PersistentCache} backed by localforage (IndexedDB / WebSQL / localStorage).
|
|
@@ -4472,4 +4484,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
|
|
|
4472
4484
|
*/
|
|
4473
4485
|
declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
|
|
4474
4486
|
|
|
4475
|
-
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilEntityChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BinaryAsset, type Biome, type BiomeColorKind, Biomes, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsMode, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DecoratedPotSide, DecoratedPots, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidQuads, type FluidRules, type FluidSample, type FluidSampler, type FlyAction, FlyControls, type FlyControlsEventMap, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, ItemDefaults, ItemGlint, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, type LogHandler, type LogLevel, type LogThreshold, type Logger, Logging, type LoggingOptions, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderData, type MineRenderDataManifest, type MineRenderDatasets, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenameKind, Renames, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SCENE_DOCUMENT_MAX_BYTES, SKIN_PARTS, type SavedLightSample, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneItemContext, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionFluidInput, type SectionFluidKind, type SectionFluids, type SectionGeometryInput, type SectionGeometryPage, type SectionLightData, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldBlockIntersection, type WorldChunkSource, type WorldEntityIntersection, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, copySectionLight, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, decodeSceneDocument, encodeSceneDocument, entityAnimationTime, estimateBytesUsed, fluidKindOf, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isFlyControls, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isResourceLocation, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, logger, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, probeImageSize, registerBrowserEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sampleSectionLight, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, validateAnimationWeights, yieldToEventLoop };
|
|
4487
|
+
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilEntityChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BinaryAsset, type Biome, type BiomeColorKind, Biomes, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, type BrowserEnvOptions, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsMode, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DecoratedPotSide, DecoratedPots, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidQuads, type FluidRules, type FluidSample, type FluidSampler, type FlyAction, FlyControls, type FlyControlsEventMap, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, ItemDefaults, ItemGlint, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, type LogHandler, type LogLevel, type LogThreshold, type Logger, Logging, type LoggingOptions, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderData, type MineRenderDataManifest, type MineRenderDatasets, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenameKind, Renames, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SCENE_DOCUMENT_MAX_BYTES, SKIN_PARTS, type SavedLightSample, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneItemContext, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionFluidInput, type SectionFluidKind, type SectionFluids, type SectionGeometryInput, type SectionGeometryPage, type SectionLightData, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldBlockIntersection, type WorldChunkSource, type WorldEntityIntersection, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, copySectionLight, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, decodeSceneDocument, encodeSceneDocument, entityAnimationTime, estimateBytesUsed, fluidKindOf, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isFlyControls, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isResourceLocation, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, logger, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, probeImageSize, registerBrowserEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sampleSectionLight, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, validateAnimationWeights, yieldToEventLoop };
|