minerender 2.1.0-alpha.29 → 2.1.0-alpha.30

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.
@@ -912,6 +912,9 @@ declare enum SkinPart {
912
912
  }
913
913
  declare const SKIN_PARTS: SkinPart[];
914
914
 
915
+ type CapeLayout = "minecraft" | "optifine" | "labymod";
916
+ declare const capeTextureSizes: Record<CapeLayout, DoubleArray>;
917
+
915
918
  declare class SkinObject extends SceneObject {
916
919
  readonly options: SkinObjectOptions;
917
920
  private slim;
@@ -925,8 +928,8 @@ declare class SkinObject extends SceneObject {
925
928
  protected removeMeshes(): void;
926
929
  protected createMeshes(): void;
927
930
  setSkinTexture(src: string): Promise<void>;
928
- /** Load a vanilla cape texture, or pass undefined to remove the cape. */
929
- setCapeTexture(src?: string): Promise<void>;
931
+ /** Load a cape texture in the selected layout, or pass undefined to remove the cape. */
932
+ setCapeTexture(src?: string, layout?: CapeLayout): Promise<void>;
930
933
  /** Select the arm model, or pass undefined to use texture detection. */
931
934
  setSlim(slim?: boolean): void;
932
935
  private updateSlim;
@@ -1585,7 +1588,7 @@ interface SkinTexture {
1585
1588
  }
1586
1589
  declare class SkinTextures {
1587
1590
  static get(src: string, legacy?: boolean): Promise<SkinTexture>;
1588
- static getCape(src: string): Promise<MeshBasicMaterial>;
1591
+ static getCape(src: string, layout?: CapeLayout): Promise<MeshBasicMaterial>;
1589
1592
  private static createMaterial;
1590
1593
  private static isSlim;
1591
1594
  private static normalizeLegacy;
@@ -1599,7 +1602,8 @@ declare class Skins {
1599
1602
  static capeFromUuidOrUsername(uuidOrUsername: string): Promise<Maybe<string>>;
1600
1603
  static capeFromUuid(uuid: string): Promise<Maybe<string>>;
1601
1604
  static capeFromUsername(username: string): Promise<Maybe<string>>;
1602
- static capeFromCapesDev(uuid: string, capeType?: string): Promise<Maybe<string>>;
1605
+ /** Returns a full static cape texture for a username or UUID. */
1606
+ static capeFromCapesDev(player: string, capeType?: string): Promise<Maybe<string>>;
1603
1607
  private static usernameToUuid;
1604
1608
  private static usernameToUuidMcProxy;
1605
1609
  /** @deprecated **/
@@ -1737,4 +1741,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
1737
1741
  */
1738
1742
  declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
1739
1743
 
1740
- 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, BrowserCache, BrowserEnv, 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, 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, probeImageSize, registerBrowserEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
1744
+ 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, BrowserCache, BrowserEnv, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, 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, 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, capeTextureSizes, 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 };
@@ -912,6 +912,9 @@ declare enum SkinPart {
912
912
  }
913
913
  declare const SKIN_PARTS: SkinPart[];
914
914
 
915
+ type CapeLayout = "minecraft" | "optifine" | "labymod";
916
+ declare const capeTextureSizes: Record<CapeLayout, DoubleArray>;
917
+
915
918
  declare class SkinObject extends SceneObject {
916
919
  readonly options: SkinObjectOptions;
917
920
  private slim;
@@ -925,8 +928,8 @@ declare class SkinObject extends SceneObject {
925
928
  protected removeMeshes(): void;
926
929
  protected createMeshes(): void;
927
930
  setSkinTexture(src: string): Promise<void>;
928
- /** Load a vanilla cape texture, or pass undefined to remove the cape. */
929
- setCapeTexture(src?: string): Promise<void>;
931
+ /** Load a cape texture in the selected layout, or pass undefined to remove the cape. */
932
+ setCapeTexture(src?: string, layout?: CapeLayout): Promise<void>;
930
933
  /** Select the arm model, or pass undefined to use texture detection. */
931
934
  setSlim(slim?: boolean): void;
932
935
  private updateSlim;
@@ -1585,7 +1588,7 @@ interface SkinTexture {
1585
1588
  }
1586
1589
  declare class SkinTextures {
1587
1590
  static get(src: string, legacy?: boolean): Promise<SkinTexture>;
1588
- static getCape(src: string): Promise<MeshBasicMaterial>;
1591
+ static getCape(src: string, layout?: CapeLayout): Promise<MeshBasicMaterial>;
1589
1592
  private static createMaterial;
1590
1593
  private static isSlim;
1591
1594
  private static normalizeLegacy;
@@ -1599,7 +1602,8 @@ declare class Skins {
1599
1602
  static capeFromUuidOrUsername(uuidOrUsername: string): Promise<Maybe<string>>;
1600
1603
  static capeFromUuid(uuid: string): Promise<Maybe<string>>;
1601
1604
  static capeFromUsername(username: string): Promise<Maybe<string>>;
1602
- static capeFromCapesDev(uuid: string, capeType?: string): Promise<Maybe<string>>;
1605
+ /** Returns a full static cape texture for a username or UUID. */
1606
+ static capeFromCapesDev(player: string, capeType?: string): Promise<Maybe<string>>;
1603
1607
  private static usernameToUuid;
1604
1608
  private static usernameToUuidMcProxy;
1605
1609
  /** @deprecated **/
@@ -1737,4 +1741,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
1737
1741
  */
1738
1742
  declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
1739
1743
 
1740
- 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, BrowserCache, BrowserEnv, 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, 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, probeImageSize, registerBrowserEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
1744
+ 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, BrowserCache, BrowserEnv, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, 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, 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, capeTextureSizes, 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 };
@@ -213,6 +213,7 @@ __export(index_browser_exports, {
213
213
  axisToVec3: () => axisToVec3,
214
214
  base64decode: () => base64decode,
215
215
  base64encode: () => base64encode,
216
+ capeTextureSizes: () => capeTextureSizes,
216
217
  captureException: () => captureException,
217
218
  changeEvent: () => changeEvent,
218
219
  clampRotationDegrees: () => clampRotationDegrees,
@@ -5702,10 +5703,10 @@ var SkinTextures = class {
5702
5703
  });
5703
5704
  return { material, slim, legacy: isLegacy };
5704
5705
  }
5705
- static async getCape(src) {
5706
+ static async getCape(src, layout = "minecraft") {
5706
5707
  const image = await ImageLoader.getData(src);
5707
5708
  const scale = image.width / 64;
5708
- if (!Number.isInteger(scale) || scale < 1 || image.height !== image.width / 2) {
5709
+ if (layout === "minecraft" && (!Number.isInteger(scale) || scale < 1 || image.height !== image.width / 2)) {
5709
5710
  throw new MineRenderError(`Invalid cape dimensions ${image.width}x${image.height}; expected 64x32 or an integer-scaled equivalent`);
5710
5711
  }
5711
5712
  return Caching.materialCache.get(`cape:${serializeImageKey({ src })}`, () => {
@@ -5774,6 +5775,13 @@ var SkinTextures = class {
5774
5775
  }
5775
5776
  };
5776
5777
 
5778
+ // src/skin/CapeLayout.ts
5779
+ var capeTextureSizes = {
5780
+ minecraft: [64, 32],
5781
+ optifine: [46, 22],
5782
+ labymod: [22, 17]
5783
+ };
5784
+
5777
5785
  // src/skin/scene/SkinObject.ts
5778
5786
  var SkinObject = class extends SceneObject {
5779
5787
  constructor(options) {
@@ -5859,8 +5867,8 @@ var SkinObject = class extends SceneObject {
5859
5867
  }
5860
5868
  this.notifyDirty();
5861
5869
  }
5862
- /** Load a vanilla cape texture, or pass undefined to remove the cape. */
5863
- async setCapeTexture(src) {
5870
+ /** Load a cape texture in the selected layout, or pass undefined to remove the cape. */
5871
+ async setCapeTexture(src, layout = "minecraft") {
5864
5872
  const load = ++this.capeLoad;
5865
5873
  if (src === void 0) {
5866
5874
  const group = this.getGroupByName("cape" /* CAPE */);
@@ -5868,20 +5876,22 @@ var SkinObject = class extends SceneObject {
5868
5876
  this.notifyDirty();
5869
5877
  return;
5870
5878
  }
5871
- const material = await SkinTextures.getCape(src);
5879
+ const material = await SkinTextures.getCape(src, layout);
5872
5880
  if (load !== this.capeLoad) return;
5881
+ const size = capeTextureSizes[layout];
5882
+ const geometry = this._getBoxGeometryFromDimensions(
5883
+ classicSkinGeometries.cape,
5884
+ classicSkinTextureCoordinates.cape,
5885
+ size,
5886
+ size
5887
+ );
5873
5888
  const mesh = this.getMeshByName("cape" /* CAPE */);
5874
5889
  if (mesh) {
5875
5890
  mesh.material = material;
5891
+ mesh.geometry = geometry;
5876
5892
  } else {
5877
5893
  const group = this.createAndAddGroup("cape" /* CAPE */, 0, 24, 2);
5878
5894
  group.rotation.set(toRadians(-6), Math.PI, 0);
5879
- const geometry = this._getBoxGeometryFromDimensions(
5880
- classicSkinGeometries.cape,
5881
- classicSkinTextureCoordinates.cape,
5882
- [64, 32],
5883
- [64, 32]
5884
- );
5885
5895
  const cape = this.createAndAddMesh("cape" /* CAPE */, group, geometry, material);
5886
5896
  cape.position.set(0, -8, -0.5);
5887
5897
  }
@@ -7079,13 +7089,10 @@ var Skins = class {
7079
7089
  return void 0;
7080
7090
  });
7081
7091
  }
7082
- static async capeFromCapesDev(uuid, capeType = "minecraft") {
7083
- return this.getCapesDev(uuid, capeType).then((cape) => {
7084
- if (cape) {
7085
- return cape?.stillImageUrl;
7086
- }
7087
- return void 0;
7088
- });
7092
+ /** Returns a full static cape texture for a username or UUID. */
7093
+ static async capeFromCapesDev(player, capeType = "minecraft") {
7094
+ const cape = await this.getCapesDev(player, capeType);
7095
+ return cape?.exists ? cape.imageUrls?.still?.full : void 0;
7089
7096
  }
7090
7097
  //</editor-fold>
7091
7098
  //<editor-fold desc="Helpers">
@@ -7159,18 +7166,15 @@ var Skins = class {
7159
7166
  return void 0;
7160
7167
  });
7161
7168
  }
7162
- static async getCapesDev(uuid, type = "all") {
7169
+ static async getCapesDev(player, type = "all") {
7163
7170
  return Requests.genericRequest({
7164
7171
  baseURL: "https://api.capes.dev",
7165
- url: "/load/" + uuid + "/" + type
7172
+ url: "/load/" + encodeURIComponent(player) + "/" + encodeURIComponent(type)
7166
7173
  }).then((res) => {
7167
7174
  if (res.status === 200) {
7168
7175
  return res.data;
7169
7176
  }
7170
7177
  return void 0;
7171
- }).catch((err) => {
7172
- console.warn(err);
7173
- return void 0;
7174
7178
  });
7175
7179
  }
7176
7180
  static getCrafatarSkinUrl(uuid) {