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.
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.
-
init(opt_options=)
-
Initializes an instance.
Parameters:
Name Type Argument Default Description opt_options=Object <optional>
A map of initial properties. opt_options.widthnumber <optional>
10 Width. opt_options.heightnumber <optional>
10 Height. opt_options.remainsOnScreenboolean <optional>
false If set to true and perlin = true, object will avoid world edges. opt_options.maxSpeednumber <optional>
1 maxSpeed. opt_options.perlinboolean <optional>
true If set to true, object will use Perlin Noise to calculate its location. opt_options.perlinSpeednumber <optional>
0.005 If perlin = true, perlinSpeed determines how fast the object location moves through the noise space. opt_options.perlinTimenumber <optional>
0 Sets the Perlin Noise time. opt_options.perlinAccelLownumber <optional>
-0.075 The lower bound of acceleration when perlin = true. opt_options.perlinAccelHighnumber <optional>
0.075 The upper bound of acceleration when perlin = true. opt_options.perlinOffsetXnumber <optional>
Math.random() * 10000 The x offset in the Perlin Noise space. opt_options.perlinOffsetYnumber <optional>
Math.random() * 10000 The y offset in the Perlin Noise space. opt_options.colorstring | Array <optional>
255, 150, 50 Color. opt_options.borderWidthstring | number <optional>
'1em' Border width. opt_options.borderStylestring <optional>
'double' Border style. opt_options.borderColorstring | Array <optional>
255, 255, 255 Border color. opt_options.borderRadiusstring <optional>
100 Border radius. opt_options.opacitynumber <optional>
0.75 The object's opacity. opt_options.zIndexnumber <optional>
1 The object's zIndex.