Docs

HugoSpace documentation.

Usage

HugoSpace offers one single page template. It is not meant to be the default theme for a site, only used explicitly on pages that will render a simulation with Spacekit.

Spacekit simulations work best as full-page documents included in other pages as iframes.

Creation

Create a Spacekit simulation with HugoSpace by configuring the front-matter for a page. Consider the following example.

This will produce a render of our solar system using included data.

---
title: Solar
description: Solar system.
type: hugospace
hugospace:
    sunScale: 1.0
    sunColor: "0xffffff"
    systemBase: "solar"
    systemLabel: true
    systemLine: true
    systemScale: 1.0
    systemSpeed: 10.0
    skybox: "stars"
    control: true
draft: false
---
ConfigurationTypeDefaultDescription
dataPathstringdata.jsonOptional path to JSON file of objects. Looks for data.json in the page folder by default.
sunScalefloat0.0Scale the sun relative to our sun ‘Sol’. 0 will disable the sun. 1 is the size of our sun. Use solar radius, not solar mass.
sunColorstring0xffffffDefine a hex color for the simulation sun.
systemBasestring"solar"Define a base system preset to use for the simulation, set false to disable. Star presets are: “solar”, “barnard”, “lhs-1440”, “teegarden”. Planet presets are: “mercury”, “venus”, “earth”, “moon”, “mars”, “jupiter”, “saturn”, “uranus”, “neptune”. Planet presets will disable the sun in the simulation.
systemLabelboolfalseToggle labels for base system objects.
systemLinebooltrueToggle orbit lines for base system objects.
systemScalefloat1.0Scale the entire simulation. Useful with very large orbits because Spacekit will be unable to render them when zoomed out.
systemSpeedfloat6.0Control the speed of the render in Julian Days per second.
dataLabelbooltrueToggle labels for data objects.
dataLinebooltrueToggle orbit lines for data objects.
eclipticbooltrueToggle ecliptic lines for data objects.
skyboxstring"stars"Included presets are: “stars”, “tycho”.
controlbooltrueToggle simulation controls on the page.

Data

Data included in HugoSpace is used for rendering the base system. The data is stored in the data directory within assets (as opposed to Hugo’s base data directory) because it is used in its JSON form by Spacekit client-side.

Base SystemData FileData SourceNotes
Solar Systemsystem-solar.jsonNASA’s JPL Horizons System
Barnard Systemsystem-barnard.jsonNASA’s Exoplanet CatalogCertain values unknown.
LHS 1440 Systemsystem-lhs-1440.jsonNASA’s Exoplanet CatalogCertain values unknown.
Teegarden Systemsystem-teegarden.jsonNASA’s Exoplanet CatalogCertain values unknown.
Mercurysystem-mercury.jsonNASA’s JPL Horizons SystemIncluded satellites no longer orbit Mercury.
Earthsystem-earth.jsonNASA’s JPL Horizons System
Moonsystem-moon.jsonNASA’s JPL Horizons System
Marssystem-mars.jsonNASA’s JPL Horizons System