Skip to content

Commit

Permalink
обновление фона в редакторе материалов
Browse files Browse the repository at this point in the history
мелкие правки
  • Loading branch information
JavaSaBr committed Mar 1, 2016
1 parent ee67bdd commit e61265a
Show file tree
Hide file tree
Showing 7 changed files with 6,220 additions and 1,001 deletions.
7 changes: 0 additions & 7 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build-native.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
name="jME3-SpaceShift-Editor"
mainClass="com.ss.editor.Starter"
toolkit="fx"
version="0.1"
version="0.2"
/>

<mkdir dir="build/classes/META-INF"/>
Expand All @@ -130,7 +130,7 @@
<manifest>
<attribute name="Implementation-Vendor" value="spaceshift.ru"/>
<attribute name="Implementation-Title" value="jME3 SpaceShift Editor"/>
<attribute name="Implementation-Version" value="0.1"/>
<attribute name="Implementation-Version" value="0.2"/>
</manifest>
</fx:jar>

Expand Down
7,191 changes: 6,204 additions & 987 deletions resources/graphics/textures/sky/studio.hdr

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/com/ss/editor/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public abstract class Config {
public static final String CONFIG_RESOURCE_PATH = "/com/ss/editor/config/config.xml";

public static final String TITLE = "jME3 SpaceShift Editor";
public static final String VERSION = "v.0.1.1";
public static final String VERSION = "v.0.2.0";

/**
* Путь к папке с программой.
Expand Down
2 changes: 0 additions & 2 deletions src/com/ss/editor/manager/FileIconManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ public Image getIcon(final Path path, int size) {
Path iconPath = mimeTypes.resolve(valueOf(size)).resolve(contentType + ".png");
String url = toClasspath(iconPath);

LOGGER.info("url " + url);

if (!EditorUtil.checkExists(url)) {
iconPath = mimeTypes.resolve(valueOf(size)).resolve("none.png");
url = toClasspath(iconPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.jme3.app.state.AppStateManager;
import com.jme3.asset.AssetManager;
import com.jme3.environment.generation.JobProgressAdapter;
import com.jme3.input.ChaseCamera;
import com.jme3.light.DirectionalLight;
import com.jme3.light.LightProbe;
import com.jme3.material.Material;
Expand All @@ -20,6 +21,8 @@
import com.ss.editor.manager.ExecutorManager;
import com.ss.editor.state.editor.impl.AbstractEditorState;

import rlib.geom.util.AngleUtils;

/**
* Реализация 3D части редактирования материала.
*
Expand All @@ -30,6 +33,10 @@ public class MaterialEditorState extends AbstractEditorState {
public static final ExecutorManager EXECUTOR_MANAGER = ExecutorManager.getInstance();

private static final Vector3f QUAD_OFFSET = new Vector3f(0, -2, 2);
private static final Vector3f LIGHT_DIRECTION = new Vector3f(0.007654993F, 0.39636374F, 0.9180617F).negate();

private static final float H_ROTATION = AngleUtils.degreeToRadians(75);
private static final float V_ROTATION = AngleUtils.degreeToRadians(25);

private final JobProgressAdapter<LightProbe> probeHandler = new JobProgressAdapter<LightProbe>() {

Expand Down Expand Up @@ -93,7 +100,11 @@ public MaterialEditorState() {
stateNode.attachChild(sky);

final DirectionalLight light = getLightForChaseCamera();
light.setDirection(new Vector3f(-0.897672F, -0.2953406F, -0.32704628F));
light.setDirection(LIGHT_DIRECTION);

final ChaseCamera chaseCamera = getChaseCamera();
chaseCamera.setDefaultHorizontalRotation(H_ROTATION);
chaseCamera.setDefaultVerticalRotation(V_ROTATION);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void addFilter(final Material material) {

private void addFilterImpl(Material material) {

final GenericFilter genericFilter = new GenericFilter(material, true, true);
final GenericFilter genericFilter = new GenericFilter(material, false, true);
final FilterPostProcessor postProcessor = EDITOR.getPostProcessor();

final ConcurrentObjectDictionary<MaterialKey, GenericFilter> filters = getFilters();
Expand Down

0 comments on commit e61265a

Please sign in to comment.