minerender 2.1.0-alpha.115 → 2.1.0-alpha.117
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/index.d.mts +65 -11
- package/dist/browser/index.d.ts +65 -11
- package/dist/browser/index.js +441 -179
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +442 -180
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/section.worker.js +6 -3
- package/dist/browser/section.worker.js.map +1 -1
- package/dist/browser/section.worker.mjs +6 -3
- package/dist/browser/section.worker.mjs.map +1 -1
- package/dist/bundle.js +451 -183
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.d.mts +65 -11
- package/dist/node/index.d.ts +65 -11
- package/dist/node/index.js +444 -179
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +444 -180
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.d.mts
CHANGED
|
@@ -1069,6 +1069,24 @@ declare class Assets {
|
|
|
1069
1069
|
static getBlockState(key: AssetKey): Promise<Maybe<BlockState>>;
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
|
+
type BiomeColorKind = "grass" | "foliage" | "dry_foliage" | "water";
|
|
1073
|
+
/** Climate and color fields from a biome registry entry. Other registry fields are ignored. */
|
|
1074
|
+
interface Biome extends MinecraftAsset {
|
|
1075
|
+
temperature: number;
|
|
1076
|
+
downfall: number;
|
|
1077
|
+
effects: Partial<Record<`${BiomeColorKind}_color`, number | string>> & {
|
|
1078
|
+
grass_color_modifier?: "none" | "dark_forest" | "swamp";
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
/** Resolves biome colors through the selected version's registry and resource-pack colormaps. */
|
|
1082
|
+
declare class Biomes {
|
|
1083
|
+
/** Loads a biome registry entry, or returns `undefined` when no source provides it. */
|
|
1084
|
+
static get(id: string, origin?: AssetKey): Promise<Biome | undefined>;
|
|
1085
|
+
/** Returns packed sRGB, or `undefined` when the biome or requested water color is missing. */
|
|
1086
|
+
static getColor(id: string, kind: BiomeColorKind, origin?: AssetKey, x?: number, z?: number): Promise<number | undefined>;
|
|
1087
|
+
private static parseColor;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1072
1090
|
type BlockStatePropertyValue = string | boolean | number;
|
|
1073
1091
|
/** A vanilla block property's default and allowed values, loaded through {@link BlockStates.getDefaultState}. */
|
|
1074
1092
|
interface BlockStateProperty {
|
|
@@ -1292,6 +1310,7 @@ interface MineRenderDatasets {
|
|
|
1292
1310
|
source: "grass" | "stem" | "redstone";
|
|
1293
1311
|
}) & {
|
|
1294
1312
|
untinted?: number[];
|
|
1313
|
+
biome?: BiomeColorKind;
|
|
1295
1314
|
}>;
|
|
1296
1315
|
fluids: Record<string, {
|
|
1297
1316
|
kind: "water" | "lava";
|
|
@@ -1329,6 +1348,7 @@ interface MineRenderDataManifest {
|
|
|
1329
1348
|
interface ResolvedMineRenderData {
|
|
1330
1349
|
requestedVersion: string;
|
|
1331
1350
|
version: string;
|
|
1351
|
+
/** Registry lookup root. Rootless requests still allow registered sources to override this URL. */
|
|
1332
1352
|
root: string;
|
|
1333
1353
|
manifest: MineRenderDataManifest;
|
|
1334
1354
|
}
|
|
@@ -1338,7 +1358,8 @@ declare class MineRenderData {
|
|
|
1338
1358
|
static get<K extends keyof MineRenderDatasets>(dataset: K, root?: string): Promise<MineRenderDatasets[K]>;
|
|
1339
1359
|
/**
|
|
1340
1360
|
* Uses the exact version when published. Otherwise, selects the nearest patch in the same
|
|
1341
|
-
* release line (older on ties), then the latest earlier release
|
|
1361
|
+
* release line (older on ties), then the latest earlier release or the oldest published release.
|
|
1362
|
+
* Unpublished snapshots reject.
|
|
1342
1363
|
*/
|
|
1343
1364
|
static resolve(root?: string): Promise<ResolvedMineRenderData>;
|
|
1344
1365
|
private static manifest;
|
|
@@ -1375,7 +1396,6 @@ declare class Models {
|
|
|
1375
1396
|
static componentValue(components: Record<string, unknown>, id: string): unknown;
|
|
1376
1397
|
private static snapshotContext;
|
|
1377
1398
|
private static applyDefaults;
|
|
1378
|
-
private static sourceCheck;
|
|
1379
1399
|
private static contextKey;
|
|
1380
1400
|
private static snapshotJson;
|
|
1381
1401
|
private static propertyValue;
|
|
@@ -1637,6 +1657,8 @@ declare class BlockObject extends SceneObject {
|
|
|
1637
1657
|
private _fluidKey?;
|
|
1638
1658
|
private _fluidRules;
|
|
1639
1659
|
private _fluidSampler?;
|
|
1660
|
+
private readonly biomePosition?;
|
|
1661
|
+
private waterTint?;
|
|
1640
1662
|
private _fluidModel?;
|
|
1641
1663
|
private _entities;
|
|
1642
1664
|
private _entityPlacement;
|
|
@@ -1703,6 +1725,10 @@ interface BlockObjectOptions extends ModelObjectOptions {
|
|
|
1703
1725
|
initialState?: BlockStateProperties;
|
|
1704
1726
|
/** Absolute block coordinates for repeatable variants, copied at construction. Omit for random previews. */
|
|
1705
1727
|
variantPosition?: TripleArray;
|
|
1728
|
+
/** Saved biome ID used for automatic grass, foliage, and water colors. */
|
|
1729
|
+
biome?: string;
|
|
1730
|
+
/** World block coordinates used by biome grass modifiers. Copied at construction; defaults to the origin. */
|
|
1731
|
+
biomePosition?: TripleArray;
|
|
1706
1732
|
}
|
|
1707
1733
|
declare function isBlockObject(obj: any): obj is BlockObject;
|
|
1708
1734
|
|
|
@@ -2190,10 +2216,14 @@ declare class BlockStateResolver {
|
|
|
2190
2216
|
static rotation(variant: BlockStateVariant): Euler;
|
|
2191
2217
|
}
|
|
2192
2218
|
|
|
2193
|
-
/** Supplies block
|
|
2219
|
+
/** Supplies block tint colors from versioned rendering rules and the active resource pack. */
|
|
2194
2220
|
declare class BlockTints {
|
|
2195
|
-
/**
|
|
2196
|
-
static
|
|
2221
|
+
/** Returns a block's versioned biome color source, leaving fixed-color blocks unchanged. */
|
|
2222
|
+
static biomeSource(key?: AssetKey): Promise<BiomeColorKind | undefined>;
|
|
2223
|
+
/** Resolves one block's biome tint at world block coordinates, without biome blending. */
|
|
2224
|
+
static getBiomeColor(key?: AssetKey, biome?: string, position?: Readonly<TripleArray>): Promise<number | undefined>;
|
|
2225
|
+
/** Resolves used tint indices from biome or preview colors; explicit tints take precedence. */
|
|
2226
|
+
static get(key: AssetKey | undefined, state: BlockStateProperties, model: Model, tints?: Record<number, number>, biomeColor?: number | (() => Promise<number | undefined>)): Promise<Record<number, number> | undefined>;
|
|
2197
2227
|
}
|
|
2198
2228
|
|
|
2199
2229
|
/** Saved fluid levels and solid neighbors determine the geometry shared by an instance pool. */
|
|
@@ -2603,6 +2633,7 @@ declare class Caching {
|
|
|
2603
2633
|
static readonly bannerPatternCache: AsyncLoadingCache<CacheKey, BannerPattern>;
|
|
2604
2634
|
static readonly mineRenderDataCache: AsyncLoadingCache<CacheKey, unknown>;
|
|
2605
2635
|
static readonly usernameUuidCache: AsyncLoadingCache<CacheKey, string>;
|
|
2636
|
+
static readonly biomeCache: AsyncLoadingCache<CacheKey, Biome>;
|
|
2606
2637
|
private static createAssetCache;
|
|
2607
2638
|
/** Every cache above, so clear()/end() can never fall out of sync with the field list again. */
|
|
2608
2639
|
private static get all();
|
|
@@ -3461,6 +3492,8 @@ declare class Skins {
|
|
|
3461
3492
|
declare class Colormaps {
|
|
3462
3493
|
/** Samples the selected resource pack's grass colormap using Minecraft's climate coordinates. */
|
|
3463
3494
|
static grassColor(origin?: AssetKey, temperature?: number, downfall?: number): Promise<number>;
|
|
3495
|
+
/** Samples a resource-pack colormap at the supplied climate coordinates. */
|
|
3496
|
+
static getColor(kind: "grass" | "foliage" | "dry_foliage", origin?: AssetKey, temperature?: number, downfall?: number): Promise<number>;
|
|
3464
3497
|
}
|
|
3465
3498
|
|
|
3466
3499
|
/** Creates sRGB textures immediately and fills their pixels after asynchronous image loading. */
|
|
@@ -3592,7 +3625,6 @@ declare class AnvilParser {
|
|
|
3592
3625
|
* @returns The chunk with absolute coordinates, or `undefined` if the region has no chunk there.
|
|
3593
3626
|
*/
|
|
3594
3627
|
static parseChunk(data: RegionInput, localX: number, localZ: number, options?: AnvilParseOptions): Promise<AnvilChunk | undefined>;
|
|
3595
|
-
private static assetGuard;
|
|
3596
3628
|
/**
|
|
3597
3629
|
* Decodes one chunk from an `entities/r.x.z.mca` file without migrating its NBT.
|
|
3598
3630
|
* @param localX - Chunk x within the region, from 0 to 31.
|
|
@@ -3683,6 +3715,8 @@ interface SectionMeshEntry {
|
|
|
3683
3715
|
/** Fluid cells for one section and the shared atlases of the kinds present. */
|
|
3684
3716
|
interface SectionFluids {
|
|
3685
3717
|
cells: Uint8Array;
|
|
3718
|
+
/** Linear RGB per section cell, indexed by (x + 16z + 256y) * 3. */
|
|
3719
|
+
waterTints?: Float32Array;
|
|
3686
3720
|
water?: TextureAtlas;
|
|
3687
3721
|
lava?: TextureAtlas;
|
|
3688
3722
|
}
|
|
@@ -3706,14 +3740,16 @@ declare class SectionModels {
|
|
|
3706
3740
|
private readonly fluidAtlases;
|
|
3707
3741
|
constructor(maxAtlasSize?: number);
|
|
3708
3742
|
/** Returns templates for the matched parts, or `undefined` when the block needs an individual render object. */
|
|
3709
|
-
get(blockState: BlockState, properties?: BlockStateProperties, position?: Readonly<TripleArray
|
|
3710
|
-
/** Resolves section templates
|
|
3711
|
-
prepareState(blockState: BlockState, properties?: BlockStateProperties): Promise<{
|
|
3743
|
+
get(blockState: BlockState, properties?: BlockStateProperties, position?: Readonly<TripleArray>, biome?: string): Promise<SectionMeshTemplate[] | undefined>;
|
|
3744
|
+
/** Resolves section templates for one tint palette, with a synchronous weighted choice for each cell. */
|
|
3745
|
+
prepareState(blockState: BlockState, properties?: BlockStateProperties, biomeColor?: number | (() => Promise<number | undefined>)): Promise<{
|
|
3712
3746
|
pick(position?: Readonly<TripleArray>): SectionMeshTemplate[];
|
|
3713
3747
|
} | undefined>;
|
|
3748
|
+
private state;
|
|
3714
3749
|
/** Returns the shared still/flow atlas used by per-block fluid objects. */
|
|
3715
3750
|
fluidAtlas(kind: FluidKind, root?: string): Promise<TextureAtlas>;
|
|
3716
3751
|
private prepare;
|
|
3752
|
+
private template;
|
|
3717
3753
|
/** Disposes prepared geometry and clears this world's template caches. */
|
|
3718
3754
|
clear(): void;
|
|
3719
3755
|
}
|
|
@@ -3727,6 +3763,8 @@ declare class Chunk<SectionMeshing extends boolean = false> {
|
|
|
3727
3763
|
private readonly onBlocksChanged?;
|
|
3728
3764
|
private readonly sectionModels?;
|
|
3729
3765
|
private readonly neighborCell?;
|
|
3766
|
+
private readonly biomeAt?;
|
|
3767
|
+
private readonly onBiomesChanged?;
|
|
3730
3768
|
readonly scene: MineRenderScene;
|
|
3731
3769
|
readonly x: number;
|
|
3732
3770
|
readonly y: number;
|
|
@@ -3737,13 +3775,23 @@ declare class Chunk<SectionMeshing extends boolean = false> {
|
|
|
3737
3775
|
private readonly hiddenBlocks;
|
|
3738
3776
|
private readonly fluidCells;
|
|
3739
3777
|
private readonly blockPosition;
|
|
3778
|
+
private waterTints?;
|
|
3779
|
+
private biomes?;
|
|
3740
3780
|
private sectionMesh?;
|
|
3741
3781
|
private meshDirty;
|
|
3742
3782
|
private meshGeneration;
|
|
3743
|
-
constructor(scene: MineRenderScene, x: number, y: number, z: number, onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined, sectionModels?: SectionModels | undefined, neighborCell?: ((x: number, y: number, z: number) => number) | undefined);
|
|
3783
|
+
constructor(scene: MineRenderScene, x: number, y: number, z: number, onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined, sectionModels?: SectionModels | undefined, neighborCell?: ((x: number, y: number, z: number) => number) | undefined, biomeAt?: ((x: number, y: number, z: number) => Maybe<string>) | undefined, onBiomesChanged?: ((biomes?: readonly string[]) => Promise<void>) | undefined);
|
|
3744
3784
|
getBlockAt(x: number, y: number, z: number): Maybe<BlockInfo<SectionMeshing>>;
|
|
3745
3785
|
getBlockAt(pos: Vector3): Maybe<BlockInfo<SectionMeshing>>;
|
|
3746
3786
|
getBlockAt(pos: TripleArray): Maybe<BlockInfo<SectionMeshing>>;
|
|
3787
|
+
/** Returns the saved 4-block biome sample at integer world block coordinates, or `undefined` if absent. */
|
|
3788
|
+
getBiomeAt(x: number, y: number, z: number): Maybe<string>;
|
|
3789
|
+
getBiomeAt(pos: Vector3): Maybe<string>;
|
|
3790
|
+
getBiomeAt(pos: TripleArray): Maybe<string>;
|
|
3791
|
+
/** Copies 64 biome IDs in x + z * 4 + y * 16 order and refreshes placed blocks. Omit the array to clear biome data. */
|
|
3792
|
+
setBiomes(biomes?: readonly string[]): Promise<void>;
|
|
3793
|
+
/** Rebuilds biome-tinted blocks while preserving hidden blocks and unrelated render objects. */
|
|
3794
|
+
refreshBiomes(): Promise<void>;
|
|
3747
3795
|
/**
|
|
3748
3796
|
* Places a block at integer world block coordinates. Pass `undefined` to remove it.
|
|
3749
3797
|
*/
|
|
@@ -3761,6 +3809,10 @@ declare class Chunk<SectionMeshing extends boolean = false> {
|
|
|
3761
3809
|
}[]): Promise<Vector3[]>;
|
|
3762
3810
|
/** Replaces every cell from parsed section data. The caller refreshes neighbor culling. */
|
|
3763
3811
|
placeSection(data: ChunkData): Promise<void>;
|
|
3812
|
+
private positionAt;
|
|
3813
|
+
private biomePosition;
|
|
3814
|
+
private resolveState;
|
|
3815
|
+
private setWaterTint;
|
|
3764
3816
|
/** Changes visibility at world block coordinates while preserving the block's data. */
|
|
3765
3817
|
setBlockVisibleAt(pos: Vector3, visible: boolean): Promise<void>;
|
|
3766
3818
|
isBlockVisibleAt(pos: Vector3): boolean;
|
|
@@ -3899,6 +3951,8 @@ interface SectionFluidKind {
|
|
|
3899
3951
|
interface SectionFluidInput {
|
|
3900
3952
|
/** Bit 128 marks a surface rendered elsewhere; the cell still supplies neighbor fluid samples. */
|
|
3901
3953
|
cells: Uint8Array;
|
|
3954
|
+
/** Linear RGB per section cell, indexed by (x + 16z + 256y) * 3. Omission uses the water kind's tint. */
|
|
3955
|
+
waterTints?: Float32Array;
|
|
3902
3956
|
water?: SectionFluidKind;
|
|
3903
3957
|
lava?: SectionFluidKind;
|
|
3904
3958
|
}
|
|
@@ -4092,4 +4146,4 @@ declare class NodeRenderer extends Renderer {
|
|
|
4092
4146
|
dispose(): void;
|
|
4093
4147
|
}
|
|
4094
4148
|
|
|
4095
|
-
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 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, 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, 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, NodeCache, NodeEnv, type NodeImageOptions, NodeRenderer, type NodeRendererOptions, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SKIN_PARTS, 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, 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 WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, 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, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|
|
4149
|
+
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 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, 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, 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, NodeCache, NodeEnv, type NodeImageOptions, NodeRenderer, type NodeRendererOptions, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SKIN_PARTS, 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, 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 WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, 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, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1069,6 +1069,24 @@ declare class Assets {
|
|
|
1069
1069
|
static getBlockState(key: AssetKey): Promise<Maybe<BlockState>>;
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
|
+
type BiomeColorKind = "grass" | "foliage" | "dry_foliage" | "water";
|
|
1073
|
+
/** Climate and color fields from a biome registry entry. Other registry fields are ignored. */
|
|
1074
|
+
interface Biome extends MinecraftAsset {
|
|
1075
|
+
temperature: number;
|
|
1076
|
+
downfall: number;
|
|
1077
|
+
effects: Partial<Record<`${BiomeColorKind}_color`, number | string>> & {
|
|
1078
|
+
grass_color_modifier?: "none" | "dark_forest" | "swamp";
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
/** Resolves biome colors through the selected version's registry and resource-pack colormaps. */
|
|
1082
|
+
declare class Biomes {
|
|
1083
|
+
/** Loads a biome registry entry, or returns `undefined` when no source provides it. */
|
|
1084
|
+
static get(id: string, origin?: AssetKey): Promise<Biome | undefined>;
|
|
1085
|
+
/** Returns packed sRGB, or `undefined` when the biome or requested water color is missing. */
|
|
1086
|
+
static getColor(id: string, kind: BiomeColorKind, origin?: AssetKey, x?: number, z?: number): Promise<number | undefined>;
|
|
1087
|
+
private static parseColor;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1072
1090
|
type BlockStatePropertyValue = string | boolean | number;
|
|
1073
1091
|
/** A vanilla block property's default and allowed values, loaded through {@link BlockStates.getDefaultState}. */
|
|
1074
1092
|
interface BlockStateProperty {
|
|
@@ -1292,6 +1310,7 @@ interface MineRenderDatasets {
|
|
|
1292
1310
|
source: "grass" | "stem" | "redstone";
|
|
1293
1311
|
}) & {
|
|
1294
1312
|
untinted?: number[];
|
|
1313
|
+
biome?: BiomeColorKind;
|
|
1295
1314
|
}>;
|
|
1296
1315
|
fluids: Record<string, {
|
|
1297
1316
|
kind: "water" | "lava";
|
|
@@ -1329,6 +1348,7 @@ interface MineRenderDataManifest {
|
|
|
1329
1348
|
interface ResolvedMineRenderData {
|
|
1330
1349
|
requestedVersion: string;
|
|
1331
1350
|
version: string;
|
|
1351
|
+
/** Registry lookup root. Rootless requests still allow registered sources to override this URL. */
|
|
1332
1352
|
root: string;
|
|
1333
1353
|
manifest: MineRenderDataManifest;
|
|
1334
1354
|
}
|
|
@@ -1338,7 +1358,8 @@ declare class MineRenderData {
|
|
|
1338
1358
|
static get<K extends keyof MineRenderDatasets>(dataset: K, root?: string): Promise<MineRenderDatasets[K]>;
|
|
1339
1359
|
/**
|
|
1340
1360
|
* Uses the exact version when published. Otherwise, selects the nearest patch in the same
|
|
1341
|
-
* release line (older on ties), then the latest earlier release
|
|
1361
|
+
* release line (older on ties), then the latest earlier release or the oldest published release.
|
|
1362
|
+
* Unpublished snapshots reject.
|
|
1342
1363
|
*/
|
|
1343
1364
|
static resolve(root?: string): Promise<ResolvedMineRenderData>;
|
|
1344
1365
|
private static manifest;
|
|
@@ -1375,7 +1396,6 @@ declare class Models {
|
|
|
1375
1396
|
static componentValue(components: Record<string, unknown>, id: string): unknown;
|
|
1376
1397
|
private static snapshotContext;
|
|
1377
1398
|
private static applyDefaults;
|
|
1378
|
-
private static sourceCheck;
|
|
1379
1399
|
private static contextKey;
|
|
1380
1400
|
private static snapshotJson;
|
|
1381
1401
|
private static propertyValue;
|
|
@@ -1637,6 +1657,8 @@ declare class BlockObject extends SceneObject {
|
|
|
1637
1657
|
private _fluidKey?;
|
|
1638
1658
|
private _fluidRules;
|
|
1639
1659
|
private _fluidSampler?;
|
|
1660
|
+
private readonly biomePosition?;
|
|
1661
|
+
private waterTint?;
|
|
1640
1662
|
private _fluidModel?;
|
|
1641
1663
|
private _entities;
|
|
1642
1664
|
private _entityPlacement;
|
|
@@ -1703,6 +1725,10 @@ interface BlockObjectOptions extends ModelObjectOptions {
|
|
|
1703
1725
|
initialState?: BlockStateProperties;
|
|
1704
1726
|
/** Absolute block coordinates for repeatable variants, copied at construction. Omit for random previews. */
|
|
1705
1727
|
variantPosition?: TripleArray;
|
|
1728
|
+
/** Saved biome ID used for automatic grass, foliage, and water colors. */
|
|
1729
|
+
biome?: string;
|
|
1730
|
+
/** World block coordinates used by biome grass modifiers. Copied at construction; defaults to the origin. */
|
|
1731
|
+
biomePosition?: TripleArray;
|
|
1706
1732
|
}
|
|
1707
1733
|
declare function isBlockObject(obj: any): obj is BlockObject;
|
|
1708
1734
|
|
|
@@ -2190,10 +2216,14 @@ declare class BlockStateResolver {
|
|
|
2190
2216
|
static rotation(variant: BlockStateVariant): Euler;
|
|
2191
2217
|
}
|
|
2192
2218
|
|
|
2193
|
-
/** Supplies block
|
|
2219
|
+
/** Supplies block tint colors from versioned rendering rules and the active resource pack. */
|
|
2194
2220
|
declare class BlockTints {
|
|
2195
|
-
/**
|
|
2196
|
-
static
|
|
2221
|
+
/** Returns a block's versioned biome color source, leaving fixed-color blocks unchanged. */
|
|
2222
|
+
static biomeSource(key?: AssetKey): Promise<BiomeColorKind | undefined>;
|
|
2223
|
+
/** Resolves one block's biome tint at world block coordinates, without biome blending. */
|
|
2224
|
+
static getBiomeColor(key?: AssetKey, biome?: string, position?: Readonly<TripleArray>): Promise<number | undefined>;
|
|
2225
|
+
/** Resolves used tint indices from biome or preview colors; explicit tints take precedence. */
|
|
2226
|
+
static get(key: AssetKey | undefined, state: BlockStateProperties, model: Model, tints?: Record<number, number>, biomeColor?: number | (() => Promise<number | undefined>)): Promise<Record<number, number> | undefined>;
|
|
2197
2227
|
}
|
|
2198
2228
|
|
|
2199
2229
|
/** Saved fluid levels and solid neighbors determine the geometry shared by an instance pool. */
|
|
@@ -2603,6 +2633,7 @@ declare class Caching {
|
|
|
2603
2633
|
static readonly bannerPatternCache: AsyncLoadingCache<CacheKey, BannerPattern>;
|
|
2604
2634
|
static readonly mineRenderDataCache: AsyncLoadingCache<CacheKey, unknown>;
|
|
2605
2635
|
static readonly usernameUuidCache: AsyncLoadingCache<CacheKey, string>;
|
|
2636
|
+
static readonly biomeCache: AsyncLoadingCache<CacheKey, Biome>;
|
|
2606
2637
|
private static createAssetCache;
|
|
2607
2638
|
/** Every cache above, so clear()/end() can never fall out of sync with the field list again. */
|
|
2608
2639
|
private static get all();
|
|
@@ -3461,6 +3492,8 @@ declare class Skins {
|
|
|
3461
3492
|
declare class Colormaps {
|
|
3462
3493
|
/** Samples the selected resource pack's grass colormap using Minecraft's climate coordinates. */
|
|
3463
3494
|
static grassColor(origin?: AssetKey, temperature?: number, downfall?: number): Promise<number>;
|
|
3495
|
+
/** Samples a resource-pack colormap at the supplied climate coordinates. */
|
|
3496
|
+
static getColor(kind: "grass" | "foliage" | "dry_foliage", origin?: AssetKey, temperature?: number, downfall?: number): Promise<number>;
|
|
3464
3497
|
}
|
|
3465
3498
|
|
|
3466
3499
|
/** Creates sRGB textures immediately and fills their pixels after asynchronous image loading. */
|
|
@@ -3592,7 +3625,6 @@ declare class AnvilParser {
|
|
|
3592
3625
|
* @returns The chunk with absolute coordinates, or `undefined` if the region has no chunk there.
|
|
3593
3626
|
*/
|
|
3594
3627
|
static parseChunk(data: RegionInput, localX: number, localZ: number, options?: AnvilParseOptions): Promise<AnvilChunk | undefined>;
|
|
3595
|
-
private static assetGuard;
|
|
3596
3628
|
/**
|
|
3597
3629
|
* Decodes one chunk from an `entities/r.x.z.mca` file without migrating its NBT.
|
|
3598
3630
|
* @param localX - Chunk x within the region, from 0 to 31.
|
|
@@ -3683,6 +3715,8 @@ interface SectionMeshEntry {
|
|
|
3683
3715
|
/** Fluid cells for one section and the shared atlases of the kinds present. */
|
|
3684
3716
|
interface SectionFluids {
|
|
3685
3717
|
cells: Uint8Array;
|
|
3718
|
+
/** Linear RGB per section cell, indexed by (x + 16z + 256y) * 3. */
|
|
3719
|
+
waterTints?: Float32Array;
|
|
3686
3720
|
water?: TextureAtlas;
|
|
3687
3721
|
lava?: TextureAtlas;
|
|
3688
3722
|
}
|
|
@@ -3706,14 +3740,16 @@ declare class SectionModels {
|
|
|
3706
3740
|
private readonly fluidAtlases;
|
|
3707
3741
|
constructor(maxAtlasSize?: number);
|
|
3708
3742
|
/** Returns templates for the matched parts, or `undefined` when the block needs an individual render object. */
|
|
3709
|
-
get(blockState: BlockState, properties?: BlockStateProperties, position?: Readonly<TripleArray
|
|
3710
|
-
/** Resolves section templates
|
|
3711
|
-
prepareState(blockState: BlockState, properties?: BlockStateProperties): Promise<{
|
|
3743
|
+
get(blockState: BlockState, properties?: BlockStateProperties, position?: Readonly<TripleArray>, biome?: string): Promise<SectionMeshTemplate[] | undefined>;
|
|
3744
|
+
/** Resolves section templates for one tint palette, with a synchronous weighted choice for each cell. */
|
|
3745
|
+
prepareState(blockState: BlockState, properties?: BlockStateProperties, biomeColor?: number | (() => Promise<number | undefined>)): Promise<{
|
|
3712
3746
|
pick(position?: Readonly<TripleArray>): SectionMeshTemplate[];
|
|
3713
3747
|
} | undefined>;
|
|
3748
|
+
private state;
|
|
3714
3749
|
/** Returns the shared still/flow atlas used by per-block fluid objects. */
|
|
3715
3750
|
fluidAtlas(kind: FluidKind, root?: string): Promise<TextureAtlas>;
|
|
3716
3751
|
private prepare;
|
|
3752
|
+
private template;
|
|
3717
3753
|
/** Disposes prepared geometry and clears this world's template caches. */
|
|
3718
3754
|
clear(): void;
|
|
3719
3755
|
}
|
|
@@ -3727,6 +3763,8 @@ declare class Chunk<SectionMeshing extends boolean = false> {
|
|
|
3727
3763
|
private readonly onBlocksChanged?;
|
|
3728
3764
|
private readonly sectionModels?;
|
|
3729
3765
|
private readonly neighborCell?;
|
|
3766
|
+
private readonly biomeAt?;
|
|
3767
|
+
private readonly onBiomesChanged?;
|
|
3730
3768
|
readonly scene: MineRenderScene;
|
|
3731
3769
|
readonly x: number;
|
|
3732
3770
|
readonly y: number;
|
|
@@ -3737,13 +3775,23 @@ declare class Chunk<SectionMeshing extends boolean = false> {
|
|
|
3737
3775
|
private readonly hiddenBlocks;
|
|
3738
3776
|
private readonly fluidCells;
|
|
3739
3777
|
private readonly blockPosition;
|
|
3778
|
+
private waterTints?;
|
|
3779
|
+
private biomes?;
|
|
3740
3780
|
private sectionMesh?;
|
|
3741
3781
|
private meshDirty;
|
|
3742
3782
|
private meshGeneration;
|
|
3743
|
-
constructor(scene: MineRenderScene, x: number, y: number, z: number, onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined, sectionModels?: SectionModels | undefined, neighborCell?: ((x: number, y: number, z: number) => number) | undefined);
|
|
3783
|
+
constructor(scene: MineRenderScene, x: number, y: number, z: number, onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined, sectionModels?: SectionModels | undefined, neighborCell?: ((x: number, y: number, z: number) => number) | undefined, biomeAt?: ((x: number, y: number, z: number) => Maybe<string>) | undefined, onBiomesChanged?: ((biomes?: readonly string[]) => Promise<void>) | undefined);
|
|
3744
3784
|
getBlockAt(x: number, y: number, z: number): Maybe<BlockInfo<SectionMeshing>>;
|
|
3745
3785
|
getBlockAt(pos: Vector3): Maybe<BlockInfo<SectionMeshing>>;
|
|
3746
3786
|
getBlockAt(pos: TripleArray): Maybe<BlockInfo<SectionMeshing>>;
|
|
3787
|
+
/** Returns the saved 4-block biome sample at integer world block coordinates, or `undefined` if absent. */
|
|
3788
|
+
getBiomeAt(x: number, y: number, z: number): Maybe<string>;
|
|
3789
|
+
getBiomeAt(pos: Vector3): Maybe<string>;
|
|
3790
|
+
getBiomeAt(pos: TripleArray): Maybe<string>;
|
|
3791
|
+
/** Copies 64 biome IDs in x + z * 4 + y * 16 order and refreshes placed blocks. Omit the array to clear biome data. */
|
|
3792
|
+
setBiomes(biomes?: readonly string[]): Promise<void>;
|
|
3793
|
+
/** Rebuilds biome-tinted blocks while preserving hidden blocks and unrelated render objects. */
|
|
3794
|
+
refreshBiomes(): Promise<void>;
|
|
3747
3795
|
/**
|
|
3748
3796
|
* Places a block at integer world block coordinates. Pass `undefined` to remove it.
|
|
3749
3797
|
*/
|
|
@@ -3761,6 +3809,10 @@ declare class Chunk<SectionMeshing extends boolean = false> {
|
|
|
3761
3809
|
}[]): Promise<Vector3[]>;
|
|
3762
3810
|
/** Replaces every cell from parsed section data. The caller refreshes neighbor culling. */
|
|
3763
3811
|
placeSection(data: ChunkData): Promise<void>;
|
|
3812
|
+
private positionAt;
|
|
3813
|
+
private biomePosition;
|
|
3814
|
+
private resolveState;
|
|
3815
|
+
private setWaterTint;
|
|
3764
3816
|
/** Changes visibility at world block coordinates while preserving the block's data. */
|
|
3765
3817
|
setBlockVisibleAt(pos: Vector3, visible: boolean): Promise<void>;
|
|
3766
3818
|
isBlockVisibleAt(pos: Vector3): boolean;
|
|
@@ -3899,6 +3951,8 @@ interface SectionFluidKind {
|
|
|
3899
3951
|
interface SectionFluidInput {
|
|
3900
3952
|
/** Bit 128 marks a surface rendered elsewhere; the cell still supplies neighbor fluid samples. */
|
|
3901
3953
|
cells: Uint8Array;
|
|
3954
|
+
/** Linear RGB per section cell, indexed by (x + 16z + 256y) * 3. Omission uses the water kind's tint. */
|
|
3955
|
+
waterTints?: Float32Array;
|
|
3902
3956
|
water?: SectionFluidKind;
|
|
3903
3957
|
lava?: SectionFluidKind;
|
|
3904
3958
|
}
|
|
@@ -4092,4 +4146,4 @@ declare class NodeRenderer extends Renderer {
|
|
|
4092
4146
|
dispose(): void;
|
|
4093
4147
|
}
|
|
4094
4148
|
|
|
4095
|
-
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 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, 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, 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, NodeCache, NodeEnv, type NodeImageOptions, NodeRenderer, type NodeRendererOptions, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SKIN_PARTS, 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, 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 WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, 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, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|
|
4149
|
+
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 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, 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, 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, NodeCache, NodeEnv, type NodeImageOptions, NodeRenderer, type NodeRendererOptions, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, PlayerHeadTextures, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererControls, type RendererFrame, type RendererOptions, type RendererSurface, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResolvedMineRenderData, type ResponseParser, SKIN_PARTS, 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, 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 WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildFluidQuads, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, 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, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveBlockFluidState, resolveLegacyBlock, resolveLegacyBlockState, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|