roavatar-renderer 1.5.18 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +239 -31
  2. package/dist/index.js +14434 -9050
  3. package/package.json +4 -3
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { EffectComposer } from 'three/examples/jsm/Addons.js';
1
+ import { EffectComposer } from 'postprocessing';
2
2
  import { OrbitControls } from 'three/examples/jsm/Addons.js';
3
3
  import * as THREE from 'three';
4
4
 
@@ -653,7 +653,7 @@ export declare interface AvatarModel_Result {
653
653
  avatarConfigurations: AvatarConfigurations | null;
654
654
  }
655
655
 
656
- export declare type AvatarModelUpdateType = "UpdateName" | "UpdateBodyColors" | "UpdateAssets" | "UpdateScales" | "UpdateBackground";
656
+ export declare type AvatarModelUpdateType = "UpdateName" | "UpdateBodyColors" | "UpdateAssets" | "UpdateScales" | "UpdateBackground" | "UpdateAvatarType";
657
657
 
658
658
  /** @category Outfit */
659
659
  export declare type AvatarType = "R6" | "R15";
@@ -683,6 +683,71 @@ export declare function awaitTimeout<T>(promise: Promise<T>, time?: number): Pro
683
683
  */
684
684
  export declare function awaitTimeoutThrows<T>(promise: Promise<T>, time?: number): Promise<T>;
685
685
 
686
+ declare class BackgroundRenderer {
687
+ auth: Authentication;
688
+ avatarCyclorama?: Instance;
689
+ backgroundData?: Instance;
690
+ backgroundId?: number;
691
+ lastLoadedBackgroundId?: number;
692
+ currentlyUpdating: boolean;
693
+ hasNewUpdate: boolean;
694
+ affectSceneAppearance: boolean;
695
+ cameraAffectsTransparency: boolean;
696
+ lastFrameTime: number;
697
+ animationInterval?: NodeJS.Timeout;
698
+ animationFPS: number;
699
+ renderScene: RBXRendererScene;
700
+ private _renderSceneCompiledConnection?;
701
+ private _renderSceneFailedConnection?;
702
+ hasFiredFullyRendered: boolean;
703
+ /**Event is fired if a new outfit failed to load (specifically the Instance tree, not the rendering part)
704
+ *
705
+ * Simple: Fired when, Instance tree = fail
706
+ * @returns BackgroundRendererErrorType
707
+ */
708
+ onError: Event_2;
709
+ /**Event is fired if a new outfit successfully loaded (specifically the Instance tree, not the rendering part)
710
+ *
711
+ * Simple: Fired when, Instance tree = done
712
+ * @returns void
713
+ */
714
+ onSuccess: Event_2;
715
+ /**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)
716
+ *
717
+ * Simple: Fired when, Instance tree = done & Rendering = done (AKA everything)
718
+ * @returns void
719
+ */
720
+ onRenderSuccess: Event_2;
721
+ /**Event is fired if a renderDesc fails to compile, it can be fired multiple times
722
+ *
723
+ * Simple: Fired when, Rendering = fail
724
+ * @returns void
725
+ */
726
+ onRenderError: Event_2;
727
+ constructor(auth: Authentication, backgroundId?: number, renderScene?: RBXRendererScene);
728
+ /**Updates background to match the set id */
729
+ setBackground(id?: number): void;
730
+ _updateBackground(): Promise<void>;
731
+ _loadBackgroundData(): Promise<void>;
732
+ _loadAvatarCyclorama(): Promise<void>;
733
+ _applyBackgroundData(): void;
734
+ /**
735
+ * Starts updating the animation of the background per frame
736
+ */
737
+ startAnimating(): void;
738
+ /**
739
+ * Updates the animation once
740
+ */
741
+ animateOnce(): void;
742
+ /**
743
+ * Stops updating the animation of the background per frame
744
+ */
745
+ stopAnimating(): void;
746
+ fireFullyRenderedIfNeeded(): void;
747
+ /**Calls destroy on the background, stops animating and disconnects connections. The OutfitRenderer should not be interacted with after this */
748
+ destroy(): void;
749
+ }
750
+
686
751
  /**
687
752
  * @category Mesh
688
753
  */
@@ -1010,6 +1075,7 @@ export declare class Color3 {
1010
1075
  clone(): Color3;
1011
1076
  isSame(other: Color3): boolean;
1012
1077
  toColor3uint8(): Color3uint8;
1078
+ toArray(): Vec3;
1013
1079
  multiply(vec3: Color3): Color3;
1014
1080
  divide(vec3: Color3): Color3;
1015
1081
  add(vec3: Color3): Color3;
@@ -1026,6 +1092,7 @@ export declare class Color3uint8 {
1026
1092
  constructor(R?: number, G?: number, B?: number);
1027
1093
  clone(): Color3uint8;
1028
1094
  toColor3(): Color3;
1095
+ toArray(): Vec3;
1029
1096
  }
1030
1097
 
1031
1098
  /**
@@ -1493,9 +1560,15 @@ export declare const FLAGS: {
1493
1560
  ALWAYS_SHOW_ATTACHMENTS: boolean;
1494
1561
  /**Multiplier for delta time used by renderer things (does not affect datamodel side of things but particles and such instead) */
1495
1562
  RENDERER_DELTA_TIME_MULTIPLIER: number;
1496
- /**How many seconds particles will presimulate (mainly so they arent incomplete in thumbnail generations) */
1563
+ /**
1564
+ * How many seconds particles will presimulate (mainly so they arent incomplete in thumbnail generations)
1565
+ * @deprecated This can now be set per-scene
1566
+ * */
1497
1567
  PARTICLES_START_FULL: number;
1498
- /**Framerate of presimulation particles */
1568
+ /**
1569
+ * Framerate of presimulation particles
1570
+ * @deprecated This can now be set per-scene
1571
+ * */
1499
1572
  PARTICLES_START_FULL_FRAMERATE: number;
1500
1573
  /**shows ThreeJS SkeletonHelper */
1501
1574
  SHOW_SKELETON_HELPER: boolean;
@@ -1621,12 +1694,9 @@ export declare function generateOutfitModelThumbnail(auth: Authentication, outfi
1621
1694
  * **Example on generating 1000x1000 webp thumbnail for blank outfit**
1622
1695
  * ```ts
1623
1696
  * const outfit = new Outfit()
1624
- * FLAGS.THUMBNAIL_TIMEOUT = 1 //makes thumbnail generation faster
1625
- * FLAGS.PARTICLES_START_FULL = 10 //makes emitters appear as if theyve been there for some time (10 seconds)
1626
1697
  * FLAGS.RENDERTARGET_TO_CANVASTEXTURE = true //required for gltf export
1627
1698
  * const result = await generateOutfitThumbnail(new Authentication(), outfit, [1000,1000], "webp", 0.99)
1628
1699
  * FLAGS.RENDERTARGET_TO_CANVASTEXTURE = false
1629
- * FLAGS.PARTICLES_START_FULL = 0
1630
1700
  * console.log(result)
1631
1701
  * ```
1632
1702
  */
@@ -1661,21 +1731,20 @@ export declare function getCameraCFrameForHeadshotCustomized(rig: Instance, fov:
1661
1731
  export declare function getDistIndexArray(ref: FileMesh, dist: FileMesh): (number | undefined)[];
1662
1732
 
1663
1733
  /**
1664
- * @deprecated Use new Thumbnails category instead
1665
1734
  * @category ThumbnailGenerator */
1666
1735
  export declare function getExtents(cframe: CFrame, parts: Instance[]): [Vector3, Vector3];
1667
1736
 
1668
1737
  /**
1669
- * @deprecated Use new Thumbnails category instead
1670
1738
  * @category ThumbnailGenerator */
1671
1739
  export declare function getExtentsCenter(extents: [Vector3, Vector3]): Vector3;
1672
1740
 
1673
1741
  /**
1674
- * @deprecated Use new Thumbnails category instead
1675
1742
  * @category ThumbnailGenerator
1676
1743
  * */
1677
1744
  export declare function getExtentsForParts(parts: Instance[], includeTransform?: boolean): [Vector3, Vector3];
1678
1745
 
1746
+ export declare function getExtentsWorld(rig: Instance): [Vector3, Vector3];
1747
+
1679
1748
  export declare function getHeadExtents(rig: Instance): [Vector3, Vector3] | undefined;
1680
1749
 
1681
1750
  /**@category API */
@@ -1707,8 +1776,6 @@ export declare function getPartsInAssembly_Generate(part: Instance): Instance[];
1707
1776
 
1708
1777
  export declare function getRandomBetweenInclusive(min: number, max: number, randomVal?: number): number;
1709
1778
 
1710
- export declare function getRigExtentsWorld(rig: Instance): [Vector3, Vector3];
1711
-
1712
1779
  export declare function getRootAssemblyPart_Generate(part: Instance): Instance;
1713
1780
 
1714
1781
  /**@category API */
@@ -1731,7 +1798,6 @@ export declare interface GetSubscription_Result {
1731
1798
  * Calculates the CFrame the camera should be at when generating a thumbnail
1732
1799
  * @param model The model-like instance to get thumbnail camera for
1733
1800
  * @returns Thumbnail camera cframe
1734
- * @deprecated Use new Thumbnails category instead
1735
1801
  * @category ThumbnailGenerator
1736
1802
  */
1737
1803
  export declare function getThumbnailCameraCFrame(model: Instance, fov: number, forceAngle?: Vec3): CFrame | undefined;
@@ -1921,6 +1987,31 @@ export declare const HumanoidRigType: {
1921
1987
  R15: number;
1922
1988
  };
1923
1989
 
1990
+ /**
1991
+ * Renders a scene to an image and returns a data url
1992
+ * @param renderScene Scene that will be rendered
1993
+ * @param width Width in pixels
1994
+ * @param height Height in pixels
1995
+ * @param format Type of image
1996
+ * @param options
1997
+ * @returns data url
1998
+ *
1999
+ * @category ThumbnailGenerator
2000
+ */
2001
+ export declare function imageThumbnailClick(renderScene: RBXRendererScene, width: number, height: number, format: ImageThumbnailFormat, options?: Partial<ImageThumbnailOptions>): Promise<string | undefined>;
2002
+
2003
+ /**
2004
+ * @category ThumbnailGenerator
2005
+ */
2006
+ export declare type ImageThumbnailFormat = "png" | "webp" | "jpeg";
2007
+
2008
+ /**
2009
+ * @category ThumbnailGenerator
2010
+ */
2011
+ export declare interface ImageThumbnailOptions {
2012
+ quality: number;
2013
+ }
2014
+
1924
2015
  export declare function imageUrlToDataUrl(imageUrl: string): Promise<string>;
1925
2016
 
1926
2017
  /**
@@ -2017,6 +2108,7 @@ export declare class Instance {
2017
2108
  FindFirstChildOfClass(className: string): Instance | undefined;
2018
2109
  FindLastChildOfClass(className: string): Instance | undefined;
2019
2110
  IsA(className: string): boolean;
2111
+ IsDescendantOf(instance: Instance): boolean;
2020
2112
  preRender(): void;
2021
2113
  }
2022
2114
 
@@ -2476,6 +2568,31 @@ export declare const minimumDeltaEBodyColorDifference = 11.4;
2476
2568
  */
2477
2569
  export declare function minus(v0: Vec3, v1: Vec3): Vec3;
2478
2570
 
2571
+ /**
2572
+ * Generates a 3D model from the scene
2573
+ * @param renderScene Scene that will be rendered
2574
+ * @param format Format of resulting model
2575
+ * @param options
2576
+ * @returns ArrayBuffer for glb or Object for gltf
2577
+ *
2578
+ * @category ThumbnailGenerator
2579
+ */
2580
+ export declare function modelThumbnailClick(renderScene: RBXRendererScene, format: ModelThumbnailFormat, options?: Partial<ModelThumbnailOptions>): Promise<ArrayBuffer | {
2581
+ [key: string]: unknown;
2582
+ }>;
2583
+
2584
+ /**
2585
+ * @category ThumbnailGenerator
2586
+ */
2587
+ export declare type ModelThumbnailFormat = "gltf" | "glb";
2588
+
2589
+ /**
2590
+ * @category ThumbnailGenerator
2591
+ */
2592
+ export declare interface ModelThumbnailOptions {
2593
+ includeAnimations: boolean;
2594
+ }
2595
+
2479
2596
  /**
2480
2597
  * @category InstanceWrapper
2481
2598
  */
@@ -2811,15 +2928,49 @@ export declare const OutfitOrigin: {
2811
2928
 
2812
2929
  /**
2813
2930
  * @category Renderer
2931
+ * @example
2932
+ * **Example on usage**
2933
+ * ```ts
2934
+ * const auth = new Authentication()
2935
+ * const outfit = new Outfit()
2936
+ * const renderScene = RBXRenderer.addScene()
2937
+ *
2938
+ * const outfitRenderer = new OutfitRenderer(auth, outfit, renderScene)
2939
+ * outfitRenderer.startAnimating()
2940
+ * outfitRenderer.setMainAnimation("anim.1234") //animation with id 1234, check documentation for other possible values
2941
+ *
2942
+ * outfitRenderer.onRenderSuccess.Connect(() => {
2943
+ * //handle Instance tree + renderDesc being successfuly
2944
+ * })
2945
+ * outfitRenderer.onError.Connect(() => {
2946
+ * //handle Instance tree error
2947
+ * })
2948
+ * outfitRenderer.onRenderError.Connect(() => {
2949
+ * //handle renderDesc error
2950
+ * })
2951
+ *
2952
+ * //onRenderSuccess is fired once after some time
2953
+ *
2954
+ * outfitRenderer.setOutfit(new Outfit())
2955
+ *
2956
+ * //onRenderSuccess is fired again once after some time
2957
+ *
2958
+ * //when we're done rendering
2959
+ * outfitRenderer.destroy()
2960
+ * renderScene.destroy()
2961
+ * ```
2814
2962
  */
2815
2963
  export declare class OutfitRenderer {
2816
2964
  auth: Authentication;
2965
+ outfitModel?: OutfitModel;
2817
2966
  outfit: Outfit;
2818
2967
  currentRig?: Instance; /**Instance for the Model of the current outfit */
2819
2968
  currentRigType: AvatarType;
2820
2969
  doCameraUpdateOnLoad: boolean; /**Makes camera update when new avatar has loaded */
2821
2970
  doCameraUpdate: boolean; /**Does camera update every frame */
2822
2971
  doAddInstance: boolean; /**If outfitRenderer should call RBXRenderer.addInstance() */
2972
+ forceAnimationLoop: boolean; /**If future loaded animations should be set to loop */
2973
+ backgroundRenderer: BackgroundRenderer;
2823
2974
  currentlyChangingRig: boolean;
2824
2975
  currentlyUpdating: boolean;
2825
2976
  hasNewUpdate: boolean;
@@ -2829,21 +2980,42 @@ export declare class OutfitRenderer {
2829
2980
  animationFPS: number;
2830
2981
  deltaTimeMultiplier: number;
2831
2982
  renderScene: RBXRendererScene;
2832
- /**Event is fired if a new outfit failed to load
2983
+ private _renderSceneCompiledConnection?;
2984
+ private _renderSceneFailedConnection?;
2985
+ hasFiredFullyRendered: boolean;
2986
+ /**Event is fired if a new outfit failed to load (specifically the Instance tree, not the rendering part)
2987
+ *
2988
+ * Simple: Fired when, Instance tree = fail
2833
2989
  * @returns OutfitRendererErrorType
2834
2990
  */
2835
2991
  onError: Event_2;
2836
- /**Event is fired if a new outfit successfully loaded
2992
+ /**Event is fired if a new outfit successfully loaded (specifically the Instance tree, not the rendering part)
2993
+ *
2994
+ * Simple: Fired when, Instance tree = done
2837
2995
  * @returns void
2838
2996
  */
2839
2997
  onSuccess: Event_2;
2998
+ /**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)
2999
+ *
3000
+ * Simple: Fired when, Instance tree = done & Rendering = done (AKA everything)
3001
+ *
3002
+ * NOTE: If FLAGS.LAYERED_CLOTHING_COOLDOWN > 0 (non-default), this may be fired too early and later fire again
3003
+ * @returns void
3004
+ */
3005
+ onRenderSuccess: Event_2;
3006
+ /**Event is fired if a renderDesc fails to compile, it can be fired multiple times
3007
+ *
3008
+ * Simple: Fired when, Rendering = fail
3009
+ * @returns void
3010
+ */
3011
+ onRenderError: Event_2;
2840
3012
  /**
2841
3013
  * Creates a new OutfitRenderer which makes it easy to render outfits
2842
3014
  * @param auth The authentication object, you should have one you use for everything
2843
3015
  * @param outfit The outfit you want to render, it can be updated later by calling setOutfit()
2844
3016
  * @param renderScene The scene the outfit should be rendered in
2845
3017
  */
2846
- constructor(auth: Authentication, outfit: Outfit, renderScene?: RBXRendererScene);
3018
+ constructor(auth: Authentication, outfit: Outfit | OutfitModel, renderScene?: RBXRendererScene);
2847
3019
  /**
2848
3020
  * Updates the current rig, called internally by _updateOutfit()
2849
3021
  */
@@ -2856,6 +3028,10 @@ export declare class OutfitRenderer {
2856
3028
  * Updates the current outfit being rendered
2857
3029
  */
2858
3030
  setOutfit(outfit: Outfit): void;
3031
+ /**
3032
+ * Updates the current outfitModel being rendered
3033
+ */
3034
+ setOutfitModel(outfitModel: OutfitModel): void;
2859
3035
  /**
2860
3036
  * Centers camera on avatar
2861
3037
  */
@@ -2874,11 +3050,22 @@ export declare class OutfitRenderer {
2874
3050
  stopAnimating(): void;
2875
3051
  /**
2876
3052
  * Sets the current animation being played
2877
- * @param name The name of the animation, for example "idle", "run" or "emote.1234"
3053
+ * @param name The name of the animation, for example "idle", "run", "emote.1234" or "anim.1234"
2878
3054
  * @returns If the animation started playing, it may start playing later if it has been queued despite returning false
2879
3055
  */
2880
3056
  setMainAnimation(name: string): Promise<boolean>;
2881
- /**Calls destroy on the rig and stops animating, the OutfitRenderer should not be interacted with after this */
3057
+ fireFullyRenderedIfNeeded(): void;
3058
+ /**
3059
+ * Prepares the OutfitRenderer to be used for a thumbnail, call IMMEDIATELY after creating the OutfitRenderer
3060
+ * @returns true on success
3061
+ */
3062
+ prepareForThumbnail(): Promise<boolean>;
3063
+ private _prepareForThumbnail;
3064
+ /**
3065
+ * Updates rendered particles so they face the camera without simulating them (usually used when generating thumbnails)
3066
+ */
3067
+ updateParticleMatrix(): void;
3068
+ /**Calls destroy on the rig, stops animating and disconnects connections. The OutfitRenderer should not be interacted with after this */
2882
3069
  destroy(): void;
2883
3070
  }
2884
3071
 
@@ -3149,23 +3336,27 @@ export declare class RBXRenderer {
3149
3336
  static scenes: RBXRendererScene[];
3150
3337
  static get firstScene(): RBXRendererScene;
3151
3338
  /**@deprecated This can only get the first renderScene's scene */
3152
- static get scene(): THREE.Scene;
3339
+ static get scene(): THREE.Scene<THREE.Object3DEventMap>;
3153
3340
  /**@deprecated This can only get the first renderScene's camera */
3154
3341
  static get camera(): THREE.PerspectiveCamera;
3155
3342
  /**@deprecated This can only get the first renderScene's controls */
3156
- static get controls(): OrbitControls | undefined;
3343
+ static get controls(): OrbitControls<THREE.Camera> | undefined;
3157
3344
  static renderer?: THREE.WebGLRenderer;
3158
3345
  static resolution: [number, number];
3159
- static backgroundColorHex: number;
3346
+ static backgroundColor: THREE.ColorRepresentation;
3347
+ /**@deprecated Use backgroundColor instead */
3348
+ static get backgroundColorHex(): number;
3349
+ /**@deprecated Use backgroundColor instead */
3350
+ static set backgroundColorHex(val: number);
3160
3351
  static backgroundTransparent: boolean;
3161
3352
  static createLoadingIcon: boolean;
3162
3353
  static canvasContainer: HTMLDivElement;
3163
3354
  static loadingIcon?: HTMLSpanElement;
3164
3355
  static loadingIconStyle?: HTMLStyleElement;
3165
3356
  /**@deprecated This can only get the first renderScene's plane */
3166
- static get plane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined;
3357
+ static get plane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap> | undefined;
3167
3358
  /**@deprecated This can only get the first renderScene's shadowPlane */
3168
- static get shadowPlane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined;
3359
+ static get shadowPlane(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap> | undefined;
3169
3360
  /**@deprecated This can only get the first renderScene's ambientLight */
3170
3361
  static get ambientLight(): THREE.AmbientLight | undefined;
3171
3362
  /**@deprecated This can only get the first renderScene's directionalLight */
@@ -3193,15 +3384,15 @@ export declare class RBXRenderer {
3193
3384
  static setupLostContextHandler(): void;
3194
3385
  /**Sets up a basic scene with lighting
3195
3386
  * @param lightingType "WellLit" is the default lighting for RoAvatar, "Thumbnail" tries to match the Roblox thumbnail lighting
3196
- * @param backgroundColorHex is the hex code for the background color, for example 0x2b2d33
3387
+ * @param backgroundColor is the color code for the background color, for example 0x2b2d33
3197
3388
  */
3198
- static setupScene(lightingType?: "WellLit" | "Thumbnail", backgroundColorHex?: number, renderScene?: RBXRendererScene): void;
3389
+ static setupScene(lightingType?: "WellLit" | "Thumbnail", backgroundColorVal?: THREE.ColorRepresentation, renderScene?: RBXRendererScene): void;
3199
3390
  /**Sets up orbit controls */
3200
3391
  static setupControls(renderScene?: RBXRendererScene): void;
3201
3392
  /**
3202
- * @param colorHex example: 0x2b2d33 which is the default
3393
+ * @param color example: 0x2b2d33 which is the default
3203
3394
  */
3204
- static setBackgroundColor(colorHex: number): void;
3395
+ static setBackgroundColor(color: THREE.ColorRepresentation): void;
3205
3396
  /**
3206
3397
  * Sets the background and ground's visibility, but not the shadowPlane
3207
3398
  * @param transparent If the background and ground should be transparent
@@ -3240,7 +3431,7 @@ export declare class RBXRenderer {
3240
3431
  */
3241
3432
  static getRenderer(): THREE.WebGLRenderer | undefined;
3242
3433
  /**@deprecated This can only get the first renderScene's scene */
3243
- static getScene(): THREE.Scene;
3434
+ static getScene(): THREE.Scene<THREE.Object3DEventMap>;
3244
3435
  /**
3245
3436
  * @deprecated Superseded by RBXRendererScene.exportGLTF()
3246
3437
  * This function is unstable and can throw errors, but might work
@@ -3261,9 +3452,15 @@ export declare class RBXRendererScene {
3261
3452
  effectComposer: EffectComposer | undefined;
3262
3453
  scissor?: [number, number, number, number];
3263
3454
  viewport?: [number, number, number, number];
3455
+ addedInstances: Instance[];
3264
3456
  isRenderingMesh: Map<Instance, boolean>;
3265
3457
  renderDescs: Map<Instance, RenderDesc>;
3266
3458
  destroyConnections: Map<Instance, Connection>;
3459
+ compiledRenderDesc: Event_2;
3460
+ failedRenderDesc: Event_2;
3461
+ forceAccurateNeedsRegeneration: boolean;
3462
+ particlesStartFull?: number;
3463
+ particlesStartFullFramerate: number;
3267
3464
  lookAwayVector: Vec3;
3268
3465
  lookAwayDistance: number;
3269
3466
  shadowEnabled: boolean;
@@ -3282,6 +3479,16 @@ export declare class RBXRendererScene {
3282
3479
  noRect(): void;
3283
3480
  /** Destroys all renderDescs but does not call Destroy on instances */
3284
3481
  destroy(): void;
3482
+ /**
3483
+ * Checks that renderDescs for provided instances are compiled, ignores instances that shouldn't be compiled or haven't been added
3484
+ * @returns true if all provided instances's renderDescs have been compiled
3485
+ */
3486
+ areInstancesCompiled(instances: Instance[]): boolean;
3487
+ /**
3488
+ * Checks that all renderDescs are compiled
3489
+ * @return true if all have been compiled
3490
+ */
3491
+ isFullyCompiled(): boolean;
3285
3492
  /**
3286
3493
  * Exports scene as a GLTF or GLB
3287
3494
  * @param name Name of the resulting file if autoDownload is true
@@ -3341,6 +3548,8 @@ declare class RenderDesc extends DisposableDesc {
3341
3548
  renderScene: RBXRendererScene;
3342
3549
  results?: THREE.Object3D[];
3343
3550
  instance?: Instance;
3551
+ compiled: boolean;
3552
+ failed: boolean;
3344
3553
  constructor(renderScene: RBXRendererScene);
3345
3554
  isSame(_other: RenderDesc): boolean;
3346
3555
  needsRegeneration(_other: RenderDesc): boolean;
@@ -3544,7 +3753,6 @@ export declare interface Search_Result {
3544
3753
  * Gives a scene the default appearance for thumbnails
3545
3754
  * @param renderScene RBXRenderScene to setup
3546
3755
  *
3547
- * @deprecated Use new Thumbnails category instead
3548
3756
  * @category ThumbnailGenerator
3549
3757
  */
3550
3758
  export declare function setupThumbnailScene(renderScene: RBXRendererScene): void;
@@ -3925,8 +4133,6 @@ export declare const WrapLayerAutoSkin: {
3925
4133
 
3926
4134
  export declare const xmlMagic = "<roblox ";
3927
4135
 
3928
- export declare function zoomExtents(cameraCFrame: CFrame, modelCFrame: CFrame, modelSize: Vector3, targetFOV: number, distanceScale: number, sizeType?: ZoomExtentsSizeType): void;
3929
-
3930
4136
  /**
3931
4137
  * Makes model fit inside camera
3932
4138
  * @param cameraCFrame Original camera cframe
@@ -3936,6 +4142,8 @@ export declare function zoomExtents(cameraCFrame: CFrame, modelCFrame: CFrame, m
3936
4142
  * @param distanceScale Distance is multiplied by this
3937
4143
  * @category ThumbnailGenerator
3938
4144
  */
4145
+ export declare function zoomExtents(cameraCFrame: CFrame, modelCFrame: CFrame, modelSize: Vector3, targetFOV: number, distanceScale: number, sizeType?: ZoomExtentsSizeType): void;
4146
+
3939
4147
  export declare type ZoomExtentsSizeType = "largestAxis" | "calculate";
3940
4148
 
3941
4149
  /**