Class DropzonePlugin

Dropzone Plugin

Adds a dropzone to the viewer for importing assets.

Automatically imports and adds assets to the scene, the behavior can be configured.

Hierarchy (view full)



_allowedExtensions: undefined | string[] = undefined
_dirty: boolean = false
_domElement?: HTMLElement
_dropzone?: Dropzone
_inputEl?: HTMLInputElement
_viewer?: ThreeViewer
_viewerListeners: PartialRecord<"update" | "dispose" | "preRender" | "postRender" | "preFrame" | "postFrame" | "*" | "addPlugin" | "renderEnabled" | "renderDisabled", ((e) => void)> = {}

Type declaration

addOptions: AddAssetOptions = ...

Add options for the RootScene.addObject

autoAdd: boolean = true

Automatically add dropped and imported assets to the scene. Works only if autoImport is true.

autoImport: boolean = true

Automatically import assets when dropped.

constructor: typeof AViewerPluginSync & typeof AViewerPlugin
enabled: boolean = true
importOptions: ImportFilesOptions = ...

Import options for the AssetImporter.importFiles

uiConfig: UiObjectConfig<any, string, any>
PluginType: "Dropzone" = 'Dropzone'



  • Parameters

    • __namedParameters: {
          files: Map<string, File>;
          nativeEvent: DragEvent;
      • files: Map<string, File>
      • nativeEvent: DragEvent

    Returns Promise<void>

Generated using TypeDoc