# @ferret/destruction: API (continued)

### FRAME_LOAD_SHARE

*const* · `packages/destruction/src/autoparts.ts:34`

```ts
const FRAME_LOAD_SHARE: 0.12
```

The share of a zone's section (thickness x perimeter of its face) that carries load when it crumples along the car's length, per load path of a frontal or rear impact (modelling constants). The paths act in
PARALLEL, so their plateau forces add: for the crown-victoria they are about 285 kN (frame), 125 kN (bumper beam), 70 kN (hood) and 40 kN each (fenders), 560 kN together; at 15 m/s (54 km/h) a 1.8 t car then
stops in about 0.4 m, which is what barrier tests of cars of this class show (0.4 to 0.5 m of crush at 56 km/h). The side, roof and door zones keep the general share. These four numbers are a CALIBRATION (tuning constants chosen for that stop depth), not measured values.

### FRONT_CRUSH_FRACTION

*const* · `packages/destruction/src/autoparts.ts:44`

```ts
const FRONT_CRUSH_FRACTION: 0.7
```

crush depths as shares of what lies there: front and rear of the overhang past the axle; the sides of the half width; the roof of the body's height

### GLASS_FRACTURE_SHARE

*const* · `packages/destruction/src/glass.ts:48`

```ts
const GLASS_FRACTURE_SHARE: 0.6
```

the share of a hit's energy that may go into the crack surface of a break (tuning constant)

### GLASS_KIND

*const* · `packages/destruction/src/glass.ts:35`

```ts
const GLASS_KIND: { readonly annealed: 0; readonly tempered: 1; readonly laminated: 2; }
```

### GLASS_MAX_PIECES

*const* · `packages/destruction/src/glass.ts:51`

```ts
const GLASS_MAX_PIECES: 128
```

### GLASS_POISSON

*const* · `packages/destruction/src/glass.ts:38`

```ts
const GLASS_POISSON: 0.22
```

Poisson's ratio of glass

### GRAVITY

*const* · `packages/destruction/src/vehicle.ts:73`

```ts
const GRAVITY: 9.81
```

### GREEN_WOOD

*const* · `packages/destruction/src/branches.ts:37`

```ts
const GREEN_WOOD: { modulus: number; rupture: number; density: number; }
```

### HOOD_LOAD_SHARE

*const* · `packages/destruction/src/autoparts.ts:34`

```ts
const HOOD_LOAD_SHARE: 0.08
```

### HULL_FRICTION

*const* · `packages/destruction/src/vehicle.ts:95`

```ts
const HULL_FRICTION: 0.6
```

friction of the body's metal on the ground

### HULL_MIN_DEPTH

*const* · `packages/destruction/src/crush.ts:30`

```ts
const HULL_MIN_DEPTH: 0.05
```

the collider hull is not rebuilt for dents shallower than this, m (a rebuild per scratch would be a waste)

### HULL_MIN_FRACTION

*const* · `packages/destruction/src/crush.ts:32`

```ts
const HULL_MIN_FRACTION: 0.2
```

a hull never shrinks below this share of its size along an axis

### HULL_PROBE

*const* · `packages/destruction/src/vehicle.ts:97`

```ts
const HULL_PROBE: 0.3
```

the ray of a hull corner starts this high above the corner, m

### HULL_SAG

*const* · `packages/destruction/src/vehicle.ts:93`

```ts
const HULL_SAG: 0.02
```

the hull touches the ground like a hard pad: static sag of a corner under a quarter of the weight, m

### KIND_DEFAULT

*const* · `packages/destruction/src/material.ts:30`

```ts
const KIND_DEFAULT: Record<MaterialKind, string>
```

the substance a kind stands for when nothing more is said

### KNOT_DENSITY

*const* · `packages/destruction/src/wood.ts:44`

```ts
const KNOT_DENSITY: 1
```

knots per metre of a plank, when the part does not say (tuning constant: timber has about one a metre)

### KNOT_LOSS

*const* · `packages/destruction/src/wood.ts:46`

```ts
const KNOT_LOSS: 1.5
```

how much a knot weakens the section at its centre: loss = KNOT_LOSS x knot diameter / depth, at most 0.7 (tuning constant)

### LAMINATE_THROUGH

*const* · `packages/destruction/src/glass.ts:42`

```ts
const LAMINATE_THROUGH: 3
```

a laminated pane breaks through at this multiple of its failure stress (tuning constant: the film carries the pane; 3 means 9 x the energy)

### LAMINATED_GLASS_THICKNESS

*const* · `packages/destruction/src/autoparts.ts:38`

```ts
const LAMINATED_GLASS_THICKNESS: 0.0055
```

### LEAF_DAMPING

*const* · `packages/destruction/src/branches.ts:39`

```ts
const LEAF_DAMPING: 0.18
```

the damping ratio of a branch in leaf swinging back (tuning constant: a branch rings a few times)

### LEAFY_TERMINAL

*const* · `packages/destruction/src/branches.ts:41`

```ts
const LEAFY_TERMINAL: 4
```

m/s: the terminal speed of a falling branch in leaf and of a bare one (tuning constants: a leafy bough drifts, a stick drops)

### LINK_GIVE

*const* · `packages/destruction/src/vehicle.ts:107`

```ts
const LINK_GIVE: 0.02
```

the elastic give of the links of a part that has taken a hit, m: the residual energy of a hit over this length is the force on its links (E = F x)

### LODS

*const* · `packages/destruction/src/service.ts:37`

```ts
const LODS: readonly Lod[]
```

### LOUD_ENERGY

*const* · `packages/destruction/src/debris.ts:49`

```ts
const LOUD_ENERGY: 10000
```

the hit energy that is a loudness of 1, J (tuning constant: a heavy crash)

### MATERIAL_KINDS

*const* · `packages/destruction/src/types.ts:13`

```ts
const MATERIAL_KINDS: readonly MaterialKind[]
```

### MAX_BRANCHES

*const* · `packages/destruction/src/branches.ts:43`

```ts
const MAX_BRANCHES: 1024
```

the most branches a tree is analysed into (the branch index is a vertex attribute and a row of a texture)

### MAX_STEER

*const* · `packages/destruction/src/vehicle.ts:91`

```ts
const MAX_STEER: 0.5
```

steering lock, rad

### MERGE_DELAY

*const* · `packages/destruction/src/debris.ts:39`

```ts
const MERGE_DELAY: 1
```

seconds a sleeper waits before it may merge into the clutter of its group

### MERGE_MIN

*const* · `packages/destruction/src/debris.ts:41`

```ts
const MERGE_MIN: 3
```

the least sleepers in a group for a clutter to be made

### MIN_LOAD_FRACTION

*const* · `packages/destruction/src/wood.ts:52`

```ts
const MIN_LOAD_FRACTION: 0.02
```

the least distance of a load from a support, as a share of the span (the beam formula is not meant for a load at the support; tuning constant)

### MORTAR_SLIP

*const* · `packages/destruction/src/stone.ts:43`

```ts
const MORTAR_SLIP: 0.005
```

how far a mortar joint slips before it lets go, m (tuning constant; the work of tearing it is holds x this)

### NAIL_DEPTH

*const* · `packages/destruction/src/wood.ts:62`

```ts
const NAIL_DEPTH: 0.03
```

how deep a nail sits, m (tuning constant)

### PANEL_THICKNESS

*const* · `packages/destruction/src/autoparts.ts:22`

```ts
const PANEL_THICKNESS: 0.0008
```

thickness of body sheet, m (typical automotive outer panel)

### PHYSICAL

*const* · `packages/destruction/src/types.ts:106`

```ts
const PHYSICAL: StyleContext
```

### POROUS_DENSITY

*const* · `packages/destruction/src/stone.ts:35`

```ts
const POROUS_DENSITY: 2000
```

bulk density above which a crumbly material is taken as solid (no dust by default), kg/m^3 (tuning constant: the guess of porosity)

### PRESETS

*const* · `packages/destruction/src/style.ts:62`

```ts
const PRESETS: Record<string, StyleSpec>
```

the shipped presets (plan section 4)

### RESTING_SPEED

*const* · `packages/destruction/src/vehicle.ts:103`

```ts
const RESTING_SPEED: 0.3
```

closing speed under which two cars in contact are resting and do each other no damage, m/s (the plan's impact threshold)

### RIGID_STRENGTH

*const* · `packages/destruction/src/material.ts:34`

```ts
const RIGID_STRENGTH: 1000000000000000
```

a part of kind `rigid` holds against anything: its strengths are this (Pa)

### ROOF_CRUSH_FRACTION

*const* · `packages/destruction/src/autoparts.ts:44`

```ts
const ROOF_CRUSH_FRACTION: 0.12
```

### ROTATION_SHARE

*const* · `packages/destruction/src/fracture.ts:591`

```ts
const ROTATION_SHARE: 0.1
```

the share of the pieces' kinetic energy that is rotation (the rest is translation)

### SEAL_TENSILE

*const* · `packages/destruction/src/autoparts.ts:46`

```ts
const SEAL_TENSILE: 1000000
```

### SIDE_CRUSH_FRACTION

*const* · `packages/destruction/src/autoparts.ts:44`

```ts
const SIDE_CRUSH_FRACTION: 0.3
```

### SIDE_GLASS_THICKNESS

*const* · `packages/destruction/src/autoparts.ts:38`

```ts
const SIDE_GLASS_THICKNESS: 0.004
```

thickness of glass, m: side panes (tempered) and windscreen (laminated), typical

### SLIP_REFERENCE_SPEED

*const* · `packages/destruction/src/vehicle.ts:85`

```ts
const SLIP_REFERENCE_SPEED: 2
```

the speed below which slip is measured against this one (a stopped car has no slip ratio), m/s

### SLIP_SATURATION

*const* · `packages/destruction/src/vehicle.ts:83`

```ts
const SLIP_SATURATION: 0.15
```

slip at which a tyre reaches its friction limit (longitudinal ratio and lateral slope)

### SMALL_MASS

*const* · `packages/destruction/src/debris.ts:43`

```ts
const SMALL_MASS: 0.05
```

a piece is small below this mass, kg, and fades; larger ones stay (tuning constant)

### SPLINTER_LENGTH_DEPTHS

*const* · `packages/destruction/src/wood.ts:54`

```ts
const SPLINTER_LENGTH_DEPTHS: 2.5
```

the length of a long splinter, in section depths (tuning constant)

### SPLINTER_SHARE

*const* · `packages/destruction/src/wood.ts:60`

```ts
const SPLINTER_SHARE: 0.5
```

the share of the energy left after the break plane that the splinter cuts may take (tuning constant; the chips get the rest)

### SPLINTERS_MAX

*const* · `packages/destruction/src/wood.ts:57`

```ts
const SPLINTERS_MAX: 6
```

### SPOT_WELD_DIAMETER

*const* · `packages/destruction/src/autoparts.ts:52`

```ts
const SPOT_WELD_DIAMETER: 0.006
```

the diameter of a spot weld nugget, m

### STAR_FRACTION

*const* · `packages/destruction/src/glass.ts:40`

```ts
const STAR_FRACTION: 0.7
```

the stress ratio from which a hit leaves a star (tuning constant: cracks start before the pane gives way)

### STAR_SHARE

*const* · `packages/destruction/src/glass.ts:46`

```ts
const STAR_SHARE: 0.3
```

the share of a hit's energy a star's cracks may take (tuning constant)

### STAR_WEAKEN

*const* · `packages/destruction/src/glass.ts:44`

```ts
const STAR_WEAKEN: 0.3
```

how much a full star weakens the pane for the next hit (tuning constant)

### STONE_FRACTURE_SHARE

*const* · `packages/destruction/src/stone.ts:33`

```ts
const STONE_FRACTURE_SHARE: 0.7
```

the share of a hit's energy that may go into crack surface (tuning constant)

### STONE_MAX_PIECES

*const* · `packages/destruction/src/stone.ts:31`

```ts
const STONE_MAX_PIECES: 32
```

the most cells of one break (tuning constant: the cell build costs about n^1.4, 32 cells take under 2 ms, 48 about 3 ms; `stone.maxPieces` raises it for one part)

### STRIKER_DIAMETER

*const* · `packages/destruction/src/autoparts.ts:50`

```ts
const STRIKER_DIAMETER: 0.008
```

a door latch's striker pin, m (diameter)

### STYLE_PRESET_NAMES

*const* · `packages/destruction/src/service.ts:485`

```ts
const STYLE_PRESET_NAMES: string[]
```

the shipped style names, for a game's menu

### SUBSTANCES

*const* · `packages/destruction/src/material.ts:11`

```ts
const SUBSTANCES: Record<string, { kind: MaterialKind; props: MaterialProps; }>
```

substance -> its kind and numbers. Strengths in Pa, fracture energy in J/m^2.

### SUSPENSION_DAMPING

*const* · `packages/destruction/src/vehicle.ts:77`

```ts
const SUSPENSION_DAMPING: 0.4
```

suspension damping as a share of critical

### SUSPENSION_FREQUENCY

*const* · `packages/destruction/src/vehicle.ts:75`

```ts
const SUSPENSION_FREQUENCY: 1.2
```

suspension natural frequency on the sprung weight, Hz (passenger car range)

### SUSPENSION_TRAVEL

*const* · `packages/destruction/src/vehicle.ts:79`

```ts
const SUSPENSION_TRAVEL: 0.35
```

total spring travel from full droop to the bump stop, m

### TEMPERED_MAX_PIECES

*const* · `packages/destruction/src/glass.ts:52`

```ts
const TEMPERED_MAX_PIECES: 400
```

### TYRE_FRICTION

*const* · `packages/destruction/src/vehicle.ts:87`

```ts
const TYRE_FRICTION: 1
```

tyre friction coefficient on a normal surface (dry asphalt, handbook range 0.8 to 1)

### VEHICLE_SLEEP_ANGULAR

*const* · `packages/destruction/src/vehicle.ts:100`

```ts
const VEHICLE_SLEEP_ANGULAR: 0.03
```

### VEHICLE_SLEEP_LINEAR

*const* · `packages/destruction/src/vehicle.ts:99`

```ts
const VEHICLE_SLEEP_LINEAR: 0.03
```

a car sleeps when it has moved no faster than these (m/s, rad/s) for `VEHICLE_SLEEP_TIME` seconds

### VEHICLE_SLEEP_TIME

*const* · `packages/destruction/src/vehicle.ts:101`

```ts
const VEHICLE_SLEEP_TIME: 0.6
```

### WHEEL_EFFECTIVE_DENSITY

*const* · `packages/destruction/src/autoparts.ts:36`

```ts
const WHEEL_EFFECTIVE_DENSITY: 280
```

effective density of a wheel with its tyre over the cylinder it fills, kg/m^3 (a tyre is mostly air)

### WHEEL_INERTIA

*const* · `packages/destruction/src/vehicle.ts:89`

```ts
const WHEEL_INERTIA: 1.5
```

spin inertia of a wheel with its tyre and brake, kg m^2

### WHEEL_ROLL_AXIS

*const* · `packages/destruction/src/vehicle.ts:110`

```ts
const WHEEL_ROLL_AXIS: Vec3
```

the right-handed rotation axis, in the car frame, of a wheel that rolls forward (+x) on the ground (+y up): `up x forward`, along -z. A wheel turned by `spin x dt` radians about it moves its top toward the front.

### WOOD_FRACTURE_SHARE

*const* · `packages/destruction/src/wood.ts:50`

```ts
const WOOD_FRACTURE_SHARE: 0.6
```

the share of a hit's energy that may go into crack surface (tuning constant)

