44import com .jme3 .app .state .AppStateManager ;
55import com .jme3 .asset .AssetManager ;
66import com .jme3 .environment .generation .JobProgressAdapter ;
7+ import com .jme3 .input .ChaseCamera ;
78import com .jme3 .light .DirectionalLight ;
89import com .jme3 .light .LightProbe ;
910import com .jme3 .material .Material ;
2021import com .ss .editor .manager .ExecutorManager ;
2122import com .ss .editor .state .editor .impl .AbstractEditorState ;
2223
24+ import rlib .geom .util .AngleUtils ;
25+
2326/**
2427 * Реализация 3D части редактирования материала.
2528 *
@@ -30,6 +33,10 @@ public class MaterialEditorState extends AbstractEditorState {
3033 public static final ExecutorManager EXECUTOR_MANAGER = ExecutorManager .getInstance ();
3134
3235 private static final Vector3f QUAD_OFFSET = new Vector3f (0 , -2 , 2 );
36+ private static final Vector3f LIGHT_DIRECTION = new Vector3f (0.007654993F , 0.39636374F , 0.9180617F ).negate ();
37+
38+ private static final float H_ROTATION = AngleUtils .degreeToRadians (75 );
39+ private static final float V_ROTATION = AngleUtils .degreeToRadians (25 );
3340
3441 private final JobProgressAdapter <LightProbe > probeHandler = new JobProgressAdapter <LightProbe >() {
3542
@@ -93,7 +100,11 @@ public MaterialEditorState() {
93100 stateNode .attachChild (sky );
94101
95102 final DirectionalLight light = getLightForChaseCamera ();
96- light .setDirection (new Vector3f (-0.897672F , -0.2953406F , -0.32704628F ));
103+ light .setDirection (LIGHT_DIRECTION );
104+
105+ final ChaseCamera chaseCamera = getChaseCamera ();
106+ chaseCamera .setDefaultHorizontalRotation (H_ROTATION );
107+ chaseCamera .setDefaultVerticalRotation (V_ROTATION );
97108 }
98109
99110 /**
0 commit comments