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
---
Configuration | Type | Default | Description |
---|---|---|---|
dataPath | string | data.json | Optional path to JSON file of objects. Looks for data.json in the page folder by default. |
sunScale | float | 0.0 | Scale 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. |
sunColor | string | 0xffffff | Define a hex color for the simulation sun. |
systemBase | string | "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. |
systemLabel | bool | false | Toggle labels for base system objects. |
systemLine | bool | true | Toggle orbit lines for base system objects. |
systemScale | float | 1.0 | Scale the entire simulation. Useful with very large orbits because Spacekit will be unable to render them when zoomed out. |
systemSpeed | float | 6.0 | Control the speed of the render in Julian Days per second. |
dataLabel | bool | true | Toggle labels for data objects. |
dataLine | bool | true | Toggle orbit lines for data objects. |
ecliptic | bool | true | Toggle ecliptic lines for data objects. |
skybox | string | "stars" | Included presets are: “stars”, “tycho”. |
control | bool | true | Toggle 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 System | Data File | Data Source | Notes |
---|---|---|---|
Solar System | system-solar.json | NASA’s JPL Horizons System | |
Barnard System | system-barnard.json | NASA’s Exoplanet Catalog | Certain values unknown. |
LHS 1440 System | system-lhs-1440.json | NASA’s Exoplanet Catalog | Certain values unknown. |
Teegarden System | system-teegarden.json | NASA’s Exoplanet Catalog | Certain values unknown. |
Mercury | system-mercury.json | NASA’s JPL Horizons System | Included satellites no longer orbit Mercury. |
Earth | system-earth.json | NASA’s JPL Horizons System | |
Moon | system-moon.json | NASA’s JPL Horizons System | |
Mars | system-mars.json | NASA’s JPL Horizons System |