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

Constructors

  • Creates THREE.EventDispatcher | EventDispatcher object.

    Returns TransfrSharePlugin

Properties

_dirty: boolean = false
_exporting: boolean = false
_viewer?: ThreeViewer
_viewerListeners: PartialRecord<"dispose" | "*" | "update" | "preRender" | "postRender" | "preFrame" | "postFrame" | "addPlugin" | "removePlugin" | "renderEnabled" | "renderDisabled", ((e) => void)> = {}

Type declaration

    • (e): void
    • Parameters

      • e: IViewerEvent

      Returns void

baseUrls: Record<string, string> = ...
constructor: typeof AViewerPluginSync & typeof AViewerPlugin
dependencies: typeof AssetExporterPlugin[] = ...
enabled: boolean = true
pageUrl: string = window.location.href
queryParam: string = 'm'
serverUrl: string = 'https://bee.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

    • Optional prefix: string

    Returns string

  • Parameters

    • Optional model: IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>

    Returns Promise<undefined | BlobExt>

  • Returns ISerializedConfig | Record<string, never>

  • Export and get the link of the 3d model or scene

    Parameters

    • Optional model: IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>

    Returns Promise<string>

  • Parameters

    • state: any

    Returns Promise<void>

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

    Parameters

    • Optional base: string | URL
    • Optional param: string

    Returns Promise<null | string>

Generated using TypeDoc