Falloff

sealed trait Falloff

Represents different lighting falloff models, also known as attenuation, i.e. how much a light power decays over distance.

Quadratic is the most physically accurate, but possibly least useful for 2D games! All other models are unrealistic, but possibly easier to work with.

Note that "intensity" will feel different in different lighting models. Try smooth with intensity 1 or 2, Linear 5, or Quadratic 500 and compare.

Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def withFar(newFar: Int): Falloff
def withNear(newNear: Int): Falloff
def withRange(newNear: Int, newFar: Int): Falloff