roavatar-renderer 1.2.0 → 1.2.2
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/index.js +23 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -57028,10 +57028,12 @@ class WrapLayerDesc {
|
|
|
57028
57028
|
cage;
|
|
57029
57029
|
cageOrigin;
|
|
57030
57030
|
autoSkin;
|
|
57031
|
+
importOrigin;
|
|
57031
57032
|
//temporary, order of array is used instead
|
|
57032
57033
|
order;
|
|
57033
57034
|
isSame(other) {
|
|
57034
|
-
|
|
57035
|
+
const importOriginSame = this.importOrigin && other.importOrigin && this.importOrigin.isSame(other.importOrigin) || !this.importOrigin && !other.importOrigin;
|
|
57036
|
+
return this.reference === other.reference && this.referenceOrigin.isSame(other.referenceOrigin) && this.cage === other.cage && this.cageOrigin.isSame(other.cageOrigin) && this.autoSkin === other.autoSkin && importOriginSame;
|
|
57035
57037
|
}
|
|
57036
57038
|
constructor(reference, referenceOrigin, cage, cageOrigin) {
|
|
57037
57039
|
this.reference = reference;
|
|
@@ -57173,6 +57175,9 @@ class ModelLayersDesc {
|
|
|
57173
57175
|
if (otherWrapLayer.HasProperty("AutoSkin")) {
|
|
57174
57176
|
underneathLayer.autoSkin = otherWrapLayer.Prop("AutoSkin");
|
|
57175
57177
|
}
|
|
57178
|
+
if (otherWrapLayer.HasProperty("ImportOrigin")) {
|
|
57179
|
+
underneathLayer.importOrigin = otherWrapLayer.Prop("ImportOrigin");
|
|
57180
|
+
}
|
|
57176
57181
|
underneathLayers.push(underneathLayer);
|
|
57177
57182
|
}
|
|
57178
57183
|
}
|
|
@@ -57592,6 +57597,20 @@ class MeshDesc {
|
|
|
57592
57597
|
layerClothingChunked(mesh, ref_mesh, dist_mesh, layeredClothingCacheId);
|
|
57593
57598
|
break;
|
|
57594
57599
|
}
|
|
57600
|
+
} else {
|
|
57601
|
+
let totalOffset = this.layerDesc.cageOrigin.inverse();
|
|
57602
|
+
if (this.layerDesc.importOrigin) {
|
|
57603
|
+
totalOffset = totalOffset.multiply(this.layerDesc.importOrigin.inverse());
|
|
57604
|
+
}
|
|
57605
|
+
const rig = this.instance?.parent?.parent;
|
|
57606
|
+
if (rig) {
|
|
57607
|
+
const lowerTorso = rig.FindFirstChild("LowerTorso");
|
|
57608
|
+
if (lowerTorso) {
|
|
57609
|
+
const lowerTorsoSize = lowerTorso.PropOrDefault("Size", new Vector32());
|
|
57610
|
+
totalOffset = totalOffset.multiply(new CFrame(0, -lowerTorsoSize.Y, 0));
|
|
57611
|
+
}
|
|
57612
|
+
}
|
|
57613
|
+
offsetMesh(mesh, totalOffset);
|
|
57595
57614
|
}
|
|
57596
57615
|
the_ref_mesh = void 0;
|
|
57597
57616
|
}
|
|
@@ -57752,6 +57771,9 @@ class MeshDesc {
|
|
|
57752
57771
|
if (wrapLayer.HasProperty("AutoSkin")) {
|
|
57753
57772
|
this.layerDesc.autoSkin = wrapLayer.Prop("AutoSkin");
|
|
57754
57773
|
}
|
|
57774
|
+
if (wrapLayer.HasProperty("ImportOrigin")) {
|
|
57775
|
+
this.layerDesc.importOrigin = wrapLayer.Prop("ImportOrigin");
|
|
57776
|
+
}
|
|
57755
57777
|
this.layerDesc.order = layerOrder;
|
|
57756
57778
|
this.modelLayersDesc = getModelLayersDesc(model);
|
|
57757
57779
|
} else if (wrapDeformer && wrapTarget) {
|