new Smoother(count)
Constructs a new smoother.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
count |
Number | 10 | The amount of samples the smoother will use to average a vector. |
Members
-
count :Number
-
The amount of samples the smoother will use to average a vector.
- Default Value:
- 10
Methods
-
calculate(value, average) → {Vector3}
-
Calculates for the given value a smooth average.
Parameters:
Name Type Description value
Vector3 The value to smooth.
average
Vector3 The calculated average.
-
fromJSON(json) → {Smoother}
-
Restores this instance from the given JSON object.
Parameters:
Name Type Description json
Object The JSON object.
-
toJSON() → {Object}
-
Transforms this instance into a JSON object.
Returns:
Object -The JSON object.