Home
API: chem

Interface: Element

lifecycle-kit

lifecycle-kit


lifecycle-kit / chem / Element

Interface: Element

Defined in: chem/elements.ts:21

The elements a creature is made of.

Ported from a sibling simulation game's periodic table — real atomic masses, valences, electronegativities, cosmic abundances and CPK colours, validated against the npm periodic-table reference.

That table stops at chlorine, which is a limitation we inherit and one that does not matter here: H, C, N, O, P and S are roughly 99% of biomass by mass, and the trace metals a real cell needs are not something a 12x9 pixel creature can express anyway.

Abundance is the important field. It is the cosmic abundance of the element, and it is what makes a creature's composition a consequence rather than a choice: carbon is common, phosphorus is scarce, and a body that wants a lot of phosphorus is therefore expensive to build.

Properties

abundance

abundance: number

Defined in: chem/elements.ts:30

Fraction of ordinary matter in the universe.


color

color: string

Defined in: chem/elements.ts:32

CPK colour, used to tint the pixel that represents this atom.


electronegativity

electronegativity: number

Defined in: chem/elements.ts:28


mass

mass: number

Defined in: chem/elements.ts:26

Atomic mass, u.


metallic

metallic: number

Defined in: chem/elements.ts:34

0..1. Metals catch light; a magnesium-rich tissue reads bright-edged.


name

name: string

Defined in: chem/elements.ts:24


opacity

opacity: number

Defined in: chem/elements.ts:38

0..1. Below 1 reads translucent — a watery, jelly-ish body.


roughness

roughness: number

Defined in: chem/elements.ts:36

0..1. Low roughness is glossy, high is matte.


symbol

symbol: string

Defined in: chem/elements.ts:23


valence

valence: number

Defined in: chem/elements.ts:27


z

z: number

Defined in: chem/elements.ts:22