Commit 169dc7a8 authored by legoc's avatar legoc

Added --no-link mode and changed light settings

parent 35e4f232
......@@ -76,7 +76,7 @@
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>nomad-3d-editor-${project.version}</finalName>
<finalName>nomad-3d-editor-${project.version}-full</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
......
......@@ -127,13 +127,29 @@ public class Nomad3DEditor extends Application {
* @param args Program arguments
*/
public static void main(String[] args) {
NomadLinker.getInstance().init(args);
boolean nomad = true;
// Analyse arguments.
for (int i = 0; i < args.length; ++i) {
if (args[i].equals("--no-link")) {
nomad = false;
}
}
if (nomad) {
NomadLinker.getInstance().init(args);
}
try {
launch(args);
} catch (Exception e) {
e.printStackTrace();
} finally {
NomadLinker.getInstance().terminate();
if (nomad) {
NomadLinker.getInstance().terminate();
}
exit(0);
}
......@@ -524,16 +540,34 @@ public class Nomad3DEditor extends Application {
PointLight light = null;
double lightHeight = sceneBox.getMinY() + 1.1 * sceneBox.getHeight();
double coef = 10.0;
// Back.
// light = new PointLight(pointColor);
// light.setTranslateX(0.0);
// light.setTranslateY(0.0);
// light.setTranslateZ(sceneBox.getMaxZ() * coef);
// root.getChildren().add(light);
// Front.
light = new PointLight(pointColor);
light.setTranslateX(sceneBox.getMinX());
light.setTranslateY(lightHeight);
light.setTranslateZ(sceneBox.getMinZ());
light.setTranslateX(0.0);
light.setTranslateY(0.0);
light.setTranslateZ(-sceneBox.getMaxZ() * coef);
root.getChildren().add(light);
// Right.
light = new PointLight(pointColor);
light.setTranslateX(-sceneBox.getMaxX() * coef);
light.setTranslateY(0.0);
light.setTranslateZ(0.0);
root.getChildren().add(light);
// Left.
light = new PointLight(pointColor);
light.setTranslateX(sceneBox.getMaxX());
light.setTranslateY(lightHeight);
light.setTranslateZ(sceneBox.getMaxZ());
light.setTranslateX(sceneBox.getMaxX() * coef);
light.setTranslateY(0.0);
light.setTranslateZ(0.0);
root.getChildren().add(light);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment