createFog
@zylem/game-lib / entity / createFog
Function: createFog()
createFog(
options?):ZylemFog
Defined in: packages/game-lib/src/lib/entities/fog.ts:221
Create a fog entity that can be added to a stage with stage.add(...).
Parameters
options?
ZylemFogOptions = \{\}
Returns
Examples
Default greyish fog -- no arguments needed:
stage.add(createFog());
Exp² fog with animated, ground-hugging haze:
stage.add(createFog({
type: 'exp2',
color: '#aabbcc',
density: 0.015,
height: { enabled: true, level: 5, falloff: 0.2 },
noise: { scale: 0.05, strength: 0.15, speed: 0.1 },
}));