Class WWTControlBuilder

A class used to initialize the WWT engine.

You can use the various methods on this class to configure how the engine will work, and finally invoke the create method to instantiate it.

After instantiation, the engine generally can't be used immediately since it must perform initialization that includes fetching resources from the network.


  • WWTControlBuilder



  • Configure the WWT engine to operate in freestanding mode. The default is not to do so.

    Calling this function configures the engine to avoid the use of any resources available from the main website. The initial view will be black sky, and the 3D solar system mode will be unavailable due to its need for centralized assets. In order to see anything, you will need to load data definitions into the engine and configure it to show something. See the Freestanding Mode documentation for more information.


    • asset_baseurl: string

      The baseurl to use for engine static assets. The default value used by WWT is You can use that value here to activate freestanding mode if you are comfortable depending on the existence of the domain. Otherwise, you can provide your own baseurl here.

    Returns void

  • Configure the initial mode of the WWT engine.

    The default is "sky", where engine starts in Sky mode showing the DSS sky map, unless freestandingMode has been activated, in which case the engine starts showing a content-free black sky map. The value "black" explicitly starts in this mode, but without invoking freestandingMode itself. The value "earth" causes the engine to start in Earth mode showing the "Blue Marble" map.


    • mode: string

    Returns void

  • Configure the initial view of the WWT engine.

    The default is to have a latitude and longitude of zero and zoom level of 360, which corresponds to a viewport height of 60 degrees in the 2D sky mode.


    • lat: number
    • lng: number
    • zoom: number

    Returns void

  • Configure whether the WWT engine should start and run its own render loop. The default is false.

    If set to true, upon engine instantiation of the engine, it will queue a callback that renders the scene and then requeues itself to rerun in 10 milliseconds. It is generally better to manage the render loop yourself and call WWTControl.renderOneFrame manually.


    • value: boolean

      Whether the engine should run its own render loop.

    Returns void

Generated using TypeDoc