Class: A_AttractY

b5. A_AttractY

b5.A_AttractY

new b5.A_AttractY(target, container, min_y, max_y, min_x, max_x, strength, stop, bounce){b5.A_AttractY}

actions/generic/attractor.js, line 120

Action that pulls objects towards or repels objects away on the y-axis that are within a specific range, does not exit

Created actions should be added to an actor or scenes actions list to be processed

For a complete overview of Actions see Booty5 Actions Overview

Name Type Description
target string:b5.Actor

Path to or instance of actor object that will attract other objects

container b5.Actor | b5.Scene

Path to or instance of object that contains the actors (actors that can be attracted have attract property set to true)

min_y number

Minimum y-axis attraction range

max_y number

Maximum y-axis attraction range

min_x number

Minimum x-axis inclusion range

max_x number

Maximum x-axis inclusion range

strength number

Strength of attraction, negative for repulsion

stop boolean

If set to true then attracted objects will stop when they hit the min distance range

bounce boolean

If set to true then objects when stopped at the min distance range will bounce

Returns:
Type Description
b5.A_AttractY The created action