roavatar-renderer 1.1.3 → 1.2.0
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.d.ts +10 -5
- package/dist/index.js +165 -36
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -151,12 +151,17 @@ export declare class AnimatorWrapper extends InstanceWrapper {
|
|
|
151
151
|
static className: string;
|
|
152
152
|
static requiredProperties: string[];
|
|
153
153
|
setup(): void;
|
|
154
|
+
created(): void;
|
|
154
155
|
get data(): AnimatorWrapperData;
|
|
156
|
+
updateToolAnimation(rig: Instance): void;
|
|
157
|
+
updateToolConnections(): void;
|
|
155
158
|
_pickRandom(entries: AnimationSetEntry[]): AnimationSetEntry;
|
|
156
159
|
_getTrack(id: string): AnimationTrack | undefined;
|
|
157
160
|
_switchAnimation(name: string): boolean;
|
|
158
161
|
stopMoodAnimation(): void;
|
|
159
162
|
_switchMoodAnimation(name: string): boolean;
|
|
163
|
+
stopToolAnimation(): void;
|
|
164
|
+
_switchToolAnimation(name: string): boolean;
|
|
160
165
|
isValidTrackForSet(track: AnimationTrack, name: string): boolean;
|
|
161
166
|
_fixUnloaded(): void;
|
|
162
167
|
restPose(includeMotors?: boolean, includeFACS?: boolean): void;
|
|
@@ -176,6 +181,9 @@ declare class AnimatorWrapperData {
|
|
|
176
181
|
currentMoodAnimation?: string;
|
|
177
182
|
currentMoodAnimationTrack?: AnimationTrack;
|
|
178
183
|
moodTracks: AnimationTrack[];
|
|
184
|
+
toolTracks: AnimationTrack[];
|
|
185
|
+
toolAddedConnection?: Connection;
|
|
186
|
+
toolRemovedConnection?: Connection;
|
|
179
187
|
}
|
|
180
188
|
|
|
181
189
|
export declare const animNamesR15: AnimationSet;
|
|
@@ -1120,6 +1128,7 @@ export declare class Instance {
|
|
|
1120
1128
|
classID?: number;
|
|
1121
1129
|
objectFormat?: number;
|
|
1122
1130
|
ChildAdded: Event_2;
|
|
1131
|
+
ChildRemoved: Event_2;
|
|
1123
1132
|
Destroying: Event_2;
|
|
1124
1133
|
Changed: Event_2;
|
|
1125
1134
|
AncestryChanged: Event_2;
|
|
@@ -1395,10 +1404,6 @@ export declare const magic = "<roblox!";
|
|
|
1395
1404
|
|
|
1396
1405
|
export declare function magnitude(v: Vec3): number;
|
|
1397
1406
|
|
|
1398
|
-
export declare const MainToSubNames: {
|
|
1399
|
-
[K in string]: string[];
|
|
1400
|
-
};
|
|
1401
|
-
|
|
1402
1407
|
export declare class MakeupDescriptionWrapper extends InstanceWrapper {
|
|
1403
1408
|
static className: string;
|
|
1404
1409
|
static requiredProperties: string[];
|
|
@@ -1915,7 +1920,7 @@ export declare class RBX {
|
|
|
1915
1920
|
readPROP(chunkView: RBXSimpleView): void;
|
|
1916
1921
|
readPRNT(chunkView: RBXSimpleView): void;
|
|
1917
1922
|
getChunkBuffer(view: RBXSimpleView, compressedLength: number, uncompressedLength: number): ArrayBuffer | SharedArrayBuffer;
|
|
1918
|
-
addItem(item: Element, itemParent?: Instance): Instance;
|
|
1923
|
+
addItem(propertyToReferent: Map<Property, string>, item: Element, itemParent?: Instance): Instance;
|
|
1919
1924
|
fromXML(xml: Document): void;
|
|
1920
1925
|
fromBuffer(buffer: ArrayBuffer): void;
|
|
1921
1926
|
fromInstance(root: Instance): ArrayBuffer;
|
package/dist/index.js
CHANGED
|
@@ -27204,16 +27204,6 @@ const AllAnimations = [
|
|
|
27204
27204
|
"SwimAnimation",
|
|
27205
27205
|
"WalkAnimation"
|
|
27206
27206
|
];
|
|
27207
|
-
const MainToSubNames = {
|
|
27208
|
-
"climb": ["ClimbAnim"],
|
|
27209
|
-
"fall": ["FallAnim"],
|
|
27210
|
-
"idle": ["Animation1", "Animation2"],
|
|
27211
|
-
"jump": ["JumpAnim"],
|
|
27212
|
-
"mood": ["Animation1"],
|
|
27213
|
-
"run": ["RunAnim"],
|
|
27214
|
-
"swim": ["Swim"],
|
|
27215
|
-
"walk": ["WalkAnim"]
|
|
27216
|
-
};
|
|
27217
27207
|
const AnimationPropToName = {
|
|
27218
27208
|
"ClimbAnimation": "climb",
|
|
27219
27209
|
"FallAnimation": "fall",
|
|
@@ -28272,7 +28262,7 @@ const FLAGS = {
|
|
|
28272
28262
|
//this is needed to enable bloom, but ugly since it disables anti aliasing...
|
|
28273
28263
|
POST_PROCESSING_IS_DOUBLE_SIZE: true,
|
|
28274
28264
|
//does this count as anti aliasing?
|
|
28275
|
-
GEAR_ENABLED:
|
|
28265
|
+
GEAR_ENABLED: true,
|
|
28276
28266
|
//skeleton
|
|
28277
28267
|
SHOW_SKELETON_HELPER: false,
|
|
28278
28268
|
UPDATE_SKELETON: true,
|
|
@@ -28720,6 +28710,7 @@ class Instance {
|
|
|
28720
28710
|
objectFormat;
|
|
28721
28711
|
//same as above
|
|
28722
28712
|
ChildAdded = new Event();
|
|
28713
|
+
ChildRemoved = new Event();
|
|
28723
28714
|
Destroying = new Event();
|
|
28724
28715
|
Changed = new Event();
|
|
28725
28716
|
AncestryChanged = new Event();
|
|
@@ -29058,10 +29049,14 @@ class Instance {
|
|
|
29058
29049
|
this.parent.children.splice(index, 1);
|
|
29059
29050
|
}
|
|
29060
29051
|
}
|
|
29052
|
+
const originalParent = this.parent;
|
|
29061
29053
|
this.parent = instance;
|
|
29062
29054
|
if (this.parent) {
|
|
29063
29055
|
this.AccessoryBuildWeld();
|
|
29064
29056
|
}
|
|
29057
|
+
if (originalParent && originalParent !== instance) {
|
|
29058
|
+
originalParent.ChildRemoved.Fire(this);
|
|
29059
|
+
}
|
|
29065
29060
|
if (instance) {
|
|
29066
29061
|
instance.children.push(this);
|
|
29067
29062
|
instance.ChildAdded.Fire(this);
|
|
@@ -29074,15 +29069,16 @@ class Instance {
|
|
|
29074
29069
|
connection.Disconnect();
|
|
29075
29070
|
}
|
|
29076
29071
|
this._connectionReferences = [];
|
|
29077
|
-
for (const child of this.GetChildren()) {
|
|
29078
|
-
child.Destroy();
|
|
29079
|
-
}
|
|
29080
29072
|
this.Destroying.Fire(this);
|
|
29081
29073
|
this.ChildAdded.Clear();
|
|
29074
|
+
this.ChildRemoved.Clear();
|
|
29082
29075
|
this.Destroying.Clear();
|
|
29083
29076
|
this.Changed.Clear();
|
|
29084
29077
|
this.AncestryChanged.Clear();
|
|
29085
29078
|
this.setParent(null);
|
|
29079
|
+
for (const child of this.GetChildren()) {
|
|
29080
|
+
child.Destroy();
|
|
29081
|
+
}
|
|
29086
29082
|
for (const property of this.getPropertyNames()) {
|
|
29087
29083
|
this.setProperty(property, null);
|
|
29088
29084
|
}
|
|
@@ -29687,7 +29683,7 @@ class RBX {
|
|
|
29687
29683
|
}
|
|
29688
29684
|
return view.buffer.slice(view.viewOffset, view.viewOffset + uncompressedLength);
|
|
29689
29685
|
}
|
|
29690
|
-
addItem(item, itemParent) {
|
|
29686
|
+
addItem(propertyToReferent, item, itemParent) {
|
|
29691
29687
|
const instance = new Instance(item.getAttribute("class") || "null", true);
|
|
29692
29688
|
const properties = item.querySelectorAll(":scope > Properties > *");
|
|
29693
29689
|
for (const propertyNode of properties) {
|
|
@@ -29836,6 +29832,14 @@ class RBX {
|
|
|
29836
29832
|
instance.setProperty(property.name, Number(propertyNode.textContent));
|
|
29837
29833
|
break;
|
|
29838
29834
|
}
|
|
29835
|
+
case "Ref": {
|
|
29836
|
+
const property = new Property();
|
|
29837
|
+
property.name = propertyNode.getAttribute("name") || "null";
|
|
29838
|
+
property.typeID = DataType.Referent;
|
|
29839
|
+
instance.addProperty(property);
|
|
29840
|
+
instance.setProperty(property.name, void 0);
|
|
29841
|
+
propertyToReferent.set(property, propertyNode.textContent);
|
|
29842
|
+
}
|
|
29839
29843
|
}
|
|
29840
29844
|
}
|
|
29841
29845
|
if (itemParent) {
|
|
@@ -29849,11 +29853,15 @@ class RBX {
|
|
|
29849
29853
|
console.warn("Parsing RBX xml file, the result may not be accurate");
|
|
29850
29854
|
console.log(xml);
|
|
29851
29855
|
const itemParentMap = /* @__PURE__ */ new Map();
|
|
29856
|
+
const propertyToReferent = /* @__PURE__ */ new Map();
|
|
29857
|
+
const referentMap = /* @__PURE__ */ new Map();
|
|
29852
29858
|
let currentItems = xml.querySelectorAll(":scope > Item");
|
|
29853
29859
|
while (currentItems.length > 0) {
|
|
29854
29860
|
const newCurrentItems = [];
|
|
29855
29861
|
for (const item of currentItems) {
|
|
29856
|
-
const instance = this.addItem(item, itemParentMap.get(item));
|
|
29862
|
+
const instance = this.addItem(propertyToReferent, item, itemParentMap.get(item));
|
|
29863
|
+
const referent = item.getAttribute("referent") || "null";
|
|
29864
|
+
referentMap.set(referent, instance);
|
|
29857
29865
|
const itemChildren = item.querySelectorAll(":scope > Item");
|
|
29858
29866
|
for (const itemChild of itemChildren) {
|
|
29859
29867
|
itemParentMap.set(itemChild, instance);
|
|
@@ -29863,6 +29871,16 @@ class RBX {
|
|
|
29863
29871
|
currentItems = newCurrentItems;
|
|
29864
29872
|
}
|
|
29865
29873
|
for (const child of this.dataModel.GetDescendants()) {
|
|
29874
|
+
for (const propertyName of child.getPropertyNames()) {
|
|
29875
|
+
const property = child._properties.get(propertyName);
|
|
29876
|
+
if (property && property.typeID === DataType.Referent) {
|
|
29877
|
+
const referent = propertyToReferent.get(property);
|
|
29878
|
+
if (referent) {
|
|
29879
|
+
const instance = referentMap.get(referent);
|
|
29880
|
+
child.setProperty(propertyName, instance);
|
|
29881
|
+
}
|
|
29882
|
+
}
|
|
29883
|
+
}
|
|
29866
29884
|
child.createWrapper();
|
|
29867
29885
|
}
|
|
29868
29886
|
this.treeGenerated = true;
|
|
@@ -31655,6 +31673,13 @@ class Outfit {
|
|
|
31655
31673
|
}
|
|
31656
31674
|
fixOrders() {
|
|
31657
31675
|
for (const asset of this.assets.slice().reverse()) {
|
|
31676
|
+
if (!AccessoryAssetTypes.includes(asset.assetType.name) && LayeredAssetTypes.includes(asset.assetType.name)) {
|
|
31677
|
+
if (asset.meta) {
|
|
31678
|
+
if (typeof asset.meta.order !== "number") {
|
|
31679
|
+
asset.meta.order = this.getNextOrder(LayeredClothingAssetOrder[asset.assetType.id]);
|
|
31680
|
+
}
|
|
31681
|
+
}
|
|
31682
|
+
}
|
|
31658
31683
|
if (asset.meta && asset.meta.order && this.isOrderUsed(asset.meta.order, asset)) {
|
|
31659
31684
|
asset.setOrder(this.getNextOrder(asset.meta.order));
|
|
31660
31685
|
}
|
|
@@ -34675,7 +34700,10 @@ const API = {
|
|
|
34675
34700
|
} else {
|
|
34676
34701
|
API.Misc.startCurrentlyLoadingAssets();
|
|
34677
34702
|
const fetchStr = await API.Misc.assetURLToCDNURL(url, headers);
|
|
34678
|
-
if (fetchStr instanceof Response)
|
|
34703
|
+
if (fetchStr instanceof Response) {
|
|
34704
|
+
API.Misc.stopCurrentlyLoadingAssets();
|
|
34705
|
+
return fetchStr;
|
|
34706
|
+
}
|
|
34679
34707
|
const response = await RBLXGet(fetchStr, void 0, false);
|
|
34680
34708
|
API.Misc.stopCurrentlyLoadingAssets();
|
|
34681
34709
|
if (response.status === 200) {
|
|
@@ -49885,8 +49913,8 @@ function replaceBodyPart(rig, child) {
|
|
|
49885
49913
|
const motor6ds = rig.GetDescendants();
|
|
49886
49914
|
for (const motor of motor6ds) {
|
|
49887
49915
|
if (motor.className === "Motor6D" || motor.className === "Weld") {
|
|
49888
|
-
const part0 = motor.
|
|
49889
|
-
const part1 = motor.
|
|
49916
|
+
const part0 = motor.PropOrDefault("Part0", void 0);
|
|
49917
|
+
const part1 = motor.PropOrDefault("Part1", void 0);
|
|
49890
49918
|
if (part0 && oldBodyPart === part0) {
|
|
49891
49919
|
motor.setProperty("Part0", child);
|
|
49892
49920
|
}
|
|
@@ -50830,6 +50858,9 @@ class AnimatorWrapperData {
|
|
|
50830
50858
|
currentMoodAnimation = "mood";
|
|
50831
50859
|
currentMoodAnimationTrack;
|
|
50832
50860
|
moodTracks = [];
|
|
50861
|
+
toolTracks = [];
|
|
50862
|
+
toolAddedConnection;
|
|
50863
|
+
toolRemovedConnection;
|
|
50833
50864
|
}
|
|
50834
50865
|
class AnimatorWrapper extends InstanceWrapper {
|
|
50835
50866
|
static className = "Animator";
|
|
@@ -50839,9 +50870,45 @@ class AnimatorWrapper extends InstanceWrapper {
|
|
|
50839
50870
|
if (!this.instance.HasProperty("_data")) this.instance.addProperty(new Property("_data", DataType.NonSerializable), new AnimatorWrapperData());
|
|
50840
50871
|
if (!this.instance.HasProperty("_HasLoadedAnimation")) this.instance.addProperty(new Property("_HasLoadedAnimation", DataType.NonSerializable), false);
|
|
50841
50872
|
}
|
|
50873
|
+
created() {
|
|
50874
|
+
if (this.instance.parent) {
|
|
50875
|
+
this.updateToolConnections();
|
|
50876
|
+
}
|
|
50877
|
+
const ancestryChangedConnection = this.instance.AncestryChanged.Connect(() => {
|
|
50878
|
+
this.updateToolConnections();
|
|
50879
|
+
});
|
|
50880
|
+
const destroyingConection = this.instance.Destroying.Connect(() => {
|
|
50881
|
+
ancestryChangedConnection.Disconnect();
|
|
50882
|
+
destroyingConection.Disconnect();
|
|
50883
|
+
});
|
|
50884
|
+
}
|
|
50842
50885
|
get data() {
|
|
50843
50886
|
return this.instance.Prop("_data");
|
|
50844
50887
|
}
|
|
50888
|
+
updateToolAnimation(rig) {
|
|
50889
|
+
if (rig.FindFirstChildOfClass("Tool")) {
|
|
50890
|
+
this._switchToolAnimation("toolnone");
|
|
50891
|
+
} else {
|
|
50892
|
+
this.stopToolAnimation();
|
|
50893
|
+
}
|
|
50894
|
+
}
|
|
50895
|
+
updateToolConnections() {
|
|
50896
|
+
this.data.toolAddedConnection?.Disconnect();
|
|
50897
|
+
this.data.toolRemovedConnection?.Disconnect();
|
|
50898
|
+
this.data.toolAddedConnection = void 0;
|
|
50899
|
+
this.data.toolRemovedConnection = void 0;
|
|
50900
|
+
const humanoid = this.instance.parent;
|
|
50901
|
+
const rig = humanoid?.parent;
|
|
50902
|
+
console.log(humanoid, rig);
|
|
50903
|
+
if (humanoid && rig) {
|
|
50904
|
+
this.data.toolAddedConnection = rig.ChildAdded.Connect(() => {
|
|
50905
|
+
this.updateToolAnimation(rig);
|
|
50906
|
+
});
|
|
50907
|
+
this.data.toolRemovedConnection = rig.ChildRemoved.Connect(() => {
|
|
50908
|
+
this.updateToolAnimation(rig);
|
|
50909
|
+
});
|
|
50910
|
+
}
|
|
50911
|
+
}
|
|
50845
50912
|
_pickRandom(entries) {
|
|
50846
50913
|
let totalWeight = 0;
|
|
50847
50914
|
for (const entry of entries) {
|
|
@@ -50933,6 +51000,42 @@ class AnimatorWrapper extends InstanceWrapper {
|
|
|
50933
51000
|
}
|
|
50934
51001
|
return !!toPlayTrack;
|
|
50935
51002
|
}
|
|
51003
|
+
stopToolAnimation() {
|
|
51004
|
+
if (this.data.currentToolAnimationTrack) {
|
|
51005
|
+
this.data.currentToolAnimationTrack.Stop();
|
|
51006
|
+
}
|
|
51007
|
+
this.data.currentToolAnimationTrack = void 0;
|
|
51008
|
+
this.data.currentToolAnimation = void 0;
|
|
51009
|
+
}
|
|
51010
|
+
_switchToolAnimation(name2) {
|
|
51011
|
+
let transitionTime = 0.2;
|
|
51012
|
+
if (name2 === this.data.currentToolAnimation) {
|
|
51013
|
+
transitionTime = 0.15;
|
|
51014
|
+
}
|
|
51015
|
+
this.data.currentToolAnimation = name2;
|
|
51016
|
+
let toPlayTrack = void 0;
|
|
51017
|
+
const entries = this.data.animationSet[name2];
|
|
51018
|
+
if (entries && entries.length > 0) {
|
|
51019
|
+
const entry = this._pickRandom(entries);
|
|
51020
|
+
if (entry) {
|
|
51021
|
+
toPlayTrack = this._getTrack(entry.id);
|
|
51022
|
+
}
|
|
51023
|
+
}
|
|
51024
|
+
if (toPlayTrack !== this.data.currentToolAnimationTrack) {
|
|
51025
|
+
if (toPlayTrack) {
|
|
51026
|
+
if (this.data.currentToolAnimationTrack) {
|
|
51027
|
+
this.data.currentToolAnimationTrack.Stop(transitionTime);
|
|
51028
|
+
}
|
|
51029
|
+
this.data.currentToolAnimationTrack = void 0;
|
|
51030
|
+
if (!this.data.toolTracks.includes(toPlayTrack)) {
|
|
51031
|
+
this.data.toolTracks.push(toPlayTrack);
|
|
51032
|
+
}
|
|
51033
|
+
this.data.currentToolAnimationTrack = toPlayTrack;
|
|
51034
|
+
toPlayTrack.Play(transitionTime);
|
|
51035
|
+
}
|
|
51036
|
+
}
|
|
51037
|
+
return !!toPlayTrack;
|
|
51038
|
+
}
|
|
50936
51039
|
isValidTrackForSet(track, name2) {
|
|
50937
51040
|
if (this.data.animationSet[name2]) {
|
|
50938
51041
|
for (const entry of this.data.animationSet[name2]) {
|
|
@@ -50950,6 +51053,9 @@ class AnimatorWrapper extends InstanceWrapper {
|
|
|
50950
51053
|
if (this.data.currentMoodAnimation && !this.data.currentMoodAnimationTrack || this.data.currentMoodAnimation && this.data.currentMoodAnimationTrack && !this.isValidTrackForSet(this.data.currentMoodAnimationTrack, this.data.currentMoodAnimation)) {
|
|
50951
51054
|
this._switchMoodAnimation(this.data.currentMoodAnimation);
|
|
50952
51055
|
}
|
|
51056
|
+
if (this.data.currentToolAnimation && !this.data.currentToolAnimationTrack || this.data.currentToolAnimation && this.data.currentToolAnimationTrack && !this.isValidTrackForSet(this.data.currentToolAnimationTrack, this.data.currentToolAnimation)) {
|
|
51057
|
+
this._switchToolAnimation(this.data.currentToolAnimation);
|
|
51058
|
+
}
|
|
50953
51059
|
}
|
|
50954
51060
|
restPose(includeMotors = true, includeFACS = true) {
|
|
50955
51061
|
const rig = this.instance.parent?.parent;
|
|
@@ -50975,6 +51081,7 @@ class AnimatorWrapper extends InstanceWrapper {
|
|
|
50975
51081
|
this._fixUnloaded();
|
|
50976
51082
|
for (const track of this.data.animationTracks.values()) {
|
|
50977
51083
|
if (this.data.moodTracks.includes(track)) continue;
|
|
51084
|
+
if (this.data.toolTracks.includes(track)) continue;
|
|
50978
51085
|
const looped = track.tick(addTime);
|
|
50979
51086
|
if (this.data.currentAnimationTrack === track && looped && this.data.currentAnimation) {
|
|
50980
51087
|
this._switchAnimation(this.data.currentAnimation);
|
|
@@ -50987,6 +51094,13 @@ class AnimatorWrapper extends InstanceWrapper {
|
|
|
50987
51094
|
this._switchAnimation(this.data.currentAnimation);
|
|
50988
51095
|
}
|
|
50989
51096
|
}
|
|
51097
|
+
for (const track of this.data.animationTracks.values()) {
|
|
51098
|
+
if (!this.data.toolTracks.includes(track)) continue;
|
|
51099
|
+
const looped = track.tick(addTime);
|
|
51100
|
+
if (this.data.currentAnimationTrack === track && looped && this.data.currentAnimation) {
|
|
51101
|
+
this._switchAnimation(this.data.currentAnimation);
|
|
51102
|
+
}
|
|
51103
|
+
}
|
|
50990
51104
|
const hasMood = this.data.currentMoodAnimation && this.data.currentMoodAnimation.length > 0;
|
|
50991
51105
|
const isEmote = this.data.currentAnimation?.startsWith("emote.");
|
|
50992
51106
|
if (!hasMood && !isEmote) {
|
|
@@ -51134,6 +51248,13 @@ class AnimatorWrapper extends InstanceWrapper {
|
|
|
51134
51248
|
} else {
|
|
51135
51249
|
return true;
|
|
51136
51250
|
}
|
|
51251
|
+
case "tool":
|
|
51252
|
+
if (this.data.currentToolAnimation !== name2) {
|
|
51253
|
+
console.log("playing", name2);
|
|
51254
|
+
return this._switchToolAnimation(name2);
|
|
51255
|
+
} else {
|
|
51256
|
+
return true;
|
|
51257
|
+
}
|
|
51137
51258
|
}
|
|
51138
51259
|
return false;
|
|
51139
51260
|
}
|
|
@@ -52120,6 +52241,11 @@ class HumanoidDescriptionWrapper extends InstanceWrapper {
|
|
|
52120
52241
|
if (oldTool) {
|
|
52121
52242
|
oldTool.Destroy();
|
|
52122
52243
|
}
|
|
52244
|
+
for (const child of tool.GetDescendants()) {
|
|
52245
|
+
if (child.className === "Motor6D" || child.className === "Weld") {
|
|
52246
|
+
child.Destroy();
|
|
52247
|
+
}
|
|
52248
|
+
}
|
|
52123
52249
|
tool.setParent(rig);
|
|
52124
52250
|
}
|
|
52125
52251
|
} else {
|
|
@@ -52466,6 +52592,7 @@ class HumanoidDescriptionWrapper extends InstanceWrapper {
|
|
|
52466
52592
|
toChange.push("dance1");
|
|
52467
52593
|
toChange.push("dance2");
|
|
52468
52594
|
toChange.push("dance3");
|
|
52595
|
+
toChange.push("toolnone");
|
|
52469
52596
|
}
|
|
52470
52597
|
miniPromises.push(this._applyAnimations(humanoid, toChange));
|
|
52471
52598
|
}
|
|
@@ -52709,23 +52836,26 @@ class ToolWrapper extends InstanceWrapper {
|
|
|
52709
52836
|
}
|
|
52710
52837
|
const humanoid = rig?.FindFirstChildOfClass("Humanoid");
|
|
52711
52838
|
if (handle && rig && rig.className === "Model" && humanoid) {
|
|
52712
|
-
|
|
52713
|
-
|
|
52714
|
-
|
|
52715
|
-
if (
|
|
52716
|
-
rightGripAttCF.
|
|
52839
|
+
const rightHand = rig.FindFirstChild("RightHand") || rig.FindFirstChild("Right Arm");
|
|
52840
|
+
if (rightHand) {
|
|
52841
|
+
for (const child of rightHand.GetChildren()) {
|
|
52842
|
+
if (child.Prop("Name") === "RightGripAttachment") {
|
|
52843
|
+
const rightGripAttCF = child.PropOrDefault("CFrame", new CFrame()).clone();
|
|
52844
|
+
if (humanoid.Prop("RigType") === HumanoidRigType.R6) {
|
|
52845
|
+
rightGripAttCF.Orientation[0] -= 90;
|
|
52846
|
+
}
|
|
52847
|
+
const weld = new Instance("Weld");
|
|
52848
|
+
weld.addProperty(new Property("Name", DataType.String), "ToolWeld_GripRoAvatar");
|
|
52849
|
+
weld.addProperty(new Property("Archivable", DataType.Bool), true);
|
|
52850
|
+
weld.addProperty(new Property("C0", DataType.CFrame), rightGripAttCF);
|
|
52851
|
+
weld.addProperty(new Property("C1", DataType.CFrame), grip);
|
|
52852
|
+
weld.addProperty(new Property("Part0", DataType.Referent), child.parent);
|
|
52853
|
+
weld.addProperty(new Property("Part1", DataType.Referent), handle);
|
|
52854
|
+
weld.addProperty(new Property("Active", DataType.Bool), true);
|
|
52855
|
+
weld.addProperty(new Property("Enabled", DataType.Bool), false);
|
|
52856
|
+
weld.setParent(handle);
|
|
52857
|
+
weld.setProperty("Enabled", true);
|
|
52717
52858
|
}
|
|
52718
|
-
const weld = new Instance("Weld");
|
|
52719
|
-
weld.addProperty(new Property("Name", DataType.String), "ToolWeld_GripRoAvatar");
|
|
52720
|
-
weld.addProperty(new Property("Archivable", DataType.Bool), true);
|
|
52721
|
-
weld.addProperty(new Property("C1", DataType.CFrame), grip);
|
|
52722
|
-
weld.addProperty(new Property("C0", DataType.CFrame), rightGripAttCF);
|
|
52723
|
-
weld.addProperty(new Property("Part1", DataType.Referent), handle);
|
|
52724
|
-
weld.addProperty(new Property("Part0", DataType.Referent), child.parent);
|
|
52725
|
-
weld.addProperty(new Property("Active", DataType.Bool), true);
|
|
52726
|
-
weld.addProperty(new Property("Enabled", DataType.Bool), false);
|
|
52727
|
-
weld.setParent(handle);
|
|
52728
|
-
weld.setProperty("Enabled", true);
|
|
52729
52859
|
}
|
|
52730
52860
|
}
|
|
52731
52861
|
}
|
|
@@ -60793,7 +60923,6 @@ export {
|
|
|
60793
60923
|
LayeredAssetTypes,
|
|
60794
60924
|
LayeredClothingAssetOrder,
|
|
60795
60925
|
LocalOutfit,
|
|
60796
|
-
MainToSubNames,
|
|
60797
60926
|
MakeupDescriptionWrapper,
|
|
60798
60927
|
MakeupType,
|
|
60799
60928
|
MaxOneOfAssetTypes,
|