turbulenceField(smoothness:animationSpeed:)
Creates and returns a field behavior object that applies noise to an item in motion.
Declaration
class func turbulenceField(smoothness: CGFloat, animationSpeed speed: CGFloat) -> SelfParameters
- smoothness:
The smoothness of the turbulence field. Specify a value between
0.0and1.0, where0.0indicates the maximum amount of randomness in the generated field and1.0indicates the least amount of randomness. - speed:
The frequency at which the turbulence field changes, measured in Hertz (Hz). Specify
0.0to create a turbulence field that does not change over time.
Return Value
A field behavior object that applies turbulence to an item in motion.
Discussion
The strength of the noise generated by this field is proportional to the velocity of the item in the field.