roavatar-renderer
    Preparing search index...

    Function cropForModel

    • Crops the camera projection matrix to only contain model, allows for image to be cropped without lowering resolution

      Parameters

      • model: Instance

        Model that should be in focus

      • renderScene: RBXRendererScene

        RenderScene containing model and camera

      • width: number

        Width of thumbnail in pixels

      • height: number

        Height of thumbnail in pixels

      • resizeToRemoveUnusedSpace: boolean = false

        If the aspect ratio can be changed to crop out unused space. Default false

      Returns number[]

      [newWidth, newHeight] (Only differs from provided width/height if resizeToRemoveUnusedSpace = true)