Home
API: chem

Interface: Biomolecule

lifecycle-kit

lifecycle-kit


lifecycle-kit / chem / Biomolecule

Interface: Biomolecule

Defined in: chem/biomolecules.ts:36

What a body is built out of.

Adapted from an earlier procedural-creature molecular synthesis model. Its principle is exactly right and entirely renderer-agnostic:

protein → muscle bulk calcium → rigid structure lipid → insulation and reserve chitin → exoskeleton keratin → spines, claws, coat

Only its final step was 3D — it turned those fractions into THREE.js cylinders and spheres, and that is the part of Ebb & Bloom that is hard. Rendering fusing molecules in 3D is the problem that stalled it. At 12x9 pixels a molecule is a glyph and a body plan is a handful of parts, so the expensive half of the idea evaporates and the valuable half ports intact.

That table has no calcium, so rigidity here comes from phosphorus and magnesium — which is chemically honest: bone mineral is calcium phosphate, and phosphate is the scarce half.

The formulas below are real molecules — glucose, an amino-acid residue, palmitic acid — written as carbon compounds because that is what they are. On a world whose chemistry chose a different backbone, asBackbone() substitutes it, so a tissue keeps its STRUCTURE (a chain with nitrogen and sulfur hanging off it is a protein whatever the chain is made of) while its composition, mass and cost follow the world. Everything downstream reads through that rather than off the literal formula.

Properties

formula

formula: Record<string, number>

Defined in: chem/biomolecules.ts:40

Element counts per unit.


id

id: string

Defined in: chem/biomolecules.ts:37


name

name: string

Defined in: chem/biomolecules.ts:38


role

role: string

Defined in: chem/biomolecules.ts:42

What having a lot of this does to a body.