--- layout: typedoc title: 'Presenter | @msrvida/sanddance-react' ---

Class which presents a Stage of chart data using Deck.gl to render.

Hierarchy

  • Presenter

Index

Constructors

constructor

  • Instantiate a new Presenter.

    Parameters

    • el: HTMLElement

      Parent HTMLElement to present within.

    • Optional style: PresenterStyle

      Optional PresenterStyle styling options.

    Returns Presenter

Properties

animationTimer

animationTimer: number

Handle of the timer for animation.

deckgl

deckgl: DeckGL_Class

Deck.gl instance for rendering WebGL.

el

el: HTMLElement

logger

logger: (message?: any, ...optionalParams: any[]) => void

Logger, such as console.log

Type declaration

    • (message?: any, ...optionalParams: any[]): void
    • Logger, such as console.log

      Parameters

      • Optional message: any
      • Rest ...optionalParams: any[]

      Returns void

style

Options for styling the output.

Accessors

stage

  • Get the previously rendered Stage object.

    Returns Stage

view

  • Get the current View camera type.

    Returns View

Methods

animationCancel

  • animationCancel(): void
  • Cancels any pending animation, calling animationCanceled() on original queue.

    Returns void

animationQueue

  • Stops the current animation and queues a new animation.

    Parameters

    • handler: () => void

      Function to invoke when timeout is complete.

        • (): void
        • Returns void

    • timeout: number

      Length of time to wait before invoking the handler.

    • Optional options: QueuedAnimationOptions

      Optional QueuedAnimationOptions object.

    Returns void

canvasToDataURL

  • canvasToDataURL(): Promise<string>
  • Returns Promise<string>

finalize

  • finalize(): void
  • Returns void

getCubeData

  • getCubeData(): Cube[]
  • Get cube data array from the cubes layer.

    Returns Cube[]

getElement

  • Retrieve a sub-element of the rendered output.

    Parameters

    Returns HTMLElement

homeCamera

  • homeCamera(): void
  • Home the camera to the last initial position.

    Returns void

present

  • Present the Vega Scene, or Stage object using Deck.gl.

    Parameters

    • sceneOrStage: Stage | Scene3d

      Vega Scene object, or Stage object containing chart layout info.

    • height: number

      Height of the rendering area.

    • width: number

      Width of the rendering area.

    • Optional config: PresenterConfig

      Optional presentation configuration object.

    Returns void

rePresent

  • Present the same recently rendered Stage with only slight modifications such as a color change, using the previous Stage values as a basis.

    Parameters

    • stage: Partial<Stage>

      Partially populated Stage object containing changes.

    • Optional modifyConfig: PresenterConfig

      Optional presentation configuration object.

    Returns void

showGuides

  • showGuides(): void
  • Show guidelines of rendering height/width and center of OrbitView.

    Returns void