Skip to content

Commit

Permalink
Simplify float and texture data types (Kopernicus#59)
Browse files Browse the repository at this point in the history
* replace mentions of "double" or "single" with "float

* Make data types less progammmery step 1

* latitudeDouble is a proper noun

* texture2d -> texture

* Merge branch 'data-types-simple'

* change float to decimal
  • Loading branch information
DeltaDizzy authored May 20, 2024
1 parent f45357b commit e518c1b
Show file tree
Hide file tree
Showing 40 changed files with 261 additions and 261 deletions.
16 changes: 8 additions & 8 deletions content/Atmosphere/Atmosphere.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ Body
|oxygen|Boolean|Whether the atmosphere contains oxygen. Used for whether jet engines should work in the atmosphere.|
|ambientColor|Color|All objects inside of the atmosphere will slightly shine in this color.|
|lightColor|Color|(Deprecated) Sets the AFG `waveLength` to this value. If AFG is not included, it automatically creates a new AFG.|
|staticDensityASL|Float|Atmospheric density at sea level. Used to calculate the parameters of the atmosphere if no curves are used.|
|staticPressureASL|Float|The static pressure at sea level in kPa. Used to calculate the parameters of the atmosphere if no curves are used. It is displayed in KSP under the body information.|
|temperatureSeaLevel|Float|The static temperature in Kelvin at sea level. Used to calculate the parameters of the atmosphere if no curves are used.|
|adiabaticIndex|Float|?|
|atmosphereDepth|Float|(Also `altitude`,`maxAltitude`) The atmosphere cutoff altitude/height of the atmosphere.|
|gasMassLapseRate|Float|?|
|atmosphereMolarMass|Float|?|
|temperatureLapseRate|Float|?|
|staticDensityASL|Decimal|Atmospheric density at sea level. Used to calculate the parameters of the atmosphere if no curves are used.|
|staticPressureASL|Decimal|The static pressure at sea level in kPa. Used to calculate the parameters of the atmosphere if no curves are used. It is displayed in KSP under the body information.|
|temperatureSeaLevel|Decimal|The static temperature in Kelvin at sea level. Used to calculate the parameters of the atmosphere if no curves are used.|
|adiabaticIndex|Decimal|?|
|atmosphereDepth|Decimal|(Also `altitude`,`maxAltitude`) The atmosphere cutoff altitude/height of the atmosphere.|
|gasMassLapseRate|Decimal|?|
|atmosphereMolarMass|Decimal|?|
|temperatureLapseRate|Decimal|?|
|pressureCurveIsNormalized|Boolean|Whether the pressure curve height values should use absolute (0 - atmosphereDepth) or relative (0 - 1) values.|
|pressureCurve|FloatCurve|Assigns a pressure value (in kPa) to a height value inside of the atmosphere.|
|temperatureCurveIsNormalized|Boolean|Whether the temperature curve should use absolute (0 - atmosphereDepth) or relative (0 - 1) values.|
Expand Down
10 changes: 5 additions & 5 deletions content/Atmosphere/AtmosphereFromGround.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Atmosphere
|--------|------|-----------|
|DEBUG_alwaysUpdateAll|Boolean|Whether all parameters should get recalculated and reapplied every frame.|
|doScale|Boolean|Whether the atmosphere mesh should be scaled automatically.|
|innerRadius|Float|The lower bound of the atmosphere effect in 1/6000ths of a meter.|
|outerRadius|Float|The upper bound of the atmosphere effect in 1/6000ths of a meter.|
|innerRadius|Decimal|The lower bound of the atmosphere effect in 1/6000ths of a meter.|
|outerRadius|Decimal|The upper bound of the atmosphere effect in 1/6000ths of a meter.|
|invWaveLength|BandOffset|The inverse wavelength. Either this OR `waveLength` should be used. The inverse wavelength is equivalent to each of the color values of the `waveLength` as x: `1/(x^4)` with an alpha of 0.5.|
|waveLength|BandOffset|The wavelength of the atmosphere. Either this OR `invWaveLength` should be used. The wavelength is equal to each of the color values of the `invWaveLength` as x: `sqrt(sqrt(1/x))` with an alpha of 0.5.|
|samples|Float|?|
|samples|Decimal|?|
|transformScale|Vector3|The scale of the atmosphere mesh in all three directions. Automatically set if `doScale` is enabled. If this is set, then `doScale` is set to false automatically.|
|innerRadiusMult|Float|A multiplier that automatically sets innerRadius based on the planet's radius. Replaces `innerRadius`.|
|outerRadiusMult|Float|A multiplier that automatically sets outerRadius based on the planet's radius. Replaces `outerRadius`.|
|innerRadiusMult|Decimal|A multiplier that automatically sets innerRadius based on the planet's radius. Replaces `innerRadius`.|
|outerRadiusMult|Decimal|A multiplier that automatically sets outerRadius based on the planet's radius. Replaces `outerRadius`.|

BandOffset is an input type unique to AtmosphereFromGround and is not strictly a color. Instead, it is the amount a series of specifically-colored bands are offset up and down. The way in which these bands overlap determine the atmosphere color. Note that in `waveLength`, a value of 1 means the band is all the way down.
2 changes: 1 addition & 1 deletion content/Body.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The `Body { }` node contains all the aspects of a body and describes the essenti
|barycenter|Boolean|Whether the body should act as a barycenter. Also makes the body unselectable.|
|cbNameLater|Text|(Deprecated, use `Properties/displayName` to change the name instead.) Applies a name change after loading the body.|
|identifier|Text|The Unique Body Identifier (UBI) for the body. Used in the [Interstellar Consortium](https://forum.kerbalspaceprogram.com/index.php?/topic/177439-kopernicus-interstellar-consortium/) and follows the format `System/Body`.|
|self|List of String List|(Optional) The UBIs that the body implements. Each line in this node should have the key "implements" and have a String[] as a value.|
|implements|Text|(Optional) The UBIs that the body implements. Any number of these can be used. Each line should have the key "implements" and have a UBI as the value.|
|finalizeOrbit|Boolean|Whether the orbit of the body should be finalized.|
|randomMainMenuBody|Boolean|Whether the body should have a chance at being displayed on the Main Menu.|
|contractWeight|Integer|How often contracts should be generated for a body. Default is 30.|
2 changes: 1 addition & 1 deletion content/HazardousBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Body
|--------|------|-----------|
|sumTemp|Boolean|Whether or not to add the ambientTemp to the calculated temperature.|
|biomeName|Text|Optional. This limits this instance of HazardousBody to the specified biome.|
|ambientTemp|Float|Optional, defaults to 0. This is the base temperature before applying modifiers such as the Alt/Lon/Lat Curves and the HeatMap. After all such modifiers are applied, if the new temperature is higher than KSP's default ambient temperature, then the new one will be applied. If KSP's is higher, KSP's shall be used instead.|
|ambientTemp|Decimal|Optional, defaults to 0. This is the base temperature before applying modifiers such as the Alt/Lon/Lat Curves and the HeatMap. After all such modifiers are applied, if the new temperature is higher than KSP's default ambient temperature, then the new one will be applied. If KSP's is higher, KSP's shall be used instead.|
|HeatMap|File Path|Optional. A greyscale map for fine control of the ambient temperature. It acts as a multiplier map. Black = 0, White = 1.|
|AltitudeCurve|FloatCurve|Optional, defaults to 1 at all altitudes. A multiplier of the average heat that gets applied at a certain altitude.|
|LatitudeCurve|FloatCurve|Optional, defaults to 1 at all latitudes. A multiplier of the average heat that gets applied at a certain latitude.|
Expand Down
8 changes: 4 additions & 4 deletions content/Ocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ Body
|--------|------|-----------|
|ocean|Boolean|Whether the ocean is enabled.|
|oceanColor|Color|The color of the ocean on the map.|
|oceanHeight|Float|The height of the ocean in meters.|
|density|Float|The density of the ocean in g/m3. 1 is the density of actual water.|
|oceanHeight|Decimal|The height of the ocean in meters.|
|density|Decimal|The density of the ocean in g/m3. 1 is the density of actual water.|
|minLevel|Integer|The PQS minimum level of triangles needed to display the ocean. Advised not to touch.|
|maxLevel|Integer|The PQS maximum level of triangles needed to display the ocean.|
|minDetailDistance|Float|The minimum detail distance of ???.|
|maxQuadLengthsPerFrame|Float|Unknown use. Advised not to touch.|
|minDetailDistance|Decimal|The minimum detail distance of ???.|
|maxQuadLengthsPerFrame|Decimal|Unknown use. Advised not to touch.|
18 changes: 9 additions & 9 deletions content/Orbit.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ Orbit
|--------|------|-----------|
|referenceBody|Text|The `name` of the object the body orbits.|
|color|Color|The color of the orbit line. See [the DataTypes page]({{ site.baseurl }}{% link content/datatypes.md %}) for more info on colors.|
|inclination|Float|The tilt of the orbit in degrees. 0 = normal, 90 = polar, 180 = retrograde, etc...|
|eccentricity|Float|The difference between your body's apoapsis and periapsis. It is a value between 0 and 1, where 0 is a perfect circle, and 1 is a straight line. 0.5 would give an oval shape.|
|period|Float|The custom orbital period in seconds. This can be used to set extreme orbital periods.|
|[semiMajorAxis](https://en.wikipedia.org/wiki/Semi-major_and_semi-minor_axes)|Float|The average altitude of the body above its `referenceBody`'s center.|
|longitudeOfAscendingNode|Float|The longitude at where the body crosses the `referenceBody`'s equator. It relies on `inclination`.|
|argumentOfPeriapsis|Float|The longitude of the `referenceBody` where the body's periapsis is.|
|[meanAnomalyAtEpoch](https://en.wikipedia.org/wiki/Mean_anomaly)|Float|The position of the body along the orbit, in radians, at the specified epoch between 0 and 2π, where 0 is the periapsis and π is the apoapsis.|
|meanAnomalyAtEpochD|Float|Similar to `meanAnomalyAtEpoch`, but is in degrees instead of radians. Useful for more precise measurement.|
|epoch|Float|The epoch at which `meanAnomalyAtEpoch` is described. Typically should be at 0 for best accuracy.|
|inclination|Decimal|The tilt of the orbit in degrees. 0 = normal, 90 = polar, 180 = retrograde, etc...|
|eccentricity|Decimal|The difference between your body's apoapsis and periapsis. It is a value between 0 and 1, where 0 is a perfect circle, and 1 is a straight line. 0.5 would give an oval shape.|
|period|Decimal|The custom orbital period in seconds. This can be used to set extreme orbital periods.|
|[semiMajorAxis](https://en.wikipedia.org/wiki/Semi-major_and_semi-minor_axes)|Decimal|The average altitude of the body above its `referenceBody`'s center.|
|longitudeOfAscendingNode|Decimal|The longitude at where the body crosses the `referenceBody`'s equator. It relies on `inclination`.|
|argumentOfPeriapsis|Decimal|The longitude of the `referenceBody` where the body's periapsis is.|
|[meanAnomalyAtEpoch](https://en.wikipedia.org/wiki/Mean_anomaly)|Decimal|The position of the body along the orbit, in radians, at the specified epoch between 0 and 2π, where 0 is the periapsis and π is the apoapsis.|
|meanAnomalyAtEpochD|Decimal|Similar to `meanAnomalyAtEpoch`, but is in degrees instead of radians. Useful for more precise measurement.|
|epoch|Decimal|The epoch at which `meanAnomalyAtEpoch` is described. Typically should be at 0 for best accuracy.|
|iconColor|[Color]({{ site.baseurl }}{% link content/datatypes.md %})|(Also nodeColor) The color of the orbit icon/node.|
|iconTexture|File Path|The path to the custom icon texture.|
|mode|OrbitDrawMode|Orbit Draw Mode. Possible values are `OFF`, `REDRAW_ONLY`, `REDRAW_AND_FOLLOW`, and `REDRAW_AND_RECALCULATE`. Default is `REDRAW_AND_RECALCULATE`.|
Expand Down
6 changes: 3 additions & 3 deletions content/PQSMods/HeightColorMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ PQS

|Property|Format|Description|
|--------|------|-----------|
|blend|Float|The blend between the LandClasses.|
|blend|Decimal|The blend between the LandClasses.|

## LandClasses
The `LandClasses { }` wraps several `LandClass { }` nodes that describe an individual region's color as defined by altitudes.
Expand All @@ -79,6 +79,6 @@ The `LandClasses { }` wraps several `LandClass { }` nodes that describe an indiv
|--------|------|-----------|
|name|Text|The name of the LandClass.|
|color|Color|The color to be applied to the LandClass.|
|altitudeStart|Float|The starting altitude of the LandClass. NOTE: Altitude is measured in fractions of valid PQS height: `altitude = (vertexHeight - vertexMinHeightOfPQS) / vertexHeightDeltaOfPQS`.|
|altitudeEnd|Float|The ending altitude of the LandClass. Follows same measurement unit as `altitudeStart`.|
|altitudeStart|Decimal|The starting altitude of the LandClass. NOTE: Altitude is measured in fractions of valid PQS height: `altitude = (vertexHeight - vertexMinHeightOfPQS) / vertexHeightDeltaOfPQS`.|
|altitudeEnd|Decimal|The ending altitude of the LandClass. Follows same measurement unit as `altitudeStart`.|
|lerpToNext|Boolean|Whether to blend into the next LandClass. Highly recommended to set to true on all but the last LandClass.|
10 changes: 5 additions & 5 deletions content/PQSMods/HeightColorMap2.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ PQS

|Property|Format|Description|
|--------|------|-----------|
|blend|Float|The blend between the LandClasses.|
|minHeight|Float|The minimum height, or `0.0` altitude, of a LandClass.|
|maxHeight|Float|The maxmium height, or `1.0` altitude, of a LandClass.|
|blend|Decimal|The blend between the LandClasses.|
|minHeight|Decimal|The minimum height, or `0.0` altitude, of a LandClass.|
|maxHeight|Decimal|The maxmium height, or `1.0` altitude, of a LandClass.|

## LandClasses
The `LandClasses { }` wraps several `LandClass { }` nodes that describe an individual region's color as defined by altitudes.
Expand All @@ -84,6 +84,6 @@ The `LandClasses { }` wraps several `LandClass { }` nodes that describe an indiv
|--------|------|-----------|
|name|Text|The name of the LandClass.|
|color|Color|The color to be applied to the LandClass.|
|altitudeStart|Float|The starting altitude of the LandClass. NOTE: Altitude is measured in fractions of defined height: `altitude = (height - minHeight) / (maxHeight - minHeight)`.|
|altitudeEnd|Float|The ending altitude of the LandClass. Follows same measurement unit as `altitudeStart`.|
|altitudeStart|Decimal|The starting altitude of the LandClass. NOTE: Altitude is measured in fractions of defined height: `altitude = (height - minHeight) / (maxHeight - minHeight)`.|
|altitudeEnd|Decimal|The ending altitude of the LandClass. Follows same measurement unit as `altitudeStart`.|
|lerpToNext|Boolean|Whether to blend into the next LandClass. Highly recommended to set to true on all but the last LandClass.|
36 changes: 18 additions & 18 deletions content/PQSMods/LandControl/LandClasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,45 +81,45 @@ LandControl
|Property|Format|Description|
|--------|------|-----------|
|name|Text|The name of the LandClass.|
|alterApparentHeight|Float|Supposedly adjusts the terrain's appearance. Only ever observed in the practice of forming icecaps.|
|alterRealHeight|Float|Supposedly adjusts the terrain's actual height.|
|minimumRealHeight|Float|The minimum height of the LandClass's terrain.|
|alterApparentHeight|Decimal|Supposedly adjusts the terrain's appearance. Only ever observed in the practice of forming icecaps.|
|alterRealHeight|Decimal|Supposedly adjusts the terrain's actual height.|
|minimumRealHeight|Decimal|The minimum height of the LandClass's terrain.|
|color|Color|The color of the region.|
|coverageBlend|Float|The blend of the coverage with surrounding LandClasses.|
|coverageFrequency|Float|The size of the each feature of the LandClass coverage. As frequency gets bigger, size gets smaller.|
|coverageBlend|Decimal|The blend of the coverage with surrounding LandClasses.|
|coverageFrequency|Decimal|The size of the each feature of the LandClass coverage. As frequency gets bigger, size gets smaller.|
|coverageOctaves|Integer|The amount of blanketing over the LandClass coverage. Higher octaves mean rougher coverage.|
|coveragePersistance|Float|The complexity of or amount of detail in the LandClass coverage.|
|coveragePersistance|Decimal|The complexity of or amount of detail in the LandClass coverage.|
|coverageSeed|Integer|The random seed of the LandClass coverage.|
|noiseBlend|Float|The blend of the LandClass noise with adjacent terrain.|
|noiseFrequency|Float|The size of the each feature of the LandClass noise. As frequency gets bigger, size gets smaller.|
|noiseBlend|Decimal|The blend of the LandClass noise with adjacent terrain.|
|noiseFrequency|Decimal|The size of the each feature of the LandClass noise. As frequency gets bigger, size gets smaller.|
|noiseOctaves|Integer|The amount of blanketing over the LandClass noise. Higher octaves mean rougher noise.|
|noisePersistance|Float|The complexity of or amount of detail in the LandClass noise.|
|noisePersistance|Decimal|The complexity of or amount of detail in the LandClass noise.|
|noiseSeed|Integer|The random seed of the LandClass noise.|
|noiseColor|Color|The main color of the noise to be added to the LandClass.|
|latDelta|Float|The change between min and max of ~~the latitude specified.~~ 0 latitude?|
|latitudeFloat|Boolean|Whether to use a second latitude range - could be used for mirroring over the equator.|
|lonDelta|Float|The change between min and max of ~~the longitude specified.~~ 0 longitude?|
|latDelta|Decimal|The change between min and max of ~~the latitude specified.~~ 0 latitude?|
|latitudeDouble|Boolean|Whether to use a second latitude range - could be used for mirroring over the equator.|
|lonDelta|Decimal|The change between min and max of ~~the longitude specified.~~ 0 longitude?|
|altitudeRange|LerpRange|Determines the heights at which the LandClass encompasses.|
|latitudeRange|LerpRange|Determines the latitudes at which the LandClass encompasses.|
|latitudeFloatRange|LerpRange|Determines the second latitudes at which the LandClass encompasses - only used if `latitudeFloat` is true.|
|longitudeRange|LerpRange|Determines the longitudes at which the LandClass encompasses.|

## LerpRange
Each `LerpRange { }` node describes a range of numbers to encompass, or lerp over. These ranges are applied to each dimension. The image below describes the valid ranges for latitude and longitude, with a handy diagram at the bottom for a visual description of the coverage of the LandClass over a single "dimension." Areas where coverage is not complete are determined by the `coverage___` properties.
Each `LerpRange { }` node describes a range of numbers to encompass, or lerp over. These ranges are applied to each dimension. The image below describes the valid ranges for latitude and longitude, with a handy diagram at the bottom for a visual description of the coverage of the LandClass over a Float "dimension." Areas where coverage is not complete are determined by the `coverage___` properties.

![alttext](https://media.discordapp.net/attachments/717082915565076491/717506199100194876/LANDCONTROL.png)

|Property|Format|Description|
|--------|------|-----------|
|startStart|Float|The true start of the LandClass coverage. Coverage before this point is non-existent, while coverage after this point is sparse.|
|startEnd|Float|The end of the starting area of the LandClass coverage. Coverage before this point is sparse, while coverage after this point is complete.|
|endStart|Float|The start of the ending area of the LandClass coverage. Coverage before this point is complete, while coverage after this point is sparse.|
|endEnd|Float|The true end of the LandClass coverage. Coverage before this point is sparse, while coverage after this point is non-existent.|
|startStart|Decimal|The true start of the LandClass coverage. Coverage before this point is non-existent, while coverage after this point is sparse.|
|startEnd|Decimal|The end of the starting area of the LandClass coverage. Coverage before this point is sparse, while coverage after this point is complete.|
|endStart|Decimal|The start of the ending area of the LandClass coverage. Coverage before this point is complete, while coverage after this point is sparse.|
|endEnd|Decimal|The true end of the LandClass coverage. Coverage before this point is sparse, while coverage after this point is non-existent.|

## Scatters
Although not a true scatters node, the `Scatters { }` node in a LandClass node has a list of values in which each modifies the density of the scatter's use in the LandClass.

|Property|Format|Description|
|--------|------|-----------|
|density|Float|The amount to modify the scatter's density with. Seems to be multiplied with the scatter's `maxScatter`?|
|density|Decimal|The amount to modify the scatter's density with. Seems to be multiplied with the scatter's `maxScatter`?|
|scatterName|Text|The name of the scatter to modify the density of.|
Loading

0 comments on commit e518c1b

Please sign in to comment.