Class: Walker

Walker

new Walker()

Creates a new Walker. Walkers have no seeking, steering or directional behavior and just randomly explore their World. Use Walkers to create wandering objects or targets for Agents to seek. They are not affected by gravity or friction.
Source:

Extends

Methods

applyAdditionalForces()

If walker uses perlin noise, updates acceleration based on noise space. If walker is a random walker, updates location based on random location.
Source:

init(opt_options=)

Initializes an instance.
Parameters:
Name Type Argument Default Description
opt_options= Object <optional>
A map of initial properties.
opt_options.width number <optional>
10 Width.
opt_options.height number <optional>
10 Height.
opt_options.remainsOnScreen boolean <optional>
false If set to true and perlin = true, object will avoid world edges.
opt_options.maxSpeed number <optional>
1 maxSpeed.
opt_options.perlin boolean <optional>
true If set to true, object will use Perlin Noise to calculate its location.
opt_options.perlinSpeed number <optional>
0.005 If perlin = true, perlinSpeed determines how fast the object location moves through the noise space.
opt_options.perlinTime number <optional>
0 Sets the Perlin Noise time.
opt_options.perlinAccelLow number <optional>
-0.075 The lower bound of acceleration when perlin = true.
opt_options.perlinAccelHigh number <optional>
0.075 The upper bound of acceleration when perlin = true.
opt_options.perlinOffsetX number <optional>
Math.random() * 10000 The x offset in the Perlin Noise space.
opt_options.perlinOffsetY number <optional>
Math.random() * 10000 The y offset in the Perlin Noise space.
opt_options.color string | Array <optional>
255, 150, 50 Color.
opt_options.borderWidth string | number <optional>
'1em' Border width.
opt_options.borderStyle string <optional>
'double' Border style.
opt_options.borderColor string | Array <optional>
255, 255, 255 Border color.
opt_options.borderRadius string <optional>
100 Border radius.
opt_options.opacity number <optional>
0.75 The object's opacity.
opt_options.zIndex number <optional>
1 The object's zIndex.
Source: