Preparing search index...

    Class MediaPickerTextureProvider

    Base class for Texture Providers based on selectable media.

    Hierarchy (View Summary)

    Index

    Properties

    autoShowMediaPicker: boolean

    If set to true, MediaPickerTextureProvider will request media picker UI automatically during loading.

    Lens Scripting Version 160

    false
    
    cropFace: boolean

    If set to true, MediaPickerTextureProvider will provide a proper texture transform for image with face(s), that will "zoom" UVs to the first found face on the image.

    Lens Scripting Version 160

    false
    
    faceImageControl: FaceTextureProvider

    Returns underlying TextureProvider for the last selected media file. If the last media file was not image with at least one face, null is returned.

    Lens Scripting Version 160

    null
    
    faceRect: vec4

    Use MediaPickerTextureProvider#faceImageControl to access the face area.

    imageControl: TextureProvider

    Returns underlying TextureProvider for the last selected media file. If the last media file was not image, null is returned.

    Lens Scripting Version 160

    isContentReady: boolean

    Returns true if an image is selected, or a video file has been loaded and is ready for decoding, false otherwise.

    isFaceImagePickingEnabled: boolean

    MediaPickerTextureProvider will allow users to select only images with detected faces through media picker UI. See also "cropFace" option.

    false
    
    isImagePickingEnabled: boolean

    MediaPickerTextureProvider will allow users to select all images files through media picker UI.

    true
    
    isVideoPickingEnabled: boolean

    MediaPickerTextureProvider will allow users to select video files through media picker UI.

    true
    
    videoControl: VideoTextureProvider

    Returns underlying VideoTextureProvider for the last selected media file. If the last media file was not video, null is returned.

    Methods

    • Returns the texture's aspect ratio, which is calculated as width / height.

      Returns number

    • Returns the width of the texture in pixels.

      Returns number

    • Requests SDK to hide media picking UI.

      Returns void

      Lens Scripting Version 160

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    • Requests face mesh and sets a callback to fire when it's ready.

      Parameters

      • callback: () => void

      Returns void

      Lens Scripting Version 160

    • Sets a callback to fire when a file is picked through media picking UI.

      Parameters

      • callback: () => void

      Returns void

      Lens Scripting Version 160

    • Requests SDK to show media picking UI.

      Returns void

      Lens Scripting Version 160