minerender 2.1.0-alpha.26 → 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/bundle.js CHANGED
@@ -81254,7 +81254,41 @@ return ${compiler2.callType("value", tagType)}
81254
81254
  var classicSkinTextureCoordinates = {
81255
81255
  ...baseSkinCoordinates
81256
81256
  };
81257
- var slimSkinTextureCoordinates = { ...baseSkinCoordinates };
81257
+ var slimSkinTextureCoordinates = {
81258
+ ...baseSkinCoordinates,
81259
+ leftArm: {
81260
+ ...baseSkinCoordinates.leftArm,
81261
+ west: { uv: [39, 52, 43, 64] },
81262
+ north: { uv: [36, 52, 39, 64] },
81263
+ south: { uv: [43, 52, 46, 64] },
81264
+ up: { uv: [39, 52, 36, 48] },
81265
+ down: { uv: [42, 48, 39, 52] }
81266
+ },
81267
+ rightArm: {
81268
+ ...baseSkinCoordinates.rightArm,
81269
+ west: { uv: [47, 20, 51, 32] },
81270
+ north: { uv: [44, 20, 47, 32] },
81271
+ south: { uv: [51, 20, 54, 32] },
81272
+ up: { uv: [47, 20, 44, 16] },
81273
+ down: { uv: [50, 16, 47, 20] }
81274
+ },
81275
+ leftSleeve: {
81276
+ ...baseSkinCoordinates.leftSleeve,
81277
+ west: { uv: [55, 52, 59, 64] },
81278
+ north: { uv: [52, 52, 55, 64] },
81279
+ south: { uv: [59, 52, 62, 64] },
81280
+ up: { uv: [55, 52, 52, 48] },
81281
+ down: { uv: [58, 48, 55, 52], rotation: 180 }
81282
+ },
81283
+ rightSleeve: {
81284
+ ...baseSkinCoordinates.rightSleeve,
81285
+ west: { uv: [47, 36, 51, 48] },
81286
+ north: { uv: [44, 36, 47, 48] },
81287
+ south: { uv: [51, 36, 54, 48] },
81288
+ up: { uv: [47, 36, 44, 32] },
81289
+ down: { uv: [50, 32, 47, 36], rotation: 180 }
81290
+ }
81291
+ };
81258
81292
 
81259
81293
  // src/skin/SkinGeometries.ts
81260
81294
  init_dirname();
@@ -81367,7 +81401,6 @@ return ${compiler2.callType("value", tagType)}
81367
81401
  }
81368
81402
  setSkinTexture(src) {
81369
81403
  if (typeof src === "undefined") return;
81370
- this.skinTextureSrc = src;
81371
81404
  const mat = Materials.getImage({
81372
81405
  texture: { src },
81373
81406
  transparent: true
@@ -81381,18 +81414,18 @@ return ${compiler2.callType("value", tagType)}
81381
81414
  }
81382
81415
  //TODO: cape
81383
81416
  setSlim(slim) {
81384
- console.log("#setSlim");
81385
- const changed = slim !== this.slim;
81417
+ if (slim === this.slim) return;
81386
81418
  this.slim = slim;
81387
- if (changed) {
81388
- this.createMeshes();
81389
- }
81390
- if (changed) {
81391
- if (this.skinTextureSrc) {
81392
- this.setSkinTexture(this.skinTextureSrc);
81393
- }
81394
- }
81395
- console.log("#setSlim done");
81419
+ for (const part of ["leftArm" /* LEFT_ARM */, "leftSleeve" /* LEFT_SLEEVE */, "rightArm" /* RIGHT_ARM */, "rightSleeve" /* RIGHT_SLEEVE */]) {
81420
+ const mesh = this.getMeshByName(part);
81421
+ if (mesh) mesh.geometry = this.getBoxGeometry(part);
81422
+ }
81423
+ const offset = slim ? 0.5 : -0.5;
81424
+ const leftArm = this.getGroupByName("leftArm" /* LEFT_ARM */);
81425
+ const rightArm = this.getGroupByName("rightArm" /* RIGHT_ARM */);
81426
+ if (leftArm) leftArm.position.x += offset;
81427
+ if (rightArm) rightArm.position.x -= offset;
81428
+ this.notifyDirty();
81396
81429
  }
81397
81430
  setLegacy(legacy) {
81398
81431
  if (legacy !== this.legacy) {