minerender 2.1.0-alpha.25 → 2.1.0-alpha.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.mts +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +48 -13
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +48 -13
- package/dist/browser/index.mjs.map +1 -1
- package/dist/bundle.js +48 -13
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +48 -13
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +48 -13
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -2736,6 +2736,8 @@ var Entities = class {
|
|
|
2736
2736
|
if (textureKey) {
|
|
2737
2737
|
const path2 = isAssetKey(textureKey) ? textureKey.getFullPath() : textureKey.path;
|
|
2738
2738
|
texture = isAssetKey(textureKey) && textureKey.assetType === "textures" && path2.startsWith("entity/") ? textureKey : new AssetKey(textureKey.namespace, path2, "textures", "entity", "assets", ".png", isAssetKey(textureKey) ? textureKey.root : void 0);
|
|
2739
|
+
} else if (layer.textureLocation !== void 0) {
|
|
2740
|
+
texture = AssetKey.parse("textures", layer.textureLocation.replace(/^([^:]+:)?textures\//, "$1"));
|
|
2739
2741
|
} else {
|
|
2740
2742
|
texture = await this.resolveTexture(modelKey);
|
|
2741
2743
|
}
|
|
@@ -5504,7 +5506,41 @@ var baseSkinCoordinates = {
|
|
|
5504
5506
|
var classicSkinTextureCoordinates = {
|
|
5505
5507
|
...baseSkinCoordinates
|
|
5506
5508
|
};
|
|
5507
|
-
var slimSkinTextureCoordinates = {
|
|
5509
|
+
var slimSkinTextureCoordinates = {
|
|
5510
|
+
...baseSkinCoordinates,
|
|
5511
|
+
leftArm: {
|
|
5512
|
+
...baseSkinCoordinates.leftArm,
|
|
5513
|
+
west: { uv: [39, 52, 43, 64] },
|
|
5514
|
+
north: { uv: [36, 52, 39, 64] },
|
|
5515
|
+
south: { uv: [43, 52, 46, 64] },
|
|
5516
|
+
up: { uv: [39, 52, 36, 48] },
|
|
5517
|
+
down: { uv: [42, 48, 39, 52] }
|
|
5518
|
+
},
|
|
5519
|
+
rightArm: {
|
|
5520
|
+
...baseSkinCoordinates.rightArm,
|
|
5521
|
+
west: { uv: [47, 20, 51, 32] },
|
|
5522
|
+
north: { uv: [44, 20, 47, 32] },
|
|
5523
|
+
south: { uv: [51, 20, 54, 32] },
|
|
5524
|
+
up: { uv: [47, 20, 44, 16] },
|
|
5525
|
+
down: { uv: [50, 16, 47, 20] }
|
|
5526
|
+
},
|
|
5527
|
+
leftSleeve: {
|
|
5528
|
+
...baseSkinCoordinates.leftSleeve,
|
|
5529
|
+
west: { uv: [55, 52, 59, 64] },
|
|
5530
|
+
north: { uv: [52, 52, 55, 64] },
|
|
5531
|
+
south: { uv: [59, 52, 62, 64] },
|
|
5532
|
+
up: { uv: [55, 52, 52, 48] },
|
|
5533
|
+
down: { uv: [58, 48, 55, 52], rotation: 180 }
|
|
5534
|
+
},
|
|
5535
|
+
rightSleeve: {
|
|
5536
|
+
...baseSkinCoordinates.rightSleeve,
|
|
5537
|
+
west: { uv: [47, 36, 51, 48] },
|
|
5538
|
+
north: { uv: [44, 36, 47, 48] },
|
|
5539
|
+
south: { uv: [51, 36, 54, 48] },
|
|
5540
|
+
up: { uv: [47, 36, 44, 32] },
|
|
5541
|
+
down: { uv: [50, 32, 47, 36], rotation: 180 }
|
|
5542
|
+
}
|
|
5543
|
+
};
|
|
5508
5544
|
|
|
5509
5545
|
// src/skin/SkinGeometries.ts
|
|
5510
5546
|
var box8inner = [8, 8, 8];
|
|
@@ -5614,7 +5650,6 @@ var SkinObject = class extends SceneObject {
|
|
|
5614
5650
|
}
|
|
5615
5651
|
setSkinTexture(src) {
|
|
5616
5652
|
if (typeof src === "undefined") return;
|
|
5617
|
-
this.skinTextureSrc = src;
|
|
5618
5653
|
const mat = Materials.getImage({
|
|
5619
5654
|
texture: { src },
|
|
5620
5655
|
transparent: true
|
|
@@ -5628,18 +5663,18 @@ var SkinObject = class extends SceneObject {
|
|
|
5628
5663
|
}
|
|
5629
5664
|
//TODO: cape
|
|
5630
5665
|
setSlim(slim) {
|
|
5631
|
-
|
|
5632
|
-
const changed = slim !== this.slim;
|
|
5666
|
+
if (slim === this.slim) return;
|
|
5633
5667
|
this.slim = slim;
|
|
5634
|
-
|
|
5635
|
-
this.
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5668
|
+
for (const part of ["leftArm" /* LEFT_ARM */, "leftSleeve" /* LEFT_SLEEVE */, "rightArm" /* RIGHT_ARM */, "rightSleeve" /* RIGHT_SLEEVE */]) {
|
|
5669
|
+
const mesh = this.getMeshByName(part);
|
|
5670
|
+
if (mesh) mesh.geometry = this.getBoxGeometry(part);
|
|
5671
|
+
}
|
|
5672
|
+
const offset = slim ? 0.5 : -0.5;
|
|
5673
|
+
const leftArm = this.getGroupByName("leftArm" /* LEFT_ARM */);
|
|
5674
|
+
const rightArm = this.getGroupByName("rightArm" /* RIGHT_ARM */);
|
|
5675
|
+
if (leftArm) leftArm.position.x += offset;
|
|
5676
|
+
if (rightArm) rightArm.position.x -= offset;
|
|
5677
|
+
this.notifyDirty();
|
|
5643
5678
|
}
|
|
5644
5679
|
setLegacy(legacy) {
|
|
5645
5680
|
if (legacy !== this.legacy) {
|