ThreePipe
    Preparing search index...

    Interface ImportAddOptions

    interface ImportAddOptions {
        _testDataTextureComplete?: boolean;
        addToRoot?: boolean;
        autoCenter?: boolean;
        autoImportZipContents?: boolean;
        autoScale?: boolean;
        autoScaleRadius?: number;
        autoSetBackground?: boolean;
        autoSetEnvironment?: boolean;
        centerGeometries?: boolean;
        centerGeometriesKeepPosition?: boolean;
        clearSceneObjects?: boolean;
        createUniqueNames?: boolean;
        disposeSceneObjects?: boolean;
        fileExtension?: string;
        fileHandler?: ILoader<any, any>;
        forceImport?: boolean;
        forceImporterReprocess?: boolean;
        generateMipmaps?: boolean;
        importConfig?: boolean;
        importedFile?: IFile;
        license?: string;
        mimeType?: string;
        pathOverride?: string;
        processImported?: boolean;
        processRaw?: boolean;
        queryString?: string;
        reimportDisposed?: boolean;
        replaceCameras?: boolean;
        replaceLights?: boolean;
        replaceMaterials?: boolean;
        rootPath?: string;
        useMeshLines?: boolean;
        [key: string]: any;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: string]: any
    Index

    Properties

    _testDataTextureComplete?: boolean

    default = false, if set to true, it will test if the data textures are complete. [internal use]

    addToRoot?: boolean

    Add directly to the RootScene object instead of RootScene.modelRoot

    false
    
    autoCenter?: boolean

    Automatically center the object in the scene.

    false
    
    autoImportZipContents?: boolean

    default = true, if true, the importer will automatically import the contents of zip files, if zip importer is registered.

    autoScale?: boolean

    Automatically scale the object according to its bounding box and the autoScaleRadius setting

    false
    
    autoScaleRadius?: number

    Radius to use for autoScale autoScale must be true for this to work.

    2
    
    autoSetBackground?: boolean

    Automatically set any loaded image(ITexture) file as the scene background

    autoSetEnvironment?: boolean

    Automatically set any loaded HDR, EXR file as the scene environment map

    true
    
    centerGeometries?: boolean

    Automatically center the geometries(pivots) in the object hierarchy before adding.

    false
    
    centerGeometriesKeepPosition?: boolean

    This centers the geometry while keeping the world position, i.e the mesh(Object3D) positions will change. centerGeometries must be true for this to work.

    true
    
    clearSceneObjects?: boolean

    Clear the viewer scene objects before the new object is added. Same as disposeSceneObjects but does not dispose the objects.

    createUniqueNames?: boolean

    If true, the loader will create unique names for objects in the gltf file when multiple objects with the same name are found.

    Note - Only for gltf, glb files or files loaded with GLTFLoader2. If this flag is not passed, the default value is the value of the static property GLTFLoader2.CreateUniqueNames.

    disposeSceneObjects?: boolean

    Dispose all the scene objects before the new object is added. Same as clearSceneObjects but also disposes the objects.

    fileExtension?: string

    The file extension to use for the file. If not specified, the importer will try to determine the file extension from the file name/url.

    fileHandler?: ILoader<any, any>

    The custom ILoader to use for the file. If not specified, the importer will try to determine the loader from the file extension.

    forceImport?: boolean

    Default = false. If true, the asset will be imported again on subsequent calls, even if it is already imported.

    forceImporterReprocess?: boolean

    default = false. If true, the importer will reprocess the imported objects, even if they are already processed.

    generateMipmaps?: boolean

    default = undefined, only used for textures

    importConfig?: boolean

    any attached viewer config will be ignored if this is set to true

    true
    
    importedFile?: IFile

    Pass a custom file to use for the import. This will be used in the importer, and nothing will be fetched from the path

    license?: string

    Add a license to the object

    mimeType?: string

    Mime type to use when importing the file, if not specified, it will be determined from the file extension.

    pathOverride?: string

    Path override to use for the asset. This will be used in the importer as override to path inside the asset/cached asset.

    processImported?: boolean

    use processRaw instead

    processRaw?: boolean

    default = true, toggle to control the processing of the raw objects in the proecssRaw method

    queryString?: string

    Query string to add to the url. Default = undefined

    reimportDisposed?: boolean

    If true or not specified, and any of the assets is disposed(only root objects are checked, not children), all assets will be imported in this call. If false, old assets will be returned. Default = true.

    replaceCameras?: boolean

    If true, the importer will replace any three.js camera instances with upgraded cameras default = true

    replaceLights?: boolean

    If true, the importer will replace any three.js light instances with upgraded lights default = true

    replaceMaterials?: boolean

    If true, the importer will replace any three.js material instances with upgraded materials default = true

    rootPath?: string

    internal use

    useMeshLines?: boolean

    Use MeshLine(an extension of three.js Line2) instead of default Line for lines. This allows changing line width(fat lines) and other properties.

    Note - Only for gltf, glb files or files loaded with GLTFLoader2. If this flag is not passed, the default value is the value of the static property GLTFLoader2.UseMeshLines.