Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Ombro

Index

Constructors

constructor

Properties

Private #config

#config: ConfigProps

Private #domElement

#domElement: HTMLElement

Private Optional #fnDrawHandler

#fnDrawHandler?: () => void

Type declaration

    • (): void
    • Returns void

Private #light

#light: Light

Private Optional #shadow

#shadow?: Shadow

Accessors

config

light

shadow

  • get shadow(): undefined | Shadow

Methods

destroy

  • destroy(): void

disableAutoUpdates

  • disableAutoUpdates(): void
  • Disables auto updates of shadows

    Returns void

draw

  • draw(): void
  • Draw all shadows based on current light position. Call this method whenever a parameter is changed.

    Returns void

enableAutoUpdates

  • enableAutoUpdates(): void
  • Redraws shadows when window is scrolled or resized

    Returns void

setDomElement

  • setDomElement(domElement: HTMLElement): void
  • Sets the target element to create a new shadow instance on

    Parameters

    • domElement: HTMLElement

    Returns void

setLightPosition

  • setLightPosition(x: number, y: number): void
  • Sets the coordinates of the light source

    Parameters

    • x: number
    • y: number

    Returns void

Private updateContent

  • updateContent(): void

Generated using TypeDoc