{"TotalCount":10,"Files":[{"Ident":"fwotsoft.lightinghelpers","Path":"Code/KelvinSliderAttribute.cs","FileName":"KelvinSliderAttribute.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"using System;\r\n\r\nnamespace RotSoft.Lighting;\r\n\r\n/// \u003Csummary\u003EMarks a float property as a color temperature in kelvin; the inspector renders it with the kelvin gradient slider.\u003C/summary\u003E\r\n[AttributeUsage( AttributeTargets.Property )]\r\npublic sealed class KelvinSliderAttribute : Attribute\r\n{\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"Code/Helpers/TemperatureExtensions.cs","FileName":"TemperatureExtensions.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"using Sandbox;\r\nusing System;\r\n\r\nnamespace RotSoft.Lighting;\r\n\r\n/// \u003Csummary\u003ETemperature to color conversions.\u003C/summary\u003E\r\npublic static class TemperatureExtensions\r\n{\r\n\t/// \u003Csummary\u003E\r\n\t/// Converts this temperature to an sRGB color, clamped to \u003Csee cref=\u0022Temperature.MinTemperature\u0022/\u003E..\u003Csee cref=\u0022Temperature.MaxTemperature\u0022/\u003E.\r\n\t/// \u003C/summary\u003E\r\n\tpublic static Color ToColor( this Temperature temperature )\r\n\t{\r\n\t\tfloat kelvin = Math.Clamp( temperature.Kelvin, Temperature.MinTemperature, Temperature.MaxTemperature );\r\n\t\tfloat temp = kelvin / 100f;\r\n\t\tfloat r, g, b;\r\n\r\n\t\tif ( temp \u003C= 66f )\r\n\t\t\tr = 1f;\r\n\t\telse\r\n\t\t\tr = Math.Clamp( 1.29293618606f * MathF.Pow( temp - 60f, -0.1332047592f ), 0f, 1f );\r\n\r\n\t\tif ( temp \u003C= 66f )\r\n\t\t\tg = Math.Clamp( 0.390081578769f * MathF.Log( temp ) - 0.63184144378f, 0f, 1f );\r\n\t\telse\r\n\t\t\tg = Math.Clamp( 1.12989086369f * MathF.Pow( temp - 60f, -0.0755148492f ), 0f, 1f );\r\n\r\n\t\tif ( temp \u003E= 66f )\r\n\t\t\tb = 1f;\r\n\t\telse if ( temp \u003C= 19f )\r\n\t\t\tb = 0f;\r\n\t\telse\r\n\t\t\tb = Math.Clamp( 0.54320678911f * MathF.Log( temp - 10f ) - 1.19625408914f, 0f, 1f );\r\n\r\n\t\treturn new Color( r, g, b );\r\n\t}\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"LightTemperature.cs","FileName":"LightTemperature.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"using Sandbox;\r\n\r\nnamespace RotSoft.Lighting;\r\n\r\n\r\n\r\n\r\n/// \u003Csummary\u003E\r\n/// Adjusts the \u003Csee cref=\u0022Color\u0022/\u003E of a \u003Csee cref=\u0022Light\u0022/\u003E component using Color \u003Csee cref=\u0022Temperature\u0022/\u003E in Kelvin.\r\n/// Applies once on add and whenever the temperature or brightness changes, so the light\u0027s color stays manually editable.\r\n/// \u003C/summary\u003E\r\n[Title( \u0022Light Temperature\u0022 )]\r\n[Category( \u0022Light\u0022 )]\r\n[Icon( \u0022thermostat\u0022 )]\r\n[Alias( \u0022Temperature\u0022, \u0022Kelvin\u0022 )]\r\npublic sealed class LightTemperature : Component, Component.ExecuteInEditor\r\n{\r\n\t/// \u003Csummary\u003ECommon light temperature presets in Kelvin.\u003C/summary\u003E\r\n\tpublic enum LightTemperaturePreset\r\n\t{\r\n\t\t/// \u003Csummary\u003E1000 K\u003C/summary\u003E\r\n\t\tMatchFlame = 1700,\r\n\t\t/// \u003Csummary\u003E2400 K\u003C/summary\u003E\r\n\t\tIncandescent = 2400,\r\n\t\t/// \u003Csummary\u003E2700 K\u003C/summary\u003E\r\n\t\tWarmWhite = 3000,\r\n\t\t/// \u003Csummary\u003E3200 K\u003C/summary\u003E\r\n\t\tStudio = 3200,\r\n\t\t/// \u003Csummary\u003E5000 K\u003C/summary\u003E\r\n\t\tCoolWhite = 5000,\r\n\t\t/// \u003Csummary\u003E6500 K\u003C/summary\u003E\r\n\t\tDaylight = 6500,\r\n\t\t/// \u003Csummary\u003E6500 K\u003C/summary\u003E\r\n\t\tLCD = 9500,\r\n\t\t/// \u003Csummary\u003E7500 K\u003C/summary\u003E\r\n\t\tBlueSky = 15000,\r\n\t\t/// \u003Csummary\u003ECustom value, set it with the Kelvin slider.\u003C/summary\u003E\r\n\t\tCustom = 0,\r\n\t}\r\n\r\n\tLightTemperaturePreset _preset = LightTemperaturePreset.CoolWhite;\r\n\tfloat _kelvin = 5000f;\r\n\tfloat _brightness = 1f;\r\n\tbool _syncing;\r\n\tLight _light;\r\n\r\n\t/// \u003Csummary\u003EStandard light temperature presets.\u003C/summary\u003E\r\n\t[Property]\r\n\tpublic LightTemperaturePreset Preset\r\n\t{\r\n\t\tget =\u003E _preset;\r\n\t\tset\r\n\t\t{\r\n\t\t\tif ( _preset == value ) return;\r\n\t\t\t_preset = value;\r\n\t\t\tif ( value != LightTemperaturePreset.Custom )\r\n\t\t\t{\r\n\t\t\t\t_syncing = true;\r\n\t\t\t\tKelvin = (float)(int)value;\r\n\t\t\t\t_syncing = false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tApplyColor();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EThe color temperature in Kelvin.\u003C/summary\u003E\r\n\t[Property, Title( \u0022Temperature (K)\u0022 ), Range( 1500, 15000 ), KelvinSlider]\r\n\tpublic float Kelvin\r\n\t{\r\n\t\tget =\u003E _kelvin;\r\n\t\tset\r\n\t\t{\r\n\t\t\tif ( _kelvin == value ) return;\r\n\t\t\t_kelvin = value;\r\n\t\t\tif ( !_syncing \u0026\u0026 _preset != LightTemperaturePreset.Custom )\r\n\t\t\t\t_preset = LightTemperaturePreset.Custom;\r\n\t\t\tApplyColor();\r\n\t\t}\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EThe brightness (range) of the Light.\u003C/summary\u003E\r\n\t[Property, Range( 0, 5f ), Step( 0.01f )]\r\n\tpublic float Brightness\r\n\t{\r\n\t\tget =\u003E _brightness;\r\n\t\tset\r\n\t\t{\r\n\t\t\tif ( _brightness == value ) return;\r\n\t\t\t_brightness = value;\r\n\t\t\tApplyColor();\r\n\t\t}\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EApplies the current temperature and brightness to the \u003Csee cref=\u0022Light\u0022/\u003E\u0027s color once on add.\u003C/summary\u003E\r\n\tprotected override void OnStart()\r\n\t{\r\n\t\tApplyColor();\r\n\t}\r\n\r\n\t/// \u003Csummary\u003ESets the \u003Csee cref=\u0022Light\u0022/\u003E\u0027s color from the current temperature and brightness, if a light is present.\u003C/summary\u003E\r\n\tvoid ApplyColor()\r\n\t{\r\n\t\t_light ??= GetComponentInChildren\u003CLight\u003E( true );\r\n\t\tif ( _light is null ) return;\r\n\t\t_light.LightColor = new Temperature( Kelvin ).ToColor() * Brightness;\r\n\t}\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"Temperature.cs","FileName":"Temperature.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"namespace RotSoft.Lighting;\r\n\r\n/// \u003Csummary\u003E\r\n/// A color temperature in kelvin, converted to a color via \u003Csee cref=\u0022TemperatureExtensions.ToColor(Temperature)\u0022/\u003E.\r\n/// \u003C/summary\u003E\r\npublic struct Temperature\r\n{\r\n\t/// \u003Csummary\u003ELowest valid temperature, in kelvin.\u003C/summary\u003E\r\n\tpublic const float MinTemperature = 1500f;\r\n\r\n\t/// \u003Csummary\u003EHighest valid temperature, in kelvin.\u003C/summary\u003E\r\n\tpublic const float MaxTemperature = 15000f;\r\n\r\n\t/// \u003Csummary\u003ETemperature in kelvin.\u003C/summary\u003E\r\n\tpublic float Kelvin { get; set; }\r\n\r\n\t/// \u003Csummary\u003ECreates a temperature from a kelvin value.\u003C/summary\u003E\r\n\tpublic Temperature( float kelvin )\r\n\t{\r\n\t\tKelvin = kelvin;\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EImplicitly converts a kelvin value to a \u003Csee cref=\u0022Temperature\u0022/\u003E.\u003C/summary\u003E\r\n\tpublic static implicit operator Temperature( float kelvin ) =\u003E new( kelvin );\r\n\r\n\t/// \u003Csummary\u003EImplicitly converts a \u003Csee cref=\u0022Temperature\u0022/\u003E back to its kelvin value.\u003C/summary\u003E\r\n\tpublic static implicit operator float( Temperature temperature ) =\u003E temperature.Kelvin;\r\n\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"Editor/KelvinFloatControlWidget.cs","FileName":"KelvinFloatControlWidget.cs","PackageType":"library","CodeKind":"Editor","AssetVersionId":355266,"Code":"using System;\r\nusing Sandbox;\r\nusing RotSoft.Lighting;\r\nusing Editor;\r\n\r\nnamespace RotSoft.Lighting;\r\n\r\n/// \u003Csummary\u003E\r\n/// A \u003Csee cref=\u0022FloatControlWidget\u0022/\u003E for float properties marked with \u003Csee cref=\u0022KelvinSliderAttribute\u0022/\u003E:\r\n/// paints the kelvin (blackbody) gradient as the slider track, with a thermostat icon. The property\u0027s\r\n/// \u003Csee cref=\u0022RangeAttribute\u0022/\u003E supplies the track bounds.\r\n/// \u003C/summary\u003E\r\n[CustomEditor( typeof( float ), WithAllAttributes = new[] { typeof( KelvinSliderAttribute ) } )]\r\npublic class KelvinFloatControlWidget : FloatControlWidget\r\n{\r\n\t/// \u003Csummary\u003ECached kelvin gradient strip, rebuilt only when the bar\u0027s width (or DPI) changes.\u003C/summary\u003E\r\n\tPixmap _gradient;\r\n\r\n\t/// \u003Csummary\u003EPixel size the gradient was baked at; rebuilt when width or DPI changes.\u003C/summary\u003E\r\n\tVector2 _gradientSize;\r\n\r\n\tpublic KelvinFloatControlWidget( SerializedProperty property ) : base( property )\r\n\t{\r\n\t\tIcon = \u0022thermostat\u0022;\r\n\t\tRangeStep = 1f; // snap to whole kelvin so values stay integers, without the [Step] spin arrows\r\n\r\n\t\tSliderPaint = ( rect, _ ) =\u003E\r\n\t\t{\r\n\t\t\t// A thin, full-width track strip (like the regular float slider\u0027s track), centered vertically.\r\n\t\t\tconst float TrackHeight = 6f;\r\n\t\t\tconst float ThumbWidth = 6f;\r\n\t\t\tconst float ThumbHeight = 12f;\r\n\r\n\t\t\tvar centerY = rect.Top \u002B rect.Height / 2f;\r\n\t\t\tvar track = new Rect( rect.Left, centerY - TrackHeight / 2f, rect.Width, TrackHeight );\r\n\r\n\t\t\tEnsureGradient( track.Width );\r\n\t\t\tif ( _gradient is not null )\r\n\t\t\t\tPaint.Draw( track, _gradient, 1f, TrackHeight / 2f );\r\n\r\n\t\t\t// White thumb at the value position, like the regular float slider.\r\n\t\t\tvar current = SerializedProperty.GetValue\u003Cfloat\u003E();\r\n\t\t\tvar t = MathX.LerpInverse( current, Range.x, Range.y, true ).Clamp( 0f, 1f );\r\n\t\t\tvar thumbX = rect.Left \u002B t * (rect.Width - ThumbWidth);\r\n\t\t\tPaint.Antialiasing = true;\r\n\r\n\t\t\t// Even soft shadow ring around the thumb, so no bare thumb edge meets the bright gradient.\r\n\t\t\tPaint.ClearPen();\r\n\t\t\tPaint.Antialiasing = true;\r\n\t\t\tPaint.SetBrush( Color.Black.WithAlpha( 0.35f ) );\r\n\t\t\tPaint.DrawRect( new Rect( thumbX - 1f, centerY - ThumbHeight / 2f - 1f, ThumbWidth \u002B 2f, ThumbHeight \u002B 2f ), 2f );\r\n\r\n\t\t\t// Thumb itself.\r\n\t\t\tPaint.ClearPen();\r\n\t\t\tPaint.Antialiasing = true;\r\n\t\t\tPaint.SetBrush( Color.White.Darken( 0.1f ) );\r\n\t\t\tPaint.DrawRect( new Rect( thumbX, centerY - ThumbHeight / 2f, ThumbWidth, ThumbHeight ), 2f );\r\n\t\t};\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EBakes the kelvin gradient into a cached pixmap, rebuilt only when the bar\u0027s width (or DPI) changes.\u003C/summary\u003E\r\n\tvoid EnsureGradient( float width )\r\n\t{\r\n\t\tvar dpi = DpiScale;\r\n\t\tvar size = new Vector2( Math.Max( (int)(width * dpi), 1 ), Math.Max( (int)(10f * dpi), 1 ) );\r\n\r\n\t\tif ( _gradient is not null \u0026\u0026 _gradientSize == size ) return;\r\n\r\n\t\t_gradient = new Pixmap( size );\r\n\t\t_gradientSize = size;\r\n\r\n\t\tusing ( Paint.ToPixmap( _gradient ) )\r\n\t\t{\r\n\t\t\tPaint.Antialiasing = true;\r\n\t\t\tPaint.ClearPen();\r\n\r\n\t\t\tint steps = (int)size.x;\r\n\t\t\tfloat denom = Math.Max( steps - 1, 1 );\r\n\t\t\tfor ( int i = 0; i \u003C steps; i\u002B\u002B )\r\n\t\t\t{\r\n\t\t\t\tfloat frac = i / denom;\r\n\t\t\t\tPaint.SetBrush( new Temperature( MathX.LerpTo( Range.x, Range.y, frac, true ) ).ToColor() );\r\n\t\t\t\tPaint.DrawRect( new Rect( i, 0, 1f, size.y ) );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"Code/LightTemperature.cs","FileName":"LightTemperature.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"using Sandbox;\r\n\r\nnamespace RotSoft.Lighting;\r\n\r\n\r\n\r\n\r\n/// \u003Csummary\u003E\r\n/// Adjusts the \u003Csee cref=\u0022Color\u0022/\u003E of a \u003Csee cref=\u0022Light\u0022/\u003E component using Color \u003Csee cref=\u0022Temperature\u0022/\u003E in Kelvin.\r\n/// Applies once on add and whenever the temperature or brightness changes, so the light\u0027s color stays manually editable.\r\n/// \u003C/summary\u003E\r\n[Title( \u0022Light Temperature\u0022 )]\r\n[Category( \u0022Light\u0022 )]\r\n[Icon( \u0022thermostat\u0022 )]\r\n[Alias( \u0022Temperature\u0022, \u0022Kelvin\u0022 )]\r\npublic sealed class LightTemperature : Component, Component.ExecuteInEditor\r\n{\r\n\t/// \u003Csummary\u003ECommon light temperature presets in Kelvin.\u003C/summary\u003E\r\n\tpublic enum LightTemperaturePreset\r\n\t{\r\n\t\t/// \u003Csummary\u003E1000 K\u003C/summary\u003E\r\n\t\tMatchFlame = 1700,\r\n\t\t/// \u003Csummary\u003E2400 K\u003C/summary\u003E\r\n\t\tIncandescent = 2400,\r\n\t\t/// \u003Csummary\u003E2700 K\u003C/summary\u003E\r\n\t\tWarmWhite = 3000,\r\n\t\t/// \u003Csummary\u003E3200 K\u003C/summary\u003E\r\n\t\tStudio = 3200,\r\n\t\t/// \u003Csummary\u003E5000 K\u003C/summary\u003E\r\n\t\tCoolWhite = 5000,\r\n\t\t/// \u003Csummary\u003E6500 K\u003C/summary\u003E\r\n\t\tDaylight = 6500,\r\n\t\t/// \u003Csummary\u003E6500 K\u003C/summary\u003E\r\n\t\tLCD = 9500,\r\n\t\t/// \u003Csummary\u003E7500 K\u003C/summary\u003E\r\n\t\tBlueSky = 15000,\r\n\t\t/// \u003Csummary\u003ECustom value, set it with the Kelvin slider.\u003C/summary\u003E\r\n\t\tCustom = 0,\r\n\t}\r\n\r\n\tLightTemperaturePreset _preset = LightTemperaturePreset.CoolWhite;\r\n\tfloat _kelvin = 5000f;\r\n\tfloat _brightness = 1f;\r\n\tbool _syncing;\r\n\tLight _light;\r\n\r\n\t/// \u003Csummary\u003EStandard light temperature presets.\u003C/summary\u003E\r\n\t[Property]\r\n\tpublic LightTemperaturePreset Preset\r\n\t{\r\n\t\tget =\u003E _preset;\r\n\t\tset\r\n\t\t{\r\n\t\t\tif ( _preset == value ) return;\r\n\t\t\t_preset = value;\r\n\t\t\tif ( value != LightTemperaturePreset.Custom )\r\n\t\t\t{\r\n\t\t\t\t_syncing = true;\r\n\t\t\t\tKelvin = (float)(int)value;\r\n\t\t\t\t_syncing = false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tApplyColor();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EThe color temperature in Kelvin.\u003C/summary\u003E\r\n\t[Property, Title( \u0022Temperature (K)\u0022 ), Range( 1500, 15000 ), KelvinSlider]\r\n\tpublic float Kelvin\r\n\t{\r\n\t\tget =\u003E _kelvin;\r\n\t\tset\r\n\t\t{\r\n\t\t\tif ( _kelvin == value ) return;\r\n\t\t\t_kelvin = value;\r\n\t\t\tif ( !_syncing \u0026\u0026 _preset != LightTemperaturePreset.Custom )\r\n\t\t\t\t_preset = LightTemperaturePreset.Custom;\r\n\t\t\tApplyColor();\r\n\t\t}\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EThe brightness (range) of the Light.\u003C/summary\u003E\r\n\t[Property, Range( 0, 5f ), Step( 0.01f )]\r\n\tpublic float Brightness\r\n\t{\r\n\t\tget =\u003E _brightness;\r\n\t\tset\r\n\t\t{\r\n\t\t\tif ( _brightness == value ) return;\r\n\t\t\t_brightness = value;\r\n\t\t\tApplyColor();\r\n\t\t}\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EApplies the current temperature and brightness to the \u003Csee cref=\u0022Light\u0022/\u003E\u0027s color once on add.\u003C/summary\u003E\r\n\tprotected override void OnStart()\r\n\t{\r\n\t\tApplyColor();\r\n\t}\r\n\r\n\t/// \u003Csummary\u003ESets the \u003Csee cref=\u0022Light\u0022/\u003E\u0027s color from the current temperature and brightness, if a light is present.\u003C/summary\u003E\r\n\tvoid ApplyColor()\r\n\t{\r\n\t\t_light ??= GetComponentInChildren\u003CLight\u003E( true );\r\n\t\tif ( _light is null ) return;\r\n\t\t_light.LightColor = new Temperature( Kelvin ).ToColor() * Brightness;\r\n\t}\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"Helpers/TemperatureExtensions.cs","FileName":"TemperatureExtensions.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"using Sandbox;\r\nusing System;\r\n\r\nnamespace RotSoft.Lighting;\r\n\r\n/// \u003Csummary\u003ETemperature to color conversions.\u003C/summary\u003E\r\npublic static class TemperatureExtensions\r\n{\r\n\t/// \u003Csummary\u003E\r\n\t/// Converts this temperature to an sRGB color, clamped to \u003Csee cref=\u0022Temperature.MinTemperature\u0022/\u003E..\u003Csee cref=\u0022Temperature.MaxTemperature\u0022/\u003E.\r\n\t/// \u003C/summary\u003E\r\n\tpublic static Color ToColor( this Temperature temperature )\r\n\t{\r\n\t\tfloat kelvin = Math.Clamp( temperature.Kelvin, Temperature.MinTemperature, Temperature.MaxTemperature );\r\n\t\tfloat temp = kelvin / 100f;\r\n\t\tfloat r, g, b;\r\n\r\n\t\tif ( temp \u003C= 66f )\r\n\t\t\tr = 1f;\r\n\t\telse\r\n\t\t\tr = Math.Clamp( 1.29293618606f * MathF.Pow( temp - 60f, -0.1332047592f ), 0f, 1f );\r\n\r\n\t\tif ( temp \u003C= 66f )\r\n\t\t\tg = Math.Clamp( 0.390081578769f * MathF.Log( temp ) - 0.63184144378f, 0f, 1f );\r\n\t\telse\r\n\t\t\tg = Math.Clamp( 1.12989086369f * MathF.Pow( temp - 60f, -0.0755148492f ), 0f, 1f );\r\n\r\n\t\tif ( temp \u003E= 66f )\r\n\t\t\tb = 1f;\r\n\t\telse if ( temp \u003C= 19f )\r\n\t\t\tb = 0f;\r\n\t\telse\r\n\t\t\tb = Math.Clamp( 0.54320678911f * MathF.Log( temp - 10f ) - 1.19625408914f, 0f, 1f );\r\n\r\n\t\treturn new Color( r, g, b );\r\n\t}\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"Code/Temperature.cs","FileName":"Temperature.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"namespace RotSoft.Lighting;\r\n\r\n/// \u003Csummary\u003E\r\n/// A color temperature in kelvin, converted to a color via \u003Csee cref=\u0022TemperatureExtensions.ToColor(Temperature)\u0022/\u003E.\r\n/// \u003C/summary\u003E\r\npublic struct Temperature\r\n{\r\n\t/// \u003Csummary\u003ELowest valid temperature, in kelvin.\u003C/summary\u003E\r\n\tpublic const float MinTemperature = 1500f;\r\n\r\n\t/// \u003Csummary\u003EHighest valid temperature, in kelvin.\u003C/summary\u003E\r\n\tpublic const float MaxTemperature = 15000f;\r\n\r\n\t/// \u003Csummary\u003ETemperature in kelvin.\u003C/summary\u003E\r\n\tpublic float Kelvin { get; set; }\r\n\r\n\t/// \u003Csummary\u003ECreates a temperature from a kelvin value.\u003C/summary\u003E\r\n\tpublic Temperature( float kelvin )\r\n\t{\r\n\t\tKelvin = kelvin;\r\n\t}\r\n\r\n\t/// \u003Csummary\u003EImplicitly converts a kelvin value to a \u003Csee cref=\u0022Temperature\u0022/\u003E.\u003C/summary\u003E\r\n\tpublic static implicit operator Temperature( float kelvin ) =\u003E new( kelvin );\r\n\r\n\t/// \u003Csummary\u003EImplicitly converts a \u003Csee cref=\u0022Temperature\u0022/\u003E back to its kelvin value.\u003C/summary\u003E\r\n\tpublic static implicit operator float( Temperature temperature ) =\u003E temperature.Kelvin;\r\n\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":"KelvinSliderAttribute.cs","FileName":"KelvinSliderAttribute.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"using System;\r\n\r\nnamespace RotSoft.Lighting;\r\n\r\n/// \u003Csummary\u003EMarks a float property as a color temperature in kelvin; the inspector renders it with the kelvin gradient slider.\u003C/summary\u003E\r\n[AttributeUsage( AttributeTargets.Property )]\r\npublic sealed class KelvinSliderAttribute : Attribute\r\n{\r\n}\r\n"},{"Ident":"fwotsoft.lightinghelpers","Path":".obj/__compiler_extra.cs","FileName":"__compiler_extra.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":355266,"Code":"global using static Sandbox.Internal.GlobalGameNamespace;\r\nglobal using Microsoft.AspNetCore.Components;\r\nglobal using Microsoft.AspNetCore.Components.Rendering;\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022AddonTitle\u0022, \u0022Lighting Helpers\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022AddonIdent\u0022, \u0022lightinghelpers\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022OrgIdent\u0022, \u0022fwotsoft\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022Ident\u0022, \u0022fwotsoft.lightinghelpers\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022EngineVersion\u0022, \u002228\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022EngineMinorVersion\u0022, \u00221\u0022 )]\r\n\r\n[assembly: System.Runtime.Versioning.TargetFramework( \u0022.NETCoreApp,Version=v9.0\u0022, FrameworkDisplayName = \u0022.NET 9.0\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022CompileTime\u0022, \u00222026-08-27T09:20:31.5361275Z\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyVersion(\u00220.0.120.0\u0022)]\r\n[assembly: global::System.Reflection.AssemblyFileVersion(\u00220.0.120.0\u0022)]"}]}