Documentation
¶
Overview ¶
A directional light is a type of graphics.gd/classdb/Light3D node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsDirectionalLight3D() Instance
- func (self *Extension[T]) AsLight3D() Light3D.Instance
- func (self *Extension[T]) AsNode() Node.Instance
- func (self *Extension[T]) AsNode3D() Node3D.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsVisualInstance3D() VisualInstance3D.Instance
- type ID
- type Instance
- func (self Instance) AsDirectionalLight3D() Instance
- func (self Instance) AsLight3D() Light3D.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
- func (self Instance) DirectionalShadowBlendSplits() bool
- func (self Instance) DirectionalShadowMode() ShadowMode
- func (self Instance) ID() ID
- func (self Instance) SetDirectionalShadowBlendSplits(value bool)
- func (self Instance) SetDirectionalShadowMode(value ShadowMode)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetSkyMode(value SkyMode)
- func (self Instance) SkyMode() SkyMode
- func (self Instance) Virtual(name string) reflect.Value
- type ShadowMode
- type SkyMode
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 Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsDirectionalLight3D ¶
func (*Extension[T]) AsVisualInstance3D ¶
func (self *Extension[T]) AsVisualInstance3D() VisualInstance3D.Instance
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.DirectionalLight3D
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsDirectionalLight3D ¶
func (Instance) AsVisualInstance3D ¶
func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
func (Instance) DirectionalShadowBlendSplits ¶
func (Instance) DirectionalShadowMode ¶
func (self Instance) DirectionalShadowMode() ShadowMode
func (Instance) SetDirectionalShadowBlendSplits ¶
func (Instance) SetDirectionalShadowMode ¶
func (self Instance) SetDirectionalShadowMode(value ShadowMode)
func (Instance) SetSkyMode ¶
type ShadowMode ¶
type ShadowMode int //gd:DirectionalLight3D.ShadowMode
const ( // Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects. ShadowOrthogonal ShadowMode = 0 // Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between [ShadowOrthogonal] and [ShadowParallel4Splits] in terms of performance. ShadowParallel2Splits ShadowMode = 1 // Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. ShadowParallel4Splits ShadowMode = 2 )
type SkyMode ¶
type SkyMode int //gd:DirectionalLight3D.SkyMode
const ( // Makes the light visible in both scene lighting and sky rendering. SkyModeLightAndSky SkyMode = 0 // Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders. SkyModeLightOnly SkyMode = 1 // Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example). SkyModeSkyOnly SkyMode = 2 )