roavatar-renderer
    Preparing search index...

    Function generateOutfitThumbnail

    • Generates a 2d or 3d thumbnail of an outfit

      Parameters

      • auth: Authentication

        Authentication

      • outfit: Outfit

        Outfit to render

      • size: Vec2 = ...

        Size of the resulting image, ignored for 3d thumbnails

      • type: ThumbnailType = "png"

        Type of thumbnail, "png" | "webp" | "gltf"

      • quality: number = 1

        Quality of image, with 1 being max

      • gltfAutoDownload: boolean = false

        Automatically download gltf file

      • includeAnimations: boolean = false
      • OptionalrenderSceneParam: RBXRendererScene

      Returns Promise<ThumbnailResult>

      ThumbnailResult, always a string for 2d thumbnails, 3d can be ArrayBuffer (glb, binary) or {[key: string]: unknown} (gltf, json)

      Use new Thumbnails category instead

      Example on generating 1000x1000 webp thumbnail for blank outfit

      const outfit = new Outfit()
      FLAGS.RENDERTARGET_TO_CANVASTEXTURE = true //required for gltf export
      const result = await generateOutfitThumbnail(new Authentication(), outfit, [1000,1000], "webp", 0.99)
      FLAGS.RENDERTARGET_TO_CANVASTEXTURE = false
      console.log(result)