package engine_entity_data_light
Constants
LightTypeDirectional
LightType(iota)
LightTypePoint
LightTypeSpot
Functions
BindingKey
Types
LightEntityData
struct
type LightEntityData struct {
Ambient matrix.Vec3 `default:"0.1,0.1,0.1"`
Diffuse matrix.Vec3 `default:"1,1,1"`
Specular matrix.Vec3 `default:"1,1,1"`
Intensity float32 `default:"5"`
Constant float32 `default:"1"`
Linear float32 `default:"0.0014"`
Quadratic float32 `default:"0.000007"`
Cutoff float32 `default:"0.8433914458128857"` // matrix.Cos(matrix.Deg2Rad(32.5))
OuterCutoff float32 `default:"0.636078220277764"` // matrix.Cos(matrix.Deg2Rad(50.5))
Type LightType
CastsShadows bool
}
LightEntityData.Init
LightEntityData.WithLegacyColorDefaults
WithLegacyColorDefaults repairs light bindings written by editor versions that failed to apply matrix vector default tags. That defect serialized all three color fields as zero, making the light permanently black after reload. A partial zero value is left alone so authored color choices are preserved.
LightModule
struct