Light improvements:
- Add `Intensity` parameter - Experimental Normal mapping support: * Simple Images
This commit is contained in:
@@ -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
|
||||
|
||||
Submodule h2d-libgdx-spine-extension updated: 66b5cce6b5...04189a68fc
Submodule h2d-libgdx-talos-extension updated: 481cb1a4fd...2b43d7b7cb
+2
@@ -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;
|
||||
|
||||
+2
@@ -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;
|
||||
|
||||
+14
-1
@@ -28,7 +28,7 @@ public class UILightBodyProperties extends UIRemovableProperties {
|
||||
private HashMap<Integer, String> 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() {
|
||||
|
||||
+2
@@ -86,6 +86,7 @@ public class UILightBodyPropertiesMediator extends UIItemPropertiesMediator<Enti
|
||||
lightComponent = item.getComponent(LightBodyComponent.class);
|
||||
viewComponent.setDirection(lightComponent.rayDirection);
|
||||
viewComponent.setDistance(lightComponent.distance + "");
|
||||
viewComponent.setLightIntensity(lightComponent.intensity + "");
|
||||
viewComponent.setRays(lightComponent.rays + "");
|
||||
viewComponent.setSoft(lightComponent.isSoft);
|
||||
viewComponent.setSoftnessLength(lightComponent.softnessLength + "");
|
||||
@@ -106,6 +107,7 @@ public class UILightBodyPropertiesMediator extends UIItemPropertiesMediator<Enti
|
||||
|
||||
payloadVo.rayDirection = viewComponent.getDirection();
|
||||
payloadVo.distance = NumberUtils.toFloat(viewComponent.getDistance());
|
||||
payloadVo.intensity = NumberUtils.toFloat(viewComponent.getLightIntensity());
|
||||
payloadVo.softnessLength = NumberUtils.toFloat(viewComponent.getSoftnessLength());
|
||||
payloadVo.rays = NumberUtils.toInt(viewComponent.getRays());
|
||||
payloadVo.isSoft = viewComponent.isSoft();
|
||||
|
||||
+14
@@ -42,6 +42,7 @@ public class UILightItemProperties extends UIItemCollapsibleProperties {
|
||||
private VisValidatableTextField pointLightRadiusField;
|
||||
private VisValidatableTextField coneInnerAngleField;
|
||||
private VisValidatableTextField heightField;
|
||||
private VisValidatableTextField intensityField;
|
||||
private VisValidatableTextField coneDistanceField;
|
||||
private VisValidatableTextField coneDirectionField;
|
||||
private VisValidatableTextField softnessLengthField;
|
||||
@@ -68,6 +69,7 @@ public class UILightItemProperties extends UIItemCollapsibleProperties {
|
||||
softnessLengthField = new VisValidatableTextField(floatValidator);
|
||||
coneDirectionField = new VisValidatableTextField(floatValidator);
|
||||
heightField = new VisValidatableTextField(floatValidator);
|
||||
intensityField = new VisValidatableTextField(floatValidator);
|
||||
|
||||
secondaryTable = new VisTable();
|
||||
|
||||
@@ -83,6 +85,9 @@ public class UILightItemProperties extends UIItemCollapsibleProperties {
|
||||
mainTable.add(new VisLabel("Height: ", Align.right)).padRight(5).width(110).right();
|
||||
mainTable.add(heightField).width(70).left();
|
||||
mainTable.row().padTop(5);
|
||||
mainTable.add(new VisLabel("Intensity: ", Align.right)).padRight(5).width(110).right();
|
||||
mainTable.add(intensityField).width(70).left();
|
||||
mainTable.row().padTop(5);
|
||||
|
||||
mainTable.add(secondaryTable).colspan(2);
|
||||
mainTable.row().padTop(5);
|
||||
@@ -191,6 +196,14 @@ public class UILightItemProperties extends UIItemCollapsibleProperties {
|
||||
return heightField.getText();
|
||||
}
|
||||
|
||||
public void setLightIntensity(String intensity) {
|
||||
intensityField.setText(intensity);
|
||||
}
|
||||
|
||||
public String getLightIntensity() {
|
||||
return intensityField.getText();
|
||||
}
|
||||
|
||||
public void setLightHeight(String distance) {
|
||||
heightField.setText(distance);
|
||||
}
|
||||
@@ -233,6 +246,7 @@ public class UILightItemProperties extends UIItemCollapsibleProperties {
|
||||
coneDistanceField.addListener(new KeyboardListener(getUpdateEventName()));
|
||||
softnessLengthField.addListener(new KeyboardListener(getUpdateEventName()));
|
||||
heightField.addListener(new KeyboardListener(getUpdateEventName()));
|
||||
intensityField.addListener(new KeyboardListener(getUpdateEventName()));
|
||||
coneDirectionField.addListener(new KeyboardListener(getUpdateEventName()));
|
||||
isSoftCheckBox.addListener(new CheckBoxChangeListener(getUpdateEventName()));
|
||||
isActiveCheckBox.addListener(new CheckBoxChangeListener(getUpdateEventName()));
|
||||
|
||||
+2
@@ -52,6 +52,7 @@ public class UILightItemPropertiesMediator extends UIItemPropertiesMediator<Enti
|
||||
viewComponent.setDistance(lightObjectComponent.distance + "");
|
||||
viewComponent.setDirection(lightObjectComponent.directionDegree + "");
|
||||
viewComponent.setLightHeight(lightObjectComponent.height + "");
|
||||
viewComponent.setLightIntensity(lightObjectComponent.intensity + "");
|
||||
viewComponent.setSoftnessLength(lightObjectComponent.softnessLength + "");
|
||||
viewComponent.setActive(lightObjectComponent.isActive);
|
||||
viewComponent.setSoft(lightObjectComponent.isSoft);
|
||||
@@ -71,6 +72,7 @@ public class UILightItemPropertiesMediator extends UIItemPropertiesMediator<Enti
|
||||
payloadVo.coneDegree = NumberUtils.toFloat(viewComponent.getAngle());
|
||||
payloadVo.softnessLength = NumberUtils.toFloat(viewComponent.getSoftnessLength());
|
||||
payloadVo.height = NumberUtils.toFloat(viewComponent.getLightHeight());
|
||||
payloadVo.intensity = NumberUtils.toFloat(viewComponent.getLightIntensity());
|
||||
payloadVo.isActive = viewComponent.isActive();
|
||||
payloadVo.isSoft = viewComponent.isSoft();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user