Threepipe Network/Cloud Plugins
    Preparing search index...

    Class AWSClientPlugin

    AWSClientPlugin Provides fetch function that performs a fetch request with AWS v4 signing. This is useful for connecting to AWS services like S3 directly from the client. It also interfaces with the FileTransferPlugin to directly upload file when exported with the viewer or the plugin. Note: Make sure to use keys with limited privileges and correct CORS settings. All the keys will be stored in plain text if serializeSettings is set to true

    {@todo Make an example for AWSClient Plugin}

    Hierarchy

    • AViewerPluginSync<AWSClientPluginEventMap>
      • AWSClientPlugin
    Index

    Constructors

    Properties

    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<
        | "preRender"
        | "postRender"
        | "preFrame"
        | "postFrame"
        | "dispose"
        | "update"
        | "*"
        | "addPlugin"
        | "removePlugin"
        | "renderEnabled"
        | "renderDisabled",
        (e: IViewerEvent) => void,
    > = {}
    accessKeyId: string = ''
    accessKeySecret: string = ''
    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    dependencies: typeof FileTransferPlugin[] = ...
    enabled: boolean = true
    endpointURL: string = ''
    exportFile: (
        blob: Blob,
        name: string,
        _onProgress?: (
            d: { progress?: number; state?: "error" | "done" | "exporting" },
        ) => void,
    ) => Promise<void> = ...
    fetchFunction: {
        (input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
        (input: string | Request | URL, init?: RequestInit): Promise<Response>;
    } = fetch

    Type declaration

      • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
      • Parameters

        • input: RequestInfo | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | Request | URL, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | Request | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

    pathPrefix: string = 'webgi'
    serializeSettings: boolean = false
    serializeWithViewer: false
    uiConfig: UiObjectConfig
    OldPluginType?: string
    PluginType: "AWSClientPlugin1" = 'AWSClientPlugin1'
    PROXY_URL: string = 'https://r2-s3-api.repalash.com/{path}'
    USE_PROXY: boolean = false

    Set to true to use a proxy for all requests. This can be used to move the access credentials to the server side or set custom headers. This is required for some services like cloudflare R2 that do not support CORS. usage: AWSClientPlugin.USE_PROXY = true, optionally set AWSClientPlugin.PROXY_URL to a custom proxy.

    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

      • input: RequestInfo
      • init: RequestInit
      • Optional_onProgress: (d: { progress?: number; state?: string }) => void

      Returns Promise<Response>

    • Parameters

      • state: any

      Returns Promise<void>