roavatar-renderer 1.4.4 → 1.4.5
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/README.md +1 -3
- package/dist/index.d.ts +129 -31
- package/dist/index.js +69 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Renderer for RoAvatar
|
|
2
2
|
The Roblox Avatar renderer used by https://github.com/steinann/RoAvatar
|
|
3
3
|
|
|
4
|
-
Links: [npm](https://www.npmjs.com/package/roavatar-renderer) | [GitHub](https://github.com/steinann/RoAvatar-Renderer)
|
|
5
|
-
|
|
6
|
-
Docs: [Documentation](https://steinann.github.io/RoAvatar-Renderer/)
|
|
4
|
+
Links: [npm](https://www.npmjs.com/package/roavatar-renderer) | [GitHub](https://github.com/steinann/RoAvatar-Renderer) | [docs](https://steinann.github.io/RoAvatar-Renderer/)
|
|
7
5
|
|
|
8
6
|
> **IMPORTANT** <br>
|
|
9
7
|
> Assets are *NOT* included in the npm module or this repository, you have to get them from the main RoAvatar repository OR set
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare const accessoryRefinementTypes: number[];
|
|
|
39
39
|
/** @category Outfit */
|
|
40
40
|
export declare const accessoryRefinementUpperBounds: typeof accessoryRefinementLowerBounds;
|
|
41
41
|
|
|
42
|
+
/**@category DataModelEnum */
|
|
42
43
|
export declare const AccessoryType: {
|
|
43
44
|
Unknown: number;
|
|
44
45
|
Hat: number;
|
|
@@ -103,6 +104,7 @@ export declare const AllHeadShapes: string[];
|
|
|
103
104
|
*/
|
|
104
105
|
export declare const AllInstances: Instance[];
|
|
105
106
|
|
|
107
|
+
/**@category DataModelEnum */
|
|
106
108
|
export declare const AlphaMode: {
|
|
107
109
|
Overlay: number;
|
|
108
110
|
Transparency: number;
|
|
@@ -280,6 +282,7 @@ export declare const API: {
|
|
|
280
282
|
parseAssetString: (str: string) => string;
|
|
281
283
|
getCDNURLFromAssetDelivery: (url: string, headers?: any) => Promise<string | Response>;
|
|
282
284
|
assetURLToCDNURL: (url: string | number | bigint, headers?: any, extraStr?: string) => Promise<string | Response>;
|
|
285
|
+
getCurrentlyLoading: () => boolean;
|
|
283
286
|
};
|
|
284
287
|
Events: {
|
|
285
288
|
OnLoadingAssets: Event_2;
|
|
@@ -515,6 +518,7 @@ export declare class Authentication {
|
|
|
515
518
|
getSessionUUID(): string;
|
|
516
519
|
}
|
|
517
520
|
|
|
521
|
+
/**@category API */
|
|
518
522
|
export declare interface AvatarInventory_Result {
|
|
519
523
|
avatarInventoryItems: {
|
|
520
524
|
itemId: number;
|
|
@@ -587,14 +591,10 @@ declare class BaseKeyframeGroup {
|
|
|
587
591
|
getHigherKeyframe(time: number): BaseKeyframe | null;
|
|
588
592
|
}
|
|
589
593
|
|
|
590
|
-
|
|
591
|
-
* @category Outfit
|
|
592
|
-
*/
|
|
594
|
+
/**@category Outfit */
|
|
593
595
|
export declare type BodyColor3Name = "headColor3" | "torsoColor3" | "rightArmColor3" | "leftArmColor3" | "rightLegColor3" | "leftLegColor3";
|
|
594
596
|
|
|
595
|
-
|
|
596
|
-
* @category Outfit
|
|
597
|
-
*/
|
|
597
|
+
/**@category Outfit */
|
|
598
598
|
export declare class BodyColor3s {
|
|
599
599
|
colorType: ColorType;
|
|
600
600
|
headColor3: string;
|
|
@@ -618,6 +618,7 @@ export declare class BodyColor3s {
|
|
|
618
618
|
fromJson(bodyColorsJson: BodyColor3sJson): void;
|
|
619
619
|
}
|
|
620
620
|
|
|
621
|
+
/**@category Outfit */
|
|
621
622
|
export declare type BodyColor3sJson = {
|
|
622
623
|
headColor3?: string;
|
|
623
624
|
torsoColor3?: string;
|
|
@@ -627,9 +628,7 @@ export declare type BodyColor3sJson = {
|
|
|
627
628
|
leftLegColor3?: string;
|
|
628
629
|
};
|
|
629
630
|
|
|
630
|
-
|
|
631
|
-
* @category Outfit
|
|
632
|
-
*/
|
|
631
|
+
/**@category Outfit */
|
|
633
632
|
export declare class BodyColors {
|
|
634
633
|
colorType: ColorType;
|
|
635
634
|
headColorId: number;
|
|
@@ -654,6 +653,7 @@ export declare class BodyColors {
|
|
|
654
653
|
toColor3(): BodyColor3s;
|
|
655
654
|
}
|
|
656
655
|
|
|
656
|
+
/**@category Outfit */
|
|
657
657
|
export declare type BodyColorsJson = {
|
|
658
658
|
headColorId?: number;
|
|
659
659
|
torsoColorId?: number;
|
|
@@ -674,6 +674,7 @@ export declare class BodyColorsWrapper extends InstanceWrapper {
|
|
|
674
674
|
update(): void;
|
|
675
675
|
}
|
|
676
676
|
|
|
677
|
+
/**@category DataModelEnum */
|
|
677
678
|
export declare const BodyPart: {
|
|
678
679
|
Head: number;
|
|
679
680
|
Torso: number;
|
|
@@ -728,6 +729,7 @@ export declare function BuildJoints(self: RigData): void;
|
|
|
728
729
|
*/
|
|
729
730
|
export declare function buildVertKD(mesh: FileMesh): KDNode | null;
|
|
730
731
|
|
|
732
|
+
/**@category API */
|
|
731
733
|
export declare interface BundleDetails_Result {
|
|
732
734
|
bundleType: number;
|
|
733
735
|
bundledItems: {
|
|
@@ -829,6 +831,7 @@ export declare function cleanString(inputString: string): string;
|
|
|
829
831
|
|
|
830
832
|
export declare function clonePrimitiveArray<T>(arr: T[]): any[];
|
|
831
833
|
|
|
834
|
+
/**@category API */
|
|
832
835
|
export declare function cloneSearch_Payload(data: Search_Payload): Search_Payload;
|
|
833
836
|
|
|
834
837
|
/**
|
|
@@ -889,9 +892,7 @@ export declare class ColorSequenceKeypoint {
|
|
|
889
892
|
isSame(other: ColorSequenceKeypoint): boolean;
|
|
890
893
|
}
|
|
891
894
|
|
|
892
|
-
|
|
893
|
-
* @category Outfit
|
|
894
|
-
*/
|
|
895
|
+
/**@category Outfit */
|
|
895
896
|
export declare type ColorType = "BrickColor" | "Color3";
|
|
896
897
|
|
|
897
898
|
/**
|
|
@@ -917,7 +918,10 @@ export declare class Content {
|
|
|
917
918
|
|
|
918
919
|
export declare const ContentMap: Map<string, string>;
|
|
919
920
|
|
|
920
|
-
|
|
921
|
+
/**
|
|
922
|
+
* Class inside FileMesh that contains core data
|
|
923
|
+
* @category Mesh */
|
|
924
|
+
export declare class COREMESH {
|
|
921
925
|
private _numverts;
|
|
922
926
|
private _positions;
|
|
923
927
|
private _normals;
|
|
@@ -1144,7 +1148,10 @@ declare class FaceKeyframeGroup extends BaseKeyframeGroup {
|
|
|
1144
1148
|
getLowerKeyframe(time: number): FaceKeyframe | null;
|
|
1145
1149
|
}
|
|
1146
1150
|
|
|
1147
|
-
|
|
1151
|
+
/**
|
|
1152
|
+
* Class inside FileMesh that contains facial animation data
|
|
1153
|
+
* @category Mesh */
|
|
1154
|
+
export declare class FACS {
|
|
1148
1155
|
faceBoneNames: string[];
|
|
1149
1156
|
faceControlNames: string[];
|
|
1150
1157
|
quantizedTransforms?: QuantizedTransform;
|
|
@@ -1189,7 +1196,10 @@ export declare class FileMesh {
|
|
|
1189
1196
|
getValidationIssue(): "subsetLengthMismatch" | undefined;
|
|
1190
1197
|
}
|
|
1191
1198
|
|
|
1192
|
-
|
|
1199
|
+
/**
|
|
1200
|
+
* Bone inside SKINNING in FileMesh
|
|
1201
|
+
* @category Mesh */
|
|
1202
|
+
export declare class FileMeshBone {
|
|
1193
1203
|
boneNameIndex: number;
|
|
1194
1204
|
parentIndex: number;
|
|
1195
1205
|
lodParentIndex: number;
|
|
@@ -1199,12 +1209,18 @@ declare class FileMeshBone {
|
|
|
1199
1209
|
clone(): FileMeshBone;
|
|
1200
1210
|
}
|
|
1201
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* Contains bone weights for a single vert
|
|
1214
|
+
* @category Mesh */
|
|
1202
1215
|
export declare class FileMeshSkinning {
|
|
1203
1216
|
subsetIndices: Vec4;
|
|
1204
1217
|
boneWeights: Vec4;
|
|
1205
1218
|
clone(): FileMeshSkinning;
|
|
1206
1219
|
}
|
|
1207
1220
|
|
|
1221
|
+
/**
|
|
1222
|
+
* Section of mesh inside SKINNING in FileMesh
|
|
1223
|
+
* @category Mesh */
|
|
1208
1224
|
export declare class FileMeshSubset {
|
|
1209
1225
|
facesBegin: number;
|
|
1210
1226
|
facesLength: number;
|
|
@@ -1298,7 +1314,7 @@ export declare const FLAGS: {
|
|
|
1298
1314
|
AUTO_RESTORE_CONTEXT: boolean;
|
|
1299
1315
|
/**RenderTarget textures are converted to CanvasTextures which can be exported */
|
|
1300
1316
|
RENDERTARGET_TO_CANVASTEXTURE: boolean;
|
|
1301
|
-
/**Amount of time thumbnail generator will wait after no assets are being loaded to resolve */
|
|
1317
|
+
/**Amount of time thumbnail generator will wait after no assets are being loaded to resolve, should be a little time at least so particles can render */
|
|
1302
1318
|
THUMBNAIL_TIMEOUT: number;
|
|
1303
1319
|
/**shows ThreeJS SkeletonHelper */
|
|
1304
1320
|
SHOW_SKELETON_HELPER: boolean;
|
|
@@ -1364,7 +1380,7 @@ export declare function gaussian_rbf(v0: Vec3, v1: Vec3, sigma?: number): number
|
|
|
1364
1380
|
/**
|
|
1365
1381
|
* Generates a 2d or 3d thumbnail of a model/similar instance
|
|
1366
1382
|
* @param auth Authentication
|
|
1367
|
-
* @param renderScene Scene to render inside, do note the scene appearance is not populated
|
|
1383
|
+
* @param renderScene Scene to render inside, do note the scene appearance is not populated automatically, use setupThumbnailScene()
|
|
1368
1384
|
* @param model Model to render
|
|
1369
1385
|
* @param size Size of the resulting image, ignored for 3d thumbnails
|
|
1370
1386
|
* @param type Type of thumbnail, "png" | "webp" | "gltf"
|
|
@@ -1428,26 +1444,44 @@ export declare function generateUUIDv4(): string;
|
|
|
1428
1444
|
|
|
1429
1445
|
export declare function GetAttachedPart(accessory: Instance, rig: Instance): Instance | undefined;
|
|
1430
1446
|
|
|
1447
|
+
/**
|
|
1448
|
+
* @deprecated Use getThumbnailCameraCFrame instead
|
|
1449
|
+
* @param rig
|
|
1450
|
+
* @returns
|
|
1451
|
+
*/
|
|
1431
1452
|
export declare function getCameraCFrameForAvatarNonCustomized(rig: Instance): CFrame | undefined;
|
|
1432
1453
|
|
|
1454
|
+
/**
|
|
1455
|
+
* Calculates the CFrame the camera should be at when generating a customized headshot thumbnail
|
|
1456
|
+
* @param rig Character
|
|
1457
|
+
* @param fov Customized fov
|
|
1458
|
+
* @param yRot Customized yRot
|
|
1459
|
+
* @param distance Customized distanceScale
|
|
1460
|
+
* @returns Thumbnail camera cframe
|
|
1461
|
+
* @category ThumbnailGenerator
|
|
1462
|
+
*/
|
|
1433
1463
|
export declare function getCameraCFrameForHeadshotCustomized(rig: Instance, fov: number, yRot: number, distance: number): CFrame | undefined;
|
|
1434
1464
|
|
|
1435
|
-
export declare function getCameraOffset(fov: number, extentsSize: Vector3): number;
|
|
1436
|
-
|
|
1437
1465
|
/**
|
|
1438
1466
|
* @category Mesh
|
|
1439
1467
|
*/
|
|
1440
1468
|
export declare function getDistIndexArray(ref: FileMesh, dist: FileMesh): (number | undefined)[];
|
|
1441
1469
|
|
|
1470
|
+
/**@category ThumbnailGenerator */
|
|
1442
1471
|
export declare function getExtents(cframe: CFrame, parts: Instance[]): [Vector3, Vector3];
|
|
1443
1472
|
|
|
1473
|
+
/**@category ThumbnailGenerator */
|
|
1444
1474
|
export declare function getExtentsCenter(extents: [Vector3, Vector3]): Vector3;
|
|
1445
1475
|
|
|
1446
|
-
|
|
1476
|
+
/**
|
|
1477
|
+
* @deprecated this is SO broken
|
|
1478
|
+
* @category ThumbnailGenerator
|
|
1479
|
+
* */
|
|
1447
1480
|
export declare function getExtentsForParts(parts: Instance[], includeTransform?: boolean): [Vector3, Vector3];
|
|
1448
1481
|
|
|
1449
1482
|
export declare function getHeadExtents(rig: Instance): [Vector3, Vector3] | undefined;
|
|
1450
1483
|
|
|
1484
|
+
/**@category API */
|
|
1451
1485
|
export declare interface GetInfoForId_Result {
|
|
1452
1486
|
"description": string;
|
|
1453
1487
|
"created": string;
|
|
@@ -1474,6 +1508,7 @@ export declare function getRandomBetweenInclusive(min: number, max: number): num
|
|
|
1474
1508
|
|
|
1475
1509
|
export declare function getRigExtentsWorld(rig: Instance): [Vector3, Vector3];
|
|
1476
1510
|
|
|
1511
|
+
/**@category API */
|
|
1477
1512
|
export declare interface GetSubscription_Result {
|
|
1478
1513
|
"subscriptionProductModel": {
|
|
1479
1514
|
"premiumFeatureId": number;
|
|
@@ -1489,12 +1524,22 @@ export declare interface GetSubscription_Result {
|
|
|
1489
1524
|
};
|
|
1490
1525
|
}
|
|
1491
1526
|
|
|
1527
|
+
/**
|
|
1528
|
+
* Calculates the CFrame the camera should be at when generating a thumbnail
|
|
1529
|
+
* @param model The model-like instance to get thumbnail camera for
|
|
1530
|
+
* @returns Thumbnail camera cframe
|
|
1531
|
+
* @category ThumbnailGenerator
|
|
1532
|
+
*/
|
|
1533
|
+
export declare function getThumbnailCameraCFrame(model: Instance): CFrame | undefined;
|
|
1534
|
+
|
|
1535
|
+
/**@category API */
|
|
1492
1536
|
export declare interface GetTopics_Payload {
|
|
1493
1537
|
items: unknown[];
|
|
1494
1538
|
maxResult: 40;
|
|
1495
1539
|
selectTopics: string[];
|
|
1496
1540
|
}
|
|
1497
1541
|
|
|
1542
|
+
/**@category API */
|
|
1498
1543
|
export declare interface GetTopics_Result {
|
|
1499
1544
|
error: null | unknown;
|
|
1500
1545
|
topics: {
|
|
@@ -1503,6 +1548,7 @@ export declare interface GetTopics_Result {
|
|
|
1503
1548
|
}[];
|
|
1504
1549
|
}
|
|
1505
1550
|
|
|
1551
|
+
/**@category API */
|
|
1506
1552
|
export declare interface GetUserOutfits_Result {
|
|
1507
1553
|
data: {
|
|
1508
1554
|
id: number;
|
|
@@ -1557,6 +1603,7 @@ export declare function hexToRgb(hex: string): {
|
|
|
1557
1603
|
} | null;
|
|
1558
1604
|
|
|
1559
1605
|
/**
|
|
1606
|
+
* The main class for the process of HSR (Hidden Surface Removal)
|
|
1560
1607
|
* @category Mesh
|
|
1561
1608
|
*/
|
|
1562
1609
|
export declare class HSR {
|
|
@@ -1577,7 +1624,10 @@ export declare class HSR {
|
|
|
1577
1624
|
calculateCloseToCageThreshold(): void;
|
|
1578
1625
|
}
|
|
1579
1626
|
|
|
1580
|
-
|
|
1627
|
+
/**
|
|
1628
|
+
* Class inside FileMesh that contains HSR Always Visible data (unused?)
|
|
1629
|
+
* @category Mesh */
|
|
1630
|
+
export declare class HSRAVIS {
|
|
1581
1631
|
bitFlags: boolean[];
|
|
1582
1632
|
clone(): HSRAVIS;
|
|
1583
1633
|
}
|
|
@@ -1655,6 +1705,7 @@ export declare class HumanoidDescriptionWrapper extends InstanceWrapper {
|
|
|
1655
1705
|
applyDescription(humanoid: Instance): Promise<Instance | Response | undefined>;
|
|
1656
1706
|
}
|
|
1657
1707
|
|
|
1708
|
+
/**@category DataModelEnum */
|
|
1658
1709
|
export declare const HumanoidRigType: {
|
|
1659
1710
|
R6: number;
|
|
1660
1711
|
R15: number;
|
|
@@ -1712,7 +1763,7 @@ export declare class Instance {
|
|
|
1712
1763
|
get id(): string;
|
|
1713
1764
|
set name(value: string);
|
|
1714
1765
|
get name(): string;
|
|
1715
|
-
createWrapper():
|
|
1766
|
+
createWrapper(): InstanceWrapper | undefined;
|
|
1716
1767
|
addConnectionReference(connection: Connection): void;
|
|
1717
1768
|
removeConnectionReference(connection: Connection): void;
|
|
1718
1769
|
addReferencedBy(instance: Instance): void;
|
|
@@ -1781,6 +1832,7 @@ export declare class InstanceWrapper {
|
|
|
1781
1832
|
preRender(): void;
|
|
1782
1833
|
}
|
|
1783
1834
|
|
|
1835
|
+
/**@category API */
|
|
1784
1836
|
export declare interface Inventory_Result {
|
|
1785
1837
|
data: {
|
|
1786
1838
|
assetId: number;
|
|
@@ -1809,6 +1861,7 @@ export declare function isSameFloat(num0: number, num1: number): boolean;
|
|
|
1809
1861
|
|
|
1810
1862
|
export declare function isSameVector3(vec0: Vector3, vec1: Vector3): boolean;
|
|
1811
1863
|
|
|
1864
|
+
/**@category API */
|
|
1812
1865
|
export declare interface ItemDetail_Result {
|
|
1813
1866
|
assetType: number;
|
|
1814
1867
|
bundledItems: [];
|
|
@@ -1835,6 +1888,7 @@ export declare interface ItemDetail_Result {
|
|
|
1835
1888
|
};
|
|
1836
1889
|
}
|
|
1837
1890
|
|
|
1891
|
+
/**@category API */
|
|
1838
1892
|
export declare interface ItemDetails_Result {
|
|
1839
1893
|
data: ItemDetail_Result[];
|
|
1840
1894
|
}
|
|
@@ -1929,7 +1983,10 @@ export declare interface LocalOutfitJson {
|
|
|
1929
1983
|
buffer: string;
|
|
1930
1984
|
}
|
|
1931
1985
|
|
|
1932
|
-
|
|
1986
|
+
/**
|
|
1987
|
+
* Class inside FileMesh that contains LOD metadata
|
|
1988
|
+
* @category Mesh */
|
|
1989
|
+
export declare class LODS {
|
|
1933
1990
|
lodType: number;
|
|
1934
1991
|
numHighQualityLODs: number;
|
|
1935
1992
|
numLodOffsets: number;
|
|
@@ -1937,6 +1994,7 @@ declare class LODS {
|
|
|
1937
1994
|
clone(): LODS;
|
|
1938
1995
|
}
|
|
1939
1996
|
|
|
1997
|
+
/**@category API */
|
|
1940
1998
|
export declare interface Look_Result {
|
|
1941
1999
|
look: {
|
|
1942
2000
|
avatarProperties: {
|
|
@@ -2047,6 +2105,7 @@ export declare class MakeupDescriptionWrapper extends InstanceWrapper {
|
|
|
2047
2105
|
setup(): void;
|
|
2048
2106
|
}
|
|
2049
2107
|
|
|
2108
|
+
/**@category DataModelEnum */
|
|
2050
2109
|
export declare const MakeupType: {
|
|
2051
2110
|
Face: number;
|
|
2052
2111
|
Lip: number;
|
|
@@ -2062,6 +2121,7 @@ export declare class ManualWeldWrapper extends WeldWrapper {
|
|
|
2062
2121
|
|
|
2063
2122
|
export declare function mapNum(x: number, in_min: number, in_max: number, out_min: number, out_max: number): number;
|
|
2064
2123
|
|
|
2124
|
+
/**@category API */
|
|
2065
2125
|
export declare interface MarketplaceWidget {
|
|
2066
2126
|
id: string;
|
|
2067
2127
|
type: string;
|
|
@@ -2083,6 +2143,7 @@ export declare interface MarketplaceWidget {
|
|
|
2083
2143
|
};
|
|
2084
2144
|
}
|
|
2085
2145
|
|
|
2146
|
+
/**@category API */
|
|
2086
2147
|
export declare interface MarketplaceWidgets_Result {
|
|
2087
2148
|
widgets: {
|
|
2088
2149
|
[K in number]: MarketplaceWidget;
|
|
@@ -2134,6 +2195,7 @@ declare class MeshCollider {
|
|
|
2134
2195
|
raycast(ray: Ray_2): boolean;
|
|
2135
2196
|
}
|
|
2136
2197
|
|
|
2198
|
+
/**@category DataModelEnum */
|
|
2137
2199
|
export declare const MeshType: {
|
|
2138
2200
|
Brick: number;
|
|
2139
2201
|
Cylinder: number;
|
|
@@ -2203,6 +2265,7 @@ export declare function multiply(v0: Vec3, v1: Vec3): Vec3;
|
|
|
2203
2265
|
*/
|
|
2204
2266
|
export declare function multiplyMatrixVector(m: Mat3x3, v: Vec3): Vec3;
|
|
2205
2267
|
|
|
2268
|
+
/**@category API */
|
|
2206
2269
|
export declare interface NavigationMenuItems {
|
|
2207
2270
|
categories: {
|
|
2208
2271
|
category: string;
|
|
@@ -2279,6 +2342,7 @@ export declare interface NavigationMenuItems {
|
|
|
2279
2342
|
|
|
2280
2343
|
export declare const NeverLayeredAccessoryTypes: number[];
|
|
2281
2344
|
|
|
2345
|
+
/**@category DataModelEnum */
|
|
2282
2346
|
export declare const NormalId: {
|
|
2283
2347
|
Right: number;
|
|
2284
2348
|
Top: number;
|
|
@@ -2436,6 +2500,7 @@ export declare class Outfit {
|
|
|
2436
2500
|
toBuffer(): ArrayBuffer;
|
|
2437
2501
|
}
|
|
2438
2502
|
|
|
2503
|
+
/**@category Outfit */
|
|
2439
2504
|
export declare type OutfitJson = {
|
|
2440
2505
|
scale?: ScaleJson;
|
|
2441
2506
|
playerAvatarType?: AvatarType;
|
|
@@ -2525,12 +2590,14 @@ declare class PartCurve {
|
|
|
2525
2590
|
rotation?: FloatCurve3;
|
|
2526
2591
|
}
|
|
2527
2592
|
|
|
2593
|
+
/**@category DataModelEnum */
|
|
2528
2594
|
export declare const ParticleEmitterShapeInOut: {
|
|
2529
2595
|
Outward: number;
|
|
2530
2596
|
Inward: number;
|
|
2531
2597
|
InAndOut: number;
|
|
2532
2598
|
};
|
|
2533
2599
|
|
|
2600
|
+
/**@category DataModelEnum */
|
|
2534
2601
|
export declare const ParticleOrientation: {
|
|
2535
2602
|
FacingCamera: number;
|
|
2536
2603
|
FacingCameraWorldUp: number;
|
|
@@ -3007,13 +3074,12 @@ export declare class RoAvatarVersions {
|
|
|
3007
3074
|
|
|
3008
3075
|
export declare function rotationMatrixToEulerAngles(te: number[], order?: string): Vec3;
|
|
3009
3076
|
|
|
3077
|
+
/**@category API */
|
|
3010
3078
|
export declare type SaleLocationType = "ShopOnly" | "ShopAndAllExperiences" | "ExperiencesDevApiOnly" | string;
|
|
3011
3079
|
|
|
3012
3080
|
export declare function saveByteArray(data: BlobPart[] | undefined, name: string): void;
|
|
3013
3081
|
|
|
3014
|
-
|
|
3015
|
-
* @category Outfit
|
|
3016
|
-
*/
|
|
3082
|
+
/**@category Outfit */
|
|
3017
3083
|
export declare class Scale {
|
|
3018
3084
|
height: number;
|
|
3019
3085
|
width: number;
|
|
@@ -3041,6 +3107,7 @@ export declare function ScaleAccessoryForRig(accessory: Instance, rig: Instance,
|
|
|
3041
3107
|
|
|
3042
3108
|
export declare function ScaleCharacter(rig: Instance, outfit: Outfit, humanoidDescription: Instance): RigData | undefined;
|
|
3043
3109
|
|
|
3110
|
+
/**@category Outfit */
|
|
3044
3111
|
export declare type ScaleJson = {
|
|
3045
3112
|
height?: number;
|
|
3046
3113
|
width?: number;
|
|
@@ -3055,9 +3122,7 @@ export declare type ScaleJson = {
|
|
|
3055
3122
|
*/
|
|
3056
3123
|
export declare function scaleMesh(mesh: FileMesh, scale: Vector3): void;
|
|
3057
3124
|
|
|
3058
|
-
|
|
3059
|
-
* @category Outfit
|
|
3060
|
-
*/
|
|
3125
|
+
/**@category Outfit */
|
|
3061
3126
|
export declare type ScaleName = "height" | "width" | "head" | "depth" | "proportion" | "bodyType";
|
|
3062
3127
|
|
|
3063
3128
|
/**
|
|
@@ -3077,6 +3142,7 @@ declare class ScriptWrapperData {
|
|
|
3077
3142
|
shouldStop: boolean;
|
|
3078
3143
|
}
|
|
3079
3144
|
|
|
3145
|
+
/**@category API */
|
|
3080
3146
|
export declare interface Search_Payload {
|
|
3081
3147
|
taxonomy: string;
|
|
3082
3148
|
salesTypeFilter: number;
|
|
@@ -3091,6 +3157,7 @@ export declare interface Search_Payload {
|
|
|
3091
3157
|
limit?: number;
|
|
3092
3158
|
}
|
|
3093
3159
|
|
|
3160
|
+
/**@category API */
|
|
3094
3161
|
export declare interface Search_Result {
|
|
3095
3162
|
keyword: string | null;
|
|
3096
3163
|
previousPageCursor: string | null;
|
|
@@ -3167,7 +3234,10 @@ declare class SimpleView {
|
|
|
3167
3234
|
readUint8(): number;
|
|
3168
3235
|
}
|
|
3169
3236
|
|
|
3170
|
-
|
|
3237
|
+
/**
|
|
3238
|
+
* Class inside FileMesh that contains skinning data
|
|
3239
|
+
* @category Mesh */
|
|
3240
|
+
export declare class SKINNING {
|
|
3171
3241
|
numSkinnings: number;
|
|
3172
3242
|
skinnings: FileMeshSkinning[];
|
|
3173
3243
|
numBones: number;
|
|
@@ -3232,6 +3302,7 @@ export declare const StringBufferProperties: string[];
|
|
|
3232
3302
|
|
|
3233
3303
|
declare type ThreePoseCorrective = Vec3;
|
|
3234
3304
|
|
|
3305
|
+
/**@category API */
|
|
3235
3306
|
export declare interface ThumbnailCustomizations_Result {
|
|
3236
3307
|
"avatarThumbnailCustomizations": {
|
|
3237
3308
|
"thumbnailType": number;
|
|
@@ -3244,10 +3315,12 @@ export declare interface ThumbnailCustomizations_Result {
|
|
|
3244
3315
|
}[];
|
|
3245
3316
|
}
|
|
3246
3317
|
|
|
3318
|
+
/**@category ThumbnailGenerator */
|
|
3247
3319
|
export declare type ThumbnailResult = ArrayBuffer | {
|
|
3248
3320
|
[key: string]: unknown;
|
|
3249
3321
|
} | string | undefined;
|
|
3250
3322
|
|
|
3323
|
+
/**@category API */
|
|
3251
3324
|
export declare interface ThumbnailsCustomization_Payload {
|
|
3252
3325
|
thumbnailType: number;
|
|
3253
3326
|
emoteAssetId: number;
|
|
@@ -3258,6 +3331,7 @@ export declare interface ThumbnailsCustomization_Payload {
|
|
|
3258
3331
|
};
|
|
3259
3332
|
}
|
|
3260
3333
|
|
|
3334
|
+
/**@category ThumbnailGenerator */
|
|
3261
3335
|
export declare type ThumbnailType = "png" | "webp" | "gltf";
|
|
3262
3336
|
|
|
3263
3337
|
/**
|
|
@@ -3324,6 +3398,7 @@ declare type UserInfo = {
|
|
|
3324
3398
|
displayName: string;
|
|
3325
3399
|
};
|
|
3326
3400
|
|
|
3401
|
+
/**@category API */
|
|
3327
3402
|
export declare interface UserLooks_Result {
|
|
3328
3403
|
data: {
|
|
3329
3404
|
assets: {
|
|
@@ -3349,6 +3424,7 @@ export declare interface UserLooks_Result {
|
|
|
3349
3424
|
previousCursor: string | null;
|
|
3350
3425
|
}
|
|
3351
3426
|
|
|
3427
|
+
/**@category API */
|
|
3352
3428
|
export declare interface UserOmniSearch_Result {
|
|
3353
3429
|
"searchResults": {
|
|
3354
3430
|
"contentGroupType": "User";
|
|
@@ -3365,12 +3441,14 @@ export declare interface UserOmniSearch_Result {
|
|
|
3365
3441
|
"nextPageToken": string;
|
|
3366
3442
|
}
|
|
3367
3443
|
|
|
3444
|
+
/**@category Outfit */
|
|
3368
3445
|
export declare type ValidationIssue = {
|
|
3369
3446
|
type: ValidationIssueType;
|
|
3370
3447
|
text: string;
|
|
3371
3448
|
assetIndex?: number;
|
|
3372
3449
|
};
|
|
3373
3450
|
|
|
3451
|
+
/**@category Outfit */
|
|
3374
3452
|
export declare type ValidationIssueType = "AccessoryLimit" | "LayeredLimit" | "OneOfTypeLimit" | "DuplicateId" | "NotWearable" | "MissingLayeredMeta" | "InvalidAsset" | "MakeupLimit";
|
|
3375
3453
|
|
|
3376
3454
|
/** @category Mesh */
|
|
@@ -3476,6 +3554,7 @@ export declare const WorkerTypeToFunction: {
|
|
|
3476
3554
|
[K in string]: Function;
|
|
3477
3555
|
};
|
|
3478
3556
|
|
|
3557
|
+
/**@category DataModelEnum */
|
|
3479
3558
|
export declare const WrapLayerAutoSkin: {
|
|
3480
3559
|
Disabled: number;
|
|
3481
3560
|
EnabledPreserve: number;
|
|
@@ -3484,8 +3563,27 @@ export declare const WrapLayerAutoSkin: {
|
|
|
3484
3563
|
|
|
3485
3564
|
export declare const xmlMagic = "<roblox ";
|
|
3486
3565
|
|
|
3487
|
-
export declare function zoomExtents(cameraCFrame: CFrame, modelCFrame: CFrame, modelSize: Vector3, targetFOV: number, distanceScale: number): void;
|
|
3566
|
+
export declare function zoomExtents(cameraCFrame: CFrame, modelCFrame: CFrame, modelSize: Vector3, targetFOV: number, distanceScale: number, sizeType?: ZoomExtentsSizeType): void;
|
|
3488
3567
|
|
|
3568
|
+
/**
|
|
3569
|
+
* Makes model fit inside camera
|
|
3570
|
+
* @param cameraCFrame Original camera cframe
|
|
3571
|
+
* @param modelCFrame Model cframe
|
|
3572
|
+
* @param modelSize Model extents size
|
|
3573
|
+
* @param targetFOV Camera fov
|
|
3574
|
+
* @param distanceScale Distance is multiplied by this
|
|
3575
|
+
* @category ThumbnailGenerator
|
|
3576
|
+
*/
|
|
3577
|
+
export declare type ZoomExtentsSizeType = "largestAxis" | "calculate";
|
|
3578
|
+
|
|
3579
|
+
/**
|
|
3580
|
+
* @deprecated Use zoomExtents instead
|
|
3581
|
+
* @param cameraCFrame
|
|
3582
|
+
* @param modelCFrame
|
|
3583
|
+
* @param modelSize
|
|
3584
|
+
* @param fov
|
|
3585
|
+
* @category ThumbnailGenerator
|
|
3586
|
+
*/
|
|
3489
3587
|
export declare function zoomToExtents(cameraCFrame: CFrame, modelCFrame: CFrame, modelSize: Vector3, fov?: number): void;
|
|
3490
3588
|
|
|
3491
3589
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -29548,7 +29548,7 @@ const FLAGS = {
|
|
|
29548
29548
|
USE_RENDERTARGET: true,
|
|
29549
29549
|
AUTO_RESTORE_CONTEXT: true,
|
|
29550
29550
|
RENDERTARGET_TO_CANVASTEXTURE: false,
|
|
29551
|
-
THUMBNAIL_TIMEOUT:
|
|
29551
|
+
THUMBNAIL_TIMEOUT: 500,
|
|
29552
29552
|
//skeleton
|
|
29553
29553
|
SHOW_SKELETON_HELPER: false,
|
|
29554
29554
|
UPDATE_SKELETON: true,
|
|
@@ -30168,6 +30168,7 @@ class Instance {
|
|
|
30168
30168
|
this._hasWrappered = true;
|
|
30169
30169
|
wrapper.created();
|
|
30170
30170
|
}
|
|
30171
|
+
return wrapper;
|
|
30171
30172
|
}
|
|
30172
30173
|
addConnectionReference(connection) {
|
|
30173
30174
|
if (!this._connectionReferences.includes(connection)) {
|
|
@@ -35497,6 +35498,9 @@ const API = {
|
|
|
35497
35498
|
}
|
|
35498
35499
|
const cdnURL = await API.Misc.getCDNURLFromAssetDelivery(fetchStr, headers);
|
|
35499
35500
|
return cdnURL;
|
|
35501
|
+
},
|
|
35502
|
+
"getCurrentlyLoading": function() {
|
|
35503
|
+
return currentlyLoadingAssets > 0;
|
|
35500
35504
|
}
|
|
35501
35505
|
},
|
|
35502
35506
|
"Events": {
|
|
@@ -36515,6 +36519,7 @@ class RBFDeformerPatch {
|
|
|
36515
36519
|
if (this.refVerts.length === 0) {
|
|
36516
36520
|
return;
|
|
36517
36521
|
}
|
|
36522
|
+
API.Misc.startCurrentlyLoadingAssets();
|
|
36518
36523
|
const [neighborIndicesBuf, weightsBuf, nearestPatchBuf] = await WorkerPool.instance.work(
|
|
36519
36524
|
"RBFDeformerSolveAsync",
|
|
36520
36525
|
[this.patchCount, this.K, this.epsilon, this.importantIndices.buffer, this.refVerts.buffer, this.distVerts.buffer, this.meshVerts.buffer, this.meshBones.buffer],
|
|
@@ -36535,6 +36540,7 @@ class RBFDeformerPatch {
|
|
|
36535
36540
|
});
|
|
36536
36541
|
this.nearestPatch = new Uint16Array(nearestPatchBuf);
|
|
36537
36542
|
timeEnd(`RBFDeformerPatch.solveAsync.unpack.${this.id}`);
|
|
36543
|
+
API.Misc.stopCurrentlyLoadingAssets();
|
|
36538
36544
|
}
|
|
36539
36545
|
/**
|
|
36540
36546
|
* solveAsync() needs to be called before this
|
|
@@ -49635,8 +49641,7 @@ class RBXRenderer {
|
|
|
49635
49641
|
RBXRenderer.backgroundColorHex = backgroundColorHex;
|
|
49636
49642
|
const backgroundColor = new Color(backgroundColorHex);
|
|
49637
49643
|
renderScene.scene.background = backgroundColor;
|
|
49638
|
-
|
|
49639
|
-
thumbnailAmbientVal = 128;
|
|
49644
|
+
const thumbnailAmbientVal = 128;
|
|
49640
49645
|
let ambientLightColor = void 0;
|
|
49641
49646
|
if (lightingType === "Thumbnail") {
|
|
49642
49647
|
ambientLightColor = new Color(thumbnailAmbientVal / 255, thumbnailAmbientVal / 255, thumbnailAmbientVal / 255);
|
|
@@ -49647,7 +49652,7 @@ class RBXRenderer {
|
|
|
49647
49652
|
renderScene.scene.add(ambientLight);
|
|
49648
49653
|
renderScene.ambientLight = ambientLight;
|
|
49649
49654
|
let directionalLightColor = void 0;
|
|
49650
|
-
const directionalLightVal =
|
|
49655
|
+
const directionalLightVal = Math.PI;
|
|
49651
49656
|
if (lightingType === "Thumbnail") {
|
|
49652
49657
|
directionalLightColor = new Color(directionalLightVal, directionalLightVal, directionalLightVal);
|
|
49653
49658
|
} else if (lightingType === "WellLit") {
|
|
@@ -49687,7 +49692,7 @@ class RBXRenderer {
|
|
|
49687
49692
|
renderScene.scene.add(directionalLight2);
|
|
49688
49693
|
renderScene.directionalLight2 = directionalLight2;
|
|
49689
49694
|
} else if (lightingType === "Thumbnail") {
|
|
49690
|
-
const directionalLight2 = new DirectionalLight(directionalLightColor,
|
|
49695
|
+
const directionalLight2 = new DirectionalLight(directionalLightColor, directionalLightVal * 0.1);
|
|
49691
49696
|
directionalLight2.position.set(-0.47489210963249207 * -10, 0.8225368857383728 * -10, 0.3129066228866577 * -10);
|
|
49692
49697
|
directionalLight2.target.position.set(0, 0, 0);
|
|
49693
49698
|
renderScene.scene.add(directionalLight2);
|
|
@@ -50173,8 +50178,11 @@ function getExtents(cframe, parts) {
|
|
|
50173
50178
|
function getExtentsCenter(extents) {
|
|
50174
50179
|
return extents[1].minus(extents[0]).divide(new Vector32(2, 2, 2)).add(extents[0]);
|
|
50175
50180
|
}
|
|
50176
|
-
function zoomExtents(cameraCFrame, modelCFrame, modelSize, targetFOV, distanceScale) {
|
|
50177
|
-
|
|
50181
|
+
function zoomExtents(cameraCFrame, modelCFrame, modelSize, targetFOV, distanceScale, sizeType = "calculate") {
|
|
50182
|
+
let largestSize = Math.max(modelSize.X, modelSize.Y, modelSize.Z);
|
|
50183
|
+
if (sizeType === "calculate") {
|
|
50184
|
+
largestSize = modelSize.magnitude() / 2 / Math.sin(rad(targetFOV / 2));
|
|
50185
|
+
}
|
|
50178
50186
|
const fovMultiplier = 70 / targetFOV;
|
|
50179
50187
|
const lookDir = multiply(normalize(minus(cameraCFrame.Position, modelCFrame.Position)), [distanceScale, distanceScale, distanceScale]);
|
|
50180
50188
|
cameraCFrame.Position = add(modelCFrame.Position, multiply(multiply(lookDir, [largestSize, largestSize, largestSize]), [fovMultiplier, fovMultiplier, fovMultiplier]));
|
|
@@ -50243,7 +50251,7 @@ function getCameraCFrameForHeadshotCustomized(rig, fov2, yRot, distance2) {
|
|
|
50243
50251
|
lookCF.Position = add(headCenterCF.Position, multiply(multiply([10, 10, 10], lookVector), [fovMultiplier, fovMultiplier, fovMultiplier]));
|
|
50244
50252
|
lookCF = CFrame.lookAt(lookCF.Position, headCenterCF.Position);
|
|
50245
50253
|
const cameraCF = lookCF.clone();
|
|
50246
|
-
zoomExtents(cameraCF, headCenterCF, headLocalExtents[1].minus(headLocalExtents[0]), fov2, distance2);
|
|
50254
|
+
zoomExtents(cameraCF, headCenterCF, headLocalExtents[1].minus(headLocalExtents[0]), fov2, distance2, "largestAxis");
|
|
50247
50255
|
return cameraCF;
|
|
50248
50256
|
}
|
|
50249
50257
|
function getCameraCFrameForAvatarNonCustomized(rig) {
|
|
@@ -50274,6 +50282,36 @@ function getCameraCFrameForAvatarNonCustomized(rig) {
|
|
|
50274
50282
|
zoomExtents(cameraCF, rootPartCF, extentsSize, 70, 1);
|
|
50275
50283
|
return cameraCF;
|
|
50276
50284
|
}
|
|
50285
|
+
function getThumbnailCameraCFrame(model) {
|
|
50286
|
+
const thumbnailCamera = model.FindFirstChildOfClass("Camera");
|
|
50287
|
+
if (thumbnailCamera) return thumbnailCamera.PropOrDefault("CFrame", new CFrame());
|
|
50288
|
+
let rootPart = model.PropOrDefault("PrimaryPart", void 0);
|
|
50289
|
+
if (!rootPart) rootPart = model.FindFirstChildOfClass("Part");
|
|
50290
|
+
if (!rootPart) rootPart = model.FindFirstChildOfClass("MeshPart");
|
|
50291
|
+
if (!rootPart) return;
|
|
50292
|
+
const rootPartCF = rootPart.PropOrDefault("CFrame", new CFrame()).clone();
|
|
50293
|
+
const worldExtents = getRigExtentsWorld(model);
|
|
50294
|
+
if (!worldExtents) return;
|
|
50295
|
+
const extentsSize = worldExtents[1].minus(worldExtents[0]);
|
|
50296
|
+
rootPartCF.Position = getExtentsCenter(worldExtents).toVec3();
|
|
50297
|
+
let lookVector = rootPartCF.lookVector();
|
|
50298
|
+
if (Math.abs(lookVector[1]) > 0.95) {
|
|
50299
|
+
lookVector = [0, 0, -1];
|
|
50300
|
+
} else {
|
|
50301
|
+
lookVector[1] = 0;
|
|
50302
|
+
lookVector = normalize(lookVector);
|
|
50303
|
+
}
|
|
50304
|
+
let lookCF = CFrame.lookAt([0, 0, 0], lookVector);
|
|
50305
|
+
lookCF = lookCF.multiply(CFrame.fromEulerAngles(0, 0, rad(45)));
|
|
50306
|
+
lookCF = lookCF.multiply(CFrame.fromEulerAngles(rad(35), 0, 0));
|
|
50307
|
+
lookCF = lookCF.multiply(CFrame.fromEulerAngles(0, 0, 0));
|
|
50308
|
+
lookVector = lookCF.lookVector();
|
|
50309
|
+
lookCF.Position = add(rootPartCF.Position, multiply([10, 10, 10], lookVector));
|
|
50310
|
+
lookCF = CFrame.lookAt(lookCF.Position, rootPartCF.Position);
|
|
50311
|
+
const cameraCF = lookCF.clone();
|
|
50312
|
+
zoomExtents(cameraCF, rootPartCF, extentsSize, 70, 1);
|
|
50313
|
+
return cameraCF;
|
|
50314
|
+
}
|
|
50277
50315
|
class OutfitRenderer {
|
|
50278
50316
|
auth;
|
|
50279
50317
|
outfit;
|
|
@@ -50475,7 +50513,8 @@ function renderToRenderTarget(width, height, renderScene) {
|
|
|
50475
50513
|
generateMipmaps: false,
|
|
50476
50514
|
minFilter: LinearFilter,
|
|
50477
50515
|
magFilter: LinearFilter,
|
|
50478
|
-
type: UnsignedByteType
|
|
50516
|
+
type: UnsignedByteType,
|
|
50517
|
+
samples: 4
|
|
50479
50518
|
});
|
|
50480
50519
|
const rbxRenderer = RBXRenderer.getRenderer();
|
|
50481
50520
|
if (!rbxRenderer) return renderTarget;
|
|
@@ -50494,12 +50533,12 @@ async function renderTargetToCanvas(renderTarget) {
|
|
|
50494
50533
|
}
|
|
50495
50534
|
async function generateModelThumbnail(auth, renderScene, model, size = [150, 150], type = "png", quality = 1, gltfAutoDownload = false) {
|
|
50496
50535
|
return new Promise((resolve) => {
|
|
50497
|
-
const cameraCFrame =
|
|
50536
|
+
const cameraCFrame = getThumbnailCameraCFrame(model);
|
|
50498
50537
|
if (cameraCFrame) {
|
|
50499
50538
|
RBXRenderer.setCameraCFrame(cameraCFrame, renderScene);
|
|
50500
50539
|
}
|
|
50501
50540
|
RBXRenderer.addInstance(model, auth, renderScene);
|
|
50502
|
-
let exportTimeout = setTimeout(doExport, FLAGS.THUMBNAIL_TIMEOUT);
|
|
50541
|
+
let exportTimeout = !API.Misc.getCurrentlyLoading() ? setTimeout(doExport, FLAGS.THUMBNAIL_TIMEOUT) : void 0;
|
|
50503
50542
|
const onLoadingConnection = API.Events.OnLoadingAssets.Connect((currentlyLoading) => {
|
|
50504
50543
|
if (exportTimeout) {
|
|
50505
50544
|
clearTimeout(exportTimeout);
|
|
@@ -50531,12 +50570,20 @@ async function generateModelThumbnail(auth, renderScene, model, size = [150, 150
|
|
|
50531
50570
|
}
|
|
50532
50571
|
async function generateOutfitThumbnail(auth, outfit, size = [150, 150], type = "png", quality = 1, gltfAutoDownload = false) {
|
|
50533
50572
|
return new Promise((resolve) => {
|
|
50573
|
+
const startTime = performance.now();
|
|
50534
50574
|
const renderScene = RBXRenderer.addScene();
|
|
50535
50575
|
setupThumbnailScene(renderScene);
|
|
50536
50576
|
const outfitRenderer = new OutfitRenderer(auth, outfit, renderScene);
|
|
50537
50577
|
if (outfit.playerAvatarType === AvatarType.R6) outfitRenderer.deltaTimeMultiplier = 0;
|
|
50538
50578
|
outfitRenderer.startAnimating();
|
|
50539
|
-
|
|
50579
|
+
if (!outfit.containsAssetType("Gear")) {
|
|
50580
|
+
if (outfit.playerAvatarType === AvatarType.R15) {
|
|
50581
|
+
outfitRenderer.setMainAnimation("pose");
|
|
50582
|
+
}
|
|
50583
|
+
} else {
|
|
50584
|
+
outfitRenderer.setMainAnimation("toolnone");
|
|
50585
|
+
}
|
|
50586
|
+
let exportTimeout = !API.Misc.getCurrentlyLoading() ? setTimeout(doExport, FLAGS.THUMBNAIL_TIMEOUT) : void 0;
|
|
50540
50587
|
const onLoadingConnection = API.Events.OnLoadingAssets.Connect((currentlyLoading) => {
|
|
50541
50588
|
if (exportTimeout) {
|
|
50542
50589
|
clearTimeout(exportTimeout);
|
|
@@ -50548,15 +50595,9 @@ async function generateOutfitThumbnail(auth, outfit, size = [150, 150], type = "
|
|
|
50548
50595
|
});
|
|
50549
50596
|
async function doExport() {
|
|
50550
50597
|
onLoadingConnection.Disconnect();
|
|
50551
|
-
if (!outfit.containsAssetType("Gear")) {
|
|
50552
|
-
if (outfit.playerAvatarType === AvatarType.R15) {
|
|
50553
|
-
outfitRenderer.setMainAnimation("pose");
|
|
50554
|
-
}
|
|
50555
|
-
} else {
|
|
50556
|
-
outfitRenderer.setMainAnimation("toolnone");
|
|
50557
|
-
}
|
|
50558
50598
|
if (outfitRenderer.currentRig) {
|
|
50559
50599
|
const thumbnailResult = await generateModelThumbnail(auth, renderScene, outfitRenderer.currentRig, size, type, quality, gltfAutoDownload);
|
|
50600
|
+
console.log("Generated outfit thumbnail after seconds:", (performance.now() - startTime) / 1e3);
|
|
50560
50601
|
resolve(thumbnailResult);
|
|
50561
50602
|
outfitRenderer.stopAnimating();
|
|
50562
50603
|
if (outfitRenderer.currentRig) outfitRenderer.currentRig.Destroy();
|
|
@@ -50570,7 +50611,7 @@ function setupThumbnailScene(renderScene) {
|
|
|
50570
50611
|
renderScene.shouldAnimate = false;
|
|
50571
50612
|
renderScene.wellLitDirectionalLightIntensity *= 2;
|
|
50572
50613
|
renderScene.shadowEnabled = false;
|
|
50573
|
-
RBXRenderer.setupScene("
|
|
50614
|
+
RBXRenderer.setupScene("Thumbnail", 16777215, renderScene);
|
|
50574
50615
|
if (renderScene.plane) renderScene.scene.remove(renderScene.plane);
|
|
50575
50616
|
if (renderScene.shadowPlane) renderScene.scene.remove(renderScene.shadowPlane);
|
|
50576
50617
|
renderScene.scene.background = null;
|
|
@@ -50590,6 +50631,7 @@ function exposeThumbnailGenerator() {
|
|
|
50590
50631
|
globalThis.generateOutfitThumbnail = generateOutfitThumbnail;
|
|
50591
50632
|
globalThis.generateModelThumbnail = generateModelThumbnail;
|
|
50592
50633
|
globalThis.setupThumbnailScene = setupThumbnailScene;
|
|
50634
|
+
globalThis.getThumbnailCameraCFrame = getThumbnailCameraCFrame;
|
|
50593
50635
|
}
|
|
50594
50636
|
export {
|
|
50595
50637
|
API,
|
|
@@ -50635,6 +50677,7 @@ export {
|
|
|
50635
50677
|
BundleTypes,
|
|
50636
50678
|
CACHE,
|
|
50637
50679
|
CFrame,
|
|
50680
|
+
COREMESH,
|
|
50638
50681
|
CatalogBundleTypes,
|
|
50639
50682
|
CategoryDictionary,
|
|
50640
50683
|
Color3,
|
|
@@ -50652,10 +50695,12 @@ export {
|
|
|
50652
50695
|
DefaultSearchData,
|
|
50653
50696
|
EmitterGroupDescClassTypes,
|
|
50654
50697
|
Event,
|
|
50698
|
+
FACS,
|
|
50655
50699
|
FLAGS,
|
|
50656
50700
|
FaceControlNames,
|
|
50657
50701
|
FaceControlsWrapper,
|
|
50658
50702
|
FileMesh,
|
|
50703
|
+
FileMeshBone,
|
|
50659
50704
|
FileMeshSkinning,
|
|
50660
50705
|
FileMeshSubset,
|
|
50661
50706
|
FindFirstMatchingAttachment,
|
|
@@ -50663,12 +50708,14 @@ export {
|
|
|
50663
50708
|
GetAttachedPart,
|
|
50664
50709
|
GetWrapperForInstance,
|
|
50665
50710
|
HSR,
|
|
50711
|
+
HSRAVIS,
|
|
50666
50712
|
HumanoidDescriptionWrapper,
|
|
50667
50713
|
HumanoidRigType,
|
|
50668
50714
|
Instance,
|
|
50669
50715
|
InstanceWrapper,
|
|
50670
50716
|
ItemInfo,
|
|
50671
50717
|
ItemSort,
|
|
50718
|
+
LODS,
|
|
50672
50719
|
LayeredAssetTypes,
|
|
50673
50720
|
LayeredClothingAssetOrder,
|
|
50674
50721
|
LocalOutfit,
|
|
@@ -50705,6 +50752,7 @@ export {
|
|
|
50705
50752
|
RoAvatarData,
|
|
50706
50753
|
RoAvatarDataError,
|
|
50707
50754
|
RoAvatarVersions,
|
|
50755
|
+
SKINNING,
|
|
50708
50756
|
Scale,
|
|
50709
50757
|
ScaleAccessory,
|
|
50710
50758
|
ScaleAccessoryForRig,
|
|
@@ -50775,7 +50823,6 @@ export {
|
|
|
50775
50823
|
generateUUIDv4,
|
|
50776
50824
|
getCameraCFrameForAvatarNonCustomized,
|
|
50777
50825
|
getCameraCFrameForHeadshotCustomized,
|
|
50778
|
-
getCameraOffset,
|
|
50779
50826
|
getDistIndexArray,
|
|
50780
50827
|
getExtents,
|
|
50781
50828
|
getExtentsCenter,
|
|
@@ -50787,6 +50834,7 @@ export {
|
|
|
50787
50834
|
getOriginalSize,
|
|
50788
50835
|
getRandomBetweenInclusive,
|
|
50789
50836
|
getRigExtentsWorld,
|
|
50837
|
+
getThumbnailCameraCFrame,
|
|
50790
50838
|
getUVtoIndexMap,
|
|
50791
50839
|
getUVtoIndicesMap,
|
|
50792
50840
|
getWorkerOnMessage,
|