roavatar-renderer 1.4.0 → 1.4.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.d.ts CHANGED
@@ -6,14 +6,19 @@ export declare const AbbreviationToFaceControlProperty: {
6
6
  [K in string]: string;
7
7
  };
8
8
 
9
+ /** @category Outfit */
9
10
  export declare const AccessoryAssetTypes: string[];
10
11
 
12
+ /**
13
+ * @category InstanceWrapper
14
+ */
11
15
  export declare class AccessoryDescriptionWrapper extends InstanceWrapper {
12
16
  static className: string;
13
17
  static requiredProperties: string[];
14
18
  setup(): void;
15
19
  }
16
20
 
21
+ /** @category Outfit */
17
22
  export declare const accessoryRefinementLowerBounds: {
18
23
  [K in string]: {
19
24
  "position": {
@@ -28,8 +33,10 @@ export declare const accessoryRefinementLowerBounds: {
28
33
  };
29
34
  };
30
35
 
36
+ /** @category Outfit */
31
37
  export declare const accessoryRefinementTypes: number[];
32
38
 
39
+ /** @category Outfit */
33
40
  export declare const accessoryRefinementUpperBounds: typeof accessoryRefinementLowerBounds;
34
41
 
35
42
  export declare const AccessoryType: {
@@ -55,6 +62,9 @@ export declare const AccessoryType: {
55
62
  Eyelash: number;
56
63
  };
57
64
 
65
+ /**
66
+ * @category InstanceWrapper
67
+ */
58
68
  export declare class AccessoryWrapper extends InstanceWrapper {
59
69
  static className: string;
60
70
  static requiredProperties: string[];
@@ -63,8 +73,12 @@ export declare class AccessoryWrapper extends InstanceWrapper {
63
73
  AccessoryBuildWeld(): void;
64
74
  }
65
75
 
76
+ /** @category Outfit */
66
77
  export declare const ActualBundleTypes: string[];
67
78
 
79
+ /**
80
+ * @category Mesh
81
+ */
68
82
  export declare function add(v0: Vec3, v1: Vec3): Vec3;
69
83
 
70
84
  export declare const AllAccessorySorts: ItemSort[];
@@ -81,8 +95,12 @@ export declare const AllCharacterSorts: ItemSort[];
81
95
 
82
96
  export declare const AllClothingSorts: ItemSort[];
83
97
 
98
+ /** @category Outfit */
84
99
  export declare const AllHeadShapes: string[];
85
100
 
101
+ /**
102
+ * @category DataModel
103
+ */
86
104
  export declare const AllInstances: Instance[];
87
105
 
88
106
  export declare const AlphaMode: {
@@ -91,6 +109,9 @@ export declare const AlphaMode: {
91
109
  TintMask: number;
92
110
  };
93
111
 
112
+ /**
113
+ * @category InstanceWrapper
114
+ */
94
115
  export declare class AnimationConstraintWrapper extends InstanceWrapper {
95
116
  static className: string;
96
117
  static requiredProperties: string[];
@@ -172,6 +193,9 @@ export declare class AnimationTrack {
172
193
 
173
194
  declare type AnimationTrackType = "Sequence" | "Curve";
174
195
 
196
+ /**
197
+ * @category InstanceWrapper
198
+ */
175
199
  export declare class AnimatorWrapper extends InstanceWrapper {
176
200
  static className: string;
177
201
  static requiredProperties: string[];
@@ -180,19 +204,47 @@ export declare class AnimatorWrapper extends InstanceWrapper {
180
204
  get data(): AnimatorWrapperData;
181
205
  updateToolAnimation(rig: Instance): void;
182
206
  updateToolConnections(): void;
183
- _pickRandom(entries: AnimationSetEntry[]): AnimationSetEntry;
184
- _getTrack(id: string): AnimationTrack | undefined;
185
- _switchAnimation(name: string): boolean;
207
+ private _pickRandom;
208
+ private _getTrack;
209
+ private _switchAnimation;
186
210
  stopMoodAnimation(): void;
187
- _switchMoodAnimation(name: string): boolean;
211
+ private _switchMoodAnimation;
188
212
  stopToolAnimation(): void;
189
- _switchToolAnimation(name: string): boolean;
213
+ private _switchToolAnimation;
190
214
  isValidTrackForSet(track: AnimationTrack, name: string): boolean;
191
- _fixUnloaded(): void;
215
+ private _fixUnloaded;
216
+ /**
217
+ * Resets all joints in the rig to be in their rest pose
218
+ * @param includeMotors If motors (body movement joints) should be set to rest pose
219
+ * @param includeFACS If FACS (face movement bones) should be set to rest pose
220
+ */
192
221
  restPose(includeMotors?: boolean, includeFACS?: boolean): void;
222
+ /**
223
+ * Renders animation pose
224
+ * @param addTime Time to add to the current time
225
+ * @param forceTime Time to force animation to be at, -1 is in the middle of the animation
226
+ * @param forceKeyframe Keyframe to force animation to be at
227
+ */
193
228
  renderAnimation(addTime?: number, forceTime?: number, forceKeyframe?: number): void;
229
+ /**
230
+ *
231
+ * @returns Currently playing animation track
232
+ */
194
233
  getCurrentAnimationTrack(): AnimationTrack | undefined;
234
+ /**
235
+ * Loads a new animation
236
+ * @param id
237
+ * @param isEmote
238
+ * @param forceLoop Forces animation track to loop
239
+ * @returns undefined on success
240
+ */
195
241
  loadAvatarAnimation(id: bigint, isEmote?: boolean, forceLoop?: boolean): Promise<Response | undefined>;
242
+ /**
243
+ * Switches to new animation
244
+ * @param name Animation name, such as "idle", "walk" or "emote.1234"
245
+ * @param type
246
+ * @returns If animation sucessfully played
247
+ */
196
248
  playAnimation(name: string, type?: "main" | "mood" | "tool"): boolean;
197
249
  }
198
250
 
@@ -216,6 +268,10 @@ export declare const animNamesR15: AnimationSet;
216
268
 
217
269
  export declare const animNamesR6: AnimationSet;
218
270
 
271
+ /**
272
+ * Contains all API methods
273
+ * @category API
274
+ */
219
275
  export declare const API: {
220
276
  Misc: {
221
277
  startCurrentlyLoadingAssets: () => void;
@@ -320,6 +376,7 @@ export declare const API: {
320
376
 
321
377
  export declare function arrayBufferToBase64(buffer: ArrayBuffer): string;
322
378
 
379
+ /** @category Outfit */
323
380
  export declare class Asset {
324
381
  id: number;
325
382
  name: string;
@@ -335,6 +392,7 @@ export declare class Asset {
335
392
  setOrder(order: number): void;
336
393
  }
337
394
 
395
+ /** @category Outfit */
338
396
  export declare type AssetJson = {
339
397
  id?: number;
340
398
  name?: string;
@@ -344,6 +402,7 @@ export declare type AssetJson = {
344
402
  supportsHeadShapes?: boolean;
345
403
  };
346
404
 
405
+ /** @category Outfit */
347
406
  export declare class AssetMeta {
348
407
  version: number;
349
408
  order?: number;
@@ -359,6 +418,7 @@ export declare class AssetMeta {
359
418
  fromJson(assetMetaJson: AssetMetaJson): void;
360
419
  }
361
420
 
421
+ /** @category Outfit */
362
422
  export declare type AssetMetaJson = {
363
423
  version?: number;
364
424
  position?: VecXYZ | Vecxyz | null;
@@ -370,6 +430,7 @@ export declare type AssetMetaJson = {
370
430
  staticFacialAnimation?: boolean;
371
431
  };
372
432
 
433
+ /** @category Outfit */
373
434
  export declare class AssetType {
374
435
  _id: number;
375
436
  name: string;
@@ -384,13 +445,16 @@ export declare class AssetType {
384
445
  get id(): number;
385
446
  }
386
447
 
448
+ /** @category Outfit */
387
449
  export declare type AssetTypeJson = {
388
450
  id?: number;
389
451
  name?: string;
390
452
  };
391
453
 
454
+ /** @category Outfit */
392
455
  export declare const AssetTypeNameToId: Map<string, number>;
393
456
 
457
+ /** @category Outfit */
394
458
  export declare const AssetTypes: string[];
395
459
 
396
460
  export declare const AssetTypeToAccessoryType: {
@@ -421,6 +485,9 @@ export declare const AssetTypeToMakeupType: {
421
485
  EyeMakeup: number;
422
486
  };
423
487
 
488
+ /**
489
+ * @category InstanceWrapper
490
+ */
424
491
  export declare class AttachmentWrapper extends InstanceWrapper {
425
492
  static className: string;
426
493
  static requiredProperties: string[];
@@ -428,6 +495,7 @@ export declare class AttachmentWrapper extends InstanceWrapper {
428
495
  getWorldCFrame(): CFrame;
429
496
  }
430
497
 
498
+ /** @category API */
431
499
  export declare class Authentication {
432
500
  TOKEN?: string;
433
501
  SessionUUID?: string;
@@ -486,14 +554,22 @@ export declare interface AvatarInventory_Result {
486
554
  nextPageToken: string | null;
487
555
  }
488
556
 
557
+ /** @category Outfit */
489
558
  export declare type AvatarType = "R6" | "R15";
490
559
 
560
+ /** @category Outfit */
491
561
  export declare const AvatarType: {
492
562
  [K in AvatarType]: AvatarType;
493
563
  };
494
564
 
565
+ /**
566
+ * @category Mesh
567
+ */
495
568
  export declare function averageVec3(vecs: Vec3[]): Vec3;
496
569
 
570
+ /**
571
+ * @category Mesh
572
+ */
497
573
  export declare function barycentric(p: Vec3, triangle: Triangle): Vec3;
498
574
 
499
575
  export declare function base64ToArrayBuffer(base64: string): ArrayBuffer;
@@ -511,6 +587,14 @@ declare class BaseKeyframeGroup {
511
587
  getHigherKeyframe(time: number): BaseKeyframe | null;
512
588
  }
513
589
 
590
+ /**
591
+ * @category Outfit
592
+ */
593
+ export declare type BodyColor3Name = "headColor3" | "torsoColor3" | "rightArmColor3" | "leftArmColor3" | "rightLegColor3" | "leftLegColor3";
594
+
595
+ /**
596
+ * @category Outfit
597
+ */
514
598
  export declare class BodyColor3s {
515
599
  colorType: ColorType;
516
600
  headColor3: string;
@@ -534,7 +618,7 @@ export declare class BodyColor3s {
534
618
  fromJson(bodyColorsJson: BodyColor3sJson): void;
535
619
  }
536
620
 
537
- declare type BodyColor3sJson = {
621
+ export declare type BodyColor3sJson = {
538
622
  headColor3?: string;
539
623
  torsoColor3?: string;
540
624
  rightArmColor3?: string;
@@ -543,6 +627,9 @@ declare type BodyColor3sJson = {
543
627
  leftLegColor3?: string;
544
628
  };
545
629
 
630
+ /**
631
+ * @category Outfit
632
+ */
546
633
  export declare class BodyColors {
547
634
  colorType: ColorType;
548
635
  headColorId: number;
@@ -567,7 +654,7 @@ export declare class BodyColors {
567
654
  toColor3(): BodyColor3s;
568
655
  }
569
656
 
570
- declare type BodyColorsJson = {
657
+ export declare type BodyColorsJson = {
571
658
  headColorId?: number;
572
659
  torsoColorId?: number;
573
660
  rightArmColorId?: number;
@@ -576,6 +663,9 @@ declare type BodyColorsJson = {
576
663
  leftLegColorId?: number;
577
664
  };
578
665
 
666
+ /**
667
+ * @category InstanceWrapper
668
+ */
579
669
  export declare class BodyColorsWrapper extends InstanceWrapper {
580
670
  static className: string;
581
671
  static requiredProperties: string[];
@@ -593,6 +683,9 @@ export declare const BodyPart: {
593
683
  RightLeg: number;
594
684
  };
595
685
 
686
+ /**
687
+ * @category InstanceWrapper
688
+ */
596
689
  export declare class BodyPartDescriptionWrapper extends InstanceWrapper {
597
690
  static className: string;
598
691
  static requiredProperties: string[];
@@ -607,8 +700,12 @@ export declare const BodyPartNameToEnum: {
607
700
  [K in string]: number;
608
701
  };
609
702
 
703
+ /**
704
+ * @category Mesh
705
+ */
610
706
  declare type Bounds = [Vec3, Vec3];
611
707
 
708
+ /** @category Outfit */
612
709
  export declare const BrickColors: {
613
710
  [K in number]: string;
614
711
  };
@@ -619,10 +716,16 @@ export declare function browserSendMessage(data: {
619
716
  [K in string]: string;
620
717
  }): Promise<any>;
621
718
 
719
+ /**
720
+ * @category Mesh
721
+ */
622
722
  export declare function buildFaceKD(mesh: FileMesh): KDNode | null;
623
723
 
624
724
  export declare function BuildJoints(self: RigData): void;
625
725
 
726
+ /**
727
+ * @category Mesh
728
+ */
626
729
  export declare function buildVertKD(mesh: FileMesh): KDNode | null;
627
730
 
628
731
  export declare interface BundleDetails_Result {
@@ -663,6 +766,7 @@ export declare interface BundleDetails_Result {
663
766
  unitsAvailableForConsumption: number;
664
767
  }
665
768
 
769
+ /** @category Outfit */
666
770
  export declare const BundleTypes: string[];
667
771
 
668
772
  export declare const CACHE: {
@@ -678,10 +782,14 @@ export declare const CACHE: {
678
782
  UserInfo: undefined;
679
783
  };
680
784
 
785
+ /**
786
+ * @category Mesh
787
+ */
681
788
  export declare function calculateMagnitude3D(x: number, y: number, z: number): number;
682
789
 
683
790
  export declare function calculateMotor6Doffset(motor: Instance, includeTransform?: boolean): CFrame;
684
791
 
792
+ /** @category Outfit */
685
793
  export declare const CatalogBundleTypes: string[];
686
794
 
687
795
  export declare const CategoryDictionary: {
@@ -692,6 +800,9 @@ export declare const CategoryDictionary: {
692
800
  };
693
801
  };
694
802
 
803
+ /**
804
+ * @category DataModelProperty
805
+ */
695
806
  export declare class CFrame {
696
807
  Position: Vec3;
697
808
  Orientation: Vec3;
@@ -709,6 +820,9 @@ export declare class CFrame {
709
820
  isSame(other: CFrame): boolean;
710
821
  }
711
822
 
823
+ /**
824
+ * @category Mesh
825
+ */
712
826
  export declare function clamp(v0: Vec3, lower: Vec3, higher: Vec3): Vec3;
713
827
 
714
828
  export declare function cleanString(inputString: string): string;
@@ -717,16 +831,21 @@ export declare function clonePrimitiveArray<T>(arr: T[]): any[];
717
831
 
718
832
  export declare function cloneSearch_Payload(data: Search_Payload): Search_Payload;
719
833
 
834
+ /**
835
+ * @category Mesh
836
+ */
720
837
  export declare function closestPointTriangle(p: Vec3, triangle: Triangle): Vec3;
721
838
 
722
- declare type ClothingDiffType = "Shirt" | "Pants" | "GraphicTShirt";
723
-
839
+ /**
840
+ * @category DataModelProperty
841
+ */
724
842
  export declare class Color3 {
725
843
  R: number;
726
844
  G: number;
727
845
  B: number;
728
846
  constructor(R?: number, G?: number, B?: number);
729
847
  clone(): Color3;
848
+ isSame(other: Color3): boolean;
730
849
  toColor3uint8(): Color3uint8;
731
850
  multiply(vec3: Color3): Color3;
732
851
  divide(vec3: Color3): Color3;
@@ -734,6 +853,9 @@ export declare class Color3 {
734
853
  minus(vec3: Color3): Color3;
735
854
  }
736
855
 
856
+ /**
857
+ * @category DataModelProperty
858
+ */
737
859
  export declare class Color3uint8 {
738
860
  R: number;
739
861
  G: number;
@@ -743,24 +865,38 @@ export declare class Color3uint8 {
743
865
  toColor3(): Color3;
744
866
  }
745
867
 
868
+ /**
869
+ * @category DataModelProperty
870
+ */
746
871
  export declare class ColorSequence {
747
872
  keypoints: ColorSequenceKeypoint[];
748
873
  static fromColor(color: Color3): ColorSequence;
749
874
  clone(): ColorSequence;
875
+ isSame(other: ColorSequence): boolean;
750
876
  getLowerKey(time: number): ColorSequenceKeypoint | null;
751
877
  getHigherKey(time: number): ColorSequenceKeypoint | null;
752
878
  getValue(time: number): Color3;
753
879
  }
754
880
 
881
+ /**
882
+ * @category DataModelProperty
883
+ */
755
884
  export declare class ColorSequenceKeypoint {
756
885
  time: number;
757
886
  value: Color3;
758
887
  constructor(time: number, r: number, g: number, b: number);
759
888
  clone(): ColorSequenceKeypoint;
889
+ isSame(other: ColorSequenceKeypoint): boolean;
760
890
  }
761
891
 
892
+ /**
893
+ * @category Outfit
894
+ */
762
895
  export declare type ColorType = "BrickColor" | "Color3";
763
896
 
897
+ /**
898
+ * @category DataModel
899
+ */
764
900
  export declare class Connection {
765
901
  Connected: boolean;
766
902
  _callback: (...args: unknown[]) => unknown;
@@ -769,6 +905,9 @@ export declare class Connection {
769
905
  Disconnect(): void;
770
906
  }
771
907
 
908
+ /**
909
+ * @category DataModelProperty
910
+ */
772
911
  export declare class Content {
773
912
  sourceType: number;
774
913
  uri?: string;
@@ -827,8 +966,14 @@ declare class COREMESH {
827
966
 
828
967
  export declare function createContentMap(): void;
829
968
 
969
+ /**
970
+ * @category Mesh
971
+ */
830
972
  export declare function createWeightsForMeshChunked(mesh: FileMesh, ref_mesh: FileMesh): WeightChunk[];
831
973
 
974
+ /**
975
+ * @category Mesh
976
+ */
832
977
  export declare function cross(a: Vec3, b: Vec3): Vec3;
833
978
 
834
979
  export declare const DataType: {
@@ -861,6 +1006,9 @@ export declare const DataType: {
861
1006
  NonSerializable: number;
862
1007
  };
863
1008
 
1009
+ /**
1010
+ * @category InstanceWrapper
1011
+ */
864
1012
  export declare class DecalWrapper extends InstanceWrapper {
865
1013
  static className: string;
866
1014
  static requiredProperties: string[];
@@ -881,8 +1029,10 @@ export declare const DefaultAnimationsR6: typeof DefaultAnimations;
881
1029
 
882
1030
  export declare function DefaultGetWorkerFunc(): Worker;
883
1031
 
1032
+ /** @category Outfit */
884
1033
  export declare const defaultPantAssetIds: number[];
885
1034
 
1035
+ /** @category Outfit */
886
1036
  export declare const defaultPantTemplateAssetIds: number[];
887
1037
 
888
1038
  export declare const DefaultSearchData: {
@@ -891,10 +1041,15 @@ export declare const DefaultSearchData: {
891
1041
  };
892
1042
  };
893
1043
 
1044
+ /** @category Outfit */
894
1045
  export declare const defaultShirtAssetIds: number[];
895
1046
 
1047
+ /** @category Outfit */
896
1048
  export declare const defaultShirtTemplateAssetIds: number[];
897
1049
 
1050
+ /**
1051
+ * @category Mesh
1052
+ */
898
1053
  export declare function deformReferenceToBaseBodyParts(reference: FileMesh, targetCages: FileMesh[], targetSizes: Vector3[], targetCFrames: CFrame[]): number[];
899
1054
 
900
1055
  export declare function deg(radians: number): number;
@@ -908,16 +1063,28 @@ declare class DisposableDesc {
908
1063
 
909
1064
  export declare function disposeMesh(scene: THREE.Scene, mesh: THREE.Mesh): void;
910
1065
 
1066
+ /**
1067
+ * @category Mesh
1068
+ */
911
1069
  export declare function distance(v0: Vec3, v1: Vec3): number;
912
1070
 
1071
+ /**
1072
+ * @category Mesh
1073
+ */
913
1074
  export declare function divide(v0: Vec3, v1: Vec3): Vec3;
914
1075
 
1076
+ /**
1077
+ * @category Mesh
1078
+ */
915
1079
  export declare function dot(v0: Vec3, v1: Vec3): number;
916
1080
 
917
1081
  export declare function download(filename: string, text: string): void;
918
1082
 
919
1083
  export declare const EmitterGroupDescClassTypes: string[];
920
1084
 
1085
+ /**
1086
+ * @category DataModel
1087
+ */
921
1088
  declare class Event_2 {
922
1089
  _callbacks: ((...args: unknown[]) => unknown)[];
923
1090
  Connect(callback: (...args: unknown[]) => unknown): Connection;
@@ -927,16 +1094,31 @@ declare class Event_2 {
927
1094
  }
928
1095
  export { Event_2 as Event }
929
1096
 
1097
+ /**
1098
+ * @category Exposer
1099
+ */
930
1100
  export declare function exposeAPI(): void;
931
1101
 
1102
+ /**
1103
+ * @category Exposer
1104
+ */
932
1105
  export declare function exposeFLAGS(): void;
933
1106
 
1107
+ /**
1108
+ * @category Exposer
1109
+ */
934
1110
  export declare function exposeMesh(): void;
935
1111
 
1112
+ /**
1113
+ * @category Exposer
1114
+ */
936
1115
  export declare function exposeThumbnailGenerator(): void;
937
1116
 
938
1117
  export declare const FaceControlNames: string[];
939
1118
 
1119
+ /**
1120
+ * @category InstanceWrapper
1121
+ */
940
1122
  export declare class FaceControlsWrapper extends InstanceWrapper {
941
1123
  static className: string;
942
1124
  static requiredProperties: string[];
@@ -971,6 +1153,10 @@ declare class FACS {
971
1153
  clone(): FACS;
972
1154
  }
973
1155
 
1156
+ /**
1157
+ * Obtained from a call to API.Asset.GetMesh()
1158
+ * @category Mesh
1159
+ */
974
1160
  export declare class FileMesh {
975
1161
  version: string;
976
1162
  facsDataFormat: number;
@@ -1029,58 +1215,114 @@ export declare class FileMeshSubset {
1029
1215
  clone(): FileMeshSubset;
1030
1216
  }
1031
1217
 
1218
+ /**
1219
+ * Converts a FileMesh to geometry that can be used by ThreeJS
1220
+ * @category Mesh */
1032
1221
  export declare function fileMeshToTHREEGeometry(mesh: FileMesh, canIncludeSkinning?: boolean, forceVertexColor?: Vector3): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
1033
1222
 
1034
1223
  export declare function FindFirstMatchingAttachment(attachmentName: string, rig: Instance): Instance | null;
1035
1224
 
1225
+ /**
1226
+ * @category FLAGS
1227
+ */
1036
1228
  export declare const FLAGS: {
1229
+ /** Only used by RoAvatar UI */
1037
1230
  HAIR_IS_BODYPART: boolean;
1231
+ /**wip, do not enable */
1038
1232
  AVATAR_JOINT_UPGRADE: boolean;
1233
+ /**wip, only for memory leak debugging */
1039
1234
  INSTANCE_GARBAGE_COLLECT: boolean;
1235
+ /**outfits returned by api use Color3 instead of BrickColor */
1040
1236
  BODYCOLOR3: boolean;
1237
+ /**allows API to cache data */
1041
1238
  ENABLE_API_CACHE: boolean;
1239
+ /**allows API to cache mesh data */
1042
1240
  ENABLE_API_MESH_CACHE: boolean;
1241
+ /**allows API to cache RBX data */
1043
1242
  ENABLE_API_RBX_CACHE: boolean;
1243
+ /**url of model to load that lists issues with specific versions (only used by RoAvatar) */
1044
1244
  ROAVATAR_DATA_URL: string;
1245
+ /**the place try-on button sends you to (only used by RoAvatar) */
1045
1246
  ROAVATAR_TRYON_PLACE: number;
1046
- ASSETS_PATH: string;
1247
+ /**API uses assetdelivery v2 instead of v1 */
1047
1248
  ASSETDELIVERY_V2: boolean;
1249
+ /**request priority given to fetch for assetdelivery */
1048
1250
  ASSET_REQUEST_PRIORITY: RequestPriority | undefined;
1251
+ /**the domain all api requests go through */
1252
+ API_DOMAIN: string;
1253
+ /**loads assets from assetdelivery instead of local files */
1049
1254
  ONLINE_ASSETS: boolean;
1255
+ /**path to rbxasset:// local files*/
1256
+ ASSETS_PATH: string;
1257
+ /**path to RigR6.rbxm and RigR15.rbxm*/
1050
1258
  RIG_PATH: string;
1259
+ /**if WebWorkers (multithreading) can be used */
1051
1260
  USE_WORKERS: boolean;
1261
+ /**makes linear algorithms cache weights */
1052
1262
  ENABLE_LC_WEIGHT_CACHE: boolean;
1263
+ /**only used by linear algorithms */
1053
1264
  INFLATE_LAYERED_CLOTHING: number;
1265
+ /**algorithm, rbf (default) is fastest, others are deprecated */
1054
1266
  LAYERED_CLOTHING_ALGORITHM: "linear" | "linearnormal" | "linearnormal2" | "rbf";
1267
+ /**renders cage mesh instead of actual mesh */
1055
1268
  SHOW_CAGE: boolean;
1269
+ /**cooldown between mesh recompile */
1056
1270
  LAYERED_CLOTHING_COOLDOWN: number;
1271
+ /**function WorkerPool uses to create workers, replace with your own if workers cant be created using the default method */
1057
1272
  GET_WORKER_FUNC: () => Worker;
1273
+ /**amount of "patches" that are used for layered clothing, multiple verts share the same patch */
1058
1274
  RBF_PATCH_COUNT: number;
1275
+ /**amount of nearby vertices each patch samples from */
1059
1276
  RBF_PATCH_DETAIL_SAMPLES: number;
1277
+ /**amount of far-away vertices (importants) each patch samples from, this is done so that the overall mesh shape is preserved */
1060
1278
  RBF_PATCH_SHAPE_SAMPLES: number;
1279
+ /**forces vertex color to be white when false */
1061
1280
  USE_VERTEX_COLOR: boolean;
1281
+ /**this is needed to enable bloom, but ugly since it disables anti aliasing... */
1062
1282
  USE_POST_PROCESSING: boolean;
1283
+ /**doubles render resolution when using post processing */
1063
1284
  POST_PROCESSING_IS_DOUBLE_SIZE: boolean;
1285
+ /**makes HumanoidDescription load gears */
1064
1286
  GEAR_ENABLED: boolean;
1287
+ /**makes Audio instances play sound when played */
1065
1288
  AUDIO_ENABLED: boolean;
1289
+ /**makes welds immediately update (bad for performance) */
1066
1290
  LEGACY_WELD_BEHAVIOR: boolean;
1291
+ /**enables full texture compilation using ThreeJS RenderTarget */
1067
1292
  USE_RENDERTARGET: boolean;
1293
+ /**the renderer will attempt to restore the webgl context when it is lost */
1068
1294
  AUTO_RESTORE_CONTEXT: boolean;
1295
+ /**RenderTarget textures are converted to CanvasTextures which can be exported */
1069
1296
  RENDERTARGET_TO_CANVASTEXTURE: boolean;
1297
+ /**Amount of time thumbnail generator will wait after no assets are being loaded to resolve */
1070
1298
  THUMBNAIL_TIMEOUT: number;
1299
+ /**shows ThreeJS SkeletonHelper */
1071
1300
  SHOW_SKELETON_HELPER: boolean;
1301
+ /**skeleton is updated every frame */
1072
1302
  UPDATE_SKELETON: boolean;
1303
+ /**skeleton is animated every frame */
1073
1304
  ANIMATE_SKELETON: boolean;
1305
+ /**autoskin is applied even when its disabled */
1074
1306
  AUTO_SKIN_EVERYTHING: boolean;
1307
+ /**skeleton is local instead of global (broken) */
1075
1308
  USE_LOCAL_SKELETONDESC: boolean;
1309
+ /**enables HSR (hidden surface removal) */
1076
1310
  ENABLE_HSR: boolean;
1311
+ /**shows rays created by HSR */
1077
1312
  HSR_SHOW_RAY: boolean;
1313
+ /**hides layered clothing */
1078
1314
  HIDE_LAYERED_CLOTHING: boolean;
1315
+ /**rays per triangle */
1079
1316
  HSR_RAY_COUNT: number;
1317
+ /**length of each ray */
1080
1318
  HSR_RAY_LENGTH: number;
1319
+ /**caches amount of hits for each triangle */
1081
1320
  CACHE_HSR_HITS: boolean;
1321
+ /**enables logging for non-critical information */
1082
1322
  VERBOSE_LOGGING: boolean;
1323
+ /**makes renderer print out strings in RBX that contain SEARCH_FOR_STRING */
1083
1324
  SEARCH_FOR_STRING: string | undefined;
1325
+ /**only used by RoAvatar, set this to a string to load a place file, for example "../assets/UniversalApp.rbxm" */
1084
1326
  LOAD_TEST_PLACE: string | undefined;
1085
1327
  };
1086
1328
 
@@ -1102,14 +1344,80 @@ declare class FloatCurveKey {
1102
1344
  rightTangent?: number;
1103
1345
  }
1104
1346
 
1347
+ /**
1348
+ * @category Mesh
1349
+ */
1105
1350
  export declare function floor(v0: Vec3): Vec3;
1106
1351
 
1352
+ /** @category Outfit */
1107
1353
  export declare const FullBodyColors: string[];
1108
1354
 
1355
+ /**
1356
+ * @category Mesh
1357
+ */
1109
1358
  export declare function gaussian_rbf(v0: Vec3, v1: Vec3, sigma?: number): number;
1110
1359
 
1360
+ /**
1361
+ * Generates a 2d or 3d thumbnail of a model/similar instance
1362
+ * @param auth Authentication
1363
+ * @param renderScene Scene to render inside, do note the scene appearance is not populated automaticall, use setupThumbnailScene()
1364
+ * @param model Model to render
1365
+ * @param size Size of the resulting image, ignored for 3d thumbnails
1366
+ * @param type Type of thumbnail, "png" | "webp" | "gltf"
1367
+ * @param quality Quality of image, with 1 being max-
1368
+ * @param gltfAutoDownload Automatically download gltf file
1369
+ * @returns ThumbnailResult, always a string for 2d thumbnails, 3d can be ArrayBuffer (glb, binary) or {[key: string]: unknown} (gltf, json)
1370
+ *
1371
+ * @category ThumbnailGenerator
1372
+ *
1373
+ * @example
1374
+ * **Example of generating thumbnail of accessory**
1375
+ * ```ts
1376
+ * //config
1377
+ * const ASSETID = 1039433
1378
+ *
1379
+ * //code
1380
+ * FLAGS.ANIMATE_SKELETON = false
1381
+ * FLAGS.UPDATE_SKELETON = true
1382
+ *
1383
+ * const rScene = RBXRenderer.addScene()
1384
+ * setupThumbnailScene(rScene)
1385
+ *
1386
+ * const accessoryrbx = await API.Asset.GetRBX(`rbxassetid://${ASSETID}`, {"Roblox-AssetFormat":"avatar_meshpart_accessory"})
1387
+ * const accessory = accessoryrbx.generateTree().GetChildren()[0]
1388
+ * const handle = accessory.FindFirstChildOfClass("MeshPart")
1389
+ * const cf = handle.Prop("CFrame")
1390
+ * if (!accessory.FindFirstChildOfClass("Camera")) cf.Position = [0,0,0]
1391
+ *
1392
+ * const result = await generateModelThumbnail(new Authentication(), rScene, accessory, [1000,1000], "webp", 0.99)
1393
+ * console.log(result)
1394
+ * console.log(result.length)
1395
+ * ```
1396
+ */
1111
1397
  export declare function generateModelThumbnail(auth: Authentication, renderScene: RBXRendererScene, model: Instance, size?: Vec2, type?: ThumbnailType, quality?: number, gltfAutoDownload?: boolean): Promise<ThumbnailResult>;
1112
1398
 
1399
+ /**
1400
+ * Generates a 2d or 3d thumbnail of an outfit
1401
+ * @param auth Authentication
1402
+ * @param outfit Outfit to render
1403
+ * @param size Size of the resulting image, ignored for 3d thumbnails
1404
+ * @param type Type of thumbnail, "png" | "webp" | "gltf"
1405
+ * @param quality Quality of image, with 1 being max
1406
+ * @param gltfAutoDownload Automatically download gltf file
1407
+ * @returns ThumbnailResult, always a string for 2d thumbnails, 3d can be ArrayBuffer (glb, binary) or {[key: string]: unknown} (gltf, json)
1408
+ *
1409
+ * @category ThumbnailGenerator
1410
+ *
1411
+ * @example
1412
+ * **Example on generating 1000x1000 webp thumbnail for blank outfit**
1413
+ * ```ts
1414
+ * const outfit = new Outfit()
1415
+ * FLAGS.RENDERTARGET_TO_CANVASTEXTURE = true //required for gltf export
1416
+ * const result = await generateOutfitThumbnail(new Authentication(), outfit, [1000,1000], "webp", 0.99)
1417
+ * FLAGS.RENDERTARGET_TO_CANVASTEXTURE = false
1418
+ * console.log(result)
1419
+ * ```
1420
+ */
1113
1421
  export declare function generateOutfitThumbnail(auth: Authentication, outfit: Outfit, size?: Vec2, type?: ThumbnailType, quality?: number, gltfAutoDownload?: boolean): Promise<ThumbnailResult>;
1114
1422
 
1115
1423
  export declare function generateUUIDv4(): string;
@@ -1122,6 +1430,9 @@ export declare function getCameraCFrameForHeadshotCustomized(rig: Instance, fov:
1122
1430
 
1123
1431
  export declare function getCameraOffset(fov: number, extentsSize: Vector3): number;
1124
1432
 
1433
+ /**
1434
+ * @category Mesh
1435
+ */
1125
1436
  export declare function getDistIndexArray(ref: FileMesh, dist: FileMesh): (number | undefined)[];
1126
1437
 
1127
1438
  export declare function getExtents(cframe: CFrame, parts: Instance[]): [Vector3, Vector3];
@@ -1144,6 +1455,9 @@ export declare interface GetInfoForId_Result {
1144
1455
  "displayName": string;
1145
1456
  }
1146
1457
 
1458
+ /**
1459
+ * @category Mesh
1460
+ */
1147
1461
  export declare function getOffsetArray(inner: FileMesh, outer: FileMesh): ([Vec3, THREE.Quaternion, number] | undefined)[];
1148
1462
 
1149
1463
  export declare function getOriginalAttachmentOrientation(attachment: Instance): Vector3;
@@ -1194,16 +1508,36 @@ export declare interface GetUserOutfits_Result {
1194
1508
  }[];
1195
1509
  }
1196
1510
 
1511
+ /**
1512
+ * @category Mesh
1513
+ */
1197
1514
  export declare function getUVtoIndexMap(mesh: FileMesh): Map<number, number>;
1198
1515
 
1516
+ /**
1517
+ * @category Mesh
1518
+ */
1199
1519
  export declare function getUVtoIndicesMap(mesh: FileMesh): Map<number, number[]>;
1200
1520
 
1201
1521
  export declare function getWorkerOnMessage(): (event: MessageEvent) => void;
1202
1522
 
1523
+ /**
1524
+ * @category InstanceWrapper
1525
+ */
1526
+ export declare function GetWrapperForInstance(instance: Instance): InstanceWrapper | undefined;
1527
+
1528
+ /**
1529
+ * @category Mesh
1530
+ */
1203
1531
  export declare function hashVec2(x: number, y: number): number;
1204
1532
 
1533
+ /**
1534
+ * @category Mesh
1535
+ */
1205
1536
  export declare function hashVec3(x: number, y: number, z: number, distance: number): number;
1206
1537
 
1538
+ /**
1539
+ * @category Mesh
1540
+ */
1207
1541
  export declare function hashVec3Safe(a: number | bigint, b: number | bigint, c: number | bigint): bigint;
1208
1542
 
1209
1543
  export declare function hasSameVal(instance0: Instance, instance1: Instance, propertyName: string): boolean;
@@ -1218,6 +1552,9 @@ export declare function hexToRgb(hex: string): {
1218
1552
  b: number;
1219
1553
  } | null;
1220
1554
 
1555
+ /**
1556
+ * @category Mesh
1557
+ */
1221
1558
  export declare class HSR {
1222
1559
  rayCount: number;
1223
1560
  rayLength: number;
@@ -1243,6 +1580,9 @@ declare class HSRAVIS {
1243
1580
 
1244
1581
  declare type HumanoidDescriptionDiff = "scale" | "bodyColor" | "animation" | "bodyPart" | "clothing" | "face" | "accessory" | "makeup" | "gear" | "staticFacialAnimation";
1245
1582
 
1583
+ /**
1584
+ * @category InstanceWrapper
1585
+ */
1246
1586
  export declare class HumanoidDescriptionWrapper extends InstanceWrapper {
1247
1587
  static className: string;
1248
1588
  static requiredProperties: string[];
@@ -1266,40 +1606,45 @@ export declare class HumanoidDescriptionWrapper extends InstanceWrapper {
1266
1606
  getBodyPartId(bodyPart: number): bigint;
1267
1607
  getBodyPartHeadShape(bodyPart: number): string;
1268
1608
  createRigData(): RigData | undefined;
1609
+ /**
1610
+ * Update the data of the HumanoidDescription to match that inside an Outfit
1611
+ * @param outfit
1612
+ * @returns HumanoidDescription or Response if it fails
1613
+ */
1269
1614
  fromOutfit(outfit: Outfit): Promise<Instance | Response>;
1270
- _applyScale(humanoid: Instance): void;
1271
- _applyBodyColors(humanoid: Instance): void;
1615
+ private _applyScale;
1616
+ private _applyBodyColors;
1272
1617
  /**
1273
1618
  * @returns undefined on success
1274
1619
  */
1275
- _applyBodyParts(humanoid: Instance, toChange?: number[]): Promise<Response | undefined>;
1620
+ private _applyBodyParts;
1276
1621
  /**
1277
1622
  * @returns undefined on success
1278
1623
  */
1279
- _applyClothing(humanoid: Instance, toChange?: ClothingDiffType[]): Promise<undefined | Response>;
1624
+ private _applyClothing;
1280
1625
  /**
1281
1626
  * @returns undefined on success
1282
1627
  */
1283
- _applyFace(humanoid: Instance): Promise<undefined | Response>;
1628
+ private _applyFace;
1284
1629
  /**
1285
1630
  * @returns undefined on success
1286
1631
  */
1287
- _applyGear(humanoid: Instance): Promise<undefined | Response>;
1288
- _inheritAccessoryReferences(originalW: HumanoidDescriptionWrapper): void;
1289
- _inheritMakeupReferences(originalW: HumanoidDescriptionWrapper): void;
1632
+ private _applyGear;
1633
+ private _inheritAccessoryReferences;
1634
+ private _inheritMakeupReferences;
1290
1635
  /**
1291
1636
  * @returns undefined on success
1292
1637
  */
1293
- _applyAccessories(humanoid: Instance, originalW?: HumanoidDescriptionWrapper, addedIds?: bigint[], removedIds?: bigint[]): Promise<undefined | Response>;
1294
- _applyMakeup(humanoid: Instance, originalW?: HumanoidDescriptionWrapper, addedIds?: bigint[], removedIds?: bigint[]): Promise<undefined | Response>;
1638
+ private _applyAccessories;
1639
+ private _applyMakeup;
1295
1640
  /**
1296
1641
  * @returns undefined on success
1297
1642
  */
1298
- _applyAnimations(humanoid: Instance, toChange?: AnimationProp[]): Promise<undefined | Response>;
1643
+ private _applyAnimations;
1299
1644
  /**
1300
1645
  * @returns undefined on success
1301
1646
  */
1302
- _applyAll(humanoid: Instance): Promise<undefined | Response>;
1647
+ private _applyAll;
1303
1648
  /**
1304
1649
  * @returns Instance on success
1305
1650
  */
@@ -1313,8 +1658,14 @@ export declare const HumanoidRigType: {
1313
1658
 
1314
1659
  export declare function imageUrlToDataUrl(imageUrl: string): Promise<string>;
1315
1660
 
1661
+ /**
1662
+ * @category Mesh
1663
+ */
1316
1664
  export declare function inheritSkeleton(to: FileMesh, from: FileMesh): void;
1317
1665
 
1666
+ /**
1667
+ * @category Mesh
1668
+ */
1318
1669
  export declare function inheritUV(to: FileMesh, from: FileMesh): void;
1319
1670
 
1320
1671
  declare class INST {
@@ -1326,18 +1677,26 @@ declare class INST {
1326
1677
  clone(): INST;
1327
1678
  }
1328
1679
 
1680
+ /**
1681
+ * @category DataModel
1682
+ */
1329
1683
  export declare class Instance {
1330
- _id: number;
1684
+ private _id;
1685
+ /**
1686
+ * @deprecated Use .Prop("Name") instead
1687
+ */
1331
1688
  _name?: string;
1332
1689
  className: string;
1690
+ /**
1691
+ * @deprecated Do not use this directly
1692
+ */
1333
1693
  _properties: Map<string, Property>;
1334
- _referencedBy: Instance[];
1335
- _connectionReferences: Connection[];
1336
- children: Instance[];
1694
+ private _referencedBy;
1695
+ private _connectionReferences;
1696
+ private _children;
1337
1697
  parent?: Instance;
1338
1698
  destroyed: boolean;
1339
- hasWrappered: boolean;
1340
- canGC: boolean;
1699
+ private _hasWrappered;
1341
1700
  classID?: number;
1342
1701
  objectFormat?: number;
1343
1702
  ChildAdded: Event_2;
@@ -1358,7 +1717,21 @@ export declare class Instance {
1358
1717
  fixPropertyName(name: string): string;
1359
1718
  setProperty(name: string, value: unknown, supressEvents?: boolean): void;
1360
1719
  HasProperty(name: string): boolean;
1720
+ /**
1721
+ * Returns the value of a property
1722
+ * @param name Name of property
1723
+ * @returns Property's value
1724
+ *
1725
+ * @throws When property doesn't exist, PropOrDefault is a safer alternative
1726
+ */
1361
1727
  Property(name: string): unknown;
1728
+ /**
1729
+ * Returns the value of a property
1730
+ * @param name Name of property
1731
+ * @returns Property's value
1732
+ *
1733
+ * @throws When property doesn't exist, PropOrDefault is a safer alternative
1734
+ */
1362
1735
  Prop(name: string): unknown;
1363
1736
  PropOrDefault(name: string, def: unknown): unknown;
1364
1737
  PropertyType(name: string): number | undefined;
@@ -1376,7 +1749,13 @@ export declare class Instance {
1376
1749
  preRender(): void;
1377
1750
  }
1378
1751
 
1379
- declare class InstanceWrapper {
1752
+ /**
1753
+ * Virtual class for all instance wrapper's
1754
+ *
1755
+ * @category InstanceWrapper
1756
+ * @virtual
1757
+ */
1758
+ export declare class InstanceWrapper {
1380
1759
  static className: string;
1381
1760
  static requiredProperties: string[];
1382
1761
  instance: Instance;
@@ -1384,8 +1763,17 @@ declare class InstanceWrapper {
1384
1763
  setup(): void;
1385
1764
  static(): typeof InstanceWrapper;
1386
1765
  static register(): void;
1766
+ /**
1767
+ * @virtual
1768
+ */
1387
1769
  created(): void;
1770
+ /**
1771
+ * @virtual
1772
+ */
1388
1773
  destroy(): void;
1774
+ /**
1775
+ * @virtual
1776
+ */
1389
1777
  preRender(): void;
1390
1778
  }
1391
1779
 
@@ -1447,6 +1835,7 @@ export declare interface ItemDetails_Result {
1447
1835
  data: ItemDetail_Result[];
1448
1836
  }
1449
1837
 
1838
+ /** @category Outfit */
1450
1839
  export declare class ItemInfo {
1451
1840
  itemType: ItemType;
1452
1841
  type: string;
@@ -1481,14 +1870,28 @@ declare class KDNode {
1481
1870
  constructor(point: Vec3, index: number, axis: number);
1482
1871
  }
1483
1872
 
1873
+ /**
1874
+ * @deprecated Superseded by RBFDeformerPatch
1875
+ * @category Mesh
1876
+ */
1484
1877
  export declare function layerClothingChunked(mesh: FileMesh, ref_mesh: FileMesh, dist_mesh: FileMesh, cacheId?: string): void;
1485
1878
 
1879
+ /**
1880
+ * @deprecated Superseded by RBFDeformerPatch
1881
+ * @category Mesh
1882
+ */
1486
1883
  export declare function layerClothingChunkedNormals(mesh: FileMesh, ref_mesh: FileMesh, dist_mesh: FileMesh, cacheId?: string): void;
1487
1884
 
1885
+ /**
1886
+ * @deprecated Superseded by RBFDeformerPatch
1887
+ * @category Mesh
1888
+ */
1488
1889
  export declare function layerClothingChunkedNormals2(mesh: FileMesh, ref_mesh: FileMesh, dist_mesh: FileMesh, cacheId?: string): void;
1489
1890
 
1891
+ /** @category Outfit */
1490
1892
  export declare const LayeredAssetTypes: string[];
1491
1893
 
1894
+ /** @category Outfit */
1492
1895
  export declare const LayeredClothingAssetOrder: {
1493
1896
  [K in number]: number;
1494
1897
  };
@@ -1623,10 +2026,17 @@ export declare interface Look_Result {
1623
2026
 
1624
2027
  export declare const magic = "<roblox!";
1625
2028
 
2029
+ /**
2030
+ * @category Mesh
2031
+ */
1626
2032
  export declare function magnitude(v: Vec3): number;
1627
2033
 
2034
+ /** @category Outfit */
1628
2035
  export declare const MakeupAssetTypes: string[];
1629
2036
 
2037
+ /**
2038
+ * @category InstanceWrapper
2039
+ */
1630
2040
  export declare class MakeupDescriptionWrapper extends InstanceWrapper {
1631
2041
  static className: string;
1632
2042
  static requiredProperties: string[];
@@ -1639,6 +2049,9 @@ export declare const MakeupType: {
1639
2049
  Eye: number;
1640
2050
  };
1641
2051
 
2052
+ /**
2053
+ * @category InstanceWrapper
2054
+ */
1642
2055
  export declare class ManualWeldWrapper extends WeldWrapper {
1643
2056
  static className: string;
1644
2057
  }
@@ -1673,28 +2086,41 @@ export declare interface MarketplaceWidgets_Result {
1673
2086
  configuration: unknown;
1674
2087
  }
1675
2088
 
2089
+ /** @category Mesh */
1676
2090
  export declare type Mat3x3 = [number, number, number, number, number, number, number, number, number];
1677
2091
 
2092
+ /** @category Mesh */
1678
2093
  export declare type Mat4x4 = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];
1679
2094
 
1680
2095
  export declare function mathRandom(min: number, max: number): number;
1681
2096
 
2097
+ /** @category Outfit */
1682
2098
  export declare const MaxOneOfAssetTypes: string[];
1683
2099
 
1684
2100
  /**
1685
2101
  * @deprecated This is incorrect
2102
+ * @category Outfit
1686
2103
  */
1687
2104
  export declare const MaxPerAsset: {
1688
2105
  [K in string]: number;
1689
2106
  };
1690
2107
 
2108
+ /**
2109
+ * @category Mesh
2110
+ */
1691
2111
  export declare function mergeTargetWithReference(reference: FileMesh, target: FileMesh, targetSize: Vector3, targetCFrame: CFrame, ignoredIndices?: number[]): number[];
1692
2112
 
2113
+ /**
2114
+ * @category Mesh
2115
+ */
1693
2116
  export declare type MeshChunk = {
1694
2117
  pos: Vec3;
1695
2118
  indices: number[];
1696
2119
  };
1697
2120
 
2121
+ /**
2122
+ * @category Mesh
2123
+ */
1698
2124
  declare class MeshCollider {
1699
2125
  mesh: FileMesh;
1700
2126
  octree: OctreeNode<number>;
@@ -1714,10 +2140,17 @@ export declare const MeshType: {
1714
2140
  Wedge: number;
1715
2141
  };
1716
2142
 
2143
+ /** @category Outfit */
1717
2144
  export declare const minimumDeltaEBodyColorDifference = 11.4;
1718
2145
 
2146
+ /**
2147
+ * @category Mesh
2148
+ */
1719
2149
  export declare function minus(v0: Vec3, v1: Vec3): Vec3;
1720
2150
 
2151
+ /**
2152
+ * @category InstanceWrapper
2153
+ */
1721
2154
  export declare class ModelWrapper extends InstanceWrapper {
1722
2155
  static className: string;
1723
2156
  static requiredProperties: string[];
@@ -1725,6 +2158,9 @@ export declare class ModelWrapper extends InstanceWrapper {
1725
2158
  GetModelCFrame(): CFrame;
1726
2159
  }
1727
2160
 
2161
+ /**
2162
+ * @category InstanceWrapper
2163
+ */
1728
2164
  export declare class Motor6DWrapper extends WeldWrapper {
1729
2165
  static className: string;
1730
2166
  static requiredProperties: string[];
@@ -1734,13 +2170,33 @@ export declare class Motor6DWrapper extends WeldWrapper {
1734
2170
  /**
1735
2171
  * @deprecated Use mountElement instead
1736
2172
  * @param container
2173
+ * @category Renderer
1737
2174
  */
1738
2175
  export declare function mount(container: HTMLDivElement): void;
1739
2176
 
2177
+ /**
2178
+ * Mounting function for use with React
2179
+ * @param container Container to mount inside
2180
+ * @category Renderer
2181
+ * @example
2182
+ * ```ts
2183
+ * export default function Component(): React.JSX.Element {
2184
+ * const containerRef = useCallback(mountElement, [])
2185
+ *
2186
+ * return <div ref={containerRef}></div>
2187
+ * }
2188
+ * ```
2189
+ */
1740
2190
  export declare function mountElement(container: HTMLDivElement): void;
1741
2191
 
2192
+ /**
2193
+ * @category Mesh
2194
+ */
1742
2195
  export declare function multiply(v0: Vec3, v1: Vec3): Vec3;
1743
2196
 
2197
+ /**
2198
+ * @category Mesh
2199
+ */
1744
2200
  export declare function multiplyMatrixVector(m: Mat3x3, v: Vec3): Vec3;
1745
2201
 
1746
2202
  export declare interface NavigationMenuItems {
@@ -1828,8 +2284,14 @@ export declare const NormalId: {
1828
2284
  Front: number;
1829
2285
  };
1830
2286
 
2287
+ /**
2288
+ * @category Mesh
2289
+ */
1831
2290
  export declare function normalize(v: Vec3): Vec3;
1832
2291
 
2292
+ /**
2293
+ * @category DataModelProperty
2294
+ */
1833
2295
  export declare class NumberRange {
1834
2296
  Min: number;
1835
2297
  Max: number;
@@ -1838,21 +2300,29 @@ export declare class NumberRange {
1838
2300
  isSame(other: NumberRange): boolean;
1839
2301
  }
1840
2302
 
2303
+ /**
2304
+ * @category DataModelProperty
2305
+ */
1841
2306
  export declare class NumberSequence {
1842
2307
  keypoints: NumberSequenceKeypoint[];
1843
2308
  constructor(keypoints?: NumberSequenceKeypoint[]);
1844
2309
  clone(): NumberSequence;
2310
+ isSame(other: NumberSequence): boolean;
1845
2311
  getLowerKey(time: number): NumberSequenceKeypoint | null;
1846
2312
  getHigherKey(time: number): NumberSequenceKeypoint | null;
1847
2313
  getValue(time: number, seed: number): number;
1848
2314
  }
1849
2315
 
2316
+ /**
2317
+ * @category DataModelProperty
2318
+ */
1850
2319
  export declare class NumberSequenceKeypoint {
1851
2320
  time: number;
1852
2321
  value: number;
1853
2322
  envelope: number;
1854
2323
  constructor(time: number, value: number, envelope?: number);
1855
2324
  clone(): NumberSequenceKeypoint;
2325
+ isSame(other: NumberSequenceKeypoint): boolean;
1856
2326
  }
1857
2327
 
1858
2328
  export declare const ObjectDescClassTypes: string[];
@@ -1882,10 +2352,20 @@ declare class OctreeNode<T> {
1882
2352
  collideRay(ray: Ray_2): OctreeNode<T>[];
1883
2353
  }
1884
2354
 
2355
+ /**
2356
+ * @category Mesh
2357
+ */
1885
2358
  export declare function offsetMesh(mesh: FileMesh, cframe: CFrame): void;
1886
2359
 
2360
+ /**
2361
+ * @category Mesh
2362
+ */
1887
2363
  export declare function offsetMeshWithRotation(mesh: FileMesh, cframe: CFrame): void;
1888
2364
 
2365
+ /**
2366
+ * Usually obtained from API
2367
+ * @category Outfit
2368
+ */
1889
2369
  export declare class Outfit {
1890
2370
  scale: Scale;
1891
2371
  bodyColors: BodyColors | BodyColor3s;
@@ -1920,8 +2400,14 @@ export declare class Outfit {
1920
2400
  */
1921
2401
  isValid(): boolean;
1922
2402
  getValidationIssues(): ValidationIssue[];
2403
+ /**
2404
+ * @deprecated Outdated
2405
+ * @returns
2406
+ */
1923
2407
  toHumanoidDescription(): Promise<Document | null>;
2408
+ /** @deprecated */
1924
2409
  fromHumanoidDescription(rootDocument: Document): Promise<void>;
2410
+ /** @deprecated */
1925
2411
  downloadHumanoidDescription(): Promise<void>;
1926
2412
  getAssetsJson(removeNotOwnedAssets?: boolean): AssetJson[];
1927
2413
  containsAsset(assetId: number): boolean;
@@ -1930,6 +2416,9 @@ export declare class Outfit {
1930
2416
  removeAsset(assetId: number): void;
1931
2417
  removeAssetType(type: string | number): void;
1932
2418
  addAsset(id: number, type: string | number, name: string, supportsHeadShapes?: boolean): void;
2419
+ /**
2420
+ * Fixes multiple layered assets having the same order value
2421
+ */
1933
2422
  fixOrders(): void;
1934
2423
  getAssetsAtOrder(order: number): Asset[];
1935
2424
  isOrderUsed(order: number, self?: Asset): boolean;
@@ -1943,7 +2432,7 @@ export declare class Outfit {
1943
2432
  toBuffer(): ArrayBuffer;
1944
2433
  }
1945
2434
 
1946
- declare type OutfitJson = {
2435
+ export declare type OutfitJson = {
1947
2436
  scale?: ScaleJson;
1948
2437
  playerAvatarType?: AvatarType;
1949
2438
  assets?: AssetJson[];
@@ -1959,12 +2448,17 @@ declare type OutfitJson = {
1959
2448
  scales?: ScaleJson;
1960
2449
  };
1961
2450
 
2451
+ /** @category Outfit */
1962
2452
  export declare type OutfitOrigin = "WebAvatar" | "WebOutfit" | "Other" | "Look";
1963
2453
 
2454
+ /** @category Outfit */
1964
2455
  export declare const OutfitOrigin: {
1965
2456
  [K in OutfitOrigin]: OutfitOrigin;
1966
2457
  };
1967
2458
 
2459
+ /**
2460
+ * @category Renderer
2461
+ */
1968
2462
  export declare class OutfitRenderer {
1969
2463
  auth: Authentication;
1970
2464
  outfit: Outfit;
@@ -1975,6 +2469,7 @@ export declare class OutfitRenderer {
1975
2469
  currentlyChangingRig: boolean;
1976
2470
  currentlyUpdating: boolean;
1977
2471
  hasNewUpdate: boolean;
2472
+ private _queuedMainAnimation;
1978
2473
  lastFrameTime: number;
1979
2474
  animationInterval?: NodeJS.Timeout;
1980
2475
  animationFPS: number;
@@ -2067,6 +2562,9 @@ declare class PROP {
2067
2562
  clone(): PROP;
2068
2563
  }
2069
2564
 
2565
+ /**
2566
+ * @category DataModel
2567
+ */
2070
2568
  export declare class Property {
2071
2569
  name?: string;
2072
2570
  typeID?: number;
@@ -2117,18 +2615,28 @@ declare class QuantizedTransform {
2117
2615
 
2118
2616
  export declare function rad(degrees: number): number;
2119
2617
 
2618
+ /**
2619
+ * @category DataModelProperty
2620
+ */
2120
2621
  export declare class Ray {
2121
2622
  Origin: Vec3;
2122
2623
  Direction: Vec3;
2123
2624
  clone(): Ray;
2124
2625
  }
2125
2626
 
2627
+ /**
2628
+ * @category Mesh
2629
+ */
2126
2630
  declare class Ray_2 {
2127
2631
  origin: Vec3;
2128
2632
  end: Vec3;
2129
2633
  constructor(origin: Vec3, end: Vec3);
2130
2634
  }
2131
2635
 
2636
+ /**
2637
+ * The deformer used for layered clothing
2638
+ * @category Mesh
2639
+ */
2132
2640
  export declare class RBFDeformerPatch {
2133
2641
  mesh: FileMesh;
2134
2642
  refVerts: Float32Array;
@@ -2146,9 +2654,33 @@ export declare class RBFDeformerPatch {
2146
2654
  epsilon: number;
2147
2655
  affectBones: boolean;
2148
2656
  id: number;
2657
+ /**
2658
+ * Creates the deformer and prepares for deformation
2659
+ * @param refMesh The reference cage
2660
+ * @param distMesh The destination cage
2661
+ * @param mesh The mesh to deform
2662
+ * @param ignoredIndices Indices in the reference cage to ignore
2663
+ * @param patchCount Amount of patches spread around the mesh, each one solves a linear equation
2664
+ * @param detailsCount Amount of close vertices in each patch
2665
+ * @param importantsCount Amount of far away vertices in each patch
2666
+ */
2149
2667
  constructor(refMesh: FileMesh, distMesh: FileMesh, mesh: FileMesh, ignoredIndices?: number[], patchCount?: number, detailsCount?: number, importantsCount?: number);
2668
+ /**
2669
+ * Solves the linear equations asynchronously, required before deformation
2670
+ * @returns void
2671
+ */
2150
2672
  solveAsync(): Promise<void>;
2673
+ /**
2674
+ * solveAsync() needs to be called before this
2675
+ * Deforms the position of something inside the mesh
2676
+ * @param i The index of the vert to deform, if it is outside the range of vertices it will be a bone instead. For example vertices range from 1 - 100, and bones range from 101 - 110. Then index 101 will represent the first bone
2677
+ * @returns New position after deformation
2678
+ */
2151
2679
  deform(i: number): Vec3;
2680
+ /**
2681
+ * solveAsync() needs to be called before this
2682
+ * Deforms vertices and bones in mesh (if this.affectBones = true)
2683
+ */
2152
2684
  deformMesh(): void;
2153
2685
  }
2154
2686
 
@@ -2160,6 +2692,10 @@ declare function RBLXPatch(url: string, auth: Authentication, body: any, attempt
2160
2692
 
2161
2693
  declare function RBLXPost(url: string, auth: Authentication | undefined, body: any, attempt?: number, method?: string): Promise<Response>;
2162
2694
 
2695
+ /**
2696
+ * Obtained from a call to API.Asset.GetRBX()
2697
+ * @category DataModel
2698
+ */
2163
2699
  export declare class RBX {
2164
2700
  classCount: number;
2165
2701
  instanceCount: number;
@@ -2187,9 +2723,18 @@ export declare class RBX {
2187
2723
  fromXML(xml: Document): void;
2188
2724
  fromBuffer(buffer: ArrayBuffer): void;
2189
2725
  fromInstance(root: Instance): ArrayBuffer;
2726
+ /**
2727
+ * Generates if needed hierarchy and returns root instance
2728
+ * @returns Root instance
2729
+ */
2190
2730
  generateTree(): Instance;
2191
2731
  }
2192
2732
 
2733
+ /**
2734
+ * A singleton, intialized by calling RBXRenderer.fullSetup()
2735
+ *
2736
+ * @category Renderer
2737
+ */
2193
2738
  export declare class RBXRenderer {
2194
2739
  static orbitControlsTarget: Vec3;
2195
2740
  static scenes: RBXRendererScene[];
@@ -2260,7 +2805,7 @@ export declare class RBXRenderer {
2260
2805
  static _createEffectComposer(renderScene?: RBXRendererScene): void;
2261
2806
  /**Removes an instance from the renderer */
2262
2807
  static removeInstance(instance: Instance, renderScene?: RBXRendererScene): void;
2263
- static _addRenderDesc(instance: Instance, auth: Authentication, DescClass: typeof RenderDesc, renderScene: RBXRendererScene): void;
2808
+ private static _addRenderDesc;
2264
2809
  /**Adds an instance to the renderer or updates it */
2265
2810
  static addInstance(instance: Instance, auth: Authentication, renderScene?: RBXRendererScene): void;
2266
2811
  static setRendererSize(width: number, height: number): void;
@@ -2280,15 +2825,23 @@ export declare class RBXRenderer {
2280
2825
  static setCameraFov(fov: number, renderScene?: RBXRendererScene): void;
2281
2826
  /**@deprecated This can only get the first renderScene's controls */
2282
2827
  static getRendererControls(): OrbitControls | undefined;
2828
+ /**
2829
+ * @returns ThreeJS renderer
2830
+ */
2283
2831
  static getRenderer(): THREE.WebGLRenderer | undefined;
2284
2832
  /**@deprecated This can only get the first renderScene's scene */
2285
2833
  static getScene(): THREE.Scene;
2286
- /**@deprecated
2834
+ /**
2835
+ * @deprecated Superseded by RBXRendererScene.exportGLTF()
2287
2836
  * This function is unstable and can throw errors, but might work
2288
2837
  */
2289
2838
  static exportScene(renderScene?: RBXRendererScene): void;
2290
2839
  }
2291
2840
 
2841
+ /**
2842
+ * Created by calling RBXRenderer.addScene()
2843
+ * @category Renderer
2844
+ */
2292
2845
  export declare class RBXRendererScene {
2293
2846
  scene: THREE.Scene;
2294
2847
  camera: THREE.PerspectiveCamera;
@@ -2313,9 +2866,18 @@ export declare class RBXRendererScene {
2313
2866
  ambientLight?: THREE.AmbientLight;
2314
2867
  directionalLight?: THREE.DirectionalLight;
2315
2868
  directionalLight2?: THREE.DirectionalLight;
2869
+ /** Forces viewport to be within bounds */
2316
2870
  setRect(bounds: DOMRect): void;
2871
+ /** Makes viewport size 0x0, invisible */
2317
2872
  noRect(): void;
2873
+ /** Destroys all renderDescs but does not call Destroy on instances */
2318
2874
  destroy(): void;
2875
+ /**
2876
+ * Exports scene as a GLTF or GLB
2877
+ * @param name Name of the resulting file if autoDownload is true
2878
+ * @param autoDownload If resulting file should be auto downloaded
2879
+ * @returns The GLB (buffer) or GLTF (object)
2880
+ */
2319
2881
  exportGLTF(name?: string, autoDownload?: boolean): Promise<ArrayBuffer | {
2320
2882
  [key: string]: unknown;
2321
2883
  }>;
@@ -2358,6 +2920,7 @@ declare class RBXSimpleView {
2358
2920
 
2359
2921
  export declare function RegisterWrappers(): void;
2360
2922
 
2923
+ /** @category Outfit */
2361
2924
  export declare const RegularBodyColors: string[];
2362
2925
 
2363
2926
  /**
@@ -2371,6 +2934,8 @@ declare class RenderDesc extends DisposableDesc {
2371
2934
  isSame(_other: RenderDesc): boolean;
2372
2935
  needsRegeneration(_other: RenderDesc): boolean;
2373
2936
  fromRenderDesc(other: RenderDesc): void;
2937
+ transferFrom(other: RenderDesc): void;
2938
+ virtualTransferFrom(_other: RenderDesc): void;
2374
2939
  virtualFromRenderDesc(_other: RenderDesc): void;
2375
2940
  fromInstance(_child: Instance): void;
2376
2941
  compileResults(_renderer: THREE.WebGLRenderer, _scene: THREE.Scene): Promise<THREE.Mesh[] | Response | undefined>;
@@ -2442,6 +3007,9 @@ export declare type SaleLocationType = "ShopOnly" | "ShopAndAllExperiences" | "E
2442
3007
 
2443
3008
  export declare function saveByteArray(data: BlobPart[] | undefined, name: string): void;
2444
3009
 
3010
+ /**
3011
+ * @category Outfit
3012
+ */
2445
3013
  export declare class Scale {
2446
3014
  height: number;
2447
3015
  width: number;
@@ -2469,7 +3037,7 @@ export declare function ScaleAccessoryForRig(accessory: Instance, rig: Instance,
2469
3037
 
2470
3038
  export declare function ScaleCharacter(rig: Instance, outfit: Outfit, humanoidDescription: Instance): RigData | undefined;
2471
3039
 
2472
- declare type ScaleJson = {
3040
+ export declare type ScaleJson = {
2473
3041
  height?: number;
2474
3042
  width?: number;
2475
3043
  head?: number;
@@ -2478,10 +3046,19 @@ declare type ScaleJson = {
2478
3046
  bodyType?: number;
2479
3047
  };
2480
3048
 
3049
+ /**
3050
+ * @category Mesh
3051
+ */
2481
3052
  export declare function scaleMesh(mesh: FileMesh, scale: Vector3): void;
2482
3053
 
3054
+ /**
3055
+ * @category Outfit
3056
+ */
2483
3057
  export declare type ScaleName = "height" | "width" | "head" | "depth" | "proportion" | "bodyType";
2484
3058
 
3059
+ /**
3060
+ * @category InstanceWrapper
3061
+ */
2485
3062
  export declare class ScriptWrapper extends InstanceWrapper {
2486
3063
  static className: string;
2487
3064
  static requiredProperties: string[];
@@ -2548,6 +3125,12 @@ export declare interface Search_Result {
2548
3125
  }[];
2549
3126
  }
2550
3127
 
3128
+ /**
3129
+ * Gives a scene the default appearance for thumbnails
3130
+ * @param renderScene RBXRenderScene to setup
3131
+ *
3132
+ * @category ThumbnailGenerator
3133
+ */
2551
3134
  export declare function setupThumbnailScene(renderScene: RBXRendererScene): void;
2552
3135
 
2553
3136
  declare class SimpleView {
@@ -2609,6 +3192,9 @@ export declare const SortTypes: {
2609
3192
  [K in string]: number | undefined;
2610
3193
  };
2611
3194
 
3195
+ /**
3196
+ * @category InstanceWrapper
3197
+ */
2612
3198
  export declare class SoundWrapper extends InstanceWrapper {
2613
3199
  static className: string;
2614
3200
  static requiredProperties: string[];
@@ -2635,6 +3221,7 @@ export declare class SpecialInfo {
2635
3221
  constructor(type: string);
2636
3222
  }
2637
3223
 
3224
+ /** @category Outfit */
2638
3225
  export declare const SpecialLayeredAssetTypes: string[];
2639
3226
 
2640
3227
  export declare const StringBufferProperties: string[];
@@ -2669,6 +3256,9 @@ export declare interface ThumbnailsCustomization_Payload {
2669
3256
 
2670
3257
  export declare type ThumbnailType = "png" | "webp" | "gltf";
2671
3258
 
3259
+ /**
3260
+ * @category InstanceWrapper
3261
+ */
2672
3262
  export declare class ToolWrapper extends InstanceWrapper {
2673
3263
  static className: string;
2674
3264
  static requiredProperties: string[];
@@ -2677,6 +3267,7 @@ export declare class ToolWrapper extends InstanceWrapper {
2677
3267
  createWeld(): void;
2678
3268
  }
2679
3269
 
3270
+ /** @category Outfit */
2680
3271
  export declare const ToRemoveBeforeBundleType: {
2681
3272
  DynamicHead: string[];
2682
3273
  Shoes: string[];
@@ -2685,18 +3276,28 @@ export declare const ToRemoveBeforeBundleType: {
2685
3276
  MakeupLook: string[];
2686
3277
  };
2687
3278
 
3279
+ /**
3280
+ * @category Mesh
3281
+ */
2688
3282
  export declare function transferSkeleton(to: FileMesh, from: FileMesh): void;
2689
3283
 
2690
3284
  export declare function traverseRigCFrame(instance: Instance, includeTransform?: boolean, applyRoot?: boolean): CFrame;
2691
3285
 
2692
3286
  export declare function traverseRigInstance(instance: Instance): Instance[];
2693
3287
 
3288
+ /** @category Mesh */
2694
3289
  export declare type Triangle = [Vec3, Vec3, Vec3];
2695
3290
 
3291
+ /**
3292
+ * @category Mesh
3293
+ */
2696
3294
  export declare function triangleNormal(triangle: Triangle): Vec3;
2697
3295
 
2698
3296
  declare type TwoPoseCorrective = Vec2;
2699
3297
 
3298
+ /**
3299
+ * @category DataModelProperty
3300
+ */
2700
3301
  export declare class UDim {
2701
3302
  Scale: number;
2702
3303
  Offset: number;
@@ -2704,6 +3305,9 @@ export declare class UDim {
2704
3305
  clone(): UDim;
2705
3306
  }
2706
3307
 
3308
+ /**
3309
+ * @category DataModelProperty
3310
+ */
2707
3311
  export declare class UDim2 {
2708
3312
  X: UDim;
2709
3313
  Y: UDim;
@@ -2757,20 +3361,26 @@ export declare interface UserOmniSearch_Result {
2757
3361
  "nextPageToken": string;
2758
3362
  }
2759
3363
 
2760
- declare type ValidationIssue = {
3364
+ export declare type ValidationIssue = {
2761
3365
  type: ValidationIssueType;
2762
3366
  text: string;
2763
3367
  assetIndex?: number;
2764
3368
  };
2765
3369
 
2766
- declare type ValidationIssueType = "AccessoryLimit" | "LayeredLimit" | "OneOfTypeLimit" | "DuplicateId" | "NotWearable" | "MissingLayeredMeta" | "InvalidAsset" | "MakeupLimit";
3370
+ export declare type ValidationIssueType = "AccessoryLimit" | "LayeredLimit" | "OneOfTypeLimit" | "DuplicateId" | "NotWearable" | "MissingLayeredMeta" | "InvalidAsset" | "MakeupLimit";
2767
3371
 
3372
+ /** @category Mesh */
2768
3373
  export declare type Vec2 = [number, number];
2769
3374
 
3375
+ /** @category Mesh */
2770
3376
  export declare type Vec3 = [number, number, number];
2771
3377
 
3378
+ /** @category Mesh */
2772
3379
  export declare type Vec4 = [number, number, number, number];
2773
3380
 
3381
+ /**
3382
+ * @category DataModelProperty
3383
+ */
2774
3384
  export declare class Vector2 {
2775
3385
  X: number;
2776
3386
  Y: number;
@@ -2779,6 +3389,9 @@ export declare class Vector2 {
2779
3389
  isSame(other: Vector2): boolean;
2780
3390
  }
2781
3391
 
3392
+ /**
3393
+ * @category DataModelProperty
3394
+ */
2782
3395
  export declare class Vector3 {
2783
3396
  X: number;
2784
3397
  Y: number;
@@ -2811,21 +3424,34 @@ declare type Vecxyz = {
2811
3424
 
2812
3425
  export declare function versionToNumber(version: string): number;
2813
3426
 
3427
+ /**
3428
+ * @category Mesh
3429
+ */
2814
3430
  export declare function vertPosToChunkPos(pos: Vec3, meshSize: Vec3, widthSplit: number, heightSplit: number, depthSplit: number): Vec3;
2815
3431
 
2816
3432
  export declare function Wait(time: number): Promise<unknown>;
2817
3433
 
3434
+ /** @category Outfit */
2818
3435
  export declare const WearableAssetTypes: string[];
2819
3436
 
3437
+ /**
3438
+ * @category Mesh
3439
+ */
2820
3440
  export declare type WeightChunk = {
2821
3441
  meshChunk: MeshChunk;
2822
3442
  weights: number[];
2823
3443
  };
2824
3444
 
3445
+ /**
3446
+ * @category Mesh
3447
+ */
2825
3448
  export declare type WeightChunk3 = WeightChunk & {
2826
3449
  weights: Vec3[];
2827
3450
  };
2828
3451
 
3452
+ /**
3453
+ * @category InstanceWrapper
3454
+ */
2829
3455
  export declare class WeldWrapper extends InstanceWrapper {
2830
3456
  static className: string;
2831
3457
  static requiredProperties: string[];