roavatar-renderer 1.2.2 → 1.2.4
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 +107 -12
- package/dist/index.js +11659 -10348
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -107,6 +107,8 @@ export declare class AnimationTrack {
|
|
|
107
107
|
length: number;
|
|
108
108
|
looped: boolean;
|
|
109
109
|
priority: number;
|
|
110
|
+
shouldUpdateMotors: boolean;
|
|
111
|
+
updateFaceControls: boolean;
|
|
110
112
|
pOriginalWeight: number;
|
|
111
113
|
pTargetWeight: number;
|
|
112
114
|
pSpeed: number;
|
|
@@ -128,7 +130,8 @@ export declare class AnimationTrack {
|
|
|
128
130
|
* @deprecated, reset inside Animator instead
|
|
129
131
|
*/
|
|
130
132
|
resetMotorTransforms(): void;
|
|
131
|
-
renderPose(): void;
|
|
133
|
+
renderPose(updateMotors?: boolean): void;
|
|
134
|
+
updateMotors(): void;
|
|
132
135
|
setTime(time: number): void;
|
|
133
136
|
/**
|
|
134
137
|
* Remember to call tick() on each frame
|
|
@@ -313,6 +316,7 @@ export declare class AssetMeta {
|
|
|
313
316
|
rotation?: VecXYZ;
|
|
314
317
|
scale?: VecXYZ;
|
|
315
318
|
headShape?: number;
|
|
319
|
+
staticFacialAnimation?: boolean;
|
|
316
320
|
constructor();
|
|
317
321
|
clone(): AssetMeta;
|
|
318
322
|
toJson(): AssetMetaJson;
|
|
@@ -327,6 +331,7 @@ export declare type AssetMetaJson = {
|
|
|
327
331
|
order?: number | null;
|
|
328
332
|
puffiness?: number | null;
|
|
329
333
|
headShape?: "Invalid" | number;
|
|
334
|
+
staticFacialAnimation?: boolean;
|
|
330
335
|
};
|
|
331
336
|
|
|
332
337
|
export declare class AssetType {
|
|
@@ -441,6 +446,8 @@ export declare const AvatarType: {
|
|
|
441
446
|
[K in AvatarType]: AvatarType;
|
|
442
447
|
};
|
|
443
448
|
|
|
449
|
+
export declare function averageVec3(vecs: Vec3[]): Vec3;
|
|
450
|
+
|
|
444
451
|
export declare function barycentric(p: Vec3, triangle: Triangle): Vec3;
|
|
445
452
|
|
|
446
453
|
export declare function base64ToArrayBuffer(base64: string): ArrayBuffer;
|
|
@@ -546,6 +553,8 @@ export declare const BodyPartNameToEnum: {
|
|
|
546
553
|
[K in string]: number;
|
|
547
554
|
};
|
|
548
555
|
|
|
556
|
+
declare type Bounds = [Vec3, Vec3];
|
|
557
|
+
|
|
549
558
|
export declare const BrickColors: {
|
|
550
559
|
[K in number]: string;
|
|
551
560
|
};
|
|
@@ -556,8 +565,12 @@ export declare function browserSendMessage(data: {
|
|
|
556
565
|
[K in string]: string;
|
|
557
566
|
}): Promise<any>;
|
|
558
567
|
|
|
568
|
+
export declare function buildFaceKD(mesh: FileMesh): KDNode | null;
|
|
569
|
+
|
|
559
570
|
export declare function BuildJoints(self: RigData): void;
|
|
560
571
|
|
|
572
|
+
export declare function buildVertKD(mesh: FileMesh): KDNode | null;
|
|
573
|
+
|
|
561
574
|
export declare interface BundleDetails_Result {
|
|
562
575
|
bundleType: number;
|
|
563
576
|
bundledItems: {
|
|
@@ -843,9 +856,9 @@ export declare class FileMesh {
|
|
|
843
856
|
skinning: SKINNING;
|
|
844
857
|
facs?: FACS;
|
|
845
858
|
hsrAvis?: HSRAVIS;
|
|
846
|
-
_bounds?:
|
|
859
|
+
_bounds?: Bounds;
|
|
847
860
|
_size?: Vec3;
|
|
848
|
-
get bounds():
|
|
861
|
+
get bounds(): Bounds;
|
|
849
862
|
get size(): Vec3;
|
|
850
863
|
constructor();
|
|
851
864
|
clone(): FileMesh;
|
|
@@ -866,6 +879,7 @@ export declare class FileMesh {
|
|
|
866
879
|
*/
|
|
867
880
|
deleteVert(i: number): void;
|
|
868
881
|
removeDuplicateVertices(distance?: number): number;
|
|
882
|
+
removeFace(index: number): void;
|
|
869
883
|
basicSkin(boneNames: string[]): void;
|
|
870
884
|
getValidationIssue(): "subsetLengthMismatch" | undefined;
|
|
871
885
|
}
|
|
@@ -918,6 +932,8 @@ export declare const FLAGS: {
|
|
|
918
932
|
HAIR_IS_BODYPART: boolean;
|
|
919
933
|
BODYCOLOR3: boolean;
|
|
920
934
|
ENABLE_API_CACHE: boolean;
|
|
935
|
+
ENABLE_API_MESH_CACHE: boolean;
|
|
936
|
+
ENABLE_API_RBX_CACHE: boolean;
|
|
921
937
|
ROAVATAR_DATA_URL: string;
|
|
922
938
|
ROAVATAR_TRYON_PLACE: number;
|
|
923
939
|
ASSETS_PATH: string;
|
|
@@ -927,16 +943,25 @@ export declare const FLAGS: {
|
|
|
927
943
|
INFLATE_LAYERED_CLOTHING: number;
|
|
928
944
|
LAYERED_CLOTHING_ALGORITHM: "linear" | "linearnormal" | "linearnormal2" | "rbf";
|
|
929
945
|
RBF_PATCH_COUNT: number;
|
|
930
|
-
RBF_PATCH_DETAIL_SAMPLES:
|
|
931
|
-
RBF_PATCH_SHAPE_SAMPLES:
|
|
946
|
+
RBF_PATCH_DETAIL_SAMPLES: number;
|
|
947
|
+
RBF_PATCH_SHAPE_SAMPLES: number;
|
|
932
948
|
USE_VERTEX_COLOR: boolean;
|
|
933
949
|
USE_POST_PROCESSING: boolean;
|
|
934
950
|
POST_PROCESSING_IS_DOUBLE_SIZE: boolean;
|
|
935
951
|
GEAR_ENABLED: boolean;
|
|
952
|
+
AUDIO_ENABLED: boolean;
|
|
953
|
+
LEGACY_WELD_BEHAVIOR: boolean;
|
|
936
954
|
SHOW_SKELETON_HELPER: boolean;
|
|
937
955
|
UPDATE_SKELETON: boolean;
|
|
938
956
|
ANIMATE_SKELETON: boolean;
|
|
939
957
|
AUTO_SKIN_EVERYTHING: boolean;
|
|
958
|
+
USE_LOCAL_SKELETONDESC: boolean;
|
|
959
|
+
ENABLE_HSR: boolean;
|
|
960
|
+
HSR_SHOW_RAY: boolean;
|
|
961
|
+
HIDE_LAYERED_CLOTHING: boolean;
|
|
962
|
+
HSR_RAY_COUNT: number;
|
|
963
|
+
HSR_RAY_LENGTH: number;
|
|
964
|
+
CACHE_HSR_HITS: boolean;
|
|
940
965
|
SEARCH_FOR_STRING: string | undefined;
|
|
941
966
|
LOAD_TEST_PLACE: string | undefined;
|
|
942
967
|
};
|
|
@@ -1008,12 +1033,16 @@ export declare interface GetTopics_Result {
|
|
|
1008
1033
|
}[];
|
|
1009
1034
|
}
|
|
1010
1035
|
|
|
1036
|
+
export declare function getUVtoIndexMap(mesh: FileMesh): Map<number, number>;
|
|
1037
|
+
|
|
1011
1038
|
export declare function getUVtoVertMap(mesh: FileMesh): Map<number, FileMeshVertex[]>;
|
|
1012
1039
|
|
|
1013
1040
|
export declare function hashVec2(x: number, y: number): number;
|
|
1014
1041
|
|
|
1015
1042
|
export declare function hashVec3(x: number, y: number, z: number, distance: number): number;
|
|
1016
1043
|
|
|
1044
|
+
export declare function hashVec3Safe(a: number | bigint, b: number | bigint, c: number | bigint): bigint;
|
|
1045
|
+
|
|
1017
1046
|
export declare function hasSameVal(instance0: Instance, instance1: Instance, propertyName: string): boolean;
|
|
1018
1047
|
|
|
1019
1048
|
export declare function hasSameValFloat(instance0: Instance, instance1: Instance, propertyName: string): boolean;
|
|
@@ -1026,6 +1055,24 @@ export declare function hexToRgb(hex: string): {
|
|
|
1026
1055
|
b: number;
|
|
1027
1056
|
} | null;
|
|
1028
1057
|
|
|
1058
|
+
export declare class HSR {
|
|
1059
|
+
rayCount: number;
|
|
1060
|
+
rayLength: number;
|
|
1061
|
+
cullType: "front" | "back";
|
|
1062
|
+
phiAngle: number;
|
|
1063
|
+
mesh: FileMesh;
|
|
1064
|
+
inner: FileMesh;
|
|
1065
|
+
outer: FileMesh;
|
|
1066
|
+
meshCollider: MeshCollider;
|
|
1067
|
+
meshFaceKD?: KDNode | null;
|
|
1068
|
+
outerThresholds?: number[];
|
|
1069
|
+
innerHits?: number[];
|
|
1070
|
+
constructor(mesh: FileMesh, inner: FileMesh, outer: FileMesh);
|
|
1071
|
+
getRays(mesh: FileMesh, index: number): Ray_2[];
|
|
1072
|
+
calculateInnerHits(): number[];
|
|
1073
|
+
calculateCloseToCageThreshold(): void;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1029
1076
|
declare class HSRAVIS {
|
|
1030
1077
|
bitFlags: boolean[];
|
|
1031
1078
|
clone(): HSRAVIS;
|
|
@@ -1143,7 +1190,7 @@ export declare class Instance {
|
|
|
1143
1190
|
removeReferencedBy(instance: Instance): void;
|
|
1144
1191
|
addProperty(property: Property, value?: unknown): void;
|
|
1145
1192
|
fixPropertyName(name: string): string;
|
|
1146
|
-
setProperty(name: string, value: unknown): void;
|
|
1193
|
+
setProperty(name: string, value: unknown, supressEvents?: boolean): void;
|
|
1147
1194
|
HasProperty(name: string): boolean;
|
|
1148
1195
|
Property(name: string): unknown;
|
|
1149
1196
|
Prop(name: string): unknown;
|
|
@@ -1161,6 +1208,7 @@ export declare class Instance {
|
|
|
1161
1208
|
FindFirstChildOfClass(className: string): Instance | undefined;
|
|
1162
1209
|
FindLastChildOfClass(className: string): Instance | undefined;
|
|
1163
1210
|
AccessoryBuildWeld(): void;
|
|
1211
|
+
preRender(): void;
|
|
1164
1212
|
}
|
|
1165
1213
|
|
|
1166
1214
|
declare class InstanceWrapper {
|
|
@@ -1173,6 +1221,7 @@ declare class InstanceWrapper {
|
|
|
1173
1221
|
static register(): void;
|
|
1174
1222
|
created(): void;
|
|
1175
1223
|
destroy(): void;
|
|
1224
|
+
preRender(): void;
|
|
1176
1225
|
}
|
|
1177
1226
|
|
|
1178
1227
|
export declare interface Inventory_Result {
|
|
@@ -1461,13 +1510,22 @@ export declare const MaxPerAsset: {
|
|
|
1461
1510
|
[K in string]: number;
|
|
1462
1511
|
};
|
|
1463
1512
|
|
|
1464
|
-
export declare function mergeTargetWithReference(reference: FileMesh, target: FileMesh, targetSize: Vector3, targetCFrame: CFrame): number[];
|
|
1513
|
+
export declare function mergeTargetWithReference(reference: FileMesh, target: FileMesh, targetSize: Vector3, targetCFrame: CFrame, ignoredIndices?: number[]): number[];
|
|
1465
1514
|
|
|
1466
1515
|
export declare type MeshChunk = {
|
|
1467
1516
|
pos: Vec3;
|
|
1468
1517
|
indices: number[];
|
|
1469
1518
|
};
|
|
1470
1519
|
|
|
1520
|
+
declare class MeshCollider {
|
|
1521
|
+
mesh: FileMesh;
|
|
1522
|
+
octree: OctreeNode<number>;
|
|
1523
|
+
faceBounds: Bounds[];
|
|
1524
|
+
cullType: "front" | "back";
|
|
1525
|
+
constructor(mesh: FileMesh, octdepth?: number);
|
|
1526
|
+
raycast(ray: Ray_2): boolean;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1471
1529
|
export declare const MeshType: {
|
|
1472
1530
|
Brick: number;
|
|
1473
1531
|
Cylinder: number;
|
|
@@ -1500,6 +1558,8 @@ export declare function mountElement(container: HTMLDivElement): void;
|
|
|
1500
1558
|
|
|
1501
1559
|
export declare function multiply(v0: Vec3, v1: Vec3): Vec3;
|
|
1502
1560
|
|
|
1561
|
+
export declare function multiplyMatrixVector(m: Mat3x3, v: Vec3): Vec3;
|
|
1562
|
+
|
|
1503
1563
|
export declare interface NavigationMenuItems {
|
|
1504
1564
|
categories: {
|
|
1505
1565
|
category: string;
|
|
@@ -1614,6 +1674,31 @@ export declare class NumberSequenceKeypoint {
|
|
|
1614
1674
|
|
|
1615
1675
|
export declare const ObjectDescClassTypes: string[];
|
|
1616
1676
|
|
|
1677
|
+
declare class OctreeChild<T> {
|
|
1678
|
+
bounds: Bounds;
|
|
1679
|
+
data: T;
|
|
1680
|
+
constructor(bounds: Bounds, data: T);
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
declare class OctreeNode<T> {
|
|
1684
|
+
bounds: Bounds;
|
|
1685
|
+
children: OctreeChild<T>[];
|
|
1686
|
+
isEnd: boolean;
|
|
1687
|
+
ufr?: OctreeNode<T>;
|
|
1688
|
+
ufl?: OctreeNode<T>;
|
|
1689
|
+
ubr?: OctreeNode<T>;
|
|
1690
|
+
ubl?: OctreeNode<T>;
|
|
1691
|
+
lfr?: OctreeNode<T>;
|
|
1692
|
+
lfl?: OctreeNode<T>;
|
|
1693
|
+
lbr?: OctreeNode<T>;
|
|
1694
|
+
lbl?: OctreeNode<T>;
|
|
1695
|
+
constructor(bounds: Bounds);
|
|
1696
|
+
getDivisions(): (OctreeNode<T> | undefined)[];
|
|
1697
|
+
divide(): void;
|
|
1698
|
+
collide(func: (a: Bounds) => boolean): OctreeNode<T>[];
|
|
1699
|
+
collideRay(ray: Ray_2): OctreeNode<T>[];
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1617
1702
|
export declare function offsetMesh(mesh: FileMesh, cframe: CFrame): void;
|
|
1618
1703
|
|
|
1619
1704
|
export declare function offsetMeshWithRotation(mesh: FileMesh, cframe: CFrame): void;
|
|
@@ -1859,7 +1944,11 @@ export declare class Ray {
|
|
|
1859
1944
|
clone(): Ray;
|
|
1860
1945
|
}
|
|
1861
1946
|
|
|
1862
|
-
|
|
1947
|
+
declare class Ray_2 {
|
|
1948
|
+
origin: Vec3;
|
|
1949
|
+
end: Vec3;
|
|
1950
|
+
constructor(origin: Vec3, end: Vec3);
|
|
1951
|
+
}
|
|
1863
1952
|
|
|
1864
1953
|
/**
|
|
1865
1954
|
* This is a naive (think thats what its called) implementation of the RBF deformer, it is extremely slow
|
|
@@ -1884,14 +1973,13 @@ export declare class RBFDeformerPatch {
|
|
|
1884
1973
|
patchKD: KDNode | null;
|
|
1885
1974
|
patches: Patch[];
|
|
1886
1975
|
patchCenters: Vec3[];
|
|
1887
|
-
patchCenterIndices: number[];
|
|
1888
1976
|
nearestPatch: Uint16Array;
|
|
1889
1977
|
K: number;
|
|
1890
1978
|
patchCount: number;
|
|
1891
1979
|
epsilon: number;
|
|
1892
1980
|
affectBones: boolean;
|
|
1893
1981
|
id: number;
|
|
1894
|
-
constructor(refMesh: FileMesh, distMesh: FileMesh, mesh: FileMesh, ignoredIndices?: number[], patchCount?: number, detailsCount?:
|
|
1982
|
+
constructor(refMesh: FileMesh, distMesh: FileMesh, mesh: FileMesh, ignoredIndices?: number[], patchCount?: number, detailsCount?: number, importantsCount?: number);
|
|
1895
1983
|
solveAsync(): Promise<void>;
|
|
1896
1984
|
deform(i: number): Vec3;
|
|
1897
1985
|
deformMesh(): void;
|
|
@@ -1950,6 +2038,9 @@ export declare class RBXRenderer {
|
|
|
1950
2038
|
static loadingIconStyle?: HTMLStyleElement;
|
|
1951
2039
|
static plane?: THREE.Mesh;
|
|
1952
2040
|
static shadowPlane?: THREE.Mesh;
|
|
2041
|
+
static ambientLight?: THREE.AmbientLight;
|
|
2042
|
+
static directionalLight?: THREE.DirectionalLight;
|
|
2043
|
+
static directionalLight2?: THREE.DirectionalLight;
|
|
1953
2044
|
static boilerplateSetup(): Promise<void>;
|
|
1954
2045
|
/**Fully sets up renderer with scene, camera and frame rendering*/
|
|
1955
2046
|
static fullSetup(includeScene?: boolean, includeControls?: boolean): Promise<void>;
|
|
@@ -2280,12 +2371,16 @@ export declare class SoundWrapper extends InstanceWrapper {
|
|
|
2280
2371
|
get data(): SoundWrapperData;
|
|
2281
2372
|
created(): void;
|
|
2282
2373
|
_updateVolume(): void;
|
|
2374
|
+
playSource(): void;
|
|
2283
2375
|
Play(): void;
|
|
2284
2376
|
Stop(): void;
|
|
2285
2377
|
}
|
|
2286
2378
|
|
|
2287
2379
|
declare class SoundWrapperData {
|
|
2288
|
-
|
|
2380
|
+
audioContext: AudioContext | undefined;
|
|
2381
|
+
gainNode: GainNode | undefined;
|
|
2382
|
+
buffer: AudioBuffer | undefined;
|
|
2383
|
+
playingSource: AudioBufferSourceNode | undefined;
|
|
2289
2384
|
}
|
|
2290
2385
|
|
|
2291
2386
|
export declare function specialClamp(value: number, min: number, max: number): number;
|
|
@@ -2328,7 +2423,7 @@ export declare const ToRemoveBeforeBundleType: {
|
|
|
2328
2423
|
|
|
2329
2424
|
export declare function transferSkeleton(to: FileMesh, from: FileMesh): void;
|
|
2330
2425
|
|
|
2331
|
-
export declare function traverseRigCFrame(instance: Instance): CFrame;
|
|
2426
|
+
export declare function traverseRigCFrame(instance: Instance, includeTransform?: boolean, applyRoot?: boolean): CFrame;
|
|
2332
2427
|
|
|
2333
2428
|
export declare function traverseRigInstance(instance: Instance): Instance[];
|
|
2334
2429
|
|