Light3D

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package Light3D provides methods for working with Light3D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsLight3D() Instance
}

type BakeMode

type BakeMode = gdclass.Light3DBakeMode //gd:Light3D.BakeMode
const (
	/*Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights.
	  [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]).*/
	BakeDisabled BakeMode = 0
	/*Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.
	  [b]Note:[/b] The light is not baked in [LightmapGI] if [member editor_only] is [code]true[/code].*/
	BakeStatic BakeMode = 1
	/*Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to [constant BAKE_STATIC]. This has a greater performance cost compared to [constant BAKE_STATIC]. When using SDFGI, the update speed of dynamic lights is affected by [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights].*/
	BakeDynamic BakeMode = 2
)

type Instance

type Instance [1]gdclass.Light3D

Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsLight3D

func (self Instance) AsLight3D() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsVisualInstance3D

func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance

func (Instance) DistanceFadeBegin

func (self Instance) DistanceFadeBegin() Float.X

func (Instance) DistanceFadeEnabled

func (self Instance) DistanceFadeEnabled() bool

func (Instance) DistanceFadeLength

func (self Instance) DistanceFadeLength() Float.X

func (Instance) DistanceFadeShadow

func (self Instance) DistanceFadeShadow() Float.X

func (Instance) EditorOnly

func (self Instance) EditorOnly() bool

func (Instance) GetCorrelatedColor

func (self Instance) GetCorrelatedColor() Color.RGBA

Returns the [Color] of an idealized blackbody at the given [member light_temperature]. This value is calculated internally based on the [member light_temperature]. This [Color] is multiplied by [member light_color] before being sent to the [RenderingServer].

func (Instance) LightAngularDistance

func (self Instance) LightAngularDistance() Float.X

func (Instance) LightBakeMode

func (self Instance) LightBakeMode() gdclass.Light3DBakeMode

func (Instance) LightColor

func (self Instance) LightColor() Color.RGBA

func (Instance) LightCullMask

func (self Instance) LightCullMask() int

func (Instance) LightEnergy

func (self Instance) LightEnergy() Float.X

func (Instance) LightIndirectEnergy

func (self Instance) LightIndirectEnergy() Float.X

func (Instance) LightIntensityLumens

func (self Instance) LightIntensityLumens() Float.X

func (Instance) LightIntensityLux

func (self Instance) LightIntensityLux() Float.X

func (Instance) LightNegative

func (self Instance) LightNegative() bool

func (Instance) LightProjector

func (self Instance) LightProjector() [1]gdclass.Texture2D

func (Instance) LightSize

func (self Instance) LightSize() Float.X

func (Instance) LightSpecular

func (self Instance) LightSpecular() Float.X

func (Instance) LightTemperature

func (self Instance) LightTemperature() Float.X

func (Instance) LightVolumetricFogEnergy

func (self Instance) LightVolumetricFogEnergy() Float.X

func (Instance) SetDistanceFadeBegin

func (self Instance) SetDistanceFadeBegin(value Float.X)

func (Instance) SetDistanceFadeEnabled

func (self Instance) SetDistanceFadeEnabled(value bool)

func (Instance) SetDistanceFadeLength

func (self Instance) SetDistanceFadeLength(value Float.X)

func (Instance) SetDistanceFadeShadow

func (self Instance) SetDistanceFadeShadow(value Float.X)

func (Instance) SetEditorOnly

func (self Instance) SetEditorOnly(value bool)

func (Instance) SetLightAngularDistance

func (self Instance) SetLightAngularDistance(value Float.X)

func (Instance) SetLightBakeMode

func (self Instance) SetLightBakeMode(value gdclass.Light3DBakeMode)

func (Instance) SetLightColor

func (self Instance) SetLightColor(value Color.RGBA)

func (Instance) SetLightCullMask

func (self Instance) SetLightCullMask(value int)

func (Instance) SetLightEnergy

func (self Instance) SetLightEnergy(value Float.X)

func (Instance) SetLightIndirectEnergy

func (self Instance) SetLightIndirectEnergy(value Float.X)

func (Instance) SetLightIntensityLumens

func (self Instance) SetLightIntensityLumens(value Float.X)

func (Instance) SetLightIntensityLux

func (self Instance) SetLightIntensityLux(value Float.X)

func (Instance) SetLightNegative

func (self Instance) SetLightNegative(value bool)

func (Instance) SetLightProjector

func (self Instance) SetLightProjector(value [1]gdclass.Texture2D)

func (Instance) SetLightSize

func (self Instance) SetLightSize(value Float.X)

func (Instance) SetLightSpecular

func (self Instance) SetLightSpecular(value Float.X)

func (Instance) SetLightTemperature

func (self Instance) SetLightTemperature(value Float.X)

func (Instance) SetLightVolumetricFogEnergy

func (self Instance) SetLightVolumetricFogEnergy(value Float.X)

func (Instance) SetShadowBias

func (self Instance) SetShadowBias(value Float.X)

func (Instance) SetShadowBlur

func (self Instance) SetShadowBlur(value Float.X)

func (Instance) SetShadowEnabled

func (self Instance) SetShadowEnabled(value bool)

func (Instance) SetShadowNormalBias

func (self Instance) SetShadowNormalBias(value Float.X)

func (Instance) SetShadowOpacity

func (self Instance) SetShadowOpacity(value Float.X)

func (Instance) SetShadowReverseCullFace

func (self Instance) SetShadowReverseCullFace(value bool)

func (Instance) SetShadowTransmittanceBias

func (self Instance) SetShadowTransmittanceBias(value Float.X)

func (Instance) ShadowBias

func (self Instance) ShadowBias() Float.X

func (Instance) ShadowBlur

func (self Instance) ShadowBlur() Float.X

func (Instance) ShadowEnabled

func (self Instance) ShadowEnabled() bool

func (Instance) ShadowNormalBias

func (self Instance) ShadowNormalBias() Float.X

func (Instance) ShadowOpacity

func (self Instance) ShadowOpacity() Float.X

func (Instance) ShadowReverseCullFace

func (self Instance) ShadowReverseCullFace() bool

func (Instance) ShadowTransmittanceBias

func (self Instance) ShadowTransmittanceBias() Float.X

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Param

type Param = gdclass.Light3DParam //gd:Light3D.Param
const (
	/*Constant for accessing [member light_energy].*/
	ParamEnergy Param = 0
	/*Constant for accessing [member light_indirect_energy].*/
	ParamIndirectEnergy Param = 1
	/*Constant for accessing [member light_volumetric_fog_energy].*/
	ParamVolumetricFogEnergy Param = 2
	/*Constant for accessing [member light_specular].*/
	ParamSpecular Param = 3
	/*Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range].*/
	ParamRange Param = 4
	/*Constant for accessing [member light_size].*/
	ParamSize Param = 5
	/*Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation].*/
	ParamAttenuation Param = 6
	/*Constant for accessing [member SpotLight3D.spot_angle].*/
	ParamSpotAngle Param = 7
	/*Constant for accessing [member SpotLight3D.spot_angle_attenuation].*/
	ParamSpotAttenuation Param = 8
	/*Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance].*/
	ParamShadowMaxDistance Param = 9
	/*Constant for accessing [member DirectionalLight3D.directional_shadow_split_1].*/
	ParamShadowSplit1Offset Param = 10
	/*Constant for accessing [member DirectionalLight3D.directional_shadow_split_2].*/
	ParamShadowSplit2Offset Param = 11
	/*Constant for accessing [member DirectionalLight3D.directional_shadow_split_3].*/
	ParamShadowSplit3Offset Param = 12
	/*Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start].*/
	ParamShadowFadeStart Param = 13
	/*Constant for accessing [member shadow_normal_bias].*/
	ParamShadowNormalBias Param = 14
	/*Constant for accessing [member shadow_bias].*/
	ParamShadowBias Param = 15
	/*Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size].*/
	ParamShadowPancakeSize Param = 16
	/*Constant for accessing [member shadow_opacity].*/
	ParamShadowOpacity Param = 17
	/*Constant for accessing [member shadow_blur].*/
	ParamShadowBlur Param = 18
	/*Constant for accessing [member shadow_transmittance_bias].*/
	ParamTransmittanceBias Param = 19
	/*Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code].*/
	ParamIntensity Param = 20
	/*Represents the size of the [enum Param] enum.*/
	ParamMax Param = 21
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL