minerender 2.1.0-alpha.27 → 2.1.0-alpha.29

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,5 +1,5 @@
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, Mesh, Euler, Vector2, BufferAttribute, Float32BufferAttribute, BufferGeometry, Object3D, Box3, InstancedMesh, PerspectiveCamera, OrthographicCamera, Matrix4, Scene, Object3DEventMap, Texture, Camera, MOUSE, TOUCH, WebGLRenderer, EventDispatcher, Raycaster, Intersection, MeshBasicMaterial, CanvasTexture, InterleavedBufferAttribute, TrianglesDrawModes, Line, Points } from 'three';
3
3
  import * as nodeCanvas from 'canvas';
4
4
  import { ImageData as ImageData$1, CanvasRenderingContext2D } from 'canvas';
5
5
  import { Buffer as Buffer$1 } from 'buffer';
@@ -624,6 +624,12 @@ declare enum AssetParser {
624
624
  declare abstract class AssetSource {
625
625
  protected constructor();
626
626
  abstract get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<Maybe<T>>;
627
+ /**
628
+ * Identifies this source's content across sessions for persistent caching. Sources that
629
+ * cannot tell whether their content changed (an unnamed archive, for example) return
630
+ * undefined, which keeps their results out of long-lived caches.
631
+ */
632
+ get cacheId(): Maybe<string>;
627
633
  }
628
634
  /** A source failed to load or parse an asset; cause retains the original failure. */
629
635
  declare class AssetLoadError extends Error {
@@ -637,8 +643,18 @@ declare class AssetLoadError extends Error {
637
643
  declare class AssetLoader {
638
644
  static ROOT: string;
639
645
  private static _SOURCES;
646
+ /** Used when a registered source cannot identify its content, so nothing persists past this session. */
647
+ private static readonly SESSION_SCOPE;
640
648
  static get version(): string;
641
649
  static setVersion(version: string): void;
650
+ /**
651
+ * Scope for persistent cache keys. Empty with only the default vanilla sources, so their
652
+ * entries stay valid across sessions; otherwise it names every added source (resource packs,
653
+ * mirrors) so their results never masquerade as vanilla assets after a reload.
654
+ */
655
+ static get persistentScope(): string;
656
+ /** Prefixes a persistent cache key with the current source scope. */
657
+ static persistentKey(key: string): string;
642
658
  static addSource(key: string, source: AssetSource, override?: boolean): void;
643
659
  static removeSource(key: string): Maybe<AssetSource>;
644
660
  static getAll<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<T[]>;
@@ -900,20 +916,29 @@ declare const SKIN_PARTS: SkinPart[];
900
916
  declare class SkinObject extends SceneObject {
901
917
  readonly options: SkinObjectOptions;
902
918
  private slim;
903
- private legacy;
904
- private skinTextureWidth;
905
- private skinTextureHeight;
906
- private capeTextureSrc?;
919
+ private detectedSlim;
920
+ private skinTextureSrc?;
921
+ private skinMaterial?;
922
+ private skinLoad;
923
+ private capeLoad;
907
924
  constructor(options?: DeepPartial<SkinObjectOptions>);
908
925
  init(): Promise<void>;
909
926
  protected removeMeshes(): void;
910
927
  protected createMeshes(): void;
911
- setSkinTexture(src: string): void;
912
- setSlim(slim: boolean): void;
913
- setLegacy(legacy: boolean): void;
928
+ setSkinTexture(src: string): Promise<void>;
929
+ /** Load a vanilla cape texture, or pass undefined to remove the cape. */
930
+ setCapeTexture(src?: string): Promise<void>;
931
+ /** Select the arm model, or pass undefined to use texture detection. */
932
+ setSlim(slim?: boolean): void;
933
+ private updateSlim;
934
+ /** Select the texture layout, or pass undefined to detect it from image dimensions. */
935
+ setLegacy(legacy?: boolean): Promise<void>;
936
+ dispose(): void;
914
937
  protected getBoxGeometry(part: SkinPart): BoxGeometry;
915
938
  }
916
939
  interface SkinObjectOptions extends SceneObjectOptions {
940
+ slim?: boolean;
941
+ legacy?: boolean;
917
942
  }
918
943
 
919
944
  declare class EntityObject extends SceneObject {
@@ -1180,6 +1205,7 @@ declare class HostedAssetSource extends AssetSource {
1180
1205
  private readonly _options;
1181
1206
  constructor(root: string, options?: Partial<HostedAssetSourceOptions>);
1182
1207
  get root(): string;
1208
+ get cacheId(): string;
1183
1209
  get options(): HostedAssetSourceOptions;
1184
1210
  get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser): Promise<Maybe<T>>;
1185
1211
  }
@@ -1194,6 +1220,8 @@ interface ArchiveEntry {
1194
1220
  }
1195
1221
 
1196
1222
  interface ArchiveProxy {
1223
+ /** Identifies the archive's content across sessions; undefined when it cannot be identified. */
1224
+ readonly id?: string;
1197
1225
  getEntries(): Promise<ArchiveEntry[]>;
1198
1226
  }
1199
1227
 
@@ -1201,6 +1229,7 @@ declare class ArchiveAssetSource extends AssetSource implements ArchiveProxy {
1201
1229
  readonly _archiveProxy: ArchiveProxy;
1202
1230
  constructor(archiveProxy: ArchiveProxy);
1203
1231
  static blob(blob: Blob): ArchiveAssetSource;
1232
+ get cacheId(): Maybe<string>;
1204
1233
  getEntries(): Promise<ArchiveEntry[]>;
1205
1234
  getEntry(path: string): Promise<Maybe<ArchiveEntry>>;
1206
1235
  get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<Maybe<T>>;
@@ -1211,7 +1240,8 @@ declare class ArchiveAssetSource extends AssetSource implements ArchiveProxy {
1211
1240
  declare class BrowserArchiveProxy implements ArchiveProxy {
1212
1241
  readonly _blob: Blob;
1213
1242
  readonly _reader: ZipReader<Blob>;
1214
- constructor(blob: Blob);
1243
+ readonly id?: string;
1244
+ constructor(blob: Blob, id?: string);
1215
1245
  getEntries(): Promise<ArchiveEntry[]>;
1216
1246
  }
1217
1247
 
@@ -1549,6 +1579,19 @@ type SkinTextureCoordinates = Record<SkinPart, ModelFaces>;
1549
1579
  declare const classicSkinTextureCoordinates: Readonly<SkinTextureCoordinates>;
1550
1580
  declare const slimSkinTextureCoordinates: Readonly<SkinTextureCoordinates>;
1551
1581
 
1582
+ interface SkinTexture {
1583
+ material: MeshBasicMaterial;
1584
+ slim: boolean;
1585
+ legacy: boolean;
1586
+ }
1587
+ declare class SkinTextures {
1588
+ static get(src: string, legacy?: boolean): Promise<SkinTexture>;
1589
+ static getCape(src: string): Promise<MeshBasicMaterial>;
1590
+ private static createMaterial;
1591
+ private static isSlim;
1592
+ private static normalizeLegacy;
1593
+ }
1594
+
1552
1595
  declare class Skins {
1553
1596
  static fromUuidOrUsername(uuidOrUsername: string): Promise<Maybe<string>>;
1554
1597
  static fromUuid(uuid: string): Promise<Maybe<string>>;
@@ -1697,4 +1740,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
1697
1740
  forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
1698
1741
  }
1699
1742
 
1700
- export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, 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 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, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, Chunk, 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 EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, 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, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, 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, 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, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
1743
+ export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, 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 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, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, Chunk, 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 EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, 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, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResponseParser, SKIN_PARTS, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, type Serializable, type SkinGeometries, 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, 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, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
@@ -1,5 +1,5 @@
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, Mesh, Euler, Vector2, BufferAttribute, Float32BufferAttribute, BufferGeometry, Object3D, Box3, InstancedMesh, PerspectiveCamera, OrthographicCamera, Matrix4, Scene, Object3DEventMap, Texture, Camera, MOUSE, TOUCH, WebGLRenderer, EventDispatcher, Raycaster, Intersection, MeshBasicMaterial, CanvasTexture, InterleavedBufferAttribute, TrianglesDrawModes, Line, Points } from 'three';
3
3
  import * as nodeCanvas from 'canvas';
4
4
  import { ImageData as ImageData$1, CanvasRenderingContext2D } from 'canvas';
5
5
  import { Buffer as Buffer$1 } from 'buffer';
@@ -624,6 +624,12 @@ declare enum AssetParser {
624
624
  declare abstract class AssetSource {
625
625
  protected constructor();
626
626
  abstract get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<Maybe<T>>;
627
+ /**
628
+ * Identifies this source's content across sessions for persistent caching. Sources that
629
+ * cannot tell whether their content changed (an unnamed archive, for example) return
630
+ * undefined, which keeps their results out of long-lived caches.
631
+ */
632
+ get cacheId(): Maybe<string>;
627
633
  }
628
634
  /** A source failed to load or parse an asset; cause retains the original failure. */
629
635
  declare class AssetLoadError extends Error {
@@ -637,8 +643,18 @@ declare class AssetLoadError extends Error {
637
643
  declare class AssetLoader {
638
644
  static ROOT: string;
639
645
  private static _SOURCES;
646
+ /** Used when a registered source cannot identify its content, so nothing persists past this session. */
647
+ private static readonly SESSION_SCOPE;
640
648
  static get version(): string;
641
649
  static setVersion(version: string): void;
650
+ /**
651
+ * Scope for persistent cache keys. Empty with only the default vanilla sources, so their
652
+ * entries stay valid across sessions; otherwise it names every added source (resource packs,
653
+ * mirrors) so their results never masquerade as vanilla assets after a reload.
654
+ */
655
+ static get persistentScope(): string;
656
+ /** Prefixes a persistent cache key with the current source scope. */
657
+ static persistentKey(key: string): string;
642
658
  static addSource(key: string, source: AssetSource, override?: boolean): void;
643
659
  static removeSource(key: string): Maybe<AssetSource>;
644
660
  static getAll<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<T[]>;
@@ -900,20 +916,29 @@ declare const SKIN_PARTS: SkinPart[];
900
916
  declare class SkinObject extends SceneObject {
901
917
  readonly options: SkinObjectOptions;
902
918
  private slim;
903
- private legacy;
904
- private skinTextureWidth;
905
- private skinTextureHeight;
906
- private capeTextureSrc?;
919
+ private detectedSlim;
920
+ private skinTextureSrc?;
921
+ private skinMaterial?;
922
+ private skinLoad;
923
+ private capeLoad;
907
924
  constructor(options?: DeepPartial<SkinObjectOptions>);
908
925
  init(): Promise<void>;
909
926
  protected removeMeshes(): void;
910
927
  protected createMeshes(): void;
911
- setSkinTexture(src: string): void;
912
- setSlim(slim: boolean): void;
913
- setLegacy(legacy: boolean): void;
928
+ setSkinTexture(src: string): Promise<void>;
929
+ /** Load a vanilla cape texture, or pass undefined to remove the cape. */
930
+ setCapeTexture(src?: string): Promise<void>;
931
+ /** Select the arm model, or pass undefined to use texture detection. */
932
+ setSlim(slim?: boolean): void;
933
+ private updateSlim;
934
+ /** Select the texture layout, or pass undefined to detect it from image dimensions. */
935
+ setLegacy(legacy?: boolean): Promise<void>;
936
+ dispose(): void;
914
937
  protected getBoxGeometry(part: SkinPart): BoxGeometry;
915
938
  }
916
939
  interface SkinObjectOptions extends SceneObjectOptions {
940
+ slim?: boolean;
941
+ legacy?: boolean;
917
942
  }
918
943
 
919
944
  declare class EntityObject extends SceneObject {
@@ -1180,6 +1205,7 @@ declare class HostedAssetSource extends AssetSource {
1180
1205
  private readonly _options;
1181
1206
  constructor(root: string, options?: Partial<HostedAssetSourceOptions>);
1182
1207
  get root(): string;
1208
+ get cacheId(): string;
1183
1209
  get options(): HostedAssetSourceOptions;
1184
1210
  get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser): Promise<Maybe<T>>;
1185
1211
  }
@@ -1194,6 +1220,8 @@ interface ArchiveEntry {
1194
1220
  }
1195
1221
 
1196
1222
  interface ArchiveProxy {
1223
+ /** Identifies the archive's content across sessions; undefined when it cannot be identified. */
1224
+ readonly id?: string;
1197
1225
  getEntries(): Promise<ArchiveEntry[]>;
1198
1226
  }
1199
1227
 
@@ -1201,6 +1229,7 @@ declare class ArchiveAssetSource extends AssetSource implements ArchiveProxy {
1201
1229
  readonly _archiveProxy: ArchiveProxy;
1202
1230
  constructor(archiveProxy: ArchiveProxy);
1203
1231
  static blob(blob: Blob): ArchiveAssetSource;
1232
+ get cacheId(): Maybe<string>;
1204
1233
  getEntries(): Promise<ArchiveEntry[]>;
1205
1234
  getEntry(path: string): Promise<Maybe<ArchiveEntry>>;
1206
1235
  get<T extends MinecraftAsset>(key: AssetKey, parser: AssetParser | string): Promise<Maybe<T>>;
@@ -1211,7 +1240,8 @@ declare class ArchiveAssetSource extends AssetSource implements ArchiveProxy {
1211
1240
  declare class BrowserArchiveProxy implements ArchiveProxy {
1212
1241
  readonly _blob: Blob;
1213
1242
  readonly _reader: ZipReader<Blob>;
1214
- constructor(blob: Blob);
1243
+ readonly id?: string;
1244
+ constructor(blob: Blob, id?: string);
1215
1245
  getEntries(): Promise<ArchiveEntry[]>;
1216
1246
  }
1217
1247
 
@@ -1549,6 +1579,19 @@ type SkinTextureCoordinates = Record<SkinPart, ModelFaces>;
1549
1579
  declare const classicSkinTextureCoordinates: Readonly<SkinTextureCoordinates>;
1550
1580
  declare const slimSkinTextureCoordinates: Readonly<SkinTextureCoordinates>;
1551
1581
 
1582
+ interface SkinTexture {
1583
+ material: MeshBasicMaterial;
1584
+ slim: boolean;
1585
+ legacy: boolean;
1586
+ }
1587
+ declare class SkinTextures {
1588
+ static get(src: string, legacy?: boolean): Promise<SkinTexture>;
1589
+ static getCape(src: string): Promise<MeshBasicMaterial>;
1590
+ private static createMaterial;
1591
+ private static isSlim;
1592
+ private static normalizeLegacy;
1593
+ }
1594
+
1552
1595
  declare class Skins {
1553
1596
  static fromUuidOrUsername(uuidOrUsername: string): Promise<Maybe<string>>;
1554
1597
  static fromUuid(uuid: string): Promise<Maybe<string>>;
@@ -1697,4 +1740,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
1697
1740
  forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
1698
1741
  }
1699
1742
 
1700
- export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, 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 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, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, Chunk, 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 EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, 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, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, 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, 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, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
1743
+ export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, 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 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, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, Chunk, 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 EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, 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, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResponseParser, SKIN_PARTS, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, type Serializable, type SkinGeometries, 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, 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, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };