Skip to content

five-on-it / packages/ai/src/profiles / clampProfile

Function: clampProfile() ​

clampProfile(partial, base?): BehaviourProfile

Defined in: packages/ai/src/profiles.ts:245

A whole profile from a partial one: what it leaves out comes from base (the pursuit preset by default), and every number is held to its range (shares and the aggression to 0..1, angles to a half turn, counts to whole numbers, hit points to 1..255, the crew to 1..8, the tumble to half a second at least, the flee to none at least).

Parameters ​

partial ​

Partial<BehaviourProfile>

base? ​

BehaviourProfile = PROFILES.pursuit

Returns ​

BehaviourProfile