Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public enum DistanceModelType

  1. Object
  2. Enum<DistanceModelType>
  3. DistanceModelType

ImplementsComparable<DistanceModelType>

How a PannerNode attenuates a source with distance, using its refDistance, maxDistance and rolloffFactor.

Enum constants

LINEAR1 - rolloff * (d - ref) / (max - ref), with d clamped to [ref, max] and the rolloff to [0, 1].
INVERSEref / (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

LINEAR
1 - rolloff * (d - ref) / (max - ref), with d clamped to [ref, max] and the rolloff to [0, 1].

INVERSE

INVERSE
ref / (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)