waytale - v0.5.1
    Preparing search index...

    Class WaytaleGadget

    Representation of a thing that may appear in a space like an avatar. Avatars can interact with it by means of the context-dependent window half, if they are close enough or in the area of the gadget.

    Hierarchy

    Index

    Constructors

    • Create new gadget.

      Parameters

      • title: string
      • tilesSpec: any
      • graphics: string | null
      • owner: any
      • stored: boolean
      • shared: boolean

      Returns WaytaleGadget

    Properties

    digestSHA256: (x: string) => Promise<string>
    getSessionState: () => unknown
    graphics: string | null

    file ID of graphics

    init: (options: object) => void | Promise<void>
    logger: Logger
    mapFetch: (url: string) => Promise<Response>
    onEnter: (avatar: WaytaleAvatar, elem: HTMLElement) => void | Promise<void>
    onExit: (avatar: WaytaleAvatar) => void | Promise<void>
    onSharedDataUpdate: (
        container: object,
        key: string | null,
        value: unknown,
        action: string,
        local: boolean,
    ) => void
    options: object
    owner: string
    position: number[]

    location in the map

    radius: number

    interaction radius

    setSessionState: (state: unknown) => void
    shared: boolean
    sharedData: object | undefined
    sharedDataProvider: WebrtcProvider | undefined
    spaceFetch: (url: string) => Promise<Response>
    stored: boolean
    tiles: Position[]
    tilesSpec: { position: Position; radius: number } | Position[]
    title: string

    title of gadget

    type: string
    updateSessionState: (key: string, value: unknown) => void
    uuid: string

    Methods

    • Return a neat title for the gadget. Robustly, with smart fallbacks. May be overridden.

      Returns string

    • Returns a string representation of an object.

      Returns string