minerender 2.1.0-alpha.50 → 2.1.0-alpha.51

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
@@ -78088,27 +78088,66 @@ ${key}` : key;
78088
78088
  init_dirname();
78089
78089
  init_buffer2();
78090
78090
  init_process2();
78091
+ init_CubeFace();
78091
78092
  ModelGenerator = class {
78093
+ /**
78094
+ * Front and back faces plus one zero-thickness side face per run of texels that border a transparent texel,
78095
+ * like vanilla's ItemModelGenerator. Pass the pixels of a single (first) animation frame.
78096
+ */
78092
78097
  static generateItemModel(imageData, layer) {
78093
78098
  const tintindex = this.ITEM_LAYERS.indexOf(layer);
78099
+ const texture = `#${layer}`;
78094
78100
  const mainElement = {
78095
78101
  from: [0, 0, 7.5],
78096
78102
  to: [16, 16, 8.5],
78097
78103
  faces: {
78098
78104
  "south": {
78099
78105
  uv: [0, 0, 16, 16],
78100
- texture: `#${layer}`,
78106
+ texture,
78101
78107
  tintindex
78102
78108
  },
78103
78109
  "north": {
78104
78110
  uv: [16, 0, 0, 16],
78105
- texture: `#${layer}`,
78111
+ texture,
78106
78112
  tintindex
78107
78113
  }
78108
78114
  },
78109
78115
  shade: true
78110
78116
  };
78111
- return [mainElement];
78117
+ const elements = [mainElement];
78118
+ const { width, height, data } = imageData;
78119
+ const opaque = (x4, y5) => x4 >= 0 && y5 >= 0 && x4 < width && y5 < height && data[(y5 * width + x4) * 4 + 3] !== 0;
78120
+ const sx = 16 / width;
78121
+ const sy = 16 / height;
78122
+ const sides = [["up" /* UP */, 0, -1], ["down" /* DOWN */, 0, 1], ["west" /* WEST */, -1, 0], ["east" /* EAST */, 1, 0]];
78123
+ for (const [face, dx, dy] of sides) {
78124
+ const horizontal = dx === 0;
78125
+ const lines = horizontal ? height : width;
78126
+ const length = horizontal ? width : height;
78127
+ for (let line = 0; line < lines; line++) {
78128
+ for (let start = 0; start < length; start++) {
78129
+ const exposed = (i4) => horizontal ? opaque(i4, line) && !opaque(i4, line + dy) : opaque(line, i4) && !opaque(line + dx, i4);
78130
+ if (!exposed(start)) continue;
78131
+ let end = start + 1;
78132
+ while (end < length && exposed(end)) end++;
78133
+ let uv, from, to;
78134
+ if (horizontal) {
78135
+ const y5 = 16 - (line + (dy > 0 ? 1 : 0)) * sy;
78136
+ uv = [start * sx, line * sy, end * sx, (line + 1) * sy];
78137
+ from = [start * sx, y5, 7.5];
78138
+ to = [end * sx, y5, 8.5];
78139
+ } else {
78140
+ const x4 = (line + (dx > 0 ? 1 : 0)) * sx;
78141
+ uv = [line * sx, start * sy, (line + 1) * sx, end * sy];
78142
+ from = [x4, 16 - end * sy, 7.5];
78143
+ to = [x4, 16 - start * sy, 8.5];
78144
+ }
78145
+ elements.push({ from, to, faces: { [face]: { uv, texture, tintindex } }, shade: true });
78146
+ start = end;
78147
+ }
78148
+ }
78149
+ }
78150
+ return elements;
78112
78151
  }
78113
78152
  };
78114
78153
  ModelGenerator.ITEM_LAYERS = ["layer0", "layer1", "layer2", "layer3", "layer4"];
@@ -78479,7 +78518,15 @@ ${key}` : key;
78479
78518
  for (let layerName of ModelGenerator.ITEM_LAYERS) {
78480
78519
  const textureImage = textureMap[layerName];
78481
78520
  if (textureImage) {
78482
- model.elements.push(...ModelGenerator.generateItemModel(textureImage.data, layerName));
78521
+ const [width, height] = sizes[layerName];
78522
+ const frame = frames[layerName]?.[0].index ?? 0;
78523
+ const columns = textureImage.width / width;
78524
+ model.elements.push(...ModelGenerator.generateItemModel(textureImage.getSectionData(
78525
+ frame % columns * width,
78526
+ Math.floor(frame / columns) * height,
78527
+ width,
78528
+ height
78529
+ ), layerName));
78483
78530
  }
78484
78531
  }
78485
78532
  console.debug(p8, "Item model elements", model.elements);
@@ -79703,7 +79750,6 @@ ${key}` : key;
79703
79750
  if (this.options.tints) this.options.tints = { ...this.options.tints };
79704
79751
  this.addEventListener("added", () => this.updateAnimationSubscription());
79705
79752
  this.addEventListener("removed", () => this.updateAnimationSubscription());
79706
- console.log("ModelObject options", this.options);
79707
79753
  }
79708
79754
  async init() {
79709
79755
  await this.loadTextures();
@@ -83704,6 +83750,10 @@ ${key}` : key;
83704
83750
  uv
83705
83751
  ).clone();
83706
83752
  geometry.translate(cube.origin[0] + width / 2, cube.origin[1] + height / 2, cube.origin[2] + depth / 2);
83753
+ if (Math.min(width + growX * 2, height + growY * 2, depth + growZ * 2) > 0) {
83754
+ const index = Array.from(geometry.getIndex().array);
83755
+ geometry.setIndex(index.concat(index.slice().reverse()));
83756
+ }
83707
83757
  const mesh = this.createMesh(name2, geometry, material);
83708
83758
  mesh.renderOrder = renderOrder;
83709
83759
  anchor.add(mesh);
@@ -89282,7 +89332,7 @@ property list uchar int vertex_index
89282
89332
  init_process2();
89283
89333
  var baseSkinCoordinates = {
89284
89334
  head: {
89285
- east: {
89335
+ west: {
89286
89336
  // left
89287
89337
  uv: [
89288
89338
  0,
@@ -89291,7 +89341,7 @@ property list uchar int vertex_index
89291
89341
  16
89292
89342
  ]
89293
89343
  },
89294
- west: {
89344
+ east: {
89295
89345
  // right
89296
89346
  uv: [
89297
89347
  16,
@@ -89300,7 +89350,7 @@ property list uchar int vertex_index
89300
89350
  16
89301
89351
  ]
89302
89352
  },
89303
- north: {
89353
+ south: {
89304
89354
  // front
89305
89355
  uv: [
89306
89356
  8,
@@ -89309,7 +89359,7 @@ property list uchar int vertex_index
89309
89359
  16
89310
89360
  ]
89311
89361
  },
89312
- south: {
89362
+ north: {
89313
89363
  // back
89314
89364
  uv: [
89315
89365
  24,
@@ -89321,24 +89371,24 @@ property list uchar int vertex_index
89321
89371
  up: {
89322
89372
  // top
89323
89373
  uv: [
89324
- 16,
89325
89374
  8,
89326
- 8,
89327
- 0
89375
+ 0,
89376
+ 16,
89377
+ 8
89328
89378
  ]
89329
89379
  },
89330
89380
  down: {
89331
89381
  // bottom
89332
89382
  uv: [
89333
- 24,
89334
- 0,
89335
89383
  16,
89336
- 8
89384
+ 8,
89385
+ 24,
89386
+ 0
89337
89387
  ]
89338
89388
  }
89339
89389
  },
89340
89390
  body: {
89341
- east: {
89391
+ west: {
89342
89392
  uv: [
89343
89393
  16,
89344
89394
  20,
@@ -89346,7 +89396,7 @@ property list uchar int vertex_index
89346
89396
  32
89347
89397
  ]
89348
89398
  },
89349
- west: {
89399
+ east: {
89350
89400
  uv: [
89351
89401
  28,
89352
89402
  20,
@@ -89354,7 +89404,7 @@ property list uchar int vertex_index
89354
89404
  32
89355
89405
  ]
89356
89406
  },
89357
- north: {
89407
+ south: {
89358
89408
  uv: [
89359
89409
  20,
89360
89410
  20,
@@ -89362,7 +89412,7 @@ property list uchar int vertex_index
89362
89412
  32
89363
89413
  ]
89364
89414
  },
89365
- south: {
89415
+ north: {
89366
89416
  uv: [
89367
89417
  32,
89368
89418
  20,
@@ -89372,23 +89422,23 @@ property list uchar int vertex_index
89372
89422
  },
89373
89423
  up: {
89374
89424
  uv: [
89375
- 28,
89376
89425
  20,
89377
- 20,
89378
- 16
89426
+ 16,
89427
+ 28,
89428
+ 20
89379
89429
  ]
89380
89430
  },
89381
89431
  down: {
89382
89432
  uv: [
89383
- 36,
89384
- 16,
89385
89433
  28,
89386
- 20
89434
+ 20,
89435
+ 36,
89436
+ 16
89387
89437
  ]
89388
89438
  }
89389
89439
  },
89390
89440
  leftArm: {
89391
- east: {
89441
+ west: {
89392
89442
  uv: [
89393
89443
  32,
89394
89444
  52,
@@ -89396,7 +89446,7 @@ property list uchar int vertex_index
89396
89446
  64
89397
89447
  ]
89398
89448
  },
89399
- west: {
89449
+ east: {
89400
89450
  uv: [
89401
89451
  40,
89402
89452
  52,
@@ -89404,7 +89454,7 @@ property list uchar int vertex_index
89404
89454
  64
89405
89455
  ]
89406
89456
  },
89407
- north: {
89457
+ south: {
89408
89458
  uv: [
89409
89459
  36,
89410
89460
  52,
@@ -89412,7 +89462,7 @@ property list uchar int vertex_index
89412
89462
  64
89413
89463
  ]
89414
89464
  },
89415
- south: {
89465
+ north: {
89416
89466
  uv: [
89417
89467
  44,
89418
89468
  52,
@@ -89422,23 +89472,23 @@ property list uchar int vertex_index
89422
89472
  },
89423
89473
  up: {
89424
89474
  uv: [
89425
- 40,
89426
- 52,
89427
89475
  36,
89428
- 48
89476
+ 48,
89477
+ 40,
89478
+ 52
89429
89479
  ]
89430
89480
  },
89431
89481
  down: {
89432
89482
  uv: [
89433
- 44,
89434
- 48,
89435
89483
  40,
89436
- 52
89484
+ 52,
89485
+ 44,
89486
+ 48
89437
89487
  ]
89438
89488
  }
89439
89489
  },
89440
89490
  rightArm: {
89441
- east: {
89491
+ west: {
89442
89492
  uv: [
89443
89493
  40,
89444
89494
  20,
@@ -89446,7 +89496,7 @@ property list uchar int vertex_index
89446
89496
  32
89447
89497
  ]
89448
89498
  },
89449
- west: {
89499
+ east: {
89450
89500
  uv: [
89451
89501
  48,
89452
89502
  20,
@@ -89454,7 +89504,7 @@ property list uchar int vertex_index
89454
89504
  32
89455
89505
  ]
89456
89506
  },
89457
- north: {
89507
+ south: {
89458
89508
  uv: [
89459
89509
  44,
89460
89510
  20,
@@ -89462,7 +89512,7 @@ property list uchar int vertex_index
89462
89512
  32
89463
89513
  ]
89464
89514
  },
89465
- south: {
89515
+ north: {
89466
89516
  uv: [
89467
89517
  52,
89468
89518
  20,
@@ -89472,23 +89522,23 @@ property list uchar int vertex_index
89472
89522
  },
89473
89523
  up: {
89474
89524
  uv: [
89475
- 48,
89476
- 20,
89477
89525
  44,
89478
- 16
89526
+ 16,
89527
+ 48,
89528
+ 20
89479
89529
  ]
89480
89530
  },
89481
89531
  down: {
89482
89532
  uv: [
89483
- 52,
89484
- 16,
89485
89533
  48,
89486
- 20
89534
+ 20,
89535
+ 52,
89536
+ 16
89487
89537
  ]
89488
89538
  }
89489
89539
  },
89490
89540
  leftLeg: {
89491
- east: {
89541
+ west: {
89492
89542
  uv: [
89493
89543
  16,
89494
89544
  52,
@@ -89496,7 +89546,7 @@ property list uchar int vertex_index
89496
89546
  64
89497
89547
  ]
89498
89548
  },
89499
- west: {
89549
+ east: {
89500
89550
  uv: [
89501
89551
  24,
89502
89552
  52,
@@ -89504,7 +89554,7 @@ property list uchar int vertex_index
89504
89554
  64
89505
89555
  ]
89506
89556
  },
89507
- north: {
89557
+ south: {
89508
89558
  uv: [
89509
89559
  20,
89510
89560
  52,
@@ -89512,7 +89562,7 @@ property list uchar int vertex_index
89512
89562
  64
89513
89563
  ]
89514
89564
  },
89515
- south: {
89565
+ north: {
89516
89566
  uv: [
89517
89567
  28,
89518
89568
  52,
@@ -89522,24 +89572,24 @@ property list uchar int vertex_index
89522
89572
  },
89523
89573
  up: {
89524
89574
  uv: [
89525
- 24,
89526
- 52,
89527
89575
  20,
89528
- 48
89576
+ 48,
89577
+ 24,
89578
+ 52
89529
89579
  ]
89530
89580
  },
89531
89581
  down: {
89532
89582
  uv: [
89533
- 28,
89534
- 48,
89535
89583
  24,
89536
- 52
89584
+ 52,
89585
+ 28,
89586
+ 48
89537
89587
  ],
89538
89588
  rotation: 180
89539
89589
  }
89540
89590
  },
89541
89591
  rightLeg: {
89542
- east: {
89592
+ west: {
89543
89593
  uv: [
89544
89594
  0,
89545
89595
  20,
@@ -89547,7 +89597,7 @@ property list uchar int vertex_index
89547
89597
  32
89548
89598
  ]
89549
89599
  },
89550
- west: {
89600
+ east: {
89551
89601
  uv: [
89552
89602
  8,
89553
89603
  20,
@@ -89555,7 +89605,7 @@ property list uchar int vertex_index
89555
89605
  32
89556
89606
  ]
89557
89607
  },
89558
- north: {
89608
+ south: {
89559
89609
  uv: [
89560
89610
  4,
89561
89611
  20,
@@ -89563,7 +89613,7 @@ property list uchar int vertex_index
89563
89613
  32
89564
89614
  ]
89565
89615
  },
89566
- south: {
89616
+ north: {
89567
89617
  uv: [
89568
89618
  12,
89569
89619
  20,
@@ -89573,23 +89623,23 @@ property list uchar int vertex_index
89573
89623
  },
89574
89624
  up: {
89575
89625
  uv: [
89576
- 8,
89577
- 20,
89578
89626
  4,
89579
- 16
89627
+ 16,
89628
+ 8,
89629
+ 20
89580
89630
  ]
89581
89631
  },
89582
89632
  down: {
89583
89633
  uv: [
89584
- 12,
89585
- 16,
89586
89634
  8,
89587
- 20
89635
+ 20,
89636
+ 12,
89637
+ 16
89588
89638
  ]
89589
89639
  }
89590
89640
  },
89591
89641
  hat: {
89592
- east: {
89642
+ west: {
89593
89643
  uv: [
89594
89644
  32,
89595
89645
  8,
@@ -89597,7 +89647,7 @@ property list uchar int vertex_index
89597
89647
  16
89598
89648
  ]
89599
89649
  },
89600
- west: {
89650
+ east: {
89601
89651
  uv: [
89602
89652
  48,
89603
89653
  8,
@@ -89605,7 +89655,7 @@ property list uchar int vertex_index
89605
89655
  16
89606
89656
  ]
89607
89657
  },
89608
- north: {
89658
+ south: {
89609
89659
  uv: [
89610
89660
  40,
89611
89661
  8,
@@ -89613,7 +89663,7 @@ property list uchar int vertex_index
89613
89663
  16
89614
89664
  ]
89615
89665
  },
89616
- south: {
89666
+ north: {
89617
89667
  uv: [
89618
89668
  56,
89619
89669
  8,
@@ -89623,24 +89673,24 @@ property list uchar int vertex_index
89623
89673
  },
89624
89674
  up: {
89625
89675
  uv: [
89626
- 48,
89627
- 8,
89628
89676
  40,
89629
- 0
89677
+ 0,
89678
+ 48,
89679
+ 8
89630
89680
  ]
89631
89681
  },
89632
89682
  down: {
89633
89683
  uv: [
89634
- 56,
89635
- 0,
89636
89684
  48,
89637
- 8
89685
+ 8,
89686
+ 56,
89687
+ 0
89638
89688
  ],
89639
89689
  rotation: 180
89640
89690
  }
89641
89691
  },
89642
89692
  jacket: {
89643
- east: {
89693
+ west: {
89644
89694
  uv: [
89645
89695
  16,
89646
89696
  36,
@@ -89648,7 +89698,7 @@ property list uchar int vertex_index
89648
89698
  48
89649
89699
  ]
89650
89700
  },
89651
- west: {
89701
+ east: {
89652
89702
  uv: [
89653
89703
  28,
89654
89704
  36,
@@ -89656,7 +89706,7 @@ property list uchar int vertex_index
89656
89706
  48
89657
89707
  ]
89658
89708
  },
89659
- north: {
89709
+ south: {
89660
89710
  uv: [
89661
89711
  20,
89662
89712
  36,
@@ -89664,7 +89714,7 @@ property list uchar int vertex_index
89664
89714
  48
89665
89715
  ]
89666
89716
  },
89667
- south: {
89717
+ north: {
89668
89718
  uv: [
89669
89719
  32,
89670
89720
  36,
@@ -89674,24 +89724,24 @@ property list uchar int vertex_index
89674
89724
  },
89675
89725
  up: {
89676
89726
  uv: [
89677
- 28,
89678
- 36,
89679
89727
  20,
89680
- 32
89728
+ 32,
89729
+ 28,
89730
+ 36
89681
89731
  ]
89682
89732
  },
89683
89733
  down: {
89684
89734
  uv: [
89685
- 36,
89686
- 32,
89687
89735
  28,
89688
- 36
89736
+ 36,
89737
+ 36,
89738
+ 32
89689
89739
  ],
89690
89740
  rotation: 180
89691
89741
  }
89692
89742
  },
89693
89743
  leftSleeve: {
89694
- east: {
89744
+ west: {
89695
89745
  uv: [
89696
89746
  48,
89697
89747
  52,
@@ -89699,7 +89749,7 @@ property list uchar int vertex_index
89699
89749
  64
89700
89750
  ]
89701
89751
  },
89702
- west: {
89752
+ east: {
89703
89753
  uv: [
89704
89754
  56,
89705
89755
  52,
@@ -89707,7 +89757,7 @@ property list uchar int vertex_index
89707
89757
  64
89708
89758
  ]
89709
89759
  },
89710
- north: {
89760
+ south: {
89711
89761
  uv: [
89712
89762
  52,
89713
89763
  52,
@@ -89715,7 +89765,7 @@ property list uchar int vertex_index
89715
89765
  64
89716
89766
  ]
89717
89767
  },
89718
- south: {
89768
+ north: {
89719
89769
  uv: [
89720
89770
  60,
89721
89771
  52,
@@ -89725,24 +89775,24 @@ property list uchar int vertex_index
89725
89775
  },
89726
89776
  up: {
89727
89777
  uv: [
89728
- 56,
89729
89778
  52,
89730
- 52,
89731
- 48
89779
+ 48,
89780
+ 56,
89781
+ 52
89732
89782
  ]
89733
89783
  },
89734
89784
  down: {
89735
89785
  uv: [
89736
- 60,
89737
- 48,
89738
89786
  56,
89739
- 52
89787
+ 52,
89788
+ 60,
89789
+ 48
89740
89790
  ],
89741
89791
  rotation: 180
89742
89792
  }
89743
89793
  },
89744
89794
  rightSleeve: {
89745
- east: {
89795
+ west: {
89746
89796
  uv: [
89747
89797
  40,
89748
89798
  36,
@@ -89750,7 +89800,7 @@ property list uchar int vertex_index
89750
89800
  48
89751
89801
  ]
89752
89802
  },
89753
- west: {
89803
+ east: {
89754
89804
  uv: [
89755
89805
  48,
89756
89806
  36,
@@ -89758,7 +89808,7 @@ property list uchar int vertex_index
89758
89808
  48
89759
89809
  ]
89760
89810
  },
89761
- north: {
89811
+ south: {
89762
89812
  uv: [
89763
89813
  44,
89764
89814
  36,
@@ -89766,7 +89816,7 @@ property list uchar int vertex_index
89766
89816
  48
89767
89817
  ]
89768
89818
  },
89769
- south: {
89819
+ north: {
89770
89820
  uv: [
89771
89821
  52,
89772
89822
  36,
@@ -89776,24 +89826,24 @@ property list uchar int vertex_index
89776
89826
  },
89777
89827
  up: {
89778
89828
  uv: [
89779
- 48,
89780
- 36,
89781
89829
  44,
89782
- 32
89830
+ 32,
89831
+ 48,
89832
+ 36
89783
89833
  ]
89784
89834
  },
89785
89835
  down: {
89786
89836
  uv: [
89787
- 52,
89788
- 32,
89789
89837
  48,
89790
- 36
89838
+ 36,
89839
+ 52,
89840
+ 32
89791
89841
  ],
89792
89842
  rotation: 180
89793
89843
  }
89794
89844
  },
89795
89845
  leftTrousers: {
89796
- east: {
89846
+ west: {
89797
89847
  uv: [
89798
89848
  0,
89799
89849
  52,
@@ -89801,7 +89851,7 @@ property list uchar int vertex_index
89801
89851
  64
89802
89852
  ]
89803
89853
  },
89804
- west: {
89854
+ east: {
89805
89855
  uv: [
89806
89856
  8,
89807
89857
  52,
@@ -89809,7 +89859,7 @@ property list uchar int vertex_index
89809
89859
  64
89810
89860
  ]
89811
89861
  },
89812
- north: {
89862
+ south: {
89813
89863
  uv: [
89814
89864
  4,
89815
89865
  52,
@@ -89817,7 +89867,7 @@ property list uchar int vertex_index
89817
89867
  64
89818
89868
  ]
89819
89869
  },
89820
- south: {
89870
+ north: {
89821
89871
  uv: [
89822
89872
  12,
89823
89873
  52,
@@ -89827,23 +89877,23 @@ property list uchar int vertex_index
89827
89877
  },
89828
89878
  up: {
89829
89879
  uv: [
89830
- 8,
89831
- 52,
89832
89880
  4,
89833
- 48
89881
+ 48,
89882
+ 8,
89883
+ 52
89834
89884
  ]
89835
89885
  },
89836
89886
  down: {
89837
89887
  uv: [
89838
- 12,
89839
- 48,
89840
89888
  8,
89841
- 52
89889
+ 52,
89890
+ 12,
89891
+ 48
89842
89892
  ]
89843
89893
  }
89844
89894
  },
89845
89895
  rightTrousers: {
89846
- east: {
89896
+ west: {
89847
89897
  uv: [
89848
89898
  0,
89849
89899
  36,
@@ -89851,7 +89901,7 @@ property list uchar int vertex_index
89851
89901
  48
89852
89902
  ]
89853
89903
  },
89854
- west: {
89904
+ east: {
89855
89905
  uv: [
89856
89906
  8,
89857
89907
  36,
@@ -89859,7 +89909,7 @@ property list uchar int vertex_index
89859
89909
  48
89860
89910
  ]
89861
89911
  },
89862
- north: {
89912
+ south: {
89863
89913
  uv: [
89864
89914
  4,
89865
89915
  36,
@@ -89867,7 +89917,7 @@ property list uchar int vertex_index
89867
89917
  48
89868
89918
  ]
89869
89919
  },
89870
- south: {
89920
+ north: {
89871
89921
  uv: [
89872
89922
  12,
89873
89923
  36,
@@ -89877,18 +89927,18 @@ property list uchar int vertex_index
89877
89927
  },
89878
89928
  up: {
89879
89929
  uv: [
89880
- 8,
89881
- 36,
89882
89930
  4,
89883
- 32
89931
+ 32,
89932
+ 8,
89933
+ 36
89884
89934
  ]
89885
89935
  },
89886
89936
  down: {
89887
89937
  uv: [
89888
- 12,
89889
- 32,
89890
89938
  8,
89891
- 36
89939
+ 36,
89940
+ 12,
89941
+ 32
89892
89942
  ],
89893
89943
  rotation: 180
89894
89944
  }
@@ -89909,35 +89959,35 @@ property list uchar int vertex_index
89909
89959
  ...baseSkinCoordinates,
89910
89960
  leftArm: {
89911
89961
  ...baseSkinCoordinates.leftArm,
89912
- west: { uv: [39, 52, 43, 64] },
89913
- north: { uv: [36, 52, 39, 64] },
89914
- south: { uv: [43, 52, 46, 64] },
89915
- up: { uv: [39, 52, 36, 48] },
89916
- down: { uv: [42, 48, 39, 52] }
89962
+ east: { uv: [39, 52, 43, 64] },
89963
+ south: { uv: [36, 52, 39, 64] },
89964
+ north: { uv: [43, 52, 46, 64] },
89965
+ up: { uv: [36, 48, 39, 52] },
89966
+ down: { uv: [39, 52, 42, 48] }
89917
89967
  },
89918
89968
  rightArm: {
89919
89969
  ...baseSkinCoordinates.rightArm,
89920
- west: { uv: [47, 20, 51, 32] },
89921
- north: { uv: [44, 20, 47, 32] },
89922
- south: { uv: [51, 20, 54, 32] },
89923
- up: { uv: [47, 20, 44, 16] },
89924
- down: { uv: [50, 16, 47, 20] }
89970
+ east: { uv: [47, 20, 51, 32] },
89971
+ south: { uv: [44, 20, 47, 32] },
89972
+ north: { uv: [51, 20, 54, 32] },
89973
+ up: { uv: [44, 16, 47, 20] },
89974
+ down: { uv: [47, 20, 50, 16] }
89925
89975
  },
89926
89976
  leftSleeve: {
89927
89977
  ...baseSkinCoordinates.leftSleeve,
89928
- west: { uv: [55, 52, 59, 64] },
89929
- north: { uv: [52, 52, 55, 64] },
89930
- south: { uv: [59, 52, 62, 64] },
89931
- up: { uv: [55, 52, 52, 48] },
89932
- down: { uv: [58, 48, 55, 52], rotation: 180 }
89978
+ east: { uv: [55, 52, 59, 64] },
89979
+ south: { uv: [52, 52, 55, 64] },
89980
+ north: { uv: [59, 52, 62, 64] },
89981
+ up: { uv: [52, 48, 55, 52] },
89982
+ down: { uv: [55, 52, 58, 48], rotation: 180 }
89933
89983
  },
89934
89984
  rightSleeve: {
89935
89985
  ...baseSkinCoordinates.rightSleeve,
89936
- west: { uv: [47, 36, 51, 48] },
89937
- north: { uv: [44, 36, 47, 48] },
89938
- south: { uv: [51, 36, 54, 48] },
89939
- up: { uv: [47, 36, 44, 32] },
89940
- down: { uv: [50, 32, 47, 36], rotation: 180 }
89986
+ east: { uv: [47, 36, 51, 48] },
89987
+ south: { uv: [44, 36, 47, 48] },
89988
+ north: { uv: [51, 36, 54, 48] },
89989
+ up: { uv: [44, 32, 47, 36] },
89990
+ down: { uv: [47, 36, 50, 32], rotation: 180 }
89941
89991
  }
89942
89992
  };
89943
89993
 
@@ -90189,34 +90239,34 @@ property list uchar int vertex_index
90189
90239
  }
90190
90240
  {
90191
90241
  {
90192
- const leftArmGroup = this.createAndAddGroup("leftArm", -5, 22, 0);
90242
+ const leftArmGroup = this.createAndAddGroup("leftArm", 5, 22, 0);
90193
90243
  const leftArmGeo = this.getBoxGeometry("leftArm" /* LEFT_ARM */);
90194
90244
  const leftArm = this.createAndAddMesh("leftArm", leftArmGroup, leftArmGeo, mat, "y" /* Y */, -4);
90195
- leftArm.position.x = this.slim ? -0.5 : -1;
90245
+ leftArm.position.x = this.slim ? 0.5 : 1;
90196
90246
  const leftSleeveGeo = this.getBoxGeometry("leftSleeve" /* LEFT_SLEEVE */);
90197
90247
  const leftSleeve = this.createAndAddMesh("leftSleeve", leftArmGroup, leftSleeveGeo, mat, "y" /* Y */, -4);
90198
- leftSleeve.position.x = this.slim ? -0.5 : -1;
90248
+ leftSleeve.position.x = this.slim ? 0.5 : 1;
90199
90249
  }
90200
90250
  {
90201
- const rightArmGroup = this.createAndAddGroup("rightArm", 5, 22, 0);
90251
+ const rightArmGroup = this.createAndAddGroup("rightArm", -5, 22, 0);
90202
90252
  const rightArmGeo = this.getBoxGeometry("rightArm" /* RIGHT_ARM */);
90203
90253
  const rightArm = this.createAndAddMesh("rightArm", rightArmGroup, rightArmGeo, mat, "y" /* Y */, -4);
90204
- rightArm.position.x = this.slim ? 0.5 : 1;
90254
+ rightArm.position.x = this.slim ? -0.5 : -1;
90205
90255
  const rightSleeveGeo = this.getBoxGeometry("rightSleeve" /* RIGHT_SLEEVE */);
90206
90256
  const rightSleeve = this.createAndAddMesh("rightSleeve", rightArmGroup, rightSleeveGeo, mat, "y" /* Y */, -4);
90207
- rightSleeve.position.x = this.slim ? 0.5 : 1;
90257
+ rightSleeve.position.x = this.slim ? -0.5 : -1;
90208
90258
  }
90209
90259
  }
90210
90260
  {
90211
90261
  {
90212
- const leftLegGroup = this.createAndAddGroup("leftLeg", -1.9, 12, 0);
90262
+ const leftLegGroup = this.createAndAddGroup("leftLeg", 1.9, 12, 0);
90213
90263
  const leftLegGeo = this.getBoxGeometry("leftLeg" /* LEFT_LEG */);
90214
90264
  const leftLeg = this.createAndAddMesh("leftLeg", leftLegGroup, leftLegGeo, mat, "y" /* Y */, -6);
90215
90265
  const leftTrousersGeo = this.getBoxGeometry("leftTrousers" /* LEFT_TROUSERS */);
90216
90266
  const leftTrousers = this.createAndAddMesh("leftTrousers", leftLegGroup, leftTrousersGeo, mat, "y" /* Y */, -6);
90217
90267
  }
90218
90268
  {
90219
- const rightLegGroup = this.createAndAddGroup("rightLeg", 1.9, 12, 0);
90269
+ const rightLegGroup = this.createAndAddGroup("rightLeg", -1.9, 12, 0);
90220
90270
  const rightLegGeo = this.getBoxGeometry("rightLeg" /* RIGHT_LEG */);
90221
90271
  const rightLeg = this.createAndAddMesh("rightLeg", rightLegGroup, rightLegGeo, mat, "y" /* Y */, -6);
90222
90272
  const rightTrousersGeo = this.getBoxGeometry("rightTrousers" /* RIGHT_TROUSERS */);
@@ -90266,9 +90316,10 @@ property list uchar int vertex_index
90266
90316
  mesh.geometry = geometry;
90267
90317
  } else {
90268
90318
  const body = this.getGroupByName("body" /* BODY */);
90269
- const group = this.createGroup("cape" /* CAPE */, 0, body ? 0 : 24, 2);
90319
+ const group = this.createGroup("cape" /* CAPE */);
90320
+ group.position.set(0, body ? 0 : 24, -2);
90270
90321
  (body ?? this).add(group);
90271
- group.rotation.set(toRadians(-6), Math.PI, 0);
90322
+ group.rotation.x = toRadians(6);
90272
90323
  const cape = this.createAndAddMesh("cape" /* CAPE */, group, geometry, material);
90273
90324
  cape.position.set(0, -8, -0.5);
90274
90325
  }
@@ -90282,7 +90333,7 @@ property list uchar int vertex_index
90282
90333
  updateSlim(slim) {
90283
90334
  if (slim === this.slim) return;
90284
90335
  this.slim = slim;
90285
- const offset = slim ? 0.5 : -0.5;
90336
+ const offset = slim ? -0.5 : 0.5;
90286
90337
  for (const part of ["leftArm" /* LEFT_ARM */, "leftSleeve" /* LEFT_SLEEVE */, "rightArm" /* RIGHT_ARM */, "rightSleeve" /* RIGHT_SLEEVE */]) {
90287
90338
  const mesh = this.getMeshByName(part);
90288
90339
  if (mesh) {
@@ -90376,13 +90427,9 @@ property list uchar int vertex_index
90376
90427
  return this.add(...object);
90377
90428
  }
90378
90429
  async addSceneObject(asset, objectSupplier, _options, parent = this) {
90379
- console.log("addSceneObject", asset);
90380
- console.log("parent", parent);
90381
- console.log(_options);
90382
90430
  this.dirty = true;
90383
90431
  const obj = await objectSupplier();
90384
90432
  if (obj?.options?.instanceMeshes && asset.key && asset.key?.assetType === "models") {
90385
- console.log("instanceMeshes + key");
90386
90433
  let key = asset.key.serialize();
90387
90434
  if (isModelObject(obj)) {
90388
90435
  const { displayPosition, uvLockRotation, tints, cullMask } = obj.options;
@@ -90399,7 +90446,6 @@ property list uchar int vertex_index
90399
90446
  return obj;
90400
90447
  });
90401
90448
  } else {
90402
- console.log("!instanceMeshes | !key");
90403
90449
  obj.scene = this;
90404
90450
  await obj.init();
90405
90451
  if (!isBlockObject(obj)) {