$ npm install @projectsophon/procgenƬ PixelCoords: Object
| Name | Type |
|---|---|
x | number |
y | number |
Ƭ QuoteData: Object
| Name | Type |
|---|---|
author | string |
quote | string |
• Const grayColors: PlanetCosmeticInfo
• Const mockCommon: Artifact
• Const mockEpic: Artifact
• Const mockLegendary: Artifact
• Const mockRare: Artifact
▸ artifactName(artifact): string
| Name | Type |
|---|---|
artifact | undefined | Artifact |
string
▸ artifactRandom(loc): () => number
| Name | Type |
|---|---|
loc | ArtifactId |
fn
▸ (): number
number
▸ artifactRandomInt(loc): () => number
| Name | Type |
|---|---|
loc | ArtifactId |
fn
▸ (): number
number
▸ getBiomeRgbStr(biome): string
| Name | Type |
|---|---|
biome | Biome |
string
▸ getHatSizeName(planet): string
| Name | Type |
|---|---|
planet | Planet |
string
▸ getOwnerColor(planet): string
| Name | Type |
|---|---|
planet | Planet |
string
▸ getOwnerColorVec(planet): RGBAVec
| Name | Type |
|---|---|
planet | Planet |
RGBAVec
▸ getPlanetBlurb(planet): string
| Name | Type |
|---|---|
planet | undefined | Planet |
string
▸ getPlanetBlurb2(planet): string
| Name | Type |
|---|---|
planet | undefined | Planet |
string
▸ getPlanetClass(planet): UpgradeBranchName
| Name | Type |
|---|---|
planet | Planet |
UpgradeBranchName
▸ getPlanetCosmetic(planet): PlanetCosmeticInfo
| Name | Type |
|---|---|
planet | undefined | Planet |
PlanetCosmeticInfo
▸ getPlanetName(planet): string
| Name | Type |
|---|---|
planet | undefined | Planet |
string
▸ getPlanetNameHash(locId): string
| Name | Type |
|---|---|
locId | LocationId |
string
▸ getPlanetTagline(planet): string
| Name | Type |
|---|---|
planet | undefined | Planet |
string
▸ getPlanetTitle(planet): string
| Name | Type |
|---|---|
planet | undefined | Planet |
string
▸ getPlayerColor(player): string
| Name | Type |
|---|---|
player | EthAddress |
string
▸ getPlayerColorVec(player): RGBAVec
| Name | Type |
|---|---|
player | EthAddress |
RGBAVec
▸ getRuinsInfo(loc): RuinsInfo
| Name | Type |
|---|---|
loc | LocationId |
RuinsInfo
▸ hashToHue(hash): number
| Name | Type |
|---|---|
hash | string |
number
▸ hatTypeFromHash(hash): HatType
| Name | Type |
|---|---|
hash | LocationId |
HatType
▸ hslStr(h, s, l): string
| Name | Type |
|---|---|
h | number |
s | number |
l | number |
string
▸ hslToRgb(__namedParameters): RGBVec
| Name | Type |
|---|---|
__namedParameters | HSLVec |
RGBVec
▸ mockArtifact(rarity, artifactType?, planetBiome?): Artifact
| Name | Type | Default value |
|---|---|---|
rarity | ArtifactRarity | undefined |
artifactType | ArtifactType | ArtifactType.Spaceship |
planetBiome | Biome | Biome.WASTELAND |
Artifact
▸ mockArtifactWithRarity(rarity, artifactType?, planetBiome?): Artifact
| Name | Type | Default value |
|---|---|---|
rarity | ArtifactRarity | undefined |
artifactType | ArtifactType | ArtifactType.Spaceship |
planetBiome | Biome | Biome.WASTELAND |
Artifact
▸ planetPerlin(loc): (coords: PixelCoords) => number
| Name | Type |
|---|---|
loc | LocationId |
fn
▸ (coords): number
| Name | Type |
|---|---|
coords | PixelCoords |
number
▸ planetRandom(loc): () => number
| Name | Type |
|---|---|
loc | LocationId |
fn
▸ (): number
number
▸ planetRandomInt(loc): () => number
| Name | Type |
|---|---|
loc | LocationId |
fn
▸ (): number
number
▸ rgbStr(rgb): string
| Name | Type |
|---|---|
rgb | RGBVec |
string
▸ titleCase(title): string
| Name | Type |
|---|---|
title | string |
string