Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
BlendMode
Light2D.swift:32enum BlendMode
Cases
case add
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light.
case sub
Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
case mix
Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (19) members.
Types
Type members
Instance members
var blendMode: Light2D.BlendMode
The Light2D’s blend mode. See
BlendMode
constants for values.var color: Color
The Light2D’s
Color
.var editorOnly: Bool
If
true
, Light2D will only appear when editing the scene.var enabled: Bool
If
true
, Light2D will emit light.var energy: Double
The Light2D’s energy value. The larger the value, the stronger the light.
var rangeItemCullMask: Int32
The layer mask. Only objects with a matching
lightMask
will be affected by the Light2D. See alsoshadowItemCullMask
, which affects which objects can cast shadows.var rangeLayerMax: Int32
Maximum layer value of objects that are affected by the Light2D.
var rangeLayerMin: Int32
Minimum layer value of objects that are affected by the Light2D.
var rangeZMax: Int32
Maximum
z
value of objects that are affected by the Light2D.var rangeZMin: Int32
Minimum
z
value of objects that are affected by the Light2D.var shadowColor: Color
Color
of shadows cast by the Light2D.var shadowEnabled: Bool
If
true
, the Light2D will cast shadows.var shadowFilter: Light2D.ShadowFilter
Shadow filter type. See
ShadowFilter
for possible values.var shadowFilterSmooth: Double
Smoothing value for shadows. Higher values will result in softer shadows, at the cost of visible streaks that can appear in shadow rendering.
shadowFilterSmooth
only has an effect ifshadowFilter
is .pcf5 or .pcf13.var shadowItemCullMask: Int32
The shadow mask. Used with
LightOccluder2D
to cast shadows. Only occluders with a matchinglightMask
will cast shadows. See alsorangeItemCullMask
, which affects which objects can receive the light.func getHeight(
) -> Double Returns the light’s height, which is used in 2D normal mapping. See
height
andheight
.func setHeight(Double
) Sets the light’s height, which is used in 2D normal mapping. See
height
andheight
.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.