minerender 2.1.0-alpha.5 → 2.1.0-alpha.50

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.
@@ -1,21 +1,22 @@
1
1
  import * as three from 'three';
2
- import { Vector3, PixelFormat, BoxGeometry, Material, Mesh, Euler, Vector2, BufferAttribute, Float32BufferAttribute, BufferGeometry, Object3D, Box3, InstancedMesh, PerspectiveCamera, OrthographicCamera, Matrix4, Scene, Object3DEventMap, Texture, Camera, MOUSE, TOUCH, WebGLRenderer, EventDispatcher, Raycaster, Intersection, CanvasTexture, InterleavedBufferAttribute, TrianglesDrawModes, Line, Points } from 'three';
2
+ import { Vector3, PixelFormat, BoxGeometry, Material, MeshBasicMaterial, Mesh, Euler, Vector2, BufferAttribute, Float32BufferAttribute, BufferGeometry, Object3D, Box3, InstancedMesh, PerspectiveCamera, OrthographicCamera, Matrix4, Box2, Scene, Object3DEventMap, Texture, Camera, MOUSE, TOUCH, WebGLRenderer, EventDispatcher, Raycaster, Intersection, CanvasTexture, InterleavedBufferAttribute, TrianglesDrawModes, Line, Points, Group } from 'three';
3
3
  import * as nodeCanvas from 'canvas';
4
4
  import { ImageData as ImageData$1, CanvasRenderingContext2D } from 'canvas';
5
- import { AxiosResponse, AxiosRequestConfig } from 'axios';
6
- import { Buffer as Buffer$1 } from 'buffer';
7
- import { NBT } from 'prismarine-nbt';
5
+ import { Buffer } from 'buffer';
6
+ import { NBT, NBTFormat, Metadata } from 'prismarine-nbt';
8
7
  import { ZipReader } from '@zip.js/zip.js';
9
8
  import { AsyncLoadingCache, SimpleCache } from '@inventivetalent/loading-cache';
9
+ import { PLYExporterOptions } from 'three/examples/jsm/exporters/PLYExporter.js';
10
+ export { PLYExporterOptions } from 'three/examples/jsm/exporters/PLYExporter.js';
10
11
  import Stats from 'stats.js';
11
12
  import { EffectComposer } from 'postprocessing';
12
13
 
13
14
  interface AnimatorFunction {
14
- (): void;
15
+ (): boolean | void;
15
16
  }
16
17
 
17
18
  declare enum Axis {
18
- X = "X",
19
+ X = "x",
19
20
  Y = "y",
20
21
  Z = "z"
21
22
  }
@@ -39,6 +40,7 @@ declare enum CubeFaceIndex {
39
40
  NORTH = 5
40
41
  }
41
42
  declare const CUBE_FACES: CubeFace[];
43
+ declare const CUBE_FACE_OFFSETS: readonly [readonly [1, 0, 0], readonly [-1, 0, 0], readonly [0, 1, 0], readonly [0, -1, 0], readonly [0, 0, 1], readonly [0, 0, -1]];
42
44
 
43
45
  interface Disposable {
44
46
  dispose(): void;
@@ -60,10 +62,11 @@ declare function createCanvas(width: number, height: number): CompatCanvas;
60
62
  declare abstract class PersistentCache<B = unknown> {
61
63
  readonly backing: B;
62
64
  /** Bump to invalidate every persisted entry. */
63
- static readonly VERSION = 1;
65
+ static readonly VERSION = 2;
64
66
  static open(name: string): PersistentCache;
65
67
  protected constructor(backing: B);
66
68
  abstract get<T>(key: string): Promise<T>;
69
+ /** Loads a missing entry and stores only non-nullish results. */
67
70
  getOrLoad<T>(key: string, loader: (key: string) => Promise<T>): Promise<T>;
68
71
  abstract put<T>(key: string, value: T): Promise<T>;
69
72
  abstract delete<T>(key: string): Promise<void>;
@@ -173,6 +176,7 @@ declare class AssetKey extends BasicAssetKey {
173
176
  rootType: "assets" | "data" | string;
174
177
  extension: ".json" | ".png" | string;
175
178
  root?: string | undefined;
179
+ readonly isAssetKey: true;
176
180
  constructor(namespace: string, path: string, assetType?: AssetType | undefined, type?: string | undefined, rootType?: "assets" | "data" | string, extension?: ".json" | ".png" | string, root?: string | undefined);
177
181
  static parse(assetType: AssetType, str: string, origin?: AssetKey): AssetKey;
178
182
  toString(): string;
@@ -200,6 +204,7 @@ declare class Materials {
200
204
  static get MISSING_TEXTURE(): Material;
201
205
  static createImage(key: MaterialKey): Material;
202
206
  static createBasicCanvasMaterial(canvas: HTMLCanvasElement, transparent?: boolean, shade?: boolean): Material;
207
+ static createGuiCanvasMaterial(canvas: HTMLCanvasElement): MeshBasicMaterial;
203
208
  static createShadedCanvasMaterial(canvas: HTMLCanvasElement, transparent?: boolean, shade?: boolean): Material;
204
209
  static getImage(key: MaterialKey): Material;
205
210
  static needsUpdate(mat: Material): void;
@@ -245,7 +250,8 @@ declare enum DisplayPosition {
245
250
  GUI = "gui",
246
251
  HEAD = "head",
247
252
  GROUND = "ground",
248
- FIXED = "fixed"
253
+ FIXED = "fixed",
254
+ ON_SHELF = "on_shelf"
249
255
  }
250
256
  declare const DISPLAY_POSITIONS: DisplayPosition[];
251
257
 
@@ -254,6 +260,46 @@ declare enum GuiLight {
254
260
  SIDE = "side"
255
261
  }
256
262
 
263
+ interface RequestConfig extends RequestInit {
264
+ url: string;
265
+ /** Prepended to relative URLs, preserving any path in the base URL. */
266
+ baseURL?: string;
267
+ /** Timeout per attempt in milliseconds, including body reading. Defaults to 5000; 0 disables it. */
268
+ timeout?: number;
269
+ responseType?: "json" | "arraybuffer";
270
+ }
271
+ interface RequestResponse<T = any> {
272
+ data: T;
273
+ status: number;
274
+ statusText: string;
275
+ headers: Headers;
276
+ /** Final URL after redirects. */
277
+ url: string;
278
+ }
279
+ declare class RequestError extends Error {
280
+ readonly response?: RequestResponse<undefined> | undefined;
281
+ readonly cause?: unknown;
282
+ constructor(message: string, response?: RequestResponse<undefined> | undefined, cause?: unknown);
283
+ }
284
+ declare class Requests {
285
+ private static genericQueue;
286
+ private static mcAssetRequestQueue;
287
+ static genericRequest(request: RequestConfig): Promise<RequestResponse>;
288
+ static mcAssetRequest(request: RequestConfig): Promise<RequestResponse>;
289
+ static setMcAssetRoot(root: string): void;
290
+ /** Counts unsettled calls, including retry delays and requests still running after shutdown. */
291
+ static get queueSizes(): {
292
+ generic: number;
293
+ mcAsset: number;
294
+ };
295
+ /**
296
+ * Permanently stops both queues and rejects waiting, retrying, and future requests.
297
+ * Requests already running can finish. Idle queues hold no timer, so Node can exit without
298
+ * this cleanup. See {@link shutdown}.
299
+ */
300
+ static end(): void;
301
+ }
302
+
257
303
  declare class WrappedImage {
258
304
  readonly dta: ExtractableImageData;
259
305
  constructor(dta: ExtractableImageData);
@@ -277,7 +323,7 @@ interface ImageInfo {
277
323
  width: number;
278
324
  height: number;
279
325
  type?: string;
280
- data: Buffer$1;
326
+ data: Buffer;
281
327
  }
282
328
  declare class ImageLoader {
283
329
  protected static _createImage(): CompatImage;
@@ -289,7 +335,7 @@ declare class ImageLoader {
289
335
  static infoToData(info: ImageInfo): Promise<ImageData>;
290
336
  static getData(src: string): Promise<ImageData>;
291
337
  static getCanvasData(src: string): Promise<ExtractableImageData>;
292
- static processResponse(response: Partial<AxiosResponse>): Promise<ImageInfo>;
338
+ static processResponse(response: Pick<RequestResponse<ArrayBuffer>, "data" | "url">): Promise<ImageInfo>;
293
339
  static loadInfo(src: string): Promise<ImageInfo>;
294
340
  static getInfo(src: string): Promise<ImageInfo>;
295
341
  static loadWrapped(src: string): Promise<WrappedImage>;
@@ -303,7 +349,7 @@ declare const DEFAULT_ELEMENTS: ModelElement[];
303
349
  interface Model extends MinecraftAsset {
304
350
  textures?: IModelTextures;
305
351
  parent?: string;
306
- display?: ModelDisplay;
352
+ display?: Partial<Record<DisplayPosition, ModelDisplay>>;
307
353
  elements?: ModelElement[];
308
354
  hierarchy?: string[];
309
355
  }
@@ -318,7 +364,6 @@ interface ItemModel extends Model {
318
364
  interface TextureAsset extends MinecraftAsset, ImageInfo {
319
365
  }
320
366
  interface ModelDisplay {
321
- position?: DisplayPosition;
322
367
  translation?: TripleArray;
323
368
  rotation?: TripleArray;
324
369
  scale?: TripleArray;
@@ -338,13 +383,7 @@ declare function isDoubleArray(obj: any): obj is DoubleArray;
338
383
  declare function isTripleArray(obj: any): obj is TripleArray;
339
384
  declare function isQuadArray(obj: any): obj is QuadArray;
340
385
 
341
- /**
342
- * down up
343
- * east north west south
344
- *
345
- * bottom-left to top-right
346
- * [bl, br, tl, tr]
347
- */
386
+ /** Vanilla Minecraft cube UVs in Three.js BoxGeometry face and vertex order. */
348
387
  declare class MinecraftCubeTexture {
349
388
  readonly u: number;
350
389
  readonly v: number;
@@ -360,7 +399,7 @@ declare class MinecraftCubeTexture {
360
399
  getUvSouth(w: number, h: number, l: number): QuadArray<DoubleArray>;
361
400
  getUvNorth(w: number, h: number, l: number): QuadArray<DoubleArray>;
362
401
  getFaceUv(face: CubeFace, w: number, h: number, l: number): QuadArray<DoubleArray>;
363
- toUvArray(w: number, h: number, l: number): number[];
402
+ toUvArray(w: number, h: number, l: number, mirror?: boolean): number[];
364
403
  }
365
404
 
366
405
  interface MinecraftTextureMeta extends MinecraftAsset {
@@ -488,6 +527,7 @@ declare class TextureAtlas implements Disposable {
488
527
  };
489
528
  readonly hasTransparency: boolean;
490
529
  ticker?: number;
530
+ private readonly subscribers;
491
531
  constructor(model: Model, image: CanvasImage, sizes: {
492
532
  [texture: string]: DoubleArray;
493
533
  }, positions: {
@@ -495,6 +535,8 @@ declare class TextureAtlas implements Disposable {
495
535
  }, hasAnimation: boolean, animatorFunctions: {
496
536
  [p: string]: AnimatorFunction;
497
537
  }, hasTransparency: boolean);
538
+ /** Calls subscribers when an animation frame changes; unused atlases do not tick. */
539
+ subscribe(callback: () => void): () => void;
498
540
  getData(texture: string): ImageData$1;
499
541
  dispose(): void;
500
542
  }
@@ -513,6 +555,7 @@ declare class UVMapper {
513
555
  static setCubeUvs(geometry: BoxGeometry, originalTextureSize: DoubleArray, actualTextureSize: DoubleArray, faces: ModelFaces): void;
514
556
  static facesToUvArray(faces: ModelFaces, originalTextureSize: DoubleArray, actualTextureSize: DoubleArray): number[];
515
557
  static facesToUv(faces: ModelFaces, originalTextureSize: DoubleArray, actualTextureSize: DoubleArray): Float32BufferAttribute;
558
+ static lockUvs(geometry: BoxGeometry, faces: ModelFaces, atlas: TextureAtlas, rotation: Euler): void;
516
559
  static getAtlas(model: Model): Promise<Maybe<TextureAtlas>>;
517
560
  static fillMissingTextureKeys<T>(textures: ModelTextures, target: {
518
561
  [k: string]: T;
@@ -534,14 +577,13 @@ declare class MinecraftFaceUV {
534
577
  }
535
578
 
536
579
  /**
537
- * Releases every long-lived timer MineRender holds, so a Node process can exit.
580
+ * Stops the shared Ticker and request queues, and clears the in-memory caches.
538
581
  *
539
- * Both `@inventivetalent/loading-cache` (cache expiry) and `jobqu` (request queue draining) use
540
- * self-rescheduling timers that are not unref'd, which keeps the event loop alive for as long as
541
- * the library is loaded. Browsers don't care, but anything headless - a render server, a CLI, a
542
- * test run - has to call this when it's done.
582
+ * Idle Node processes can exit without calling this: cache and Ticker timers are unref'd,
583
+ * and idle request queues hold no timer. Pending requests keep their normal timer references.
543
584
  *
544
- * The library stays usable afterwards; the caches and queues simply start over.
585
+ * Call this only when finished with MineRender. Queued, retrying, and future requests reject;
586
+ * HTTP requests already running can finish. Queue shutdown is permanent, and cache expiry timers do not restart.
545
587
  */
546
588
  declare function shutdown(): void;
547
589
 
@@ -549,42 +591,15 @@ declare class BatchedExecutor {
549
591
  readonly interval: number;
550
592
  readonly batch: number;
551
593
  private readonly queue;
552
- private readonly task;
553
594
  constructor(interval?: number, batch?: number);
554
- submit(task: Task): void;
555
- private run;
556
- private runNext;
595
+ submit<T>(task: Task<T>): Promise<T>;
596
+ stop(): void;
557
597
  }
558
- type Task = () => any | Promise<any>;
598
+ type Task<T = unknown> = () => T | Promise<T>;
559
599
 
560
600
  declare function prefix(prefix?: string): string;
561
601
 
562
- interface ModelPart {
563
- textureWidth: number;
564
- textureHeight: number;
565
- textureOffsetU: number;
566
- textureOffsetV: number;
567
- pivotX: number;
568
- pivotY: number;
569
- pivotZ: number;
570
- pitch: number;
571
- yaw: number;
572
- roll: number;
573
- mirror: boolean;
574
- cubes: Cube[];
575
- children: ModelPart[];
576
- }
577
- interface Cube {
578
- minX: number;
579
- minY: number;
580
- minZ: number;
581
- maxX: number;
582
- maxY: number;
583
- maxZ: number;
584
- }
585
-
586
602
  declare function applyElementRotation(rotation: ElementRotation, geometry: BufferGeometry): void;
587
- declare function applyModelPartRotation(modelPart: ModelPart, geometry: BufferGeometry): void;
588
603
  declare function applyGenericRotation(axis: Axis, rotation: number, obj: Object3D): void;
589
604
  declare function addBox3WireframeToObject(box: Box3, obj: Object3D, color?: number, w?: number): void;
590
605
  declare function addWireframeToObject(obj: Object3D, color?: number, w?: number): void;
@@ -613,15 +628,47 @@ declare enum AssetParser {
613
628
  declare abstract class AssetSource {
614
629
  protected constructor();
615
630
  abstract get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<Maybe<T>>;
631
+ /**
632
+ * Identifies this source's content across sessions for persistent caching. Sources that
633
+ * cannot tell whether their content changed (an unnamed archive, for example) return
634
+ * undefined, which keeps their results out of long-lived caches.
635
+ */
636
+ get cacheId(): Maybe<string>;
637
+ }
638
+ /** A source failed to load or parse an asset; cause retains the original failure. */
639
+ declare class AssetLoadError extends Error {
640
+ readonly source: AssetSource;
641
+ readonly key: AssetKey;
642
+ readonly path: string;
643
+ readonly cause: unknown;
644
+ constructor(source: AssetSource, key: AssetKey, path: string, cause: unknown);
616
645
  }
617
646
 
618
647
  declare class AssetLoader {
619
648
  static ROOT: string;
620
649
  private static _SOURCES;
650
+ /** Used when a registered source cannot identify its content, so nothing persists past this session. */
651
+ private static readonly SESSION_SCOPE;
652
+ static get version(): string;
653
+ static setVersion(version: string): void;
654
+ /**
655
+ * Scope for persistent cache keys. Empty with only the default vanilla sources, so their
656
+ * entries stay valid across sessions; otherwise it names every added source (resource packs,
657
+ * mirrors) so their results never masquerade as vanilla assets after a reload.
658
+ */
659
+ static get persistentScope(): string;
660
+ /** Prefixes a persistent cache key with the current source scope. */
661
+ static persistentKey(key: string): string;
621
662
  static addSource(key: string, source: AssetSource, override?: boolean): void;
622
663
  static removeSource(key: string): Maybe<AssetSource>;
623
664
  static getAll<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<T[]>;
665
+ /** Returns the first defined result in source-priority order, without merging assets. */
624
666
  static get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<Maybe<T>>;
667
+ /** Tries each path within a source before considering lower-priority sources. */
668
+ static getFirst<T extends MinecraftAsset>(keys: readonly AssetKey[], parser: AssetParser | string): Promise<Maybe<{
669
+ key: AssetKey;
670
+ asset: T;
671
+ }>>;
625
672
  }
626
673
 
627
674
  interface BlockState extends MinecraftAsset {
@@ -636,18 +683,19 @@ interface BlockStateVariant {
636
683
  y?: number;
637
684
  x?: number;
638
685
  uvlock?: boolean;
686
+ weight?: number;
639
687
  }
640
688
  interface BlockStateMultipart {
641
- when?: MultipartCondition | {
642
- OR: MultipartCondition[];
643
- };
644
- apply?: BlockStateVariant;
645
- }
646
- interface MultipartCondition {
647
- [key: string]: string;
689
+ when?: MultipartCondition;
690
+ apply?: BlockStateVariant | BlockStateVariant[];
648
691
  }
692
+ type MultipartCondition = Record<string, string> | {
693
+ OR: MultipartCondition[];
694
+ } | {
695
+ AND: MultipartCondition[];
696
+ };
649
697
 
650
- declare const DEFAULT_ROOT = "https://assets.mcasset.cloud/1.17.1";
698
+ declare const DEFAULT_ROOT = "https://assets.mcasset.cloud/1.21.11";
651
699
  declare const DEFAULT_NAMESPACE = "minecraft";
652
700
  declare class Assets {
653
701
  /**
@@ -686,25 +734,60 @@ declare class DefaultBlockStates implements MinecraftAsset {
686
734
  [k: string]: BlockStatePropertyDefaults;
687
735
  }
688
736
 
689
- interface EntityModel extends BasicMinecraftAsset {
690
- parts?: {
691
- [p: string]: ModelPart;
737
+ interface EntityLayer {
738
+ key: BasicAssetKey;
739
+ texture?: AssetKey;
740
+ layer: EntityModelLayer;
741
+ }
742
+ interface EntityModel extends EntityLayer {
743
+ id: string;
744
+ /** Selected layers; the top-level fields describe the first selection. */
745
+ layers?: Record<string, EntityLayer>;
746
+ }
747
+ interface EntityModelFile extends MinecraftAsset {
748
+ id: string;
749
+ layers: Record<string, EntityModelLayer>;
750
+ }
751
+ interface EntityModelLayer {
752
+ texture: [number, number];
753
+ textureLocation?: string;
754
+ root: EntityModelPart;
755
+ }
756
+ interface EntityModelPart {
757
+ pose: {
758
+ offset: [number, number, number];
759
+ rotation: [number, number, number];
760
+ scale?: [number, number, number];
692
761
  };
762
+ texture?: [number, number];
763
+ cubes: EntityModelCube[];
764
+ children: Record<string, EntityModelPart>;
765
+ }
766
+ interface EntityModelCube {
767
+ origin: [number, number, number];
768
+ size: [number, number, number];
769
+ uv: [number, number];
770
+ grow?: [number, number, number];
771
+ mirror?: boolean;
693
772
  }
694
773
 
695
774
  declare class Entities {
696
- static getBlockEntityModels(): Promise<Maybe<BlockEntityModels>>;
697
- static getEntityModels(): Promise<Maybe<EntityModels>>;
698
- static getBlockList(): Promise<string[]>;
699
775
  static getEntityList(): Promise<string[]>;
700
- static getBlock(modelKey: BasicAssetKey, textureKey?: BasicAssetKey): Promise<Maybe<EntityModel>>;
701
- static getEntity(modelKey: BasicAssetKey, textureKey?: BasicAssetKey): Promise<Maybe<EntityModel>>;
702
- }
703
- declare class EntityModels implements MinecraftAsset {
704
- [k: string]: any;
776
+ private static getModelFile;
777
+ static getLayerList(modelKey: BasicAssetKey): Promise<string[]>;
778
+ static getEntity(modelKey: BasicAssetKey, textureKey?: BasicAssetKey, options?: EntityModelOptions): Promise<Maybe<EntityModel>>;
779
+ static resolveTexture(modelKey: BasicAssetKey): Promise<Maybe<AssetKey>>;
780
+ /** @deprecated Use getEntityList(); block entities share the entity dataset. */
781
+ static getBlockList(): Promise<string[]>;
782
+ /** @deprecated Use getEntity(); block entities share the entity dataset. */
783
+ static getBlock(modelKey: BasicAssetKey, textureKey?: BasicAssetKey, options?: EntityModelOptions): Promise<Maybe<EntityModel>>;
705
784
  }
706
- declare class BlockEntityModels implements MinecraftAsset {
707
- [k: string]: any;
785
+ interface EntityModelOptions {
786
+ layer?: string;
787
+ /** Layer names in draw order; defaults to layer or "main". */
788
+ layers?: string[];
789
+ /** Per-layer texture overrides. The positional texture key applies to the first selected layer. */
790
+ textures?: Record<string, BasicAssetKey>;
708
791
  }
709
792
 
710
793
  declare class Models {
@@ -712,12 +795,27 @@ declare class Models {
712
795
  private static get PERSISTENT_CACHE();
713
796
  static getItemList(): Promise<string[]>;
714
797
  static loadAndMerge(key: AssetKey): Promise<Maybe<Model>>;
798
+ private static getItemModel;
799
+ private static defaultItemModel;
715
800
  static getRaw(key: AssetKey): Promise<Maybe<Model>>;
716
801
  static getMerged(key: AssetKey): Promise<Maybe<Model>>;
717
802
  static get(key: AssetKey): Promise<Maybe<Model>>;
718
803
  static clearCache(): Promise<void>;
719
804
  }
720
805
 
806
+ declare class DisplayTransforms {
807
+ /** Resolve hand fallbacks within one model, before inheriting parent display entries. */
808
+ static withHandFallbacks(display: Model["display"]): Model["display"];
809
+ /** Build a display pose for geometry already centered at the model's [8, 8, 8] pivot. */
810
+ static getMatrix(display: Model["display"], position: DisplayPosition): Matrix4;
811
+ static apply(geometry: BufferGeometry, matrix: Matrix4): void;
812
+ }
813
+
814
+ declare class ModelCulling {
815
+ static toLocalMask(worldMask: number, rotation: Euler): number;
816
+ static isOpaqueFullCube(atlas: Maybe<TextureAtlas>): boolean;
817
+ }
818
+
721
819
  declare class ModelGenerator {
722
820
  static readonly ITEM_LAYERS: string[];
723
821
  static generateItemModel(imageData: ImageData$1, layer: string): ModelElement[];
@@ -734,8 +832,24 @@ interface Block {
734
832
  nbt?: any;
735
833
  }
736
834
 
835
+ declare class BlockStateResolver {
836
+ static defaults(blockState: BlockState): Promise<BlockStateProperties>;
837
+ static select(blockState: BlockState, state: BlockStateProperties, choose?: (variants: BlockStateVariant | BlockStateVariant[]) => BlockStateVariant): BlockStateVariant[];
838
+ static matching(blockState: BlockState, state: BlockStateProperties): (BlockStateVariant | BlockStateVariant[])[];
839
+ static choose(variants: BlockStateVariant | BlockStateVariant[]): BlockStateVariant;
840
+ static rotation(variant: BlockStateVariant): Euler;
841
+ }
842
+
843
+ declare class BlockTints {
844
+ /** Resolves block preview colors without biome context; explicit tints take precedence. */
845
+ static get(key: AssetKey | undefined, state: BlockStateProperties, model: Model, tints?: Record<number, number>): Promise<Record<number, number> | undefined>;
846
+ private static grassColor;
847
+ }
848
+
737
849
  interface Instanceable {
738
850
  nextInstance(): InstanceReference<SceneObject>;
851
+ removeInstanceAt(index: number): void;
852
+ isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
739
853
  getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
740
854
  setMatrixAt(index: number, matrix: Matrix4): void;
741
855
  setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
@@ -748,12 +862,15 @@ interface Instanceable {
748
862
  }
749
863
  declare function isInstanceable(obj: any): obj is Instanceable;
750
864
 
751
- declare class InstanceReference<T extends Instanceable> implements Transformable {
865
+ declare class InstanceReference<T extends Instanceable> implements Transformable, Disposable {
752
866
  readonly instanceable: T;
753
867
  readonly index: number;
754
868
  readonly isInstanceReference: true;
755
869
  constructor(instanceable: T, index: number);
756
870
  nextInstance(): InstanceReference<SceneObject>;
871
+ private get activeInstanceable();
872
+ removeFromScene(): void;
873
+ dispose(): void;
757
874
  getMatrix(matrix?: Matrix4): Matrix4;
758
875
  setMatrix(matrix: Matrix4): void;
759
876
  setPositionRotationScale(position?: Vector3, rotation?: Euler, scale?: Vector3): void;
@@ -778,18 +895,33 @@ declare class ModelObject extends SceneObject {
778
895
  readonly isModelObject: true;
779
896
  static readonly DEFAULT_OPTIONS: ModelObjectOptions;
780
897
  readonly options: ModelObjectOptions;
781
- private atlas?;
898
+ protected atlas?: TextureAtlas;
899
+ private atlasMaterial?;
900
+ private atlasTexture?;
901
+ private unsubscribeAtlas?;
782
902
  blockParent: Maybe<BlockObject>;
783
903
  private meshesCreated;
784
904
  constructor(originalModel: Model, options?: Partial<ModelObjectOptions>);
785
905
  init(): Promise<void>;
786
- dispose(): void;
787
906
  get textureAtlas(): Maybe<TextureAtlas>;
907
+ get isOpaqueFullCube(): boolean;
788
908
  protected loadTextures(): Promise<void>;
789
909
  protected createMeshes(force?: boolean): void;
790
910
  protected applyTextures(): void;
911
+ private updateAnimationSubscription;
912
+ nextInstance(): InstanceReference<SceneObject>;
913
+ removeInstanceAt(index: number): void;
914
+ disposeAndRemoveAllChildren(): void;
791
915
  }
792
916
  interface ModelObjectOptions extends SceneObjectOptions {
917
+ /** Minecraft display pose applied around the model center, before scene transforms. */
918
+ displayPosition?: DisplayPosition;
919
+ /** Quarter-turn block rotation in radians to compensate when locking UVs. */
920
+ uvLockRotation?: TripleArray;
921
+ /** sRGB 0xRRGGBB colors by face tint index; omitted indices stay white. */
922
+ tints?: Record<number, number>;
923
+ /** Hidden neighbor directions in CUBE_FACES order, before the model's block rotation. */
924
+ cullMask?: number;
793
925
  }
794
926
  declare function isModelObject(obj: any): obj is ModelObject;
795
927
 
@@ -822,24 +954,35 @@ declare enum SkinPart {
822
954
  }
823
955
  declare const SKIN_PARTS: SkinPart[];
824
956
 
957
+ type CapeLayout = "minecraft" | "optifine" | "labymod";
958
+ declare const capeTextureSizes: Record<CapeLayout, DoubleArray>;
959
+
825
960
  declare class SkinObject extends SceneObject {
826
961
  readonly options: SkinObjectOptions;
827
962
  private slim;
828
- private legacy;
963
+ private detectedSlim;
829
964
  private skinTextureSrc?;
830
- private skinTextureWidth;
831
- private skinTextureHeight;
832
- private capeTextureSrc?;
965
+ private skinMaterial?;
966
+ private skinLoad;
967
+ private capeLoad;
833
968
  constructor(options?: DeepPartial<SkinObjectOptions>);
834
969
  init(): Promise<void>;
835
970
  protected removeMeshes(): void;
836
971
  protected createMeshes(): void;
837
- setSkinTexture(src: string): void;
838
- setSlim(slim: boolean): void;
839
- setLegacy(legacy: boolean): void;
972
+ setSkinTexture(src: string): Promise<void>;
973
+ /** Load a cape texture in the selected layout, or pass undefined to remove the cape. */
974
+ setCapeTexture(src?: string, layout?: CapeLayout): Promise<void>;
975
+ /** Select the arm model, or pass undefined to use texture detection. */
976
+ setSlim(slim?: boolean): void;
977
+ private updateSlim;
978
+ /** Select the texture layout, or pass undefined to detect it from image dimensions. */
979
+ setLegacy(legacy?: boolean): Promise<void>;
980
+ dispose(): void;
840
981
  protected getBoxGeometry(part: SkinPart): BoxGeometry;
841
982
  }
842
983
  interface SkinObjectOptions extends SceneObjectOptions {
984
+ slim?: boolean;
985
+ legacy?: boolean;
843
986
  }
844
987
 
845
988
  declare class EntityObject extends SceneObject {
@@ -847,19 +990,54 @@ declare class EntityObject extends SceneObject {
847
990
  readonly isEntityObject: true;
848
991
  static readonly DEFAULT_OPTIONS: EntityObjectOptions;
849
992
  readonly options: EntityObjectOptions;
850
- private imageData?;
851
993
  private meshesCreated;
852
994
  constructor(entity: EntityModel, options?: Partial<EntityObjectOptions>);
853
995
  init(): Promise<void>;
854
996
  dispose(): void;
855
- protected loadTextures(): Promise<void>;
997
+ getLayerGroup(name: string): Maybe<Object3D>;
998
+ getGroupByName(name: string, layerName?: string): Maybe<Object3D>;
999
+ getMeshByName(name: string, layerName?: string): Maybe<Mesh>;
1000
+ private get entityLayers();
1001
+ private getTextureKey;
1002
+ protected loadTextures(layer?: EntityLayer): Promise<Maybe<ExtractableImageData>>;
856
1003
  protected createMeshes(force?: boolean): void;
1004
+ private createPart;
857
1005
  protected applyTextures(): Promise<void>;
858
1006
  }
859
1007
  interface EntityObjectOptions extends SceneObjectOptions {
1008
+ flip?: boolean;
860
1009
  }
861
1010
  declare function isEntityObject(obj: any): obj is EntityObject;
862
1011
 
1012
+ /** A texture layer in GUI pixels. Later layers draw above earlier layers. */
1013
+ interface GuiLayer {
1014
+ name?: string;
1015
+ texture: AssetKey | string;
1016
+ /** Source-image pixels: [x, y, width, height], measured from the top left. */
1017
+ crop?: [number, number, number, number];
1018
+ /** Top-left position; x grows right and y grows down. Defaults to [0, 0]. */
1019
+ position?: [number, number];
1020
+ /** Output width and height. Defaults to the crop or full image size. */
1021
+ size?: [number, number];
1022
+ }
1023
+
1024
+ declare class GuiObject extends SceneObject {
1025
+ readonly textureLayers: readonly GuiLayer[];
1026
+ readonly isGuiObject: true;
1027
+ /** Local bounds in GUI pixels, with y growing down from the origin. */
1028
+ readonly bounds: Box2;
1029
+ private readonly geometries;
1030
+ private readonly ownedMaterials;
1031
+ private initialized;
1032
+ constructor(textureLayers: readonly GuiLayer[], options?: Partial<GuiObjectOptions>);
1033
+ init(): Promise<void>;
1034
+ private loadMaterial;
1035
+ disposeAndRemoveAllChildren(): void;
1036
+ }
1037
+ interface GuiObjectOptions extends SceneObjectOptions {
1038
+ }
1039
+ declare function isGuiObject(obj: any): obj is GuiObject;
1040
+
863
1041
  declare class MineRenderScene extends Scene {
864
1042
  readonly isMineRenderScene: true;
865
1043
  static readonly DEFAULT_OPTIONS: MineRenderSceneOptions;
@@ -879,6 +1057,7 @@ declare class MineRenderScene extends Scene {
879
1057
  addBlock(blockState: BlockState, options?: Partial<BlockObjectOptions>, parent?: Object3D): Promise<BlockObject | InstanceReference<BlockObject>>;
880
1058
  addSkin(skin?: string, options?: Partial<SkinObjectOptions>, parent?: Object3D): Promise<SkinObject>;
881
1059
  addEntity(entity: EntityModel, options?: Partial<EntityObjectOptions>, parent?: Object3D): Promise<EntityObject | InstanceReference<EntityObject>>;
1060
+ addGui(layers: readonly GuiLayer[], options?: Partial<GuiObjectOptions>, parent?: Object3D): Promise<GuiObject>;
882
1061
  }
883
1062
  interface MineRenderSceneOptions {
884
1063
  }
@@ -894,6 +1073,9 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
894
1073
  private materialCallbacks;
895
1074
  protected _isInstanced: boolean;
896
1075
  _instanceCounter: number;
1076
+ protected instanceMesh?: InstancedMesh;
1077
+ private readonly instanceReferences;
1078
+ private readonly freeInstanceIndices;
897
1079
  constructor(options?: Partial<SceneObjectOptions>);
898
1080
  set scene(scene: MineRenderScene);
899
1081
  get scene(): MineRenderScene;
@@ -933,6 +1115,12 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
933
1115
  get instanceCounter(): number;
934
1116
  protected constructInstanceReference(i: number): InstanceReference<SceneObject>;
935
1117
  nextInstance(): InstanceReference<SceneObject>;
1118
+ /** Returns the live reference for a raycast hit on this object's instance mesh. */
1119
+ getInstanceReference(mesh: Object3D, index: number): Maybe<InstanceReference<SceneObject>>;
1120
+ isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
1121
+ removeInstanceAt(index: number): void;
1122
+ private growInstances;
1123
+ protected activeInstanceIndices(): Iterable<number>;
936
1124
  getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
937
1125
  setMatrixAt(index: number, matrix: Matrix4): void;
938
1126
  setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
@@ -956,6 +1144,23 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
956
1144
  }
957
1145
  declare function isSceneObject(obj: any): obj is SceneObject;
958
1146
 
1147
+ type FluidKind = "water" | "lava";
1148
+ interface BlockFluidState {
1149
+ kind: FluidKind;
1150
+ level: number;
1151
+ renderModel: boolean;
1152
+ }
1153
+ declare function getBlockFluidState(key?: AssetKey, state?: BlockStateProperties): BlockFluidState | undefined;
1154
+ declare function getFluidKind(key?: AssetKey, state?: BlockStateProperties): FluidKind | undefined;
1155
+ interface FluidSample {
1156
+ fluid?: FluidKind;
1157
+ level?: number;
1158
+ solid?: boolean;
1159
+ }
1160
+ type FluidSampler = (x: number, y: number, z: number) => FluidSample;
1161
+ /** Builds centered fluid faces with material groups 0 (still) and 1 (flowing). */
1162
+ declare function createFluidGeometry(kind: FluidKind, sample: FluidSampler): BufferGeometry;
1163
+
959
1164
  declare class BlockObject extends SceneObject {
960
1165
  readonly blockState: BlockState;
961
1166
  readonly isBlockObject: true;
@@ -969,13 +1174,27 @@ declare class BlockObject extends SceneObject {
969
1174
  private _instanceModel;
970
1175
  private _variants;
971
1176
  private _models;
1177
+ private _cullMask;
1178
+ private _fluidKey?;
1179
+ private _fluidSampler?;
1180
+ private _fluidModel?;
972
1181
  constructor(blockState: BlockState, options?: Partial<BlockObjectOptions>);
973
1182
  init(): Promise<void>;
974
1183
  dispose(): void;
975
1184
  removeFromScene(): void;
1185
+ private clearModels;
1186
+ private removeModels;
1187
+ get isOccluding(): boolean;
1188
+ private getModelMatrix;
1189
+ private getModelCullMask;
1190
+ setCullMask(worldMask: number): Promise<void>;
976
1191
  get state(): {
977
1192
  [key: string]: string;
978
1193
  };
1194
+ get fluidKind(): FluidKind | undefined;
1195
+ get fluidLevel(): number;
1196
+ /** Refreshes fluid surfaces from relative neighbors; standalone previews use air around the block. */
1197
+ updateFluid(sample?: FluidSampler): Promise<void>;
979
1198
  nextInstance(): InstanceReference<SceneObject>;
980
1199
  protected mapStateToVariant(state: BlockStateProperties): Promise<BlockStateVariant[]>;
981
1200
  recreateModels(): Promise<void>;
@@ -994,26 +1213,50 @@ declare class BlockObject extends SceneObject {
994
1213
  }
995
1214
  interface BlockObjectOptions extends ModelObjectOptions {
996
1215
  applyDefaultState: boolean;
1216
+ /** Properties applied before model creation, overriding defaults when applyDefaultState is enabled. */
1217
+ initialState?: BlockStateProperties;
997
1218
  }
998
1219
  declare function isBlockObject(obj: any): obj is BlockObject;
999
1220
 
1221
+ /** Saved fluid levels and solid neighbors determine the geometry shared by an instance pool. */
1222
+ declare function sampleFluid(kind: FluidKind, sample: FluidSampler): {
1223
+ key: string;
1224
+ sample: FluidSampler;
1225
+ };
1226
+ declare class FluidModelObject extends ModelObject {
1227
+ readonly kind: FluidKind;
1228
+ private readonly sample;
1229
+ private geometry?;
1230
+ constructor(kind: FluidKind, sample: FluidSampler, origin?: AssetKey, options?: Partial<ModelObjectOptions>);
1231
+ protected createMeshes(): void;
1232
+ protected applyTextures(): void;
1233
+ disposeAndRemoveAllChildren(): void;
1234
+ }
1235
+
1000
1236
  interface MultiBlockStructure {
1001
1237
  readonly size: TripleArray;
1002
1238
  readonly blocks: MultiBlockBlock[];
1239
+ readonly dataVersion?: number;
1240
+ readonly entities?: MultiBlockEntity[];
1241
+ }
1242
+ interface MultiBlockEntity {
1243
+ position: TripleArray;
1244
+ blockPosition?: TripleArray;
1245
+ nbt: unknown;
1003
1246
  }
1004
1247
  interface MultiBlockBlock extends Block {
1005
1248
  position: TripleArray;
1006
1249
  }
1007
1250
 
1008
1251
  declare class SchematicParser {
1009
- static parse(): Promise<MultiBlockStructure>;
1252
+ static parse(nbt: NBT): Promise<MultiBlockStructure>;
1010
1253
  }
1011
1254
 
1012
1255
  declare class StructureParser {
1013
1256
  static parse(_nbt: NBT, paletteIndex?: number): Promise<MultiBlockStructure>;
1014
1257
  }
1015
1258
  interface StructureNBT {
1016
- DataVersion: {
1259
+ DataVersion?: {
1017
1260
  type: "int";
1018
1261
  value: number;
1019
1262
  };
@@ -1025,7 +1268,13 @@ interface StructureNBT {
1025
1268
  };
1026
1269
  };
1027
1270
  palette?: Palette;
1028
- palettes?: Palette[];
1271
+ palettes?: {
1272
+ type: "list";
1273
+ value: {
1274
+ type: "list";
1275
+ value: Palette["value"][];
1276
+ };
1277
+ };
1029
1278
  blocks: {
1030
1279
  type: "list";
1031
1280
  value: {
@@ -1033,7 +1282,32 @@ interface StructureNBT {
1033
1282
  value: BlockEntry[];
1034
1283
  };
1035
1284
  };
1036
- entities: {};
1285
+ entities?: {
1286
+ type: "list";
1287
+ value: {
1288
+ type: "compound";
1289
+ value: {
1290
+ pos: {
1291
+ type: "list";
1292
+ value: {
1293
+ type: "double";
1294
+ value: TripleArray;
1295
+ };
1296
+ };
1297
+ blockPos: {
1298
+ type: "list";
1299
+ value: {
1300
+ type: "int";
1301
+ value: TripleArray;
1302
+ };
1303
+ };
1304
+ nbt: {
1305
+ type: "compound";
1306
+ value: any;
1307
+ };
1308
+ }[];
1309
+ };
1310
+ };
1037
1311
  }
1038
1312
  interface Palette {
1039
1313
  type: "list";
@@ -1077,14 +1351,17 @@ interface BlockEntry {
1077
1351
  }
1078
1352
 
1079
1353
  declare class NBTHelper {
1080
- static fromBuffer(buffer: Buffer): Promise<NBTAsset>;
1354
+ static fromBuffer(data: Uint8Array | ArrayBuffer, format?: NBTFormat): Promise<NBTAsset>;
1081
1355
  }
1082
1356
  interface NBTAsset extends MinecraftAsset, NBT {
1357
+ format?: NBTFormat;
1358
+ metadata?: Metadata;
1359
+ compression?: "gzip" | "none";
1083
1360
  }
1084
1361
 
1085
1362
  interface ResponseParser<T extends MinecraftAsset> {
1086
- config(request: AxiosRequestConfig): any;
1087
- parse(response: AxiosResponse): Maybe<T> | Promise<Maybe<T>>;
1363
+ config(request: RequestConfig): any;
1364
+ parse(response: RequestResponse): Maybe<T> | Promise<Maybe<T>>;
1088
1365
  }
1089
1366
 
1090
1367
  declare class HostedAssetSource extends AssetSource {
@@ -1103,6 +1380,7 @@ declare class HostedAssetSource extends AssetSource {
1103
1380
  private readonly _options;
1104
1381
  constructor(root: string, options?: Partial<HostedAssetSourceOptions>);
1105
1382
  get root(): string;
1383
+ get cacheId(): string;
1106
1384
  get options(): HostedAssetSourceOptions;
1107
1385
  get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser): Promise<Maybe<T>>;
1108
1386
  }
@@ -1117,6 +1395,8 @@ interface ArchiveEntry {
1117
1395
  }
1118
1396
 
1119
1397
  interface ArchiveProxy {
1398
+ /** Identifies the archive's content across sessions; undefined when it cannot be identified. */
1399
+ readonly id?: string;
1120
1400
  getEntries(): Promise<ArchiveEntry[]>;
1121
1401
  }
1122
1402
 
@@ -1124,6 +1404,7 @@ declare class ArchiveAssetSource extends AssetSource implements ArchiveProxy {
1124
1404
  readonly _archiveProxy: ArchiveProxy;
1125
1405
  constructor(archiveProxy: ArchiveProxy);
1126
1406
  static blob(blob: Blob): ArchiveAssetSource;
1407
+ get cacheId(): Maybe<string>;
1127
1408
  getEntries(): Promise<ArchiveEntry[]>;
1128
1409
  getEntry(path: string): Promise<Maybe<ArchiveEntry>>;
1129
1410
  get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<Maybe<T>>;
@@ -1134,7 +1415,8 @@ declare class ArchiveAssetSource extends AssetSource implements ArchiveProxy {
1134
1415
  declare class BrowserArchiveProxy implements ArchiveProxy {
1135
1416
  readonly _blob: Blob;
1136
1417
  readonly _reader: ZipReader<Blob>;
1137
- constructor(blob: Blob);
1418
+ readonly id?: string;
1419
+ constructor(blob: Blob, id?: string);
1138
1420
  getEntries(): Promise<ArchiveEntry[]>;
1139
1421
  }
1140
1422
 
@@ -1212,27 +1494,54 @@ declare class Caching {
1212
1494
  static readonly mergedModelCache: AsyncLoadingCache<CacheKey, Model>;
1213
1495
  static readonly modelTextureAtlasCache: AsyncLoadingCache<CacheKey, TextureAtlas>;
1214
1496
  static readonly blockStateCache: AsyncLoadingCache<CacheKey, BlockState>;
1497
+ static readonly listAssetCache: AsyncLoadingCache<CacheKey, ListAsset>;
1498
+ static readonly defaultBlockStatesCache: AsyncLoadingCache<CacheKey, DefaultBlockStates>;
1499
+ static readonly blockTintCache: AsyncLoadingCache<CacheKey, number>;
1500
+ static readonly entityModelCache: AsyncLoadingCache<CacheKey, EntityModelFile>;
1501
+ static readonly entityTextureCache: AsyncLoadingCache<CacheKey, AssetKey>;
1502
+ private static createAssetCache;
1215
1503
  /** Every cache above, so clear()/end() can never fall out of sync with the field list again. */
1216
1504
  private static get all();
1217
1505
  static clear(): void;
1218
1506
  /**
1219
1507
  * Clears every cache and stops its expiry timer.
1220
1508
  *
1221
- * loading-cache reschedules that timer indefinitely, so a Node process will not exit until
1222
- * this is called - see {@link shutdown}.
1509
+ * Expiry timers are unref'd in Node, so idle processes can exit without this cleanup.
1510
+ * Use {@link shutdown} to also stop requests and the shared Ticker.
1223
1511
  */
1224
1512
  static end(): void;
1225
1513
  static get cacheSizes(): {};
1226
1514
  }
1227
1515
 
1516
+ /** Copies the nontransparent bounds without resizing the source; empty images become one transparent pixel. */
1517
+ declare function trimCanvas(source: CompatCanvas): CompatCanvas;
1518
+
1228
1519
  declare class MineRenderError extends Error {
1229
1520
  constructor(msg: any);
1230
1521
  get name(): string;
1231
1522
  }
1232
1523
 
1233
- declare class GuiObject extends SceneObject {
1524
+ interface SceneGLTFExportOptions {
1525
+ /** Returns a GLB ArrayBuffer instead of a glTF object. */
1526
+ binary?: boolean;
1527
+ /** Maximum width and height of each exported texture, in pixels. */
1528
+ maxTextureSize?: number;
1234
1529
  }
1235
- interface GuiObjectOptions extends SceneObjectOptions {
1530
+ /** Exports the visible meshes at their current poses without changing the source scene. */
1531
+ declare class SceneExporter {
1532
+ /** Returns OBJ geometry with normals and UVs; material files and textures are not included. */
1533
+ static toObj(root: Object3D): string;
1534
+ /** Returns PLY geometry with vertex colors and UVs; texture images are not included. */
1535
+ static toPLY(root: Object3D, options?: PLYExporterOptions): string | ArrayBuffer;
1536
+ /**
1537
+ * Exports a static glTF/GLB snapshot in a browser. Atlas textures and vertex tints are retained;
1538
+ * MineRender's custom directional lighting is not baked into the exported materials.
1539
+ */
1540
+ static toGLTF(root: Object3D, options?: SceneGLTFExportOptions): Promise<Record<string, any> | ArrayBuffer>;
1541
+ }
1542
+
1543
+ declare class GuiHelper {
1544
+ static inventorySlot(slot: number | [number, number], origin?: [number, number], offset?: [number, number], rowSize?: number): [number, number];
1236
1545
  }
1237
1546
 
1238
1547
  declare class OrbitControls {
@@ -1357,7 +1666,16 @@ declare class Renderer implements Disposable {
1357
1666
  */
1358
1667
  dispose(): void;
1359
1668
  private animate;
1360
- toImage(): string;
1669
+ private drawFrame;
1670
+ /**
1671
+ * Renders a fresh frame and returns an image data URL, including while the animation loop is stopped.
1672
+ * Trimming removes transparent borders; an empty image becomes one transparent pixel.
1673
+ * MIME type support and lossy quality (0–1) follow the canvas encoder.
1674
+ */
1675
+ toImage(trim?: boolean, mime?: string, quality?: number): string;
1676
+ toObj(): string;
1677
+ toPLY(options?: PLYExporterOptions): string | ArrayBuffer;
1678
+ toGLTF(options?: SceneGLTFExportOptions): Promise<Record<string, any> | ArrayBuffer>;
1361
1679
  protected get attachedToBody(): boolean;
1362
1680
  protected get viewWidth(): number;
1363
1681
  protected get viewHeight(): number;
@@ -1395,6 +1713,8 @@ interface CameraOptions {
1395
1713
  interface RenderOptions {
1396
1714
  /** Maximum draw rate (60 by default); zero or a negative value disables the limit. */
1397
1715
  fpsLimit: number;
1716
+ /** Drawing-buffer pixels per CSS pixel (default 1); also scales toImage() output. */
1717
+ pixelRatio?: number;
1398
1718
  stats: boolean;
1399
1719
  antialias: boolean;
1400
1720
  shade: boolean;
@@ -1419,17 +1739,21 @@ declare class SceneInspector {
1419
1739
  protected readonly raycaster: Raycaster;
1420
1740
  private readonly mouse;
1421
1741
  private selectedObject?;
1742
+ private pointer?;
1743
+ private readonly listeners;
1422
1744
  constructor(renderer: Renderer);
1423
1745
  protected init(): void;
1746
+ dispose(): void;
1424
1747
  findMeshChildren(from: Object3D, out?: Mesh[]): Mesh<three.BufferGeometry<three.NormalBufferAttributes>, three.Material | three.Material[], three.Object3DEventMap>[];
1425
- onClick(event: any): void;
1748
+ onClick(event: MouseEvent): void;
1426
1749
  appendTo(el: HTMLElement): void;
1427
1750
  protected handleRaycasterObjects(intersections: Intersection[]): void;
1428
- selectObject(targetObject: Object3D, targetIntersection?: Intersection): void;
1429
- protected redraw(targetObject: Object3D, targetIntersection?: Intersection): void;
1430
- protected addControls(object: Object3D, intersection?: Intersection): void;
1751
+ private getIntersectionInstance;
1752
+ selectObject(targetObject: Object3D, targetIntersection?: Intersection, instance?: Maybe<InstanceReference<SceneObject>>): void;
1753
+ protected redraw(targetObject: Object3D, targetIntersection?: Intersection, instance?: InstanceReference<SceneObject>): void;
1754
+ protected addControls(object: Object3D, intersection?: Intersection, instance?: InstanceReference<SceneObject>): void;
1431
1755
  protected addInfoLine(name: string, id: string, value: any): HTMLElement;
1432
- protected addObjectControls(target: Object3D, intersection: Maybe<Intersection>, container: HTMLElement): void;
1756
+ protected addObjectControls(target: Object3D, intersection: Maybe<Intersection>, container: HTMLElement, instance?: InstanceReference<SceneObject>): void;
1433
1757
  protected buttonControl(name: string, id: string, click: () => void): HTMLElement;
1434
1758
  protected selectControl(name: string, id: string, options: string[], change: (v: string) => void): HTMLElement;
1435
1759
  protected toggleControl(name: string, id: string, val: boolean, change: (v: boolean) => void): HTMLElement;
@@ -1458,34 +1782,33 @@ declare class StatLine {
1458
1782
  update(): void;
1459
1783
  }
1460
1784
 
1461
- declare class Requests {
1462
- private static axiosInstance;
1463
- private static mcAssetInstance;
1464
- private static genericQueue;
1465
- private static mcAssetRequestQueue;
1466
- static genericRequest(request: AxiosRequestConfig): Promise<AxiosResponse>;
1467
- static mcAssetRequest(request: AxiosRequestConfig): Promise<AxiosResponse>;
1468
- private static shouldRetry;
1469
- static setMcAssetRoot(root: string): void;
1470
- static get queueSizes(): {
1471
- generic: number;
1472
- mcAsset: number;
1473
- };
1474
- /**
1475
- * Stops both queue timers. jobqu reschedules itself indefinitely, so a Node process will not
1476
- * exit until this is called - see {@link shutdown}.
1477
- */
1478
- static end(): void;
1479
- }
1480
-
1481
1785
  type SkinGeometries = Record<SkinPart, TripleArray>;
1482
1786
  declare const classicSkinGeometries: SkinGeometries;
1483
1787
  declare const slimSkinGeometries: SkinGeometries;
1484
1788
 
1789
+ declare class SkinImage {
1790
+ static getData(src: string): Promise<ImageData>;
1791
+ private static decodePng;
1792
+ }
1793
+
1485
1794
  type SkinTextureCoordinates = Record<SkinPart, ModelFaces>;
1486
1795
  declare const classicSkinTextureCoordinates: Readonly<SkinTextureCoordinates>;
1487
1796
  declare const slimSkinTextureCoordinates: Readonly<SkinTextureCoordinates>;
1488
1797
 
1798
+ interface SkinTexture {
1799
+ material: MeshBasicMaterial;
1800
+ slim: boolean;
1801
+ legacy: boolean;
1802
+ }
1803
+ declare class SkinTextures {
1804
+ static get(src: string, legacy?: boolean): Promise<SkinTexture>;
1805
+ static getCape(src: string, layout?: CapeLayout): Promise<MeshBasicMaterial>;
1806
+ private static createMaterial;
1807
+ private static isSlim;
1808
+ private static normalizeLegacy;
1809
+ private static makeBaseOpaque;
1810
+ }
1811
+
1489
1812
  declare class Skins {
1490
1813
  static fromUuidOrUsername(uuidOrUsername: string): Promise<Maybe<string>>;
1491
1814
  static fromUuid(uuid: string): Promise<Maybe<string>>;
@@ -1494,8 +1817,11 @@ declare class Skins {
1494
1817
  static capeFromUuidOrUsername(uuidOrUsername: string): Promise<Maybe<string>>;
1495
1818
  static capeFromUuid(uuid: string): Promise<Maybe<string>>;
1496
1819
  static capeFromUsername(username: string): Promise<Maybe<string>>;
1497
- static capeFromCapesDev(uuid: string, capeType?: string): Promise<Maybe<string>>;
1820
+ /** Returns a full static cape texture for a username or UUID. */
1821
+ static capeFromCapesDev(player: string, capeType?: string): Promise<Maybe<string>>;
1498
1822
  private static usernameToUuid;
1823
+ private static usernameToUuidMcProxy;
1824
+ /** @deprecated **/
1499
1825
  private static usernameToUuidSkinProxy;
1500
1826
  private static usernameToUuidMineTools;
1501
1827
  private static getProfileFromMinetools;
@@ -1505,11 +1831,18 @@ declare class Skins {
1505
1831
  private static getCrafatarCapeUrl;
1506
1832
  private static getMcHeadsSkinUrl;
1507
1833
  private static getMineSkinPlayerSkinUrl;
1834
+ /** @deprecated **/
1508
1835
  private static getSkinProxySkinUrl;
1836
+ /** @deprecated **/
1509
1837
  private static getSkinProxyCapeUrl;
1838
+ private static getMcProxySkinUrl;
1839
+ private static getMcProxyCapeUrl;
1510
1840
  }
1511
1841
 
1512
1842
  declare class TextureLoader {
1843
+ private static readonly failedTextures;
1844
+ /** Reports whether image loading failed, so cached textures can be retried. */
1845
+ static hasFailed(texture: Texture): boolean;
1513
1846
  protected static createTexture(): Texture;
1514
1847
  static loadInBackground(src: string, format?: PixelFormat, rotation?: number): Texture;
1515
1848
  static load(src: string, format?: PixelFormat, rotation?: number): Texture;
@@ -1531,61 +1864,155 @@ declare function mergeVertices(geometry: BufferGeometry, tolerance?: number): Bu
1531
1864
  declare function toTrianglesDrawMode(geometry: BufferGeometry, drawMode: TrianglesDrawModes): BufferGeometry;
1532
1865
  declare function computeMorphedAttributes(object: Mesh | Line | Points): object;
1533
1866
 
1534
- interface BlockInfo {
1535
- block: Block;
1536
- object: BlockObject;
1867
+ declare class ChunkData {
1868
+ private readonly indices;
1869
+ private readonly palette;
1870
+ private readonly paletteIds;
1871
+ private readonly freeIds;
1872
+ private readonly nbt;
1873
+ get(index: number): Maybe<Block>;
1874
+ snapshot(index: number): Maybe<() => Block>;
1875
+ set(index: number, block?: Block): void;
1876
+ clear(): void;
1877
+ static isAir(block: Maybe<Block>): boolean;
1878
+ private static copyBlock;
1879
+ private static validateIndex;
1880
+ }
1881
+
1882
+ type RegionInput = Uint8Array | ArrayBuffer;
1883
+ interface AnvilRegion {
1884
+ chunks: AnvilChunk[];
1885
+ }
1886
+ interface AnvilChunk {
1887
+ x: number;
1888
+ z: number;
1889
+ dataVersion?: number;
1890
+ sections: {
1891
+ y: number;
1892
+ data: ChunkData;
1893
+ }[];
1894
+ entities?: MultiBlockEntity[];
1895
+ }
1896
+ declare class AnvilParser {
1897
+ static getChunkList(data: RegionInput): {
1898
+ x: number;
1899
+ z: number;
1900
+ }[];
1901
+ static parse(data: RegionInput): Promise<AnvilRegion>;
1902
+ static parseChunk(data: RegionInput, localX: number, localZ: number): Promise<AnvilChunk | undefined>;
1903
+ private static bytes;
1904
+ private static locations;
1905
+ private static readChunk;
1906
+ private static compounds;
1907
+ private static integer;
1908
+ private static block;
1909
+ private static unpack;
1910
+ }
1911
+
1912
+ interface BlockInfo<SectionMeshing extends boolean = false> {
1913
+ /** Detached block data; use world or chunk setters to update stored blocks. */
1914
+ readonly block: Block;
1915
+ /** Merged terrain has no individual render object in section-meshing mode. */
1916
+ object: SectionMeshing extends false ? BlockObject : BlockObject | undefined;
1917
+ }
1918
+
1919
+ interface SectionMeshTemplate {
1920
+ geometry: BufferGeometry;
1921
+ atlas: TextureAtlas;
1922
+ cullFaces: readonly number[];
1923
+ }
1924
+ interface SectionMeshEntry {
1925
+ index: number;
1926
+ template: SectionMeshTemplate;
1927
+ cullMask: number;
1928
+ }
1929
+ declare class SectionMesh extends Group {
1930
+ private readonly ownedMeshes;
1931
+ static build(entries: readonly SectionMeshEntry[], maxAtlasSize?: number): SectionMesh;
1932
+ dispose(): void;
1537
1933
  }
1538
1934
 
1539
- declare class Chunk {
1935
+ declare class SectionModels {
1936
+ readonly maxAtlasSize: number;
1937
+ private states;
1938
+ private models;
1939
+ private readonly templates;
1940
+ constructor(maxAtlasSize?: number);
1941
+ get(blockState: BlockState, properties?: BlockStateProperties): Promise<SectionMeshTemplate | undefined>;
1942
+ private prepare;
1943
+ clear(): void;
1944
+ }
1945
+
1946
+ declare class Chunk<SectionMeshing extends boolean = false> {
1947
+ private readonly onBlocksChanged?;
1948
+ private readonly sectionModels?;
1540
1949
  readonly scene: MineRenderScene;
1541
1950
  readonly x: number;
1542
1951
  readonly y: number;
1543
1952
  readonly z: number;
1544
- private readonly _blocks;
1545
- private readonly _anchor;
1546
- constructor(scene: MineRenderScene, x: number, y: number, z: number);
1547
- getBlockAt(x: number, y: number, z: number): Maybe<BlockInfo>;
1548
- getBlockAt(pos: Vector3): Maybe<BlockInfo>;
1549
- getBlockAt(pos: TripleArray): Maybe<BlockInfo>;
1953
+ private readonly data;
1954
+ private readonly renderedBlocks;
1955
+ private readonly sectionBlocks;
1956
+ private sectionMesh?;
1957
+ private meshDirty;
1958
+ constructor(scene: MineRenderScene, x: number, y: number, z: number, onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined, sectionModels?: SectionModels | undefined);
1959
+ getBlockAt(x: number, y: number, z: number): Maybe<BlockInfo<SectionMeshing>>;
1960
+ getBlockAt(pos: Vector3): Maybe<BlockInfo<SectionMeshing>>;
1961
+ getBlockAt(pos: TripleArray): Maybe<BlockInfo<SectionMeshing>>;
1550
1962
  /**
1551
1963
  * Set block at a _world_ position
1552
1964
  */
1553
- setBlockAt(x: number, y: number, z: number, block: Maybe<Block>): Promise<Maybe<BlockInfo>>;
1554
- setBlockAt(pos: Vector3, block: Maybe<Block>): Promise<Maybe<BlockInfo>>;
1555
- setBlockAt(pos: TripleArray, block: Maybe<Block>): Promise<Maybe<BlockInfo>>;
1965
+ setBlockAt(x: number, y: number, z: number, block: Maybe<Block>): Promise<Maybe<BlockInfo<SectionMeshing>>>;
1966
+ setBlockAt(pos: Vector3, block: Maybe<Block>): Promise<Maybe<BlockInfo<SectionMeshing>>>;
1967
+ setBlockAt(pos: TripleArray, block: Maybe<Block>): Promise<Maybe<BlockInfo<SectionMeshing>>>;
1556
1968
  /**
1557
- * Set block at a _chunk_ position (0-16)
1969
+ * Set a block at integer chunk-local coordinates from 0 to 15.
1558
1970
  */
1559
- setBlockInChunkAt(pos: Vector3, block?: Block, worldPos?: Vector3): Promise<Maybe<BlockInfo>>;
1560
- clear(): Promise<void>;
1971
+ setBlockInChunkAt(pos: Vector3, block?: Block, worldPos?: Vector3, onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined): Promise<Maybe<BlockInfo<SectionMeshing>>>;
1972
+ isOccludingAt(pos: Vector3): boolean;
1973
+ setCullMaskAt(pos: Vector3, mask: number): Promise<void>;
1974
+ rebuildSectionMesh(): void;
1975
+ clear(onBlocksChanged?: ((positions: Vector3[]) => Promise<void>) | undefined): Promise<void>;
1561
1976
  dispose(): Promise<void>;
1977
+ static isAir(block: Maybe<Block>): boolean;
1562
1978
  static chunkPosToBlockIndex(pos: Vector3): number;
1563
1979
  worldPosToChunkPos(pos: Vector3): Vector3;
1564
1980
  chunkPosToWorldPos(pos: Vector3): Vector3;
1565
1981
  }
1566
1982
 
1567
- declare class MineRenderWorld {
1983
+ declare class MineRenderWorld<SectionMeshing extends boolean = false> {
1568
1984
  readonly scene: MineRenderScene;
1569
- private _size;
1570
- private _blockSize;
1571
1985
  private readonly _chunks;
1572
- constructor(scene: MineRenderScene);
1573
- getBlockAt(x: number, y: number, z: number): Maybe<BlockInfo>;
1574
- getBlockAt(pos: Vector3): Maybe<BlockInfo>;
1575
- getBlockAt(pos: TripleArray): Maybe<BlockInfo>;
1576
- setBlockAt(x: number, y: number, z: number, block: Block): Promise<Maybe<BlockInfo>>;
1577
- setBlockAt(pos: Vector3, block: Block): Promise<Maybe<BlockInfo>>;
1578
- setBlockAt(pos: TripleArray, block: Block): Promise<Maybe<BlockInfo>>;
1986
+ private readonly sectionModels?;
1987
+ private readonly pendingCulling;
1988
+ private culling?;
1989
+ constructor(scene: MineRenderScene, options?: MineRenderWorldOptions<SectionMeshing>);
1990
+ getBlockAt(x: number, y: number, z: number): Maybe<BlockInfo<SectionMeshing>>;
1991
+ getBlockAt(pos: Vector3): Maybe<BlockInfo<SectionMeshing>>;
1992
+ getBlockAt(pos: TripleArray): Maybe<BlockInfo<SectionMeshing>>;
1993
+ setBlockAt(x: number, y: number, z: number, block: Maybe<Block>): Promise<Maybe<BlockInfo<SectionMeshing>>>;
1994
+ setBlockAt(pos: Vector3, block: Maybe<Block>): Promise<Maybe<BlockInfo<SectionMeshing>>>;
1995
+ setBlockAt(pos: TripleArray, block: Maybe<Block>): Promise<Maybe<BlockInfo<SectionMeshing>>>;
1996
+ private placeBlock;
1579
1997
  placeMultiBlock(multiblock: MultiBlockStructure, useBatches?: boolean, executor?: BatchedExecutor): Promise<void>;
1998
+ private placeBlocks;
1999
+ /** Replaces one chunk column's blocks. Entity NBT remains available on the parsed chunk. */
2000
+ placeChunk(chunk: AnvilChunk, executor?: BatchedExecutor): Promise<void>;
1580
2001
  clear(): Promise<void>;
2002
+ private updateCulling;
1581
2003
  private getOrCreateChunkAt;
1582
- getChunkAt(pos: Vector3): Maybe<Chunk>;
2004
+ getChunkAt(pos: Vector3): Maybe<Chunk<SectionMeshing>>;
1583
2005
  static worldToScenePosition(pos: Vector3): Vector3;
1584
2006
  static sceneToWorldPosition(pos: Vector3): Vector3;
1585
- worldPosToChunkIndex(pos: Vector3): number;
1586
2007
  worldPosToChunkKey(pos: Vector3): string;
1587
2008
  validatePosBounds(pos: Vector3): void;
1588
2009
  }
2010
+ interface MineRenderWorldOptions<SectionMeshing extends boolean = boolean> {
2011
+ /** Merge static opaque cubes into section meshes. Merged blocks have no individual object. */
2012
+ sectionMeshing?: SectionMeshing;
2013
+ /** Maximum width and height of each section atlas page, in pixels. */
2014
+ maxAtlasSize?: number;
2015
+ }
1589
2016
 
1590
2017
  /**
1591
2018
  * {@link EnvProvider} backed by the DOM. Uses nothing outside of standard browser APIs and
@@ -1619,8 +2046,8 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
1619
2046
  *
1620
2047
  * `image-size` pulls in `fs`/`path` at module scope, so it can only live in the Node build.
1621
2048
  * Everything MineRender loads is a PNG in practice; GIF and JPEG are handled as a courtesy and
1622
- * anything else falls through to an empty result (callers treat that as 0x0).
2049
+ * anything else falls through to an empty result, which ImageLoader rejects.
1623
2050
  */
1624
2051
  declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
1625
2052
 
1626
- export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, ArchiveAssetSource, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type Block, BlockEntityModels, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, type BlockStateVariant, type BlockStateVariants, BlockStates, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, Chunk, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, type Cube, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, type Disposable, type DoubleArray, type ElementFace, type ElementRotation, Entities, type EntityModel, EntityModels, EntityObject, type EntityObjectOptions, Env, type EnvProvider, type ExtractableImageData, type FromTo, Geometries, GuiLight, GuiObject, type GuiObjectOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelTextures, type ListAsset, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, type ModelPart, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, Requests, type ResponseParser, SKIN_PARTS, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, type Serializable, type SkinGeometries, SkinObject, type SkinObjectOptions, SkinPart, type SkinTextureCoordinates, Skins, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, applyModelPartRotation, axisToVec3, base64decode, base64encode, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createImage, estimateBytesUsed, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, prefix, probeImageSize, registerBrowserEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
2053
+ export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, ArchiveAssetSource, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type Block, 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, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type ElementFace, type ElementRotation, Entities, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, EntityObject, type EntityObjectOptions, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, type FromTo, Geometries, GuiHelper, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelTextures, type ListAsset, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, 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, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResponseParser, SKIN_PARTS, SceneExporter, type SceneGLTFExportOptions, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createImage, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, prefix, probeImageSize, registerBrowserEnv, sampleFluid, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas };