# Interface: Biomolecule

[**lifecycle-kit**](https://jonbogaty.com/lifecycle-kit/api/readme/index.md)

***

[lifecycle-kit](https://jonbogaty.com/lifecycle-kit/api/readme/index.md) / [chem](https://jonbogaty.com/lifecycle-kit/api/chem/readme/index.md) / Biomolecule


# Interface: Biomolecule {#interface-biomolecule}


Defined in: [chem/biomolecules.ts:36](https://github.com/jbcom/lifecycle-kit/blob/074e4e7b8038d3e2de9eb44c4b5b5aee0ef02b48/src/chem/biomolecules.ts#L36)

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 {#properties}



### formula {#formula}


> **formula**: `Record`\<`string`, `number`\>

Defined in: [chem/biomolecules.ts:40](https://github.com/jbcom/lifecycle-kit/blob/074e4e7b8038d3e2de9eb44c4b5b5aee0ef02b48/src/chem/biomolecules.ts#L40)

Element counts per unit.

***


### id {#id}


> **id**: `string`

Defined in: [chem/biomolecules.ts:37](https://github.com/jbcom/lifecycle-kit/blob/074e4e7b8038d3e2de9eb44c4b5b5aee0ef02b48/src/chem/biomolecules.ts#L37)

***


### name {#name}


> **name**: `string`

Defined in: [chem/biomolecules.ts:38](https://github.com/jbcom/lifecycle-kit/blob/074e4e7b8038d3e2de9eb44c4b5b5aee0ef02b48/src/chem/biomolecules.ts#L38)

***


### role {#role}


> **role**: `string`

Defined in: [chem/biomolecules.ts:42](https://github.com/jbcom/lifecycle-kit/blob/074e4e7b8038d3e2de9eb44c4b5b5aee0ef02b48/src/chem/biomolecules.ts#L42)

What having a lot of this does to a body.
