Skip to content

1681-engine / index / puffOffset

Function: puffOffset() ​

ts
function puffOffset(
   sec, 
   age, 
   seed, 
   wind, 
   m
): object;

Defined in: src/ambient/life/lifeMotion.ts:99

Where a puff of smoke is sec seconds after it left a chimney's mouth, age the share of its life gone: it climbs straight out of the pot, then the wind takes it more the higher it gets. seed (0..1) gives each its own wobble.

Parameters ​

ParameterType
secnumber
agenumber
seednumber
windnumber
mPuffMotion

Returns ​

object

dx ​

ts
dx: number;

dy ​

ts
dy: number;

Released under the MIT License.