mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Added Lights
This commit is contained in:
@@ -28,6 +28,7 @@ namespace GlitchyEditor
|
||||
|
||||
Editor _editor ~ delete _;
|
||||
|
||||
RenderTarget2D _intermediateTarget ~ _?.ReleaseRef();
|
||||
RenderTarget2D _viewportTarget ~ _?.ReleaseRef();
|
||||
|
||||
SettingsWindow _settingsWindow = new .() ~ delete _;
|
||||
@@ -109,6 +110,28 @@ namespace GlitchyEditor
|
||||
_otherCameraEntity.AddComponent<EditorComponent>();
|
||||
}
|
||||
|
||||
{
|
||||
var lightNtt = _scene.CreateEntity("My Sexy Sun");
|
||||
let transform = lightNtt.GetComponent<TransformComponent>();
|
||||
transform.Position = .(0, 0, 0);
|
||||
transform.RotationEuler = .(MathHelper.ToRadians(45), MathHelper.ToRadians(-45), 0);
|
||||
|
||||
let light = lightNtt.AddComponent<LightComponent>();
|
||||
light.SceneLight.Illuminance = 10.0f;
|
||||
light.SceneLight.Color = .(1.0f, 0.95f, 0.8f);
|
||||
}
|
||||
|
||||
{
|
||||
var lightNtt = _scene.CreateEntity("My Sexy Sun 2");
|
||||
let transform = lightNtt.GetComponent<TransformComponent>();
|
||||
transform.Position = .(0, 0, 0);
|
||||
transform.RotationEuler = .(MathHelper.ToRadians(70), MathHelper.ToRadians(-30), 0);
|
||||
|
||||
let light = lightNtt.AddComponent<LightComponent>();
|
||||
light.SceneLight.Illuminance = 10.0f;
|
||||
light.SceneLight.Color = .(1.0f, 0.95f, 0.8f);
|
||||
}
|
||||
|
||||
InitEditor();
|
||||
|
||||
TestEntitiesWithModels();
|
||||
|
||||
Reference in New Issue
Block a user