roavatar-renderer 1.5.19 → 1.6.1
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 +216 -19
- package/dist/index.js +14837 -9085
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EffectComposer } from '
|
|
1
|
+
import { EffectComposer } from 'postprocessing';
|
|
2
2
|
import { OrbitControls } from 'three/examples/jsm/Addons.js';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
|
|
@@ -252,7 +252,7 @@ export declare class AnimatorWrapper extends InstanceWrapper {
|
|
|
252
252
|
loadAvatarAnimation(id: bigint, isEmote?: boolean, forceLoop?: boolean): Promise<Response | undefined>;
|
|
253
253
|
/**
|
|
254
254
|
* Switches to new animation
|
|
255
|
-
* @param name Animation name, such as "idle", "walk", "emote.1234" or "id.1234"
|
|
255
|
+
* @param name Animation name, such as "idle", "walk", "emote.1234" or "id.1234", can also specify sub animation like "idle:0"
|
|
256
256
|
* @param type
|
|
257
257
|
* @returns If animation sucessfully played
|
|
258
258
|
*/
|
|
@@ -273,6 +273,7 @@ declare class AnimatorWrapperData {
|
|
|
273
273
|
toolTracks: AnimationTrack[];
|
|
274
274
|
toolAddedConnection?: Connection;
|
|
275
275
|
toolRemovedConnection?: Connection;
|
|
276
|
+
forceTransitionTime: number | undefined;
|
|
276
277
|
}
|
|
277
278
|
|
|
278
279
|
export declare const animNamesR15: AnimationSet;
|
|
@@ -315,6 +316,7 @@ export declare const API: {
|
|
|
315
316
|
WearOutfit: (auth: Authentication, outfit: Outfit, onlyItems: boolean) => Promise<[boolean, boolean]>;
|
|
316
317
|
SaveOutfitNoRetry: (auth: Authentication, outfit: Outfit) => Promise<Response>;
|
|
317
318
|
GetAvatarDetails: (userId: number) => Promise<Response | Outfit>;
|
|
319
|
+
GetUserAvatarModel: (userId: number) => Promise<Response | OutfitModel>;
|
|
318
320
|
GetAvatarModel: () => Promise<Response | OutfitModel>;
|
|
319
321
|
UpdateAvatarModel: (auth: Authentication, model: OutfitModel, updateTypes?: AvatarModelUpdateType[]) => Promise<Response>;
|
|
320
322
|
GetOutfitModel: (id: number | string, creatorId: number) => Promise<Response | OutfitModel>;
|
|
@@ -683,6 +685,73 @@ export declare function awaitTimeout<T>(promise: Promise<T>, time?: number): Pro
|
|
|
683
685
|
*/
|
|
684
686
|
export declare function awaitTimeoutThrows<T>(promise: Promise<T>, time?: number): Promise<T>;
|
|
685
687
|
|
|
688
|
+
export declare class BackgroundRenderer {
|
|
689
|
+
auth: Authentication;
|
|
690
|
+
avatarCyclorama?: Instance;
|
|
691
|
+
backgroundData?: Instance;
|
|
692
|
+
backgroundId?: number;
|
|
693
|
+
lastLoadedBackgroundId?: number;
|
|
694
|
+
currentlyUpdating: boolean;
|
|
695
|
+
hasNewUpdate: boolean;
|
|
696
|
+
affectSceneAppearance: boolean;
|
|
697
|
+
cameraAffectsTransparency: boolean;
|
|
698
|
+
lastFrameTime: number;
|
|
699
|
+
animationInterval?: NodeJS.Timeout;
|
|
700
|
+
animationFPS: number;
|
|
701
|
+
renderScene: RBXRendererScene;
|
|
702
|
+
private _renderSceneCompiledConnection?;
|
|
703
|
+
private _renderSceneFailedConnection?;
|
|
704
|
+
hasFiredFullyRendered: boolean;
|
|
705
|
+
/**Event is fired if a new outfit failed to load (specifically the Instance tree, not the rendering part)
|
|
706
|
+
*
|
|
707
|
+
* Simple: Fired when, Instance tree = fail
|
|
708
|
+
* @returns BackgroundRendererErrorType
|
|
709
|
+
*/
|
|
710
|
+
onError: Event_2;
|
|
711
|
+
/**Event is fired if a new outfit successfully loaded (specifically the Instance tree, not the rendering part)
|
|
712
|
+
*
|
|
713
|
+
* Simple: Fired when, Instance tree = done
|
|
714
|
+
* @returns void
|
|
715
|
+
*/
|
|
716
|
+
onSuccess: Event_2;
|
|
717
|
+
/**Event is fired when all the renderDescs have been compiled, if any renderDescs fail to render this wil never be fired (can only be fired after Instance tree is done)
|
|
718
|
+
*
|
|
719
|
+
* Simple: Fired when, Instance tree = done & Rendering = done (AKA everything)
|
|
720
|
+
* @returns void
|
|
721
|
+
*/
|
|
722
|
+
onRenderSuccess: Event_2;
|
|
723
|
+
/**Event is fired if a renderDesc fails to compile, it can be fired multiple times
|
|
724
|
+
*
|
|
725
|
+
* Simple: Fired when, Rendering = fail
|
|
726
|
+
* @returns void
|
|
727
|
+
*/
|
|
728
|
+
onRenderError: Event_2;
|
|
729
|
+
constructor(auth: Authentication, backgroundId?: number, renderScene?: RBXRendererScene);
|
|
730
|
+
/**Updates background to match the set id */
|
|
731
|
+
setBackground(id?: number): void;
|
|
732
|
+
_updateBackground(): Promise<void>;
|
|
733
|
+
_loadBackgroundData(): Promise<void>;
|
|
734
|
+
_loadAvatarCyclorama(): Promise<void>;
|
|
735
|
+
_applyBackgroundData(): void;
|
|
736
|
+
/**
|
|
737
|
+
* Starts updating the animation of the background per frame
|
|
738
|
+
*/
|
|
739
|
+
startAnimating(): void;
|
|
740
|
+
/**
|
|
741
|
+
* Updates the animation once
|
|
742
|
+
*/
|
|
743
|
+
animateOnce(): void;
|
|
744
|
+
/**
|
|
745
|
+
* Stops updating the animation of the background per frame
|
|
746
|
+
*/
|
|
747
|
+
stopAnimating(): void;
|
|
748
|
+
fireFullyRenderedIfNeeded(): void;
|
|
749
|
+
/**Calls destroy on the background, stops animating and disconnects connections. The OutfitRenderer should not be interacted with after this */
|
|
750
|
+
destroy(): void;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export declare type BackgroundRendererErrorType = "avatarCyclorama" | "backgroundData";
|
|
754
|
+
|
|
686
755
|
/**
|
|
687
756
|
* @category Mesh
|
|
688
757
|
*/
|
|
@@ -943,6 +1012,8 @@ declare class Cache_2<K, V> {
|
|
|
943
1012
|
}
|
|
944
1013
|
export { Cache_2 as Cache }
|
|
945
1014
|
|
|
1015
|
+
export declare function calculateBaseDistanceToCamera(fieldOfViewRad: number, minExtent: Vector3, maxExtent: Vector3, marginScale: number): number;
|
|
1016
|
+
|
|
946
1017
|
/**
|
|
947
1018
|
* @category Mesh
|
|
948
1019
|
*/
|
|
@@ -950,6 +1021,39 @@ export declare function calculateMagnitude3D(x: number, y: number, z: number): n
|
|
|
950
1021
|
|
|
951
1022
|
export declare function calculateMotor6Doffset(motor: Instance, includeTransform?: boolean): CFrame;
|
|
952
1023
|
|
|
1024
|
+
export declare type CameraOptions = {
|
|
1025
|
+
optFieldOfView?: number;
|
|
1026
|
+
optFieldOfViewForDistanceScale?: number;
|
|
1027
|
+
minExtent: Vector3;
|
|
1028
|
+
maxExtent: Vector3;
|
|
1029
|
+
extentScale: number;
|
|
1030
|
+
optCameraDistanceScale?: number;
|
|
1031
|
+
targetCFrame: CFrame;
|
|
1032
|
+
optCameraXRot?: number;
|
|
1033
|
+
optCameraYRot?: number;
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1036
|
+
/**@category DataModelEnum */
|
|
1037
|
+
export declare const CameraType: {
|
|
1038
|
+
Fixed: number;
|
|
1039
|
+
Attach: number;
|
|
1040
|
+
Watch: number;
|
|
1041
|
+
Track: number;
|
|
1042
|
+
Follow: number;
|
|
1043
|
+
Custom: number;
|
|
1044
|
+
Scriptable: number;
|
|
1045
|
+
Orbital: number;
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* @category InstanceWrapper
|
|
1050
|
+
*/
|
|
1051
|
+
export declare class CameraWrapper extends InstanceWrapper {
|
|
1052
|
+
static className: string;
|
|
1053
|
+
static requiredProperties: string[];
|
|
1054
|
+
setup(): void;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
953
1057
|
/** @category Outfit */
|
|
954
1058
|
export declare const CatalogBundleTypes: string[];
|
|
955
1059
|
|
|
@@ -968,6 +1072,7 @@ export declare class CFrame {
|
|
|
968
1072
|
Position: Vec3;
|
|
969
1073
|
Orientation: Vec3;
|
|
970
1074
|
constructor(x?: number, y?: number, z?: number);
|
|
1075
|
+
static Angles(x: number, y: number, z: number): CFrame;
|
|
971
1076
|
clone(): CFrame;
|
|
972
1077
|
getTHREEMatrix(): THREE.Matrix4;
|
|
973
1078
|
getMatrix(): THREE.Matrix4Tuple;
|
|
@@ -977,8 +1082,12 @@ export declare class CFrame {
|
|
|
977
1082
|
upVector(): Vec3;
|
|
978
1083
|
static lookAt(eye: Vec3, target: Vec3, up?: Vec3): CFrame;
|
|
979
1084
|
static fromEulerAngles(rx: number, ry: number, rz: number, order?: THREE.EulerOrder): CFrame;
|
|
1085
|
+
rotationOnly(): CFrame;
|
|
1086
|
+
toEulerAngles(order?: THREE.EulerOrder): Vec3;
|
|
980
1087
|
inverse(): CFrame;
|
|
981
1088
|
multiply(cf: CFrame): CFrame;
|
|
1089
|
+
multiplyVector(vector: Vector3): Vector3;
|
|
1090
|
+
removeNaN(newValue?: number): CFrame;
|
|
982
1091
|
isSame(other: CFrame): boolean;
|
|
983
1092
|
}
|
|
984
1093
|
|
|
@@ -1010,6 +1119,7 @@ export declare class Color3 {
|
|
|
1010
1119
|
clone(): Color3;
|
|
1011
1120
|
isSame(other: Color3): boolean;
|
|
1012
1121
|
toColor3uint8(): Color3uint8;
|
|
1122
|
+
toArray(): Vec3;
|
|
1013
1123
|
multiply(vec3: Color3): Color3;
|
|
1014
1124
|
divide(vec3: Color3): Color3;
|
|
1015
1125
|
add(vec3: Color3): Color3;
|
|
@@ -1026,6 +1136,7 @@ export declare class Color3uint8 {
|
|
|
1026
1136
|
constructor(R?: number, G?: number, B?: number);
|
|
1027
1137
|
clone(): Color3uint8;
|
|
1028
1138
|
toColor3(): Color3;
|
|
1139
|
+
toArray(): Vec3;
|
|
1029
1140
|
}
|
|
1030
1141
|
|
|
1031
1142
|
/**
|
|
@@ -1066,6 +1177,21 @@ export declare class Connection {
|
|
|
1066
1177
|
Disconnect(): void;
|
|
1067
1178
|
}
|
|
1068
1179
|
|
|
1180
|
+
export declare const CONSTANTS_CameraPresetsUtility: {
|
|
1181
|
+
GOLDEN_RATIO: number;
|
|
1182
|
+
UPVECTOR_ORENTATION_TRESHOLD: number;
|
|
1183
|
+
AVATAR_ROTATION_DEGREE: number;
|
|
1184
|
+
};
|
|
1185
|
+
|
|
1186
|
+
export declare const CONSTANTS_CameraUtility: {
|
|
1187
|
+
DefaultHeadMarginScale: number;
|
|
1188
|
+
DefaultBodyMarginScale: number;
|
|
1189
|
+
DefaultBodyPartMarginScale: number;
|
|
1190
|
+
XRotForFullBody: number;
|
|
1191
|
+
XRotForCloseup: number;
|
|
1192
|
+
DistanceScaleForFullBody: number;
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1069
1195
|
/**
|
|
1070
1196
|
* @category InstanceWrapper
|
|
1071
1197
|
*/
|
|
@@ -1139,6 +1265,8 @@ export declare class COREMESH {
|
|
|
1139
1265
|
|
|
1140
1266
|
export declare function createContentMap(): void;
|
|
1141
1267
|
|
|
1268
|
+
export declare function createThumbnailCamera(): Instance;
|
|
1269
|
+
|
|
1142
1270
|
/**
|
|
1143
1271
|
* @category Mesh
|
|
1144
1272
|
*/
|
|
@@ -1633,12 +1761,26 @@ export declare function generateOutfitModelThumbnail(auth: Authentication, outfi
|
|
|
1633
1761
|
* console.log(result)
|
|
1634
1762
|
* ```
|
|
1635
1763
|
*/
|
|
1636
|
-
export declare function generateOutfitThumbnail(auth: Authentication, outfit: Outfit, size?: Vec2, type?: ThumbnailType, quality?: number, gltfAutoDownload?: boolean, includeAnimations?: boolean, renderSceneParam?: RBXRendererScene): Promise<ThumbnailResult>;
|
|
1764
|
+
export declare function generateOutfitThumbnail(auth: Authentication, outfit: Outfit | OutfitModel, size?: Vec2, type?: ThumbnailType, quality?: number, gltfAutoDownload?: boolean, includeAnimations?: boolean, renderSceneParam?: RBXRendererScene, thumbnailCameraType?: ThumbnailCameraType): Promise<ThumbnailResult>;
|
|
1637
1765
|
|
|
1638
1766
|
export declare function generateUUIDv4(): string;
|
|
1639
1767
|
|
|
1640
1768
|
export declare function GetAttachedPart(accessory: Instance, rig: Instance): Instance | undefined;
|
|
1641
1769
|
|
|
1770
|
+
export declare function getAvatarCameraCFrame(character: Instance, applyEmote?: () => void, isFallbackEmoteApplied?: boolean, fieldOfViewDeg?: number, cameraOptionsOverride?: Partial<CameraOptions>): Instance | undefined;
|
|
1771
|
+
|
|
1772
|
+
export declare function getCameraCFrame(targetCFrame: CFrame, relativePos: Vector3): CFrame;
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* Calculates the CFrame the camera should be at when generating a customized avatar thumbnail
|
|
1776
|
+
* @param rig Character
|
|
1777
|
+
* @param fov Customized fov
|
|
1778
|
+
* @param yRot Customized yRot
|
|
1779
|
+
* @returns Thumbnail camera cframe
|
|
1780
|
+
* @category ThumbnailGenerator
|
|
1781
|
+
*/
|
|
1782
|
+
export declare function getCameraCFrameForAvatarCustomized(rig: Instance, fov: number, yRot: number): CFrame | undefined;
|
|
1783
|
+
|
|
1642
1784
|
/**
|
|
1643
1785
|
* @deprecated Use getThumbnailCameraCFrame instead
|
|
1644
1786
|
* @param rig
|
|
@@ -1653,11 +1795,12 @@ export declare function getCameraCFrameForAvatarNonCustomized(rig: Instance): CF
|
|
|
1653
1795
|
* @param yRot Customized yRot
|
|
1654
1796
|
* @param distance Customized distanceScale
|
|
1655
1797
|
* @returns Thumbnail camera cframe
|
|
1656
|
-
* @deprecated Use new Thumbnails category instead
|
|
1657
1798
|
* @category ThumbnailGenerator
|
|
1658
1799
|
*/
|
|
1659
1800
|
export declare function getCameraCFrameForHeadshotCustomized(rig: Instance, fov: number, yRot: number, distance: number): CFrame | undefined;
|
|
1660
1801
|
|
|
1802
|
+
export declare function getCharacterTorsoCFrame(character: Instance): CFrame;
|
|
1803
|
+
|
|
1661
1804
|
/**
|
|
1662
1805
|
* @category Mesh
|
|
1663
1806
|
*/
|
|
@@ -1678,8 +1821,12 @@ export declare function getExtentsForParts(parts: Instance[], includeTransform?:
|
|
|
1678
1821
|
|
|
1679
1822
|
export declare function getExtentsWorld(rig: Instance): [Vector3, Vector3];
|
|
1680
1823
|
|
|
1824
|
+
export declare function getFullBodyCameraCFrame(character: Instance, applyEmote?: () => void, isFallbackEmoteApplied?: boolean, fieldOfViewDeg?: number, characterInitialCFrame?: CFrame, autoZoom?: boolean): CFrame | undefined;
|
|
1825
|
+
|
|
1681
1826
|
export declare function getHeadExtents(rig: Instance): [Vector3, Vector3] | undefined;
|
|
1682
1827
|
|
|
1828
|
+
export declare function getHeadshotCameraCFrame(character: Instance, applyEmote?: () => void, isFallbackEmoteApplied?: boolean, fieldOfViewDeg?: number, cameraOptionsOverride?: Partial<CameraOptions>): Instance | undefined;
|
|
1829
|
+
|
|
1683
1830
|
/**@category API */
|
|
1684
1831
|
export declare interface GetInfoForId_Result {
|
|
1685
1832
|
"description": string;
|
|
@@ -2041,6 +2188,7 @@ export declare class Instance {
|
|
|
2041
2188
|
FindFirstChildOfClass(className: string): Instance | undefined;
|
|
2042
2189
|
FindLastChildOfClass(className: string): Instance | undefined;
|
|
2043
2190
|
IsA(className: string): boolean;
|
|
2191
|
+
IsDescendantOf(instance: Instance): boolean;
|
|
2044
2192
|
preRender(): void;
|
|
2045
2193
|
}
|
|
2046
2194
|
|
|
@@ -2055,6 +2203,7 @@ export declare class InstanceWrapper {
|
|
|
2055
2203
|
static requiredProperties: string[];
|
|
2056
2204
|
instance: Instance;
|
|
2057
2205
|
constructor(instance: Instance);
|
|
2206
|
+
addProp(name: string, type: number, value: unknown): void;
|
|
2058
2207
|
setup(): void;
|
|
2059
2208
|
static(): typeof InstanceWrapper;
|
|
2060
2209
|
static IsA(className: string): any;
|
|
@@ -2242,7 +2391,7 @@ export declare class LocalOutfit {
|
|
|
2242
2391
|
constructor(outfit: Outfit);
|
|
2243
2392
|
toJson(): LocalOutfitJson;
|
|
2244
2393
|
fromJson(data: LocalOutfitJson): this;
|
|
2245
|
-
update(
|
|
2394
|
+
update(outfitModel: Outfit | OutfitModel): void;
|
|
2246
2395
|
/**
|
|
2247
2396
|
* @deprecated Use toOutfitModel() instead
|
|
2248
2397
|
*/
|
|
@@ -2869,7 +3018,7 @@ export declare const OutfitOrigin: {
|
|
|
2869
3018
|
*
|
|
2870
3019
|
* const outfitRenderer = new OutfitRenderer(auth, outfit, renderScene)
|
|
2871
3020
|
* outfitRenderer.startAnimating()
|
|
2872
|
-
* outfitRenderer.setMainAnimation("
|
|
3021
|
+
* outfitRenderer.setMainAnimation("id.1234") //animation with id 1234, check documentation for other possible values
|
|
2873
3022
|
*
|
|
2874
3023
|
* outfitRenderer.onRenderSuccess.Connect(() => {
|
|
2875
3024
|
* //handle Instance tree + renderDesc being successfuly
|
|
@@ -2894,13 +3043,15 @@ export declare const OutfitOrigin: {
|
|
|
2894
3043
|
*/
|
|
2895
3044
|
export declare class OutfitRenderer {
|
|
2896
3045
|
auth: Authentication;
|
|
3046
|
+
outfitModel?: OutfitModel;
|
|
2897
3047
|
outfit: Outfit;
|
|
2898
3048
|
currentRig?: Instance; /**Instance for the Model of the current outfit */
|
|
2899
3049
|
currentRigType: AvatarType;
|
|
2900
3050
|
doCameraUpdateOnLoad: boolean; /**Makes camera update when new avatar has loaded */
|
|
2901
3051
|
doCameraUpdate: boolean; /**Does camera update every frame */
|
|
2902
|
-
doAddInstance: boolean; /**If outfitRenderer should call RBXRenderer.addInstance() */
|
|
3052
|
+
doAddInstance: boolean; /**If outfitRenderer should call RBXRenderer.addInstance(), setting this to false will make OutfitRenderer return success early */
|
|
2903
3053
|
forceAnimationLoop: boolean; /**If future loaded animations should be set to loop */
|
|
3054
|
+
backgroundRenderer: BackgroundRenderer;
|
|
2904
3055
|
currentlyChangingRig: boolean;
|
|
2905
3056
|
currentlyUpdating: boolean;
|
|
2906
3057
|
hasNewUpdate: boolean;
|
|
@@ -2912,6 +3063,7 @@ export declare class OutfitRenderer {
|
|
|
2912
3063
|
renderScene: RBXRendererScene;
|
|
2913
3064
|
private _renderSceneCompiledConnection?;
|
|
2914
3065
|
private _renderSceneFailedConnection?;
|
|
3066
|
+
hasFiredFullyRendered: boolean;
|
|
2915
3067
|
/**Event is fired if a new outfit failed to load (specifically the Instance tree, not the rendering part)
|
|
2916
3068
|
*
|
|
2917
3069
|
* Simple: Fired when, Instance tree = fail
|
|
@@ -2938,13 +3090,16 @@ export declare class OutfitRenderer {
|
|
|
2938
3090
|
* @returns void
|
|
2939
3091
|
*/
|
|
2940
3092
|
onRenderError: Event_2;
|
|
3093
|
+
get humanoid(): Instance | undefined;
|
|
3094
|
+
get animator(): Instance | undefined;
|
|
3095
|
+
get animatorW(): AnimatorWrapper | undefined;
|
|
2941
3096
|
/**
|
|
2942
3097
|
* Creates a new OutfitRenderer which makes it easy to render outfits
|
|
2943
3098
|
* @param auth The authentication object, you should have one you use for everything
|
|
2944
3099
|
* @param outfit The outfit you want to render, it can be updated later by calling setOutfit()
|
|
2945
3100
|
* @param renderScene The scene the outfit should be rendered in
|
|
2946
3101
|
*/
|
|
2947
|
-
constructor(auth: Authentication, outfit: Outfit, renderScene?: RBXRendererScene);
|
|
3102
|
+
constructor(auth: Authentication, outfit: Outfit | OutfitModel, renderScene?: RBXRendererScene);
|
|
2948
3103
|
/**
|
|
2949
3104
|
* Updates the current rig, called internally by _updateOutfit()
|
|
2950
3105
|
*/
|
|
@@ -2957,6 +3112,10 @@ export declare class OutfitRenderer {
|
|
|
2957
3112
|
* Updates the current outfit being rendered
|
|
2958
3113
|
*/
|
|
2959
3114
|
setOutfit(outfit: Outfit): void;
|
|
3115
|
+
/**
|
|
3116
|
+
* Updates the current outfitModel being rendered
|
|
3117
|
+
*/
|
|
3118
|
+
setOutfitModel(outfitModel: OutfitModel): void;
|
|
2960
3119
|
/**
|
|
2961
3120
|
* Centers camera on avatar
|
|
2962
3121
|
*/
|
|
@@ -2973,9 +3132,15 @@ export declare class OutfitRenderer {
|
|
|
2973
3132
|
* Stops updating the animation of the outfit per frame
|
|
2974
3133
|
*/
|
|
2975
3134
|
stopAnimating(): void;
|
|
3135
|
+
/**
|
|
3136
|
+
* Checks if the provided animation set is loaded
|
|
3137
|
+
* @param name The name of the animation, for example "idle", "run", but NOT "emote.1234" or "id.1234" as they are not in the animation set
|
|
3138
|
+
* @returns If the animation is loaded
|
|
3139
|
+
*/
|
|
3140
|
+
hasAnimationSetAnimation(name: string): boolean;
|
|
2976
3141
|
/**
|
|
2977
3142
|
* Sets the current animation being played
|
|
2978
|
-
* @param name The name of the animation, for example "idle", "run", "emote.1234" or "
|
|
3143
|
+
* @param name The name of the animation, for example "idle", "run", "emote.1234" or "id.1234"
|
|
2979
3144
|
* @returns If the animation started playing, it may start playing later if it has been queued despite returning false
|
|
2980
3145
|
*/
|
|
2981
3146
|
setMainAnimation(name: string): Promise<boolean>;
|
|
@@ -3011,6 +3176,16 @@ export declare const ParticleEmitterShapeInOut: {
|
|
|
3011
3176
|
InAndOut: number;
|
|
3012
3177
|
};
|
|
3013
3178
|
|
|
3179
|
+
/**
|
|
3180
|
+
* @category InstanceWrapper
|
|
3181
|
+
*/
|
|
3182
|
+
export declare class ParticleEmitterWrapper extends InstanceWrapper {
|
|
3183
|
+
static className: string;
|
|
3184
|
+
static requiredProperties: string[];
|
|
3185
|
+
setup(): void;
|
|
3186
|
+
Emit(count?: number): void;
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3014
3189
|
/**@category DataModelEnum */
|
|
3015
3190
|
export declare const ParticleFlipbookLayout: {
|
|
3016
3191
|
None: number;
|
|
@@ -3133,6 +3308,10 @@ declare class QuantizedTransform {
|
|
|
3133
3308
|
clone(): QuantizedTransform;
|
|
3134
3309
|
}
|
|
3135
3310
|
|
|
3311
|
+
export declare const R15BodyPartNames: string[];
|
|
3312
|
+
|
|
3313
|
+
export declare const R6BodyPartNames: string[];
|
|
3314
|
+
|
|
3136
3315
|
export declare function rad(degrees: number): number;
|
|
3137
3316
|
|
|
3138
3317
|
/**
|
|
@@ -3261,23 +3440,27 @@ export declare class RBXRenderer {
|
|
|
3261
3440
|
static scenes: RBXRendererScene[];
|
|
3262
3441
|
static get firstScene(): RBXRendererScene;
|
|
3263
3442
|
/**@deprecated This can only get the first renderScene's scene */
|
|
3264
|
-
static get scene(): THREE.Scene
|
|
3443
|
+
static get scene(): THREE.Scene<THREE.Object3DEventMap>;
|
|
3265
3444
|
/**@deprecated This can only get the first renderScene's camera */
|
|
3266
3445
|
static get camera(): THREE.PerspectiveCamera;
|
|
3267
3446
|
/**@deprecated This can only get the first renderScene's controls */
|
|
3268
|
-
static get controls(): OrbitControls | undefined;
|
|
3447
|
+
static get controls(): OrbitControls<THREE.Camera> | undefined;
|
|
3269
3448
|
static renderer?: THREE.WebGLRenderer;
|
|
3270
3449
|
static resolution: [number, number];
|
|
3271
|
-
static
|
|
3450
|
+
static backgroundColor: THREE.ColorRepresentation;
|
|
3451
|
+
/**@deprecated Use backgroundColor instead */
|
|
3452
|
+
static get backgroundColorHex(): number;
|
|
3453
|
+
/**@deprecated Use backgroundColor instead */
|
|
3454
|
+
static set backgroundColorHex(val: number);
|
|
3272
3455
|
static backgroundTransparent: boolean;
|
|
3273
3456
|
static createLoadingIcon: boolean;
|
|
3274
3457
|
static canvasContainer: HTMLDivElement;
|
|
3275
3458
|
static loadingIcon?: HTMLSpanElement;
|
|
3276
3459
|
static loadingIconStyle?: HTMLStyleElement;
|
|
3277
3460
|
/**@deprecated This can only get the first renderScene's plane */
|
|
3278
|
-
static get plane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined;
|
|
3461
|
+
static get plane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap> | undefined;
|
|
3279
3462
|
/**@deprecated This can only get the first renderScene's shadowPlane */
|
|
3280
|
-
static get shadowPlane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined;
|
|
3463
|
+
static get shadowPlane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap> | undefined;
|
|
3281
3464
|
/**@deprecated This can only get the first renderScene's ambientLight */
|
|
3282
3465
|
static get ambientLight(): THREE.AmbientLight | undefined;
|
|
3283
3466
|
/**@deprecated This can only get the first renderScene's directionalLight */
|
|
@@ -3305,15 +3488,15 @@ export declare class RBXRenderer {
|
|
|
3305
3488
|
static setupLostContextHandler(): void;
|
|
3306
3489
|
/**Sets up a basic scene with lighting
|
|
3307
3490
|
* @param lightingType "WellLit" is the default lighting for RoAvatar, "Thumbnail" tries to match the Roblox thumbnail lighting
|
|
3308
|
-
* @param
|
|
3491
|
+
* @param backgroundColor is the color code for the background color, for example 0x2b2d33
|
|
3309
3492
|
*/
|
|
3310
|
-
static setupScene(lightingType?: "WellLit" | "Thumbnail",
|
|
3493
|
+
static setupScene(lightingType?: "WellLit" | "Thumbnail", backgroundColorVal?: THREE.ColorRepresentation, renderScene?: RBXRendererScene): void;
|
|
3311
3494
|
/**Sets up orbit controls */
|
|
3312
3495
|
static setupControls(renderScene?: RBXRendererScene): void;
|
|
3313
3496
|
/**
|
|
3314
|
-
* @param
|
|
3497
|
+
* @param color example: 0x2b2d33 which is the default
|
|
3315
3498
|
*/
|
|
3316
|
-
static setBackgroundColor(
|
|
3499
|
+
static setBackgroundColor(color: THREE.ColorRepresentation): void;
|
|
3317
3500
|
/**
|
|
3318
3501
|
* Sets the background and ground's visibility, but not the shadowPlane
|
|
3319
3502
|
* @param transparent If the background and ground should be transparent
|
|
@@ -3352,7 +3535,7 @@ export declare class RBXRenderer {
|
|
|
3352
3535
|
*/
|
|
3353
3536
|
static getRenderer(): THREE.WebGLRenderer | undefined;
|
|
3354
3537
|
/**@deprecated This can only get the first renderScene's scene */
|
|
3355
|
-
static getScene(): THREE.Scene
|
|
3538
|
+
static getScene(): THREE.Scene<THREE.Object3DEventMap>;
|
|
3356
3539
|
/**
|
|
3357
3540
|
* @deprecated Superseded by RBXRendererScene.exportGLTF()
|
|
3358
3541
|
* This function is unstable and can throw errors, but might work
|
|
@@ -3670,6 +3853,14 @@ export declare interface Search_Result {
|
|
|
3670
3853
|
}[];
|
|
3671
3854
|
}
|
|
3672
3855
|
|
|
3856
|
+
export declare function setupAccessoryCamera(accessoryModel: Instance, camera: Instance): void;
|
|
3857
|
+
|
|
3858
|
+
export declare function setupBodyPartCamera(mannequin: Instance, faceRight: boolean, focusPartNames: string[], camera: Instance): void;
|
|
3859
|
+
|
|
3860
|
+
export declare function setupCamera(camera: Instance, cameraOptions: CameraOptions): void;
|
|
3861
|
+
|
|
3862
|
+
export declare function setupHeadCamera(headModel: Instance, camera: Instance): void;
|
|
3863
|
+
|
|
3673
3864
|
/**
|
|
3674
3865
|
* Gives a scene the default appearance for thumbnails
|
|
3675
3866
|
* @param renderScene RBXRenderScene to setup
|
|
@@ -3780,6 +3971,11 @@ export declare const StringBufferProperties: string[];
|
|
|
3780
3971
|
|
|
3781
3972
|
declare type ThreePoseCorrective = Vec3;
|
|
3782
3973
|
|
|
3974
|
+
/**
|
|
3975
|
+
* @deprecated Use new Thumbnails category instead
|
|
3976
|
+
* @category ThumbnailGenerator */
|
|
3977
|
+
export declare type ThumbnailCameraType = "default" | "avatarHeadshot" | "avatarFullbody" | "fullbody";
|
|
3978
|
+
|
|
3783
3979
|
export declare class ThumbnailCustomization {
|
|
3784
3980
|
thumbnailType: number;
|
|
3785
3981
|
emoteAssetId: number;
|
|
@@ -3985,6 +4181,7 @@ export declare class Vector3 {
|
|
|
3985
4181
|
normalize(): Vector3;
|
|
3986
4182
|
clone(): Vector3;
|
|
3987
4183
|
isSame(other: Vector3): boolean;
|
|
4184
|
+
lerp(other: Vector3, t: number): Vector3;
|
|
3988
4185
|
static new(X: number, Y: number, Z: number): Vector3;
|
|
3989
4186
|
}
|
|
3990
4187
|
|