Constructors

Properties

frames: Frame[] = []

Keeping the frames array with frames ready to be render in current scenne

coveredRange: Range = ...

Keeping the range that was already covered by renderer

forwardCoverage: number = 0

Making sure that the new render area is at least 1500px ahead of the current frame range so the user doesn't need to render the scene on every click. This value get populated in App.tsx

visibleRange: Range = ...

Keeeping the current visible range so layers not within range can be hidden. This value is kept so the Frame.ts can use it without relaying on the ScrollableCanvas's newPosition parameter

Methods

  • Private

    Design and create new frame within given range

    Parameters

    • range: Range

      Designer's range

    Returns Promise<Frame>

    newly created frame as a promise

  • Downloads the terrain SVG based on the given parameters.

    Parameters

    • seed: string

      The seed for the terrain generation.

    • range: Range

      The range for which to generate the SVG.

    • windowHeight: number

      The height of the SVG.

    • Optional darkMode: boolean

    Returns Promise<void>

  • Render picture based on the given range.

    Parameters

    • range: Range

      The new range of the canvas

    Returns Promise<string>

    The svg content or undefined if no new frame is created