minerender 2.1.0-beta.6 → 2.1.0-beta.8

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.
Files changed (128) hide show
  1. package/README.md +10 -1
  2. package/dist/browser/esm/Materials.mjs +3 -1
  3. package/dist/browser/esm/Materials.mjs.map +1 -1
  4. package/dist/browser/esm/Ticker.mjs +3 -1
  5. package/dist/browser/esm/Ticker.mjs.map +1 -1
  6. package/dist/browser/esm/UVMapper.mjs +9 -9
  7. package/dist/browser/esm/UVMapper.mjs.map +1 -1
  8. package/dist/browser/esm/armor/Armor.mjs +84 -0
  9. package/dist/browser/esm/armor/Armor.mjs.map +1 -0
  10. package/dist/browser/esm/armor/index.mjs +3 -0
  11. package/dist/browser/esm/armor/index.mjs.map +1 -0
  12. package/dist/browser/esm/assets/AssetDefaults.mjs +8 -0
  13. package/dist/browser/esm/assets/AssetDefaults.mjs.map +1 -0
  14. package/dist/browser/esm/assets/AssetKey.mjs +1 -1
  15. package/dist/browser/esm/assets/AssetKey.mjs.map +1 -1
  16. package/dist/browser/esm/assets/AssetLoader.mjs +5 -5
  17. package/dist/browser/esm/assets/AssetLoader.mjs.map +1 -1
  18. package/dist/browser/esm/assets/Assets.mjs +1 -5
  19. package/dist/browser/esm/assets/Assets.mjs.map +1 -1
  20. package/dist/browser/esm/assets/BlockEntities.mjs +5 -1
  21. package/dist/browser/esm/assets/BlockEntities.mjs.map +1 -1
  22. package/dist/browser/esm/assets/BlockStates.mjs +1 -1
  23. package/dist/browser/esm/assets/BlockStates.mjs.map +1 -1
  24. package/dist/browser/esm/assets/Entities.mjs +40 -12
  25. package/dist/browser/esm/assets/Entities.mjs.map +1 -1
  26. package/dist/browser/esm/assets/MineRenderData.mjs +8 -17
  27. package/dist/browser/esm/assets/MineRenderData.mjs.map +1 -1
  28. package/dist/browser/esm/assets/ModelTextures.mjs +13 -7
  29. package/dist/browser/esm/assets/ModelTextures.mjs.map +1 -1
  30. package/dist/browser/esm/assets/Models.mjs +1 -1
  31. package/dist/browser/esm/assets/Models.mjs.map +1 -1
  32. package/dist/browser/esm/assets/_fonts/Unihex.mjs +5 -3
  33. package/dist/browser/esm/assets/_fonts/Unihex.mjs.map +1 -1
  34. package/dist/browser/esm/assets/_versions/DatasetVersions.mjs +22 -0
  35. package/dist/browser/esm/assets/_versions/DatasetVersions.mjs.map +1 -0
  36. package/dist/browser/esm/assets/index.mjs +1 -0
  37. package/dist/browser/esm/assets/index.mjs.map +1 -1
  38. package/dist/browser/esm/assets/source/HostedAssetSource.mjs +7 -8
  39. package/dist/browser/esm/assets/source/HostedAssetSource.mjs.map +1 -1
  40. package/dist/browser/esm/cache/Caching.mjs +8 -0
  41. package/dist/browser/esm/cache/Caching.mjs.map +1 -1
  42. package/dist/browser/esm/entity/scene/EntityObject.mjs +31 -5
  43. package/dist/browser/esm/entity/scene/EntityObject.mjs.map +1 -1
  44. package/dist/browser/esm/env/browser/BrowserCache.mjs +3 -3
  45. package/dist/browser/esm/env/browser/BrowserCache.mjs.map +1 -1
  46. package/dist/browser/esm/env/browser/BrowserEnv.mjs +11 -4
  47. package/dist/browser/esm/env/browser/BrowserEnv.mjs.map +1 -1
  48. package/dist/browser/esm/image/ImageLoader.mjs +3 -3
  49. package/dist/browser/esm/image/ImageLoader.mjs.map +1 -1
  50. package/dist/browser/esm/index.browser.d.mts +191 -22
  51. package/dist/browser/esm/index.browser.mjs.map +1 -1
  52. package/dist/browser/esm/index.mjs +1 -0
  53. package/dist/browser/esm/index.mjs.map +1 -1
  54. package/dist/browser/esm/inspector/SceneInspector.mjs +3 -3
  55. package/dist/browser/esm/inspector/SceneInspector.mjs.map +1 -1
  56. package/dist/browser/esm/instance/InstanceManager.mjs +4 -4
  57. package/dist/browser/esm/instance/InstanceManager.mjs.map +1 -1
  58. package/dist/browser/esm/model/ItemGlint.mjs +7 -6
  59. package/dist/browser/esm/model/ItemGlint.mjs.map +1 -1
  60. package/dist/browser/esm/model/block/scene/BlockObject.mjs +19 -6
  61. package/dist/browser/esm/model/block/scene/BlockObject.mjs.map +1 -1
  62. package/dist/browser/esm/model/multiblock/StructureParser.mjs +7 -4
  63. package/dist/browser/esm/model/multiblock/StructureParser.mjs.map +1 -1
  64. package/dist/browser/esm/model/scene/ModelObject.mjs +4 -4
  65. package/dist/browser/esm/model/scene/ModelObject.mjs.map +1 -1
  66. package/dist/browser/esm/nbt/NBTHelper.mjs +5 -2
  67. package/dist/browser/esm/nbt/NBTHelper.mjs.map +1 -1
  68. package/dist/browser/esm/renderer/Renderer.mjs +4 -2
  69. package/dist/browser/esm/renderer/Renderer.mjs.map +1 -1
  70. package/dist/browser/esm/renderer/SceneObject.mjs +0 -6
  71. package/dist/browser/esm/renderer/SceneObject.mjs.map +1 -1
  72. package/dist/browser/esm/request/Requests.mjs +3 -3
  73. package/dist/browser/esm/request/Requests.mjs.map +1 -1
  74. package/dist/browser/esm/scene/SceneDocument.mjs +35 -5
  75. package/dist/browser/esm/scene/SceneDocument.mjs.map +1 -1
  76. package/dist/browser/esm/scene/SceneDocumentLoader.mjs +14 -3
  77. package/dist/browser/esm/scene/SceneDocumentLoader.mjs.map +1 -1
  78. package/dist/browser/esm/skin/SkinGeometries.mjs +4 -1
  79. package/dist/browser/esm/skin/SkinGeometries.mjs.map +1 -1
  80. package/dist/browser/esm/skin/SkinPart.mjs +2 -0
  81. package/dist/browser/esm/skin/SkinPart.mjs.map +1 -1
  82. package/dist/browser/esm/skin/SkinTextureCoordinates.mjs +11 -1
  83. package/dist/browser/esm/skin/SkinTextureCoordinates.mjs.map +1 -1
  84. package/dist/browser/esm/skin/SkinTextures.mjs +1 -1
  85. package/dist/browser/esm/skin/SkinTextures.mjs.map +1 -1
  86. package/dist/browser/esm/skin/Skins.mjs +6 -4
  87. package/dist/browser/esm/skin/Skins.mjs.map +1 -1
  88. package/dist/browser/esm/skin/scene/SkinObject.mjs +119 -7
  89. package/dist/browser/esm/skin/scene/SkinObject.mjs.map +1 -1
  90. package/dist/browser/esm/texture/PalettedTextures.mjs +46 -0
  91. package/dist/browser/esm/texture/PalettedTextures.mjs.map +1 -0
  92. package/dist/browser/esm/texture/TextureLoader.mjs +4 -2
  93. package/dist/browser/esm/texture/TextureLoader.mjs.map +1 -1
  94. package/dist/browser/esm/texture/index.mjs +1 -0
  95. package/dist/browser/esm/texture/index.mjs.map +1 -1
  96. package/dist/browser/esm/util/log.mjs +75 -0
  97. package/dist/browser/esm/util/log.mjs.map +1 -1
  98. package/dist/browser/esm/util/performance.mjs.map +1 -1
  99. package/dist/browser/esm/util/util.mjs +0 -2
  100. package/dist/browser/esm/util/util.mjs.map +1 -1
  101. package/dist/browser/esm/world/Chunk.mjs +70 -38
  102. package/dist/browser/esm/world/Chunk.mjs.map +1 -1
  103. package/dist/browser/esm/world/MineRenderWorld.mjs +187 -60
  104. package/dist/browser/esm/world/MineRenderWorld.mjs.map +1 -1
  105. package/dist/browser/esm/world/SectionMesh.mjs +65 -9
  106. package/dist/browser/esm/world/SectionMesh.mjs.map +1 -1
  107. package/dist/browser/esm/world/SectionModels.mjs +21 -15
  108. package/dist/browser/esm/world/SectionModels.mjs.map +1 -1
  109. package/dist/browser/esm/world/SectionWorker.mjs +8 -2
  110. package/dist/browser/esm/world/SectionWorker.mjs.map +1 -1
  111. package/dist/browser/esm/world/WorldStreamer.mjs +129 -34
  112. package/dist/browser/esm/world/WorldStreamer.mjs.map +1 -1
  113. package/dist/browser/esm/world/_culling/BlockCulling.mjs +1 -1
  114. package/dist/browser/esm/world/_culling/BlockCulling.mjs.map +1 -1
  115. package/dist/browser/esm/world/_entities/WorldEntities.mjs +3 -1
  116. package/dist/browser/esm/world/_entities/WorldEntities.mjs.map +1 -1
  117. package/dist/browser/index.d.ts +191 -22
  118. package/dist/browser/index.js +4461 -3648
  119. package/dist/browser/index.js.map +1 -1
  120. package/dist/bundle.js +13482 -12651
  121. package/dist/bundle.js.map +1 -1
  122. package/dist/node/index.d.mts +179 -21
  123. package/dist/node/index.d.ts +179 -21
  124. package/dist/node/index.js +4495 -3666
  125. package/dist/node/index.js.map +1 -1
  126. package/dist/node/index.mjs +4412 -3586
  127. package/dist/node/index.mjs.map +1 -1
  128. package/package.json +2 -1
@@ -249,6 +249,15 @@ interface EntityLayer {
249
249
  render?: EntityRenderMode;
250
250
  /** Label of the state colour that multiplies the texture, from the pass that selected this draw. */
251
251
  tint?: string;
252
+ /** Fixed sRGB colour that multiplies the texture. A tint label with a colour in `EntityObjectOptions.tints` takes precedence. */
253
+ color?: number;
254
+ /** Recolours pixels matching `key` with the colour at the same index in `permutation`, as vanilla's `paletted_permutations` does. */
255
+ palette?: {
256
+ key: AssetKey;
257
+ permutation: AssetKey;
258
+ };
259
+ /** Draws vanilla's armor enchantment glint over this draw. */
260
+ glint?: boolean;
252
261
  }
253
262
  /** Selected entity data returned by {@link Entities.getEntity} for rendering. */
254
263
  interface EntityModel extends EntityLayer {
@@ -783,7 +792,10 @@ declare function toRadians(degrees: number): number;
783
792
  declare function toDegrees(radians: number): number;
784
793
  /** Resolves after a delay in milliseconds. */
785
794
  declare function sleep(timeout: number): Promise<void>;
786
- /** Yields to the next macrotask without timer clamping when the platform supports it. */
795
+ /**
796
+ * Yields to the next macrotask without timer clamping when the platform supports it.
797
+ * Not `scheduler.yield()`: Chrome runs its continuations ahead of rendering, so chained yields delay frames.
798
+ */
787
799
  declare function yieldToEventLoop(): Promise<void>;
788
800
  /** Reduces an angle modulo 360, retaining a negative sign for negative inputs. */
789
801
  declare function clampRotationDegrees(deg: number): number;
@@ -913,6 +925,33 @@ declare class MinecraftFaceUV {
913
925
  */
914
926
  declare function shutdown(): void;
915
927
 
928
+ type ArmorSlot = "head" | "chest" | "legs" | "feet";
929
+ interface ArmorTrim {
930
+ /** `trim_pattern` registry ID, such as `minecraft:sentry`. */
931
+ pattern: string;
932
+ /** `trim_material` registry ID, such as `minecraft:iron`. */
933
+ material: string;
934
+ }
935
+ /** An equipment asset ID, such as `minecraft:diamond`, or the asset with the worn item's state. */
936
+ type ArmorPiece = string | {
937
+ asset: string;
938
+ /** `dyed_color` as an RGB integer. */
939
+ color?: number;
940
+ trim?: ArmorTrim;
941
+ /** Draws the enchantment glint, as an enchanted item does. */
942
+ glint?: boolean;
943
+ };
944
+ type ArmorSet = Partial<Record<ArmorSlot, ArmorPiece>>;
945
+ /** Resolves humanoid equipment assets into armor draws. */
946
+ declare class Armor {
947
+ /** Loads 1.21.4+ armor in SkinObject's frame, or returns undefined when no layer draws. */
948
+ static getEntity(armor: ArmorSet): Promise<Maybe<EntityModel>>;
949
+ private static identifier;
950
+ }
951
+
952
+ declare const DEFAULT_ROOT = "https://assets.mcasset.cloud/1.21.11";
953
+ declare const DEFAULT_NAMESPACE = "minecraft";
954
+
916
955
  /** Runs queued tasks in bounded batches. Idle executors do not keep a timer running. */
917
956
  declare class BatchedExecutor {
918
957
  readonly interval: number;
@@ -930,6 +969,34 @@ declare class BatchedExecutor {
930
969
  }
931
970
  type Task<T = unknown> = () => T | Promise<T>;
932
971
 
972
+ /** Severity of a log message, from most to least verbose. */
973
+ type LogLevel = "debug" | "info" | "warn" | "error";
974
+ /** The lowest level that is printed, or `"silent"` to print nothing. */
975
+ type LogThreshold = LogLevel | "silent";
976
+ /** Receives each message that passes the threshold. `args` are the logger call's arguments, without a tag. */
977
+ type LogHandler = (level: LogLevel, namespace: string, args: unknown[]) => void;
978
+ interface LoggingOptions {
979
+ /** Threshold for namespaces without an override. Starts at `"warn"`. */
980
+ level?: LogThreshold;
981
+ /** Thresholds by logger name, such as `{ UVMapper: "debug" }`. Replaces earlier overrides. */
982
+ namespaces?: Record<string, LogThreshold>;
983
+ }
984
+ interface Logger {
985
+ debug(...args: unknown[]): void;
986
+ info(...args: unknown[]): void;
987
+ warn(...args: unknown[]): void;
988
+ error(...args: unknown[]): void;
989
+ }
990
+ /** Global log settings for every MineRender logger. */
991
+ declare class Logging {
992
+ /** Updates the given settings and keeps the others. */
993
+ static configure(options: LoggingOptions): void;
994
+ /** Sends messages to `handler` instead of the console. Call without an argument to restore console output. */
995
+ static setHandler(handler?: LogHandler): void;
996
+ }
997
+ /** Creates a logger whose messages are tagged and filtered as `namespace`. */
998
+ declare function logger(namespace: string): Logger;
999
+ /** @deprecated Use {@link logger}. */
933
1000
  declare function prefix(prefix?: string): string;
934
1001
 
935
1002
  /** Rotates geometry in place around the element's origin. The supplied angle is in degrees. */
@@ -941,8 +1008,11 @@ declare function addWireframeToObject(obj: Object3D, color?: number, w?: number)
941
1008
  /** Adds edge and axis helpers to a mesh and returns a function that disposes their resources. */
942
1009
  declare function addWireframeToMesh(geo: BufferGeometry, mesh: Mesh, color?: number, w?: number): () => void;
943
1010
 
1011
+ /** @deprecated Unused by MineRender. */
944
1012
  declare function captureException(e: any, ...extra: any[]): void;
1013
+ /** @deprecated Unused by MineRender. */
945
1014
  declare function timingStart(marker: string): void;
1015
+ /** @deprecated Unused by MineRender. */
946
1016
  declare function timingEnd(marker: string): void;
947
1017
 
948
1018
  declare function sha1(str: string): string;
@@ -1057,8 +1127,6 @@ type MultipartCondition = Record<string, string> | {
1057
1127
  AND: MultipartCondition[];
1058
1128
  };
1059
1129
 
1060
- declare const DEFAULT_ROOT = "https://assets.mcasset.cloud/1.21.11";
1061
- declare const DEFAULT_NAMESPACE = "minecraft";
1062
1130
  /** Convenience accessors for model and blockstate loading. */
1063
1131
  declare class Assets {
1064
1132
  /**
@@ -1227,9 +1295,16 @@ declare function sampleEntityAnimation(animation: EntityAnimation, time: number,
1227
1295
 
1228
1296
  /** Loads entity and block-entity geometry, texture selections, and animation clips from the dataset. */
1229
1297
  declare class Entities {
1298
+ /**
1299
+ * Resolves `root` (default: the active version). Uses the exact dataset when published or when the
1300
+ * version is not a release; otherwise selects the nearest published release, like {@link MineRenderData.resolve}.
1301
+ * Textures keep the requested root.
1302
+ */
1303
+ static getDatasetRoot(root?: string): Promise<Maybe<string>>;
1230
1304
  /** Lists model paths in the `minecraft` namespace, including subdirectories and excluding `.json`. */
1231
1305
  static getEntityList(): Promise<string[]>;
1232
- private static getModelFile;
1306
+ /** @internal */
1307
+ static getModelFile(modelKey: BasicAssetKey): Promise<Maybe<EntityModelFile>>;
1233
1308
  /** Returns selectable geometry-layer names, or an empty list when the model is missing. */
1234
1309
  static getLayerList(modelKey: BasicAssetKey): Promise<string[]>;
1235
1310
  /** The dataset's extra draws on top of `main`; their `when` labels are the states `EntityModelOptions.when` can enable. */
@@ -1643,6 +1718,7 @@ declare class EntityObject extends SceneObject {
1643
1718
  age: number;
1644
1719
  private readonly animationPlayers;
1645
1720
  private readonly partPoses;
1721
+ private glint?;
1646
1722
  constructor(entity: EntityModel, options?: Partial<EntityObjectOptions>);
1647
1723
  /** An optional shared material replaces texture loading for every selected draw; its owner retains disposal. */
1648
1724
  init(material?: Material): Promise<void>;
@@ -1700,7 +1776,7 @@ interface EntityObjectOptions extends SceneObjectOptions {
1700
1776
  * By default the model's dataset transform is used, or the flip for models without one.
1701
1777
  */
1702
1778
  flip?: boolean;
1703
- /** Colours for the dataset's tint labels, e.g. `{ wool_color: 0xf9801d }`; a pass whose label is absent stays untinted. */
1779
+ /** Colours for the dataset's tint labels, e.g. `{ wool_color: 0xf9801d }`; an absent label uses the draw's fixed colour, if any. */
1704
1780
  tints?: Record<string, ColorRepresentation>;
1705
1781
  /** Cube faces by layer key; omitted layers draw all six faces. */
1706
1782
  faces?: Record<string, CubeFace[]>;
@@ -1751,6 +1827,7 @@ declare class BlockObject extends SceneObject {
1751
1827
  */
1752
1828
  private createBlockEntities;
1753
1829
  private placeEntities;
1830
+ private placeEntity;
1754
1831
  get isOccluding(): boolean;
1755
1832
  private getModelMatrix;
1756
1833
  private getModelCullMask;
@@ -1873,7 +1950,9 @@ declare enum SkinPart {
1873
1950
  LEFT_SLEEVE = "leftSleeve",
1874
1951
  RIGHT_TROUSERS = "rightTrousers",
1875
1952
  LEFT_TROUSERS = "leftTrousers",
1876
- CAPE = "cape"
1953
+ CAPE = "cape",
1954
+ LEFT_EAR = "leftEar",
1955
+ RIGHT_EAR = "rightEar"
1877
1956
  }
1878
1957
  declare const SKIN_PARTS: SkinPart[];
1879
1958
 
@@ -1889,6 +1968,9 @@ declare class SkinObject extends SceneObject {
1889
1968
  private skinMaterial?;
1890
1969
  private skinLoad;
1891
1970
  private capeLoad;
1971
+ private armorLoad;
1972
+ private armorObjects;
1973
+ private model?;
1892
1974
  constructor(options?: DeepPartial<SkinObjectOptions>);
1893
1975
  init(): Promise<void>;
1894
1976
  protected removeMeshes(): void;
@@ -1904,9 +1986,20 @@ declare class SkinObject extends SceneObject {
1904
1986
  setSkinTexture(src: string): Promise<void>;
1905
1987
  /** Load a cape texture in the selected layout, or pass undefined to remove the cape. */
1906
1988
  setCapeTexture(src?: string, layout?: CapeLayout): Promise<void>;
1989
+ /**
1990
+ * Loads armor from 1.21.4+ equipment assets, or pass undefined to remove it.
1991
+ * Each piece moves with the skin part it covers.
1992
+ */
1993
+ setArmor(armor?: ArmorSet): Promise<void>;
1907
1994
  /** Select the arm model, or pass undefined to use texture detection. */
1908
1995
  setSlim(slim?: boolean): void;
1909
1996
  private updateSlim;
1997
+ /** Shows or hides deadmau5's ears, which vanilla draws from the skin texture at 24,0 for that player only. */
1998
+ setEars(ears: boolean): void;
1999
+ private updateEars;
2000
+ /** Turns the player upside down, as vanilla does for players named Dinnerbone or Grumm. */
2001
+ setUpsideDown(upsideDown: boolean): void;
2002
+ private updateUpsideDown;
1910
2003
  /** Select the texture layout, or pass undefined to detect it from image dimensions. */
1911
2004
  setLegacy(legacy?: boolean): Promise<void>;
1912
2005
  dispose(): void;
@@ -1918,6 +2011,10 @@ interface SkinObjectOptions extends SceneObjectOptions {
1918
2011
  slim?: boolean;
1919
2012
  /** Forces the legacy (`true`) or modern (`false`) texture layout. Omit it to detect the layout. */
1920
2013
  legacy?: boolean;
2014
+ /** Draws deadmau5's ears from the skin texture. Vanilla shows them only for that player name. */
2015
+ ears?: boolean;
2016
+ /** Turns the player upside down. Vanilla does this for players named Dinnerbone or Grumm. */
2017
+ upsideDown?: boolean;
1921
2018
  }
1922
2019
 
1923
2020
  /** Text appearance set on a GUI text layer or overridden by an individual text run. */
@@ -2190,7 +2287,7 @@ declare class ItemGlint {
2190
2287
  static create(owner: SceneObject, baseMap?: Texture, root?: string, entityMeshes?: readonly {
2191
2288
  mesh: Mesh;
2192
2289
  parent?: Mesh;
2193
- }[]): Promise<ItemGlint>;
2290
+ }[], kind?: "item" | "armor"): Promise<ItemGlint>;
2194
2291
  /**
2195
2292
  * Maps glint before model centering and display transforms. Ordinary sprites approximate Minecraft's shared atlas density.
2196
2293
  * @internal
@@ -2459,11 +2556,21 @@ interface Palette {
2459
2556
  };
2460
2557
  }
2461
2558
  interface PaletteEntry {
2462
- Name: {
2559
+ Name?: {
2560
+ type: "string";
2561
+ value: string;
2562
+ };
2563
+ id?: {
2463
2564
  type: "string";
2464
2565
  value: string;
2465
2566
  };
2466
- Properties: {
2567
+ Properties?: {
2568
+ type: "compound";
2569
+ value: {
2570
+ [property: string]: PalettePropertyValue;
2571
+ };
2572
+ };
2573
+ properties?: {
2467
2574
  type: "compound";
2468
2575
  value: {
2469
2576
  [property: string]: PalettePropertyValue;
@@ -2691,6 +2798,8 @@ interface UnihexFile {
2691
2798
 
2692
2799
  /** Shared in-memory caches for loaded assets and render resources. Persistent stores are managed separately. */
2693
2800
  declare class Caching {
2801
+ /** Cached in place of a missing asset. The caches drop `undefined` results, which would request the asset again. */
2802
+ static readonly MISSING: false;
2694
2803
  private static _generation;
2695
2804
  /** Changes when shared assets are cleared, so derived caches can discard their old values. */
2696
2805
  static get generation(): number;
@@ -2703,7 +2812,7 @@ declare class Caching {
2703
2812
  static readonly materialCache: SimpleCache<CacheKey, Material>;
2704
2813
  static readonly boxMeshCache: SimpleCache<CacheKey, Mesh>;
2705
2814
  static readonly textureAssetCache: AsyncLoadingCache<CacheKey, TextureAsset>;
2706
- static readonly textureMetaCache: AsyncLoadingCache<CacheKey, MinecraftTextureMeta>;
2815
+ static readonly textureMetaCache: AsyncLoadingCache<CacheKey, MinecraftTextureMeta | typeof Caching.MISSING>;
2707
2816
  static readonly rawModelCache: AsyncLoadingCache<CacheKey, Model>;
2708
2817
  static readonly mergedModelCache: AsyncLoadingCache<CacheKey, Model>;
2709
2818
  static readonly modelTextureAtlasCache: AsyncLoadingCache<CacheKey, TextureAtlas>;
@@ -2711,12 +2820,15 @@ declare class Caching {
2711
2820
  static readonly listAssetCache: AsyncLoadingCache<CacheKey, ListAsset>;
2712
2821
  static readonly blockTintCache: AsyncLoadingCache<CacheKey, number>;
2713
2822
  static readonly entityModelCache: AsyncLoadingCache<CacheKey, EntityModelFile>;
2714
- static readonly entityTextureCache: AsyncLoadingCache<CacheKey, AssetKey>;
2823
+ static readonly entityTextureCache: AsyncLoadingCache<CacheKey, AssetKey | typeof Caching.MISSING>;
2715
2824
  static readonly entityAnimationCache: AsyncLoadingCache<CacheKey, EntityAnimationFile>;
2716
2825
  static readonly blockEntityIndexCache: AsyncLoadingCache<CacheKey, BlockEntityIndex>;
2826
+ static readonly entityDatasetVersionCache: AsyncLoadingCache<CacheKey, string>;
2717
2827
  static readonly unihexCache: AsyncLoadingCache<CacheKey, UnihexFile>;
2718
2828
  static readonly fontCache: AsyncLoadingCache<CacheKey, BitmapFont>;
2719
2829
  static readonly bannerPatternCache: AsyncLoadingCache<CacheKey, BannerPattern>;
2830
+ static readonly equipmentCache: AsyncLoadingCache<CacheKey, unknown>;
2831
+ static readonly trimCache: AsyncLoadingCache<CacheKey, unknown>;
2720
2832
  static readonly mineRenderDataCache: AsyncLoadingCache<CacheKey, unknown>;
2721
2833
  static readonly usernameUuidCache: AsyncLoadingCache<CacheKey, string>;
2722
2834
  static readonly biomeCache: AsyncLoadingCache<CacheKey, Biome>;
@@ -3400,9 +3512,12 @@ interface SceneSkinDefinition extends SceneObjectDefinitionBase {
3400
3512
  texture: string;
3401
3513
  layout?: CapeLayout;
3402
3514
  };
3515
+ armor?: ArmorSet;
3403
3516
  options?: {
3404
3517
  slim?: boolean;
3405
3518
  legacy?: boolean;
3519
+ ears?: boolean;
3520
+ upsideDown?: boolean;
3406
3521
  };
3407
3522
  /** Mesh names from SkinPart; hiding a base part does not hide its overlay. */
3408
3523
  hiddenParts?: string[];
@@ -3449,8 +3564,17 @@ interface SceneEntityDefinition extends SceneObjectDefinitionBase {
3449
3564
  wireframe?: boolean;
3450
3565
  tints?: Record<string, string | number>;
3451
3566
  };
3452
- animation?: {
3567
+ /** Plays one named clip or blends clips with weights defaulting to 1, without normalization. */
3568
+ animation?: ({
3453
3569
  name: string;
3570
+ clips?: never;
3571
+ } | {
3572
+ name?: never;
3573
+ clips: {
3574
+ name: string;
3575
+ weight?: number;
3576
+ }[];
3577
+ }) & {
3454
3578
  loop?: boolean;
3455
3579
  speed?: number;
3456
3580
  time?: number;
@@ -3598,6 +3722,14 @@ declare class Colormaps {
3598
3722
  static getColor(kind: "grass" | "foliage" | "dry_foliage", origin?: AssetKey, temperature?: number, downfall?: number): Promise<number>;
3599
3723
  }
3600
3724
 
3725
+ /** Recolours textures using indexed pairs of palette images. */
3726
+ declare class PalettedTextures {
3727
+ /** Loads a texture with a palette permutation, sharing the resulting canvas between callers. */
3728
+ static get(texture: AssetKey, key: AssetKey, permutation: AssetKey): Promise<Maybe<ExtractableImageData>>;
3729
+ /** @internal */
3730
+ static permute(pixels: Uint8ClampedArray, key: Uint8ClampedArray, permutation: Uint8ClampedArray): Uint8ClampedArray;
3731
+ }
3732
+
3601
3733
  /** Creates sRGB textures immediately and fills their pixels after asynchronous image loading. */
3602
3734
  declare class TextureLoader {
3603
3735
  private static readonly failedTextures;
@@ -3961,6 +4093,8 @@ declare class SectionModels {
3961
4093
  pick(position?: Readonly<TripleArray>): SectionMeshTemplate[];
3962
4094
  biomeTint?: boolean;
3963
4095
  } | undefined>;
4096
+ /** Starts loading the state's models and atlases so a later `prepareState` with the same properties finds them loaded. */
4097
+ preload(blockState: BlockState, properties?: BlockStateProperties): Promise<void>;
3964
4098
  private state;
3965
4099
  /** Returns the shared still/flow atlas used by per-block fluid objects. */
3966
4100
  fluidAtlas(kind: FluidKind, root?: string): Promise<TextureAtlas>;
@@ -4034,7 +4168,7 @@ declare class Chunk<SectionMeshing extends boolean = false> {
4034
4168
  private ambientOcclusionCells?;
4035
4169
  private readonly blockChanges;
4036
4170
  private biomeChange?;
4037
- 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, lightAt?: ((x: number, y: number, z: number) => number) | undefined, onLightCleared?: (() => Promise<void>) | undefined, ambientLight?: number, biomeBlend?: (() => BiomeBlend | undefined) | undefined);
4171
+ constructor(scene: MineRenderScene, x: number, y: number, z: number, onBlocksChanged?: ((positions: Vector3[], deferCulling?: boolean) => 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, lightAt?: ((x: number, y: number, z: number) => number) | undefined, onLightCleared?: (() => Promise<void>) | undefined, ambientLight?: number, biomeBlend?: (() => BiomeBlend | undefined) | undefined);
4038
4172
  /** Finds the nearest owned block hit across sections, testing each shared mesh once. */
4039
4173
  static raycast<SectionMeshing extends boolean>(chunks: Iterable<Chunk<SectionMeshing>>, raycaster: Raycaster): WorldBlockIntersection | undefined;
4040
4174
  getBlockAt(x: number, y: number, z: number): Maybe<BlockInfo<SectionMeshing>>;
@@ -4046,11 +4180,14 @@ declare class Chunk<SectionMeshing extends boolean = false> {
4046
4180
  getBiomeAt(pos: TripleArray): Maybe<string>;
4047
4181
  /** Copies 64 biome IDs in x + z * 4 + y * 16 order and refreshes placed blocks. Omit the array to clear biome data. */
4048
4182
  setBiomes(biomes?: readonly string[]): Promise<void>;
4049
- /** Rebuilds biome-tinted blocks while preserving hidden blocks and unrelated render objects. */
4183
+ /**
4184
+ * Rebuilds biome-tinted blocks while preserving hidden blocks and unrelated render objects.
4185
+ * The owning world can defer neighbor culling until all affected chunks are refreshed.
4186
+ */
4050
4187
  refreshBiomes(columns?: readonly {
4051
4188
  x: number;
4052
4189
  z: number;
4053
- }[]): Promise<void>;
4190
+ }[], deferCulling?: boolean): Promise<void>;
4054
4191
  private refreshBiomeBlocks;
4055
4192
  /**
4056
4193
  * Places a block at integer world block coordinates. Pass `undefined` to remove it.
@@ -4061,7 +4198,7 @@ declare class Chunk<SectionMeshing extends boolean = false> {
4061
4198
  /**
4062
4199
  * Places a block at integer chunk-local coordinates from 0 to 15.
4063
4200
  */
4064
- setBlockInChunkAt(pos: Vector3, block?: Block, worldPos?: Vector3, onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined): Promise<Maybe<BlockInfo<SectionMeshing>>>;
4201
+ setBlockInChunkAt(pos: Vector3, block?: Block, worldPos?: Vector3, onBlocksChanged?: ((positions: Vector3[], deferCulling?: boolean) => Promise<void>) | undefined): Promise<Maybe<BlockInfo<SectionMeshing>>>;
4065
4202
  /** Places cells in input order and returns changed world positions without refreshing neighbors. */
4066
4203
  placeBlocks(blocks: readonly {
4067
4204
  index: number;
@@ -4072,6 +4209,7 @@ declare class Chunk<SectionMeshing extends boolean = false> {
4072
4209
  /** Replaces every cell from parsed section data. The caller refreshes neighbor culling. */
4073
4210
  placeSection(data: ChunkData): Promise<void>;
4074
4211
  private replaceSection;
4212
+ private createBlockObject;
4075
4213
  private positionAt;
4076
4214
  /** Refreshes saved lighting after adjacent columns load or unload, including columns with only light data. */
4077
4215
  refreshLight(indices?: Iterable<number>): Promise<void>;
@@ -4221,11 +4359,25 @@ declare class MineRenderWorld<SectionMeshing extends boolean = false> {
4221
4359
  private placeChunkGroups;
4222
4360
  /** Replaces a chunk column's blocks, biomes, and saved light and, with `renderEntities`, its supported saved mobs. */
4223
4361
  placeChunk(chunk: AnvilChunk, executor?: BatchedExecutor): Promise<void>;
4362
+ /**
4363
+ * Replaces parsed columns in input order, then refreshes neighboring geometry once.
4364
+ * Duplicate coordinates retain their order. A failed column stops placement; queued refreshes finish before rejection.
4365
+ */
4366
+ placeChunks(chunks: readonly AnvilChunk[]): Promise<void>;
4367
+ private placeColumn;
4224
4368
  /**
4225
4369
  * Removes blocks and owned entities at chunk-column coordinates, then refreshes neighboring faces and fluids.
4226
4370
  * Coordinates match AnvilChunk.x/z, not block positions. Missing columns are ignored.
4227
4371
  */
4228
4372
  unloadChunkColumn(x: number, z: number): Promise<void>;
4373
+ /**
4374
+ * Removes chunk columns together and refreshes surviving neighbors once.
4375
+ * Coordinates are absolute chunk columns. Duplicate and missing columns are ignored.
4376
+ */
4377
+ unloadChunkColumns(positions: readonly {
4378
+ x: number;
4379
+ z: number;
4380
+ }[]): Promise<void>;
4229
4381
  private clearChunkColumn;
4230
4382
  private markSectionChanged;
4231
4383
  /** Removes all chunks and releases their blocks, section meshes, and owned entities. */
@@ -4245,7 +4397,7 @@ declare class MineRenderWorld<SectionMeshing extends boolean = false> {
4245
4397
  interface MineRenderWorldOptions<SectionMeshing extends boolean = boolean> {
4246
4398
  /** Render supported saved mobs at their position and yaw, including supported appearance fields. Defaults to false. */
4247
4399
  renderEntities?: boolean;
4248
- /** Merge static opaque cubes into section meshes. Merged blocks have no individual object. */
4400
+ /** Merge block models of any shape and fluid surfaces into per-section meshes; block entities keep individual objects. Merged blocks have no individual object. */
4249
4401
  sectionMeshing?: SectionMeshing;
4250
4402
  /** Shade blocks and fluids with saved sky/block light. Missing or invalid data keeps preview brightness. Defaults to false. Requires `sectionMeshing`. */
4251
4403
  savedLighting?: boolean;
@@ -4255,7 +4407,7 @@ interface MineRenderWorldOptions<SectionMeshing extends boolean = boolean> {
4255
4407
  ambientOcclusion?: boolean;
4256
4408
  /** Average neighboring biome colors within this horizontal radius, from 0 to 7 blocks. Defaults to 0 (off). Requires `sectionMeshing`. */
4257
4409
  biomeBlendRadius?: number;
4258
- /** Maximum width and height of each section atlas page, in pixels. */
4410
+ /** Maximum width and height of each section atlas page, in pixels. Defaults to 2048. */
4259
4411
  maxAtlasSize?: number;
4260
4412
  }
4261
4413
 
@@ -4300,10 +4452,11 @@ declare class WorldStreamer {
4300
4452
  private desired;
4301
4453
  private center?;
4302
4454
  private loading?;
4455
+ private readonly reads;
4303
4456
  private running?;
4304
4457
  private disposal?;
4305
4458
  private disposed;
4306
- constructor(world: Pick<MineRenderWorld<boolean>, "placeChunk" | "unloadChunkColumn">, source: WorldChunkSource, options?: WorldStreamerOptions);
4459
+ constructor(world: Pick<MineRenderWorld<boolean>, "placeChunk" | "unloadChunkColumns"> & Partial<Pick<MineRenderWorld<boolean>, "placeChunks">>, source: WorldChunkSource, options?: WorldStreamerOptions);
4307
4460
  /** Returns absolute coordinates of successfully placed columns, including retained columns. */
4308
4461
  get loadedChunks(): readonly {
4309
4462
  x: number;
@@ -4336,19 +4489,35 @@ declare class WorldStreamer {
4336
4489
  /** Aborts source reads, waits for active work, then unloads owned columns. The world and source remain caller-owned. */
4337
4490
  dispose(): Promise<void>;
4338
4491
  private drain;
4492
+ private fillReadSlots;
4493
+ /** Places only the ready prefix, so later source reads cannot delay the nearest ready column. */
4494
+ private placeReadyChunks;
4495
+ private placeOwnedColumns;
4339
4496
  private needsLoad;
4340
- private unload;
4497
+ private unloadMany;
4341
4498
  private validateChunk;
4342
4499
  private within;
4343
4500
  private key;
4344
4501
  }
4345
4502
 
4503
+ /** Settings for {@link BrowserEnv} and {@link registerBrowserEnv}. */
4504
+ interface BrowserEnvOptions {
4505
+ /**
4506
+ * Section worker script, as a URL, or a function that creates the worker.
4507
+ * Set it when the bundle has no `import.meta.url`, such as the script-tag build: serve
4508
+ * `minerender/section.worker` from the page's origin and pass its URL.
4509
+ * Register before creating a world; the worker starts on the first section build.
4510
+ */
4511
+ sectionWorker?: string | URL | (() => Worker);
4512
+ }
4346
4513
  /**
4347
4514
  * {@link EnvProvider} backed by the DOM. Uses nothing outside of standard browser APIs and
4348
4515
  * localforage, so it stays free of Node polyfills.
4349
4516
  */
4350
4517
  declare class BrowserEnv implements EnvProvider {
4518
+ readonly options: BrowserEnvOptions;
4351
4519
  readonly name = "browser";
4520
+ constructor(options?: BrowserEnvOptions);
4352
4521
  createCanvas(width: number, height: number): CompatCanvas;
4353
4522
  createImage(width?: number, height?: number): CompatImage;
4354
4523
  imageSize(data: Uint8Array): ImageSizeInfo;
@@ -4356,7 +4525,7 @@ declare class BrowserEnv implements EnvProvider {
4356
4525
  createWorker(name: "section"): Worker | undefined;
4357
4526
  }
4358
4527
  /** Installs the browser provider. The browser package entry calls this automatically. */
4359
- declare function registerBrowserEnv(): BrowserEnv;
4528
+ declare function registerBrowserEnv(options?: BrowserEnvOptions): BrowserEnv;
4360
4529
 
4361
4530
  /**
4362
4531
  * {@link PersistentCache} backed by localforage (IndexedDB / WebSQL / localStorage).
@@ -4386,4 +4555,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
4386
4555
  */
4387
4556
  declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
4388
4557
 
4389
- 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, 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, 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 };
4558
+ 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, Armor, type ArmorPiece, type ArmorSet, type ArmorSlot, type ArmorTrim, 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, PalettedTextures, 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;AAC/C,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;","names":[]}
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":[]}
@@ -20,6 +20,7 @@ export * from "./Transformable.mjs";
20
20
  export * from "./UVMapper.mjs";
21
21
  export * from "./WrappedImage.mjs";
22
22
  export * from "./shutdown.mjs";
23
+ export * from "./armor/index.mjs";
23
24
  export * from "./assets/index.mjs";
24
25
  export * from "./bedrock/index.mjs";
25
26
  export * from "./cache/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/index.ts"],"sourcesContent":["// autogenerated\nexport * from './AnimatorFunction';\nexport * from './Axis';\nexport * from './CubeFace';\nexport * from './Disposable';\nexport * from './Env';\nexport * from './ExtractableImageData';\nexport * from './Geometries';\nexport * from './ListAsset';\nexport * from './Materials';\nexport * from './Meshes';\nexport * from './MinecraftAsset';\nexport * from './MinecraftCubeTexture';\nexport * from './MinecraftTextureMeta';\nexport * from './SceneStats';\nexport * from './Serializable';\nexport * from './Ticker';\nexport * from './TintColors';\nexport * from './Transformable';\nexport * from './UVMapper';\nexport * from './WrappedImage';\nexport * from './shutdown';\nexport * from './assets';\nexport * from './bedrock';\nexport * from './cache';\nexport * from './canvas';\nexport * from './entity';\nexport * from './error';\nexport * from './export';\nexport * from './gui';\nexport * from './image';\nexport * from './inspector';\nexport * from './instance';\nexport * from './model';\nexport * from './nbt';\nexport * from './renderer';\nexport * from './request';\nexport * from './scene';\nexport * from './skin';\nexport * from './texture';\nexport * from './three';\nexport * from './util';\nexport * from './world';\n"],"mappings":";AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/index.ts"],"sourcesContent":["// autogenerated\nexport * from './AnimatorFunction';\nexport * from './Axis';\nexport * from './CubeFace';\nexport * from './Disposable';\nexport * from './Env';\nexport * from './ExtractableImageData';\nexport * from './Geometries';\nexport * from './ListAsset';\nexport * from './Materials';\nexport * from './Meshes';\nexport * from './MinecraftAsset';\nexport * from './MinecraftCubeTexture';\nexport * from './MinecraftTextureMeta';\nexport * from './SceneStats';\nexport * from './Serializable';\nexport * from './Ticker';\nexport * from './TintColors';\nexport * from './Transformable';\nexport * from './UVMapper';\nexport * from './WrappedImage';\nexport * from './shutdown';\nexport * from './armor';\nexport * from './assets';\nexport * from './bedrock';\nexport * from './cache';\nexport * from './canvas';\nexport * from './entity';\nexport * from './error';\nexport * from './export';\nexport * from './gui';\nexport * from './image';\nexport * from './inspector';\nexport * from './instance';\nexport * from './model';\nexport * from './nbt';\nexport * from './renderer';\nexport * from './request';\nexport * from './scene';\nexport * from './skin';\nexport * from './texture';\nexport * from './three';\nexport * from './util';\nexport * from './world';\n"],"mappings":";AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -3,9 +3,9 @@ import { Raycaster, Vector2 } from "three";
3
3
  import { isSceneObject } from "../renderer/SceneObject.mjs";
4
4
  import { toDegrees, toRadians } from "../util/util.mjs";
5
5
  import { isTransformable } from "../Transformable.mjs";
6
- import { prefix } from "../util/log.mjs";
6
+ import { logger } from "../util/log.mjs";
7
7
  import { isMesh } from "../util/three.mjs";
8
- var p = prefix("SceneInspector");
8
+ var log = logger("SceneInspector");
9
9
  var help = "<span>Ctrl/Cmd+Click to Select<br/></span><br/>";
10
10
  var SceneInspector = class {
11
11
  constructor(renderer) {
@@ -99,7 +99,7 @@ var SceneInspector = class {
99
99
  }
100
100
  selectObject(targetObject, targetIntersection, instance = this.getIntersectionInstance(targetIntersection)) {
101
101
  this.selectedObject = targetObject;
102
- console.log(p, "selected", targetObject);
102
+ log.debug("selected", targetObject);
103
103
  this.redraw(targetObject, targetIntersection, instance);
104
104
  }
105
105
  redraw(targetObject, targetIntersection, instance) {