Class Wind
Extends
JEffect.
Wind a wind effect
This effect has global influence - All objects that are movable in the scene will be affected, apart from those added to the exclusions array.
This effect will be applied continuously as long as it is enabled
Defined in: wind.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Wind(_direction, _exclusions)
|
| Field Attributes | Field Name and Description |
|---|---|
|
a 3D vector defining the force of the effect in each axis
|
|
|
optional - a list of bodies to be excluded from the effect
|
- Fields borrowed from class :
- JEffect#_effectEnabled
| Method Attributes | Method Name and Description |
|---|---|
|
Apply()
|
|
|
isExcluded(body)
|
Class Detail
Wind(_direction, _exclusions)
Author: Jim Sangwine.
- Parameters:
- {array} _direction
- a 3D vector defining the force of the effect in each axis
- {array} _exclusions
- optional - a list of bodies to be excluded from the effect
- Requires:
- Vector3DUtil
Field Detail
{array}
direction
a 3D vector defining the force of the effect in each axis
{array}
exclusions
optional - a list of bodies to be excluded from the effect
Method Detail
{void}
Apply()
- See:
- JEffect.Apply
{boolean}
isExcluded(body)
- Parameters:
- {RigidBody} body
- the body to check for