Threepipe Network/Cloud Plugins
    Preparing search index...

    Class TransfrSharePlugin

    Transfr Share Plugin A sample plugin that provides helpers to export and upload scene to a server and get a shareable link. It uses the options from the AssetExporterPlugin to export the scene or object, and can be configured using it's ui.

    Uses the free service transfr.one by default which deletes the files after a certain time, but the url can be changed to a custom backend or a self-hosted version of transfr.

    Note: since the uploaded files are publicly accessible by anyone by default, it is recommended to encrypt the file using the exporter options or use a secure backend.

    Hierarchy

    • AViewerPluginSync
      • TransfrSharePlugin
    Index

    Constructors

    Properties

    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    baseUrls: Record<string, string> = ...
    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    dependencies: typeof AssetExporterPlugin[] = ...
    enabled: boolean = true
    pageUrl: string = window.location.href
    processStateKey: string = 'transfr.one/scene.glb'
    queryParam: string = 'm'
    rawSuffix: string = '?raw'
    serverUrl: string = 'https://transfr.one/scene.glb'
    toJSON: any = null
    uiConfig?: UiObjectConfig<any, string, any> = undefined
    OldPluginType?: string
    PluginType: "TransfrSharePlugin" = 'TransfrSharePlugin'

    Accessors

    Methods

    • Parameters

      • e: IViewerEvent

      Returns IViewerEvent

    • Parameters

      • Optionalprefix: string

      Returns string

    • Parameters

      • key: any
      • setDirty: boolean = true

      Returns void

    • Parameters

      • key: any
      • setDirty: boolean = true

      Returns void

    • Returns ISerializedConfig | Record<string, never>

    • Parameters

      • state: any

      Returns Promise<void>

    • Parameters

      • viewer: ThreeViewer

      Returns void

    • Parameters

      • viewer: ThreeViewer

      Returns void

    • Upload the scene and copy the link to clipboard along with the base url and query param if provided

      Parameters

      • Optionalbase: string | URL
      • Optionalparam: string

      Returns Promise<null | string>