diff --git a/CHANGES b/CHANGES index 078c291e..4797b451 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,18 @@ [0.0.7] +- Experimental support to Normal Mapping in lights: + * Simple Images +- Add light `intensity` + = Editor = +- Use Distance Field fonts for GUI - Huge improvements to Tiled Plugin: * Sprite and Spine animated Tiles * UI improvements and general refactoring + * Import Tile Set (`Resources -> Import Tile Set`) + += Runtime = +- Fix Lights positioning issues +- Cone Lights direction can be changed with `TransformComponent#rotation` [0.0.6] - Update libGDX to 1.10.0 diff --git a/h2d-libgdx-spine-extension b/h2d-libgdx-spine-extension index 66b5cce6..04189a68 160000 --- a/h2d-libgdx-spine-extension +++ b/h2d-libgdx-spine-extension @@ -1 +1 @@ -Subproject commit 66b5cce6b52e3eb8bfa1ea1bf225f032f3a4f663 +Subproject commit 04189a68fc2cdf62ae9aa4d53dfa11b6b8aea031 diff --git a/h2d-libgdx-talos-extension b/h2d-libgdx-talos-extension index 481cb1a4..2b43d7b7 160000 --- a/h2d-libgdx-talos-extension +++ b/h2d-libgdx-talos-extension @@ -1 +1 @@ -Subproject commit 481cb1a4fd77dc03709457fcaa277fa1dc13faa2 +Subproject commit 2b43d7b7cb9eb84d1322782cee692712f9f0f797 diff --git a/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightBodyDataCommand.java b/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightBodyDataCommand.java index 3f3846d9..d4cdb59d 100644 --- a/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightBodyDataCommand.java +++ b/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightBodyDataCommand.java @@ -30,6 +30,7 @@ public class UpdateLightBodyDataCommand extends EntityModifyRevertibleCommand { lightComponent.distance = vo.distance; lightComponent.softnessLength = vo.softnessLength; lightComponent.rays = vo.rays; + lightComponent.intensity = vo.intensity; lightComponent.isSoft = vo.isSoft; lightComponent.isStatic = vo.isStatic; lightComponent.isXRay = vo.isXRay; @@ -52,6 +53,7 @@ public class UpdateLightBodyDataCommand extends EntityModifyRevertibleCommand { lightComponent.rayDirection = backup.rayDirection; lightComponent.distance = backup.distance; lightComponent.softnessLength = backup.softnessLength; + lightComponent.intensity = backup.intensity; lightComponent.rays = backup.rays; lightComponent.isSoft = backup.isSoft; lightComponent.isStatic = backup.isStatic; diff --git a/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightDataCommand.java b/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightDataCommand.java index 160e6657..b9ca7b7b 100644 --- a/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightDataCommand.java +++ b/src/main/java/games/rednblack/editor/controller/commands/component/UpdateLightDataCommand.java @@ -52,6 +52,7 @@ public class UpdateLightDataCommand extends EntityModifyRevertibleCommand { lightObjectComponent.softnessLength = vo.softnessLength; lightObjectComponent.directionDegree = vo.directionDegree; lightObjectComponent.height = vo.height; + lightObjectComponent.intensity = vo.intensity; lightObjectComponent.isSoft = vo.isSoft; lightObjectComponent.isActive = vo.isActive; @@ -68,6 +69,7 @@ public class UpdateLightDataCommand extends EntityModifyRevertibleCommand { lightObjectComponent.isXRay = backup.isXRay; lightObjectComponent.coneDegree = backup.coneDegree; lightObjectComponent.height = backup.height; + lightObjectComponent.intensity = backup.intensity; lightObjectComponent.distance = backup.distance; lightObjectComponent.softnessLength = backup.softnessLength; lightObjectComponent.directionDegree = backup.directionDegree; diff --git a/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyProperties.java b/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyProperties.java index 83b66ac0..0693685d 100644 --- a/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyProperties.java +++ b/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyProperties.java @@ -28,7 +28,7 @@ public class UILightBodyProperties extends UIRemovableProperties { private HashMap directionTypes = new HashMap<>(); private Spinner raysTextSelector; - private VisTextField distanceTextField; + private VisTextField distanceTextField, intensityField; private TintButton lightColor; private VisValidatableTextField softnessLengthField; private VisCheckBox isStaticCheckBox; @@ -59,6 +59,7 @@ public class UILightBodyProperties extends UIRemovableProperties { lightColor = StandardWidgetsFactory.createTintButton(); raysTextSelector = StandardWidgetsFactory.createNumberSelector(4, 4, 5000); distanceTextField = StandardWidgetsFactory.createValidableTextField(floatValidator); + intensityField = StandardWidgetsFactory.createValidableTextField(floatValidator); softnessLengthField = new VisValidatableTextField(floatValidator); isStaticCheckBox = StandardWidgetsFactory.createCheckBox("Static"); isXRayCheckBox = StandardWidgetsFactory.createCheckBox("X-Ray"); @@ -78,6 +79,9 @@ public class UILightBodyProperties extends UIRemovableProperties { mainTable.add(new VisLabel("Distance:", Align.right)).padRight(5).colspan(2).fillX(); mainTable.add(distanceTextField).width(100).colspan(2); mainTable.row().padTop(5); + mainTable.add(new VisLabel("Intensity:", Align.right)).padRight(5).colspan(2).fillX(); + mainTable.add(intensityField).width(100).colspan(2); + mainTable.row().padTop(5); mainTable.add(new VisLabel("Softness length: ", Align.right)).padRight(5).colspan(2).fillX(); mainTable.add(softnessLengthField).width(100).colspan(2); mainTable.row().padTop(5); @@ -108,6 +112,14 @@ public class UILightBodyProperties extends UIRemovableProperties { return distanceTextField.getText(); } + public void setLightIntensity(String intensity) { + intensityField.setText(intensity); + } + + public String getLightIntensity() { + return intensityField.getText(); + } + public void setSoftnessLength(String rays) { softnessLengthField.setText(rays); } @@ -173,6 +185,7 @@ public class UILightBodyProperties extends UIRemovableProperties { raysTextSelector.addListener(new NumberSelectorOverlapListener(getUpdateEventName())); distanceTextField.addListener(new KeyboardListener(getUpdateEventName())); + intensityField.addListener(new KeyboardListener(getUpdateEventName())); softnessLengthField.addListener(new KeyboardListener(getUpdateEventName())); lightColor.addListener(new ClickListener() { diff --git a/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyPropertiesMediator.java b/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyPropertiesMediator.java index 5dc119ed..288372e4 100644 --- a/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyPropertiesMediator.java +++ b/src/main/java/games/rednblack/editor/view/ui/properties/panels/UILightBodyPropertiesMediator.java @@ -86,6 +86,7 @@ public class UILightBodyPropertiesMediator extends UIItemPropertiesMediator