Request

Response

    Autodesk.Viewing.Extensions

    glTF

    Extension description

    The glTF extension lets you view glTF 2.0 models in the Viewer. This extension lets you have efficient glTF 2.0 models in your application.

    The extension id is: ‘Autodesk.glTF’

    Examples

     // Use this viewer option to load the glTF extension
     var options = {
     env: 'AutodeskProduction',
     api: 'derivativeV2',
     documentId: 'tests/unittest/models/gltf/duck.gltf'
    }
    

    Methods

    Override the activate method to enable the functionality of the extension.

    Parameters

    mode
    An optional mode that indicates a different way the extension can function.

    Returns

    typedescription
    boolean True if the extension activation was successful.

    deactivate()

    Override the deactivate method to disable the functionality of the extension.

    Returns

    typedescription
    boolean True if the extension deactivation was successful.