Documentation ¶
Overview ¶
Package Light2D provides methods for working with Light2D object instances.
Index ¶
- type Advanced
- type Any
- type BlendMode
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsLight2D() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) BlendMode() gdclass.Light2DBlendMode
- func (self Instance) Color() Color.RGBA
- func (self Instance) EditorOnly() bool
- func (self Instance) Enabled() bool
- func (self Instance) Energy() Float.X
- func (self Instance) GetHeight() Float.X
- func (self Instance) RangeItemCullMask() int
- func (self Instance) RangeLayerMax() int
- func (self Instance) RangeLayerMin() int
- func (self Instance) RangeZMax() int
- func (self Instance) RangeZMin() int
- func (self Instance) SetBlendMode(value gdclass.Light2DBlendMode)
- func (self Instance) SetColor(value Color.RGBA)
- func (self Instance) SetEditorOnly(value bool)
- func (self Instance) SetEnabled(value bool)
- func (self Instance) SetEnergy(value Float.X)
- func (self Instance) SetHeight(height Float.X)
- func (self Instance) SetRangeItemCullMask(value int)
- func (self Instance) SetRangeLayerMax(value int)
- func (self Instance) SetRangeLayerMin(value int)
- func (self Instance) SetRangeZMax(value int)
- func (self Instance) SetRangeZMin(value int)
- func (self Instance) SetShadowColor(value Color.RGBA)
- func (self Instance) SetShadowEnabled(value bool)
- func (self Instance) SetShadowFilter(value gdclass.Light2DShadowFilter)
- func (self Instance) SetShadowFilterSmooth(value Float.X)
- func (self Instance) SetShadowItemCullMask(value int)
- func (self Instance) ShadowColor() Color.RGBA
- func (self Instance) ShadowEnabled() bool
- func (self Instance) ShadowFilter() gdclass.Light2DShadowFilter
- func (self Instance) ShadowFilterSmooth() Float.X
- func (self Instance) ShadowItemCullMask() int
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type ShadowFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type BlendMode ¶
type BlendMode = gdclass.Light2DBlendMode //gd:Light2D.BlendMode
const ( /*Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light.*/ BlendModeAdd BlendMode = 0 /*Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.*/ BlendModeSub BlendMode = 1 /*Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.*/ BlendModeMix BlendMode = 2 )
type Instance ¶
Casts light in a 2D environment. A light is defined as a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related).
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) BlendMode ¶
func (self Instance) BlendMode() gdclass.Light2DBlendMode
func (Instance) EditorOnly ¶
func (Instance) GetHeight ¶
Returns the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height].
func (Instance) RangeItemCullMask ¶
func (Instance) RangeLayerMax ¶
func (Instance) RangeLayerMin ¶
func (Instance) SetBlendMode ¶
func (self Instance) SetBlendMode(value gdclass.Light2DBlendMode)
func (Instance) SetEditorOnly ¶
func (Instance) SetEnabled ¶
func (Instance) SetHeight ¶
Sets the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height].
func (Instance) SetRangeItemCullMask ¶
func (Instance) SetRangeLayerMax ¶
func (Instance) SetRangeLayerMin ¶
func (Instance) SetRangeZMax ¶
func (Instance) SetRangeZMin ¶
func (Instance) SetShadowColor ¶
func (Instance) SetShadowEnabled ¶
func (Instance) SetShadowFilter ¶
func (self Instance) SetShadowFilter(value gdclass.Light2DShadowFilter)
func (Instance) SetShadowFilterSmooth ¶
func (Instance) SetShadowItemCullMask ¶
func (Instance) ShadowColor ¶
func (Instance) ShadowEnabled ¶
func (Instance) ShadowFilter ¶
func (self Instance) ShadowFilter() gdclass.Light2DShadowFilter
func (Instance) ShadowFilterSmooth ¶
func (Instance) ShadowItemCullMask ¶
func (*Instance) UnsafePointer ¶
type ShadowFilter ¶
type ShadowFilter = gdclass.Light2DShadowFilter //gd:Light2D.ShadowFilter
const ( /*No filter applies to the shadow map. This provides hard shadow edges and is the fastest to render. See [member shadow_filter].*/ ShadowFilterNone ShadowFilter = 0 /*Percentage closer filtering (5 samples) applies to the shadow map. This is slower compared to hard shadow rendering. See [member shadow_filter].*/ ShadowFilterPcf5 ShadowFilter = 1 /*Percentage closer filtering (13 samples) applies to the shadow map. This is the slowest shadow filtering mode, and should be used sparingly. See [member shadow_filter].*/ ShadowFilterPcf13 ShadowFilter = 2 )