Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public enum DistanceModelType
- Object
- Enum<DistanceModelType>
- DistanceModelType
ImplementsComparable<DistanceModelType>
How a
PannerNode attenuates a source with distance, using its
refDistance, maxDistance and rolloffFactor.Enum constants
LINEAR | 1 - rolloff * (d - ref) / (max - ref), with d clamped to [ref, max] and the rolloff to [0, 1]. |
INVERSE | ref / (ref + rolloff * (d - ref)), with d at least ref. |
EXPONENTIAL | (d / ref) ^ -rolloff, with d at least ref. |
Methods
public static DistanceModelType[] values() | |
public static DistanceModelType valueOf(String name) |
Inherited methods
Enum constant details
LINEAR
LINEAR1 - rolloff * (d - ref) / (max - ref), with d clamped to [ref, max]
and the rolloff to [0, 1].INVERSE
INVERSEref / (ref + rolloff * (d - ref)), with d at least ref. The default.EXPONENTIAL
EXPONENTIAL(d / ref) ^ -rolloff, with d at least ref.Method details
values
public static DistanceModelType[] values()valueOf
public static DistanceModelType valueOf(String name)