diff --git a/README.md b/README.md
index cb44a017..d1048355 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# jMonkeyBuilder 1.8.0 #
+# jMonkeyBuilder 1.9.0 #
### It's 3D Editor to prepare/work/create graphics content for jMonkeyEngine 3.2 ###
[](https://gitter.im/jME3-SpaceShift-Editor/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
diff --git a/app.version b/app.version
index afa2b351..abb16582 100644
--- a/app.version
+++ b/app.version
@@ -1 +1 @@
-1.8.0
\ No newline at end of file
+1.9.0
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 8609991e..ba07de54 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,21 +4,19 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
- classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
-apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'application'
group = 'com.spaceshift'
-version = '1.8.0'
+version = '1.9.0'
compileJava {
options.encoding = "UTF-8"
@@ -55,24 +53,13 @@ mainClassName = "com.ss.editor.JfxApplication"
ext.applicationMainClass = "com.ss.editor.JfxApplication"
ext.applicationVendor = "javasabr@gmail.com"
ext.applicationTitle = "jMonkeyBuilder"
-ext.jmeVersion = "3.2.1-SNAPSHOT"
-ext.jmbExtVersion = "2.3.1"
+ext.jmeVersion = "develop-SNAPSHOT"
+ext.jmbExtVersion = "2.4.2"
ext.jme3_xbuf_version = '0.9.1'
-ext.junitPlatformVersion = "1.0.0"
-ext.junitJupiterVersion = "5.0.0"
+ext.junitJupiterVersion = "5.2.0"
ext.log4jVersion = '2.6.2'
ext.bintrayVersion = version
-junitPlatform {
- filters {
- engines {
- }
- tags {
- }
- }
- logManager 'org.apache.logging.log4j.jul.LogManager'
-}
-
repositories {
jcenter()
mavenCentral()
@@ -119,6 +106,18 @@ bintray {
}
}
+test {
+ useJUnitPlatform()
+
+ testLogging {
+ events "passed", "skipped", "failed"
+ }
+
+ reports {
+ html.enabled = true
+ }
+}
+
javadoc {
failOnError = false
}
@@ -128,14 +127,17 @@ dependencies {
// base
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.9.0'
compile 'org.controlsfx:controlsfx:9.0.0'
- compile 'com.spaceshift:rlib.fx:5.0.2'
- compile 'com.spaceshift:rlib.common:7.1.2'
+ compile 'com.spaceshift:rlib.fx:5.1.1'
+ compile 'com.spaceshift:rlib.common:8.1.1'
compile ('com.jme3:jfx:2.0.0') {
exclude group: 'org.jmonkeyengine'
}
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
+ // https://mvnrepository.com/artifact/com.eclipsesource.minimal-json/minimal-json
+ compile group: 'com.eclipsesource.minimal-json', name: 'minimal-json', version: '0.9.5'
+
// extend image support
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-batik
@@ -171,6 +173,7 @@ dependencies {
// extensions
compile ("com.spaceshift:jmonkeybuilder-extension:$jmbExtVersion") {
exclude group: 'org.jmonkeyengine'
+ exclude group: 'com.github.JavaSaB.jmonkeyengine'
}
compile ("org.xbuf.jme3_xbuf:jme3_xbuf_loader:${jme3_xbuf_version}") {
@@ -178,7 +181,7 @@ dependencies {
}
// https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all
- compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.13'
+ compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.5.1'
// TESTS
testRuntime "com.github.JavaSaBr.jmonkeyengine:jme3-lwjgl3:$jmeVersion"
@@ -187,17 +190,8 @@ dependencies {
exclude group: 'com.github.JavaSaB.jmonkeyengine'
}
- testCompile "org.junit.platform:junit-platform-commons:$junitPlatformVersion"
- testRuntime "org.junit.platform:junit-platform-engine:$junitPlatformVersion"
-
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
-
- testRuntime "org.apache.logging.log4j:log4j-core:$log4jVersion"
- testRuntime "org.apache.logging.log4j:log4j-jul:$log4jVersion"
-
- // Only needed to run tests in an (IntelliJ) IDE(A) that bundles an older version
- testCompile "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
}
ant.importBuild('build-native.xml')
@@ -232,5 +226,6 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
}
task wrapper(type: Wrapper) {
- gradleVersion = '4.7'
+ gradleVersion = '4.9'
+ distributionType = Wrapper.DistributionType.ALL
}
\ No newline at end of file
diff --git a/embedded-plugins/jmb-font-generator/jmb-font-generator-1.1.1.jar b/embedded-plugins/jmb-font-generator/jmb-font-generator-1.1.1.jar
deleted file mode 100644
index cd11499d..00000000
Binary files a/embedded-plugins/jmb-font-generator/jmb-font-generator-1.1.1.jar and /dev/null differ
diff --git a/embedded-plugins/jmb-font-generator/jmb-font-generator-1.1.3.jar b/embedded-plugins/jmb-font-generator/jmb-font-generator-1.1.3.jar
new file mode 100644
index 00000000..9ff1fb6b
Binary files /dev/null and b/embedded-plugins/jmb-font-generator/jmb-font-generator-1.1.3.jar differ
diff --git a/embedded-plugins/jmb-shader-nodes/jmb-shader-nodes-1.1.1.jar b/embedded-plugins/jmb-shader-nodes/jmb-shader-nodes-1.1.1.jar
deleted file mode 100644
index 38de7df3..00000000
Binary files a/embedded-plugins/jmb-shader-nodes/jmb-shader-nodes-1.1.1.jar and /dev/null differ
diff --git a/embedded-plugins/jmb-sky-control/jmb-sky-control-1.2.1.jar b/embedded-plugins/jmb-sky-control/jmb-sky-control-1.2.1.jar
deleted file mode 100644
index 10df5a95..00000000
Binary files a/embedded-plugins/jmb-sky-control/jmb-sky-control-1.2.1.jar and /dev/null differ
diff --git a/embedded-plugins/jmb-sky-control/jmb-sky-control-1.2.3.jar b/embedded-plugins/jmb-sky-control/jmb-sky-control-1.2.3.jar
new file mode 100644
index 00000000..62401a98
Binary files /dev/null and b/embedded-plugins/jmb-sky-control/jmb-sky-control-1.2.3.jar differ
diff --git a/embedded-plugins/jmb-sky-control/libs/SkyControl-0.9.12.jar b/embedded-plugins/jmb-sky-control/libs/SkyControl-0.9.12.jar
deleted file mode 100644
index 5f81fd44..00000000
Binary files a/embedded-plugins/jmb-sky-control/libs/SkyControl-0.9.12.jar and /dev/null differ
diff --git a/embedded-plugins/jmb-sky-control/libs/SkyControl-0.9.13.jar b/embedded-plugins/jmb-sky-control/libs/SkyControl-0.9.13.jar
new file mode 100644
index 00000000..b1827dae
Binary files /dev/null and b/embedded-plugins/jmb-sky-control/libs/SkyControl-0.9.13.jar differ
diff --git a/embedded-plugins/jmb-sky-control/libs/jme3-utilities-heart-2.4.0.jar b/embedded-plugins/jmb-sky-control/libs/jme3-utilities-heart-2.4.0.jar
deleted file mode 100644
index e7906f82..00000000
Binary files a/embedded-plugins/jmb-sky-control/libs/jme3-utilities-heart-2.4.0.jar and /dev/null differ
diff --git a/embedded-plugins/jmb-sky-control/libs/jme3-utilities-heart-2.5.0.jar b/embedded-plugins/jmb-sky-control/libs/jme3-utilities-heart-2.5.0.jar
new file mode 100644
index 00000000..199df33e
Binary files /dev/null and b/embedded-plugins/jmb-sky-control/libs/jme3-utilities-heart-2.5.0.jar differ
diff --git a/embedded-plugins/jmb-tonegod-emitter/jmb-tonegod-emitter-1.1.2.jar b/embedded-plugins/jmb-tonegod-emitter/jmb-tonegod-emitter-1.1.2.jar
deleted file mode 100644
index 4655f139..00000000
Binary files a/embedded-plugins/jmb-tonegod-emitter/jmb-tonegod-emitter-1.1.2.jar and /dev/null differ
diff --git a/embedded-plugins/jmb-tonegod-emitter/jmb-tonegod-emitter-1.1.4.jar b/embedded-plugins/jmb-tonegod-emitter/jmb-tonegod-emitter-1.1.4.jar
new file mode 100644
index 00000000..0e7f7a68
Binary files /dev/null and b/embedded-plugins/jmb-tonegod-emitter/jmb-tonegod-emitter-1.1.4.jar differ
diff --git a/embedded-plugins/jmb-tree-generator/jmb-tree-generator-1.2.2.jar b/embedded-plugins/jmb-tree-generator/jmb-tree-generator-1.2.2.jar
deleted file mode 100644
index a9e47cef..00000000
Binary files a/embedded-plugins/jmb-tree-generator/jmb-tree-generator-1.2.2.jar and /dev/null differ
diff --git a/embedded-plugins/jmb-tree-generator/jmb-tree-generator-1.2.3.jar b/embedded-plugins/jmb-tree-generator/jmb-tree-generator-1.2.3.jar
new file mode 100644
index 00000000..917be2a8
Binary files /dev/null and b/embedded-plugins/jmb-tree-generator/jmb-tree-generator-1.2.3.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 91ca28c8..0d4a9516 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 16d28051..7dc503f1 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/libs/common-image-3.3.2.jar b/libs/common-image-3.3.2.jar
deleted file mode 100644
index b6452f78..00000000
Binary files a/libs/common-image-3.3.2.jar and /dev/null differ
diff --git a/libs/common-io-3.3.2.jar b/libs/common-io-3.3.2.jar
deleted file mode 100644
index 4f0ad4af..00000000
Binary files a/libs/common-io-3.3.2.jar and /dev/null differ
diff --git a/libs/common-lang-3.3.2.jar b/libs/common-lang-3.3.2.jar
deleted file mode 100644
index 65e30018..00000000
Binary files a/libs/common-lang-3.3.2.jar and /dev/null differ
diff --git a/libs/commons-lang3-3.4-javadoc.jar b/libs/commons-lang3-3.4-javadoc.jar
deleted file mode 100644
index f5c7c593..00000000
Binary files a/libs/commons-lang3-3.4-javadoc.jar and /dev/null differ
diff --git a/libs/commons-lang3-3.4.jar b/libs/commons-lang3-3.4.jar
deleted file mode 100644
index 8ec91d45..00000000
Binary files a/libs/commons-lang3-3.4.jar and /dev/null differ
diff --git a/libs/extensions/annotations-15.0.jar b/libs/extensions/annotations-15.0.jar
deleted file mode 100644
index 3f838329..00000000
Binary files a/libs/extensions/annotations-15.0.jar and /dev/null differ
diff --git a/libs/extensions/groovy-all-2.5.0-alpha-1.jar b/libs/extensions/groovy-all-2.5.0-alpha-1.jar
deleted file mode 100644
index 77cb9932..00000000
Binary files a/libs/extensions/groovy-all-2.5.0-alpha-1.jar and /dev/null differ
diff --git a/libs/extensions/jme3-spaceshift-extension-1.0.1-sources.jar b/libs/extensions/jme3-spaceshift-extension-1.0.1-sources.jar
deleted file mode 100644
index a6509880..00000000
Binary files a/libs/extensions/jme3-spaceshift-extension-1.0.1-sources.jar and /dev/null differ
diff --git a/libs/extensions/jme3-spaceshift-extension-1.0.1.jar b/libs/extensions/jme3-spaceshift-extension-1.0.1.jar
deleted file mode 100644
index a958b7a1..00000000
Binary files a/libs/extensions/jme3-spaceshift-extension-1.0.1.jar and /dev/null differ
diff --git a/libs/extensions/rlib-6.1.2-sources.jar b/libs/extensions/rlib-6.1.2-sources.jar
deleted file mode 100644
index de0b710b..00000000
Binary files a/libs/extensions/rlib-6.1.2-sources.jar and /dev/null differ
diff --git a/libs/extensions/rlib-6.1.2.jar b/libs/extensions/rlib-6.1.2.jar
deleted file mode 100644
index e5a49cca..00000000
Binary files a/libs/extensions/rlib-6.1.2.jar and /dev/null differ
diff --git a/libs/extensions/simsilica/iso-surface-sources.1.0.0.jar b/libs/extensions/simsilica/iso-surface-sources.1.0.0.jar
deleted file mode 100644
index bfc9fad6..00000000
Binary files a/libs/extensions/simsilica/iso-surface-sources.1.0.0.jar and /dev/null differ
diff --git a/libs/extensions/simsilica/iso-surface.1.0.0.jar b/libs/extensions/simsilica/iso-surface.1.0.0.jar
deleted file mode 100644
index c356fe1a..00000000
Binary files a/libs/extensions/simsilica/iso-surface.1.0.0.jar and /dev/null differ
diff --git a/libs/extensions/simsilica/lemur-1.9.1-sources.jar b/libs/extensions/simsilica/lemur-1.9.1-sources.jar
deleted file mode 100644
index 390329cc..00000000
Binary files a/libs/extensions/simsilica/lemur-1.9.1-sources.jar and /dev/null differ
diff --git a/libs/extensions/simsilica/lemur-1.9.1.jar b/libs/extensions/simsilica/lemur-1.9.1.jar
deleted file mode 100644
index 8ec06437..00000000
Binary files a/libs/extensions/simsilica/lemur-1.9.1.jar and /dev/null differ
diff --git a/libs/extensions/simsilica/sim-fx-1.0.4-sources.jar b/libs/extensions/simsilica/sim-fx-1.0.4-sources.jar
deleted file mode 100644
index 7bdb8181..00000000
Binary files a/libs/extensions/simsilica/sim-fx-1.0.4-sources.jar and /dev/null differ
diff --git a/libs/extensions/simsilica/sim-fx-1.0.4.jar b/libs/extensions/simsilica/sim-fx-1.0.4.jar
deleted file mode 100644
index 7a6a8ced..00000000
Binary files a/libs/extensions/simsilica/sim-fx-1.0.4.jar and /dev/null differ
diff --git a/libs/extensions/toneg0d/toneg0d.emitter-2.2.3-sources.jar b/libs/extensions/toneg0d/toneg0d.emitter-2.2.3-sources.jar
deleted file mode 100644
index f292612d..00000000
Binary files a/libs/extensions/toneg0d/toneg0d.emitter-2.2.3-sources.jar and /dev/null differ
diff --git a/libs/extensions/toneg0d/toneg0d.emitter-2.2.3.jar b/libs/extensions/toneg0d/toneg0d.emitter-2.2.3.jar
deleted file mode 100644
index 50839ea2..00000000
Binary files a/libs/extensions/toneg0d/toneg0d.emitter-2.2.3.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/guava-18.0.jar b/libs/extensions/xbuf/guava-18.0.jar
deleted file mode 100644
index 8f89e490..00000000
Binary files a/libs/extensions/xbuf/guava-18.0.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/jme3_physicsloader-0.5.jar b/libs/extensions/xbuf/jme3_physicsloader-0.5.jar
deleted file mode 100644
index 6c81ce62..00000000
Binary files a/libs/extensions/xbuf/jme3_physicsloader-0.5.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/jme3_xbuf_loader-0.9.1.jar b/libs/extensions/xbuf/jme3_xbuf_loader-0.9.1.jar
deleted file mode 100644
index f9c1ef0c..00000000
Binary files a/libs/extensions/xbuf/jme3_xbuf_loader-0.9.1.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/jme3_xbuf_rt-0.9.1.jar b/libs/extensions/xbuf/jme3_xbuf_rt-0.9.1.jar
deleted file mode 100644
index 8e3dede4..00000000
Binary files a/libs/extensions/xbuf/jme3_xbuf_rt-0.9.1.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/protobuf-java-3.0.0.jar b/libs/extensions/xbuf/protobuf-java-3.0.0.jar
deleted file mode 100644
index 7f36b334..00000000
Binary files a/libs/extensions/xbuf/protobuf-java-3.0.0.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/protobuf-java-util-3.0.0.jar b/libs/extensions/xbuf/protobuf-java-util-3.0.0.jar
deleted file mode 100644
index 81363166..00000000
Binary files a/libs/extensions/xbuf/protobuf-java-util-3.0.0.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/slf4j-api-1.7.25.jar b/libs/extensions/xbuf/slf4j-api-1.7.25.jar
deleted file mode 100644
index 0143c099..00000000
Binary files a/libs/extensions/xbuf/slf4j-api-1.7.25.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/slf4j-simple-1.7.25.jar b/libs/extensions/xbuf/slf4j-simple-1.7.25.jar
deleted file mode 100644
index a7260f3d..00000000
Binary files a/libs/extensions/xbuf/slf4j-simple-1.7.25.jar and /dev/null differ
diff --git a/libs/extensions/xbuf/xbuf-0.9.1.jar b/libs/extensions/xbuf/xbuf-0.9.1.jar
deleted file mode 100644
index 0d733845..00000000
Binary files a/libs/extensions/xbuf/xbuf-0.9.1.jar and /dev/null differ
diff --git a/libs/gson-2.6.2.jar b/libs/gson-2.6.2.jar
deleted file mode 100644
index 9d78626d..00000000
Binary files a/libs/gson-2.6.2.jar and /dev/null differ
diff --git a/libs/http/commons-codec-1.9.jar b/libs/http/commons-codec-1.9.jar
deleted file mode 100644
index ef35f1c5..00000000
Binary files a/libs/http/commons-codec-1.9.jar and /dev/null differ
diff --git a/libs/http/commons-logging-1.2.jar b/libs/http/commons-logging-1.2.jar
deleted file mode 100644
index 93a3b9f6..00000000
Binary files a/libs/http/commons-logging-1.2.jar and /dev/null differ
diff --git a/libs/http/httpclient-4.5.2.jar b/libs/http/httpclient-4.5.2.jar
deleted file mode 100644
index 701609fc..00000000
Binary files a/libs/http/httpclient-4.5.2.jar and /dev/null differ
diff --git a/libs/http/httpcore-4.4.4.jar b/libs/http/httpcore-4.4.4.jar
deleted file mode 100644
index ac4a8773..00000000
Binary files a/libs/http/httpcore-4.4.4.jar and /dev/null differ
diff --git a/libs/imageio-batik-3.3.2.jar b/libs/imageio-batik-3.3.2.jar
deleted file mode 100644
index 8cc8d286..00000000
Binary files a/libs/imageio-batik-3.3.2.jar and /dev/null differ
diff --git a/libs/imageio-core-3.3.2.jar b/libs/imageio-core-3.3.2.jar
deleted file mode 100644
index cff75070..00000000
Binary files a/libs/imageio-core-3.3.2.jar and /dev/null differ
diff --git a/libs/imageio-hdr-3.3.2.jar b/libs/imageio-hdr-3.3.2.jar
deleted file mode 100644
index 8f6a6e36..00000000
Binary files a/libs/imageio-hdr-3.3.2.jar and /dev/null differ
diff --git a/libs/imageio-metadata-3.3.2.jar b/libs/imageio-metadata-3.3.2.jar
deleted file mode 100644
index 2d7e4962..00000000
Binary files a/libs/imageio-metadata-3.3.2.jar and /dev/null differ
diff --git a/libs/imageio-tiff-3.3.2.jar b/libs/imageio-tiff-3.3.2.jar
deleted file mode 100644
index 7574dc54..00000000
Binary files a/libs/imageio-tiff-3.3.2.jar and /dev/null differ
diff --git a/libs/jME/core-0.27.jar b/libs/jME/core-0.27.jar
deleted file mode 100644
index 2cfecd5a..00000000
Binary files a/libs/jME/core-0.27.jar and /dev/null differ
diff --git a/libs/jME/dense64-0.27.jar b/libs/jME/dense64-0.27.jar
deleted file mode 100644
index 8143896f..00000000
Binary files a/libs/jME/dense64-0.27.jar and /dev/null differ
diff --git a/libs/jME/denseC64-0.27.jar b/libs/jME/denseC64-0.27.jar
deleted file mode 100644
index 8b8ce8d9..00000000
Binary files a/libs/jME/denseC64-0.27.jar and /dev/null differ
diff --git a/libs/jME/eventbus-1.4.jar b/libs/jME/eventbus-1.4.jar
deleted file mode 100644
index 4da3e24e..00000000
Binary files a/libs/jME/eventbus-1.4.jar and /dev/null differ
diff --git a/libs/jME/j-ogg-all-1.0.0.jar b/libs/jME/j-ogg-all-1.0.0.jar
deleted file mode 100644
index 73c983da..00000000
Binary files a/libs/jME/j-ogg-all-1.0.0.jar and /dev/null differ
diff --git a/libs/jME/jbullet.jar b/libs/jME/jbullet.jar
deleted file mode 100644
index 4e158f10..00000000
Binary files a/libs/jME/jbullet.jar and /dev/null differ
diff --git a/libs/jME/jglfont-core-1.4.jar b/libs/jME/jglfont-core-1.4.jar
deleted file mode 100644
index 756d955e..00000000
Binary files a/libs/jME/jglfont-core-1.4.jar and /dev/null differ
diff --git a/libs/jME/jinput-2.0.5.jar b/libs/jME/jinput-2.0.5.jar
deleted file mode 100644
index cc8428d6..00000000
Binary files a/libs/jME/jinput-2.0.5.jar and /dev/null differ
diff --git a/libs/jME/jinput-platform-2.0.5-natives-linux.jar b/libs/jME/jinput-platform-2.0.5-natives-linux.jar
deleted file mode 100644
index 10194cf2..00000000
Binary files a/libs/jME/jinput-platform-2.0.5-natives-linux.jar and /dev/null differ
diff --git a/libs/jME/jinput-platform-2.0.5-natives-osx.jar b/libs/jME/jinput-platform-2.0.5-natives-osx.jar
deleted file mode 100644
index a6d8a4f5..00000000
Binary files a/libs/jME/jinput-platform-2.0.5-natives-osx.jar and /dev/null differ
diff --git a/libs/jME/jinput-platform-2.0.5-natives-windows.jar b/libs/jME/jinput-platform-2.0.5-natives-windows.jar
deleted file mode 100644
index b9c079e6..00000000
Binary files a/libs/jME/jinput-platform-2.0.5-natives-windows.jar and /dev/null differ
diff --git a/libs/jME/jme3-blender-3.2.0-sources.jar b/libs/jME/jme3-blender-3.2.0-sources.jar
deleted file mode 100644
index 800a6e55..00000000
Binary files a/libs/jME/jme3-blender-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-blender-3.2.0.jar b/libs/jME/jme3-blender-3.2.0.jar
deleted file mode 100644
index 991e95e9..00000000
Binary files a/libs/jME/jme3-blender-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-bullet-3.2.0-sources.jar b/libs/jME/jme3-bullet-3.2.0-sources.jar
deleted file mode 100644
index 79ed4c25..00000000
Binary files a/libs/jME/jme3-bullet-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-bullet-3.2.0.jar b/libs/jME/jme3-bullet-3.2.0.jar
deleted file mode 100644
index 06c45049..00000000
Binary files a/libs/jME/jme3-bullet-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-bullet-native-3.2.0-sources.jar b/libs/jME/jme3-bullet-native-3.2.0-sources.jar
deleted file mode 100644
index f5df9709..00000000
Binary files a/libs/jME/jme3-bullet-native-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-bullet-native-3.2.0.jar b/libs/jME/jme3-bullet-native-3.2.0.jar
deleted file mode 100644
index 954ba3f4..00000000
Binary files a/libs/jME/jme3-bullet-native-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-core-3.2.0-sources.jar b/libs/jME/jme3-core-3.2.0-sources.jar
deleted file mode 100644
index 3a8c9a1e..00000000
Binary files a/libs/jME/jme3-core-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-core-3.2.0.jar b/libs/jME/jme3-core-3.2.0.jar
deleted file mode 100644
index 4d3deac3..00000000
Binary files a/libs/jME/jme3-core-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-desktop-3.2.0-sources.jar b/libs/jME/jme3-desktop-3.2.0-sources.jar
deleted file mode 100644
index 92347e51..00000000
Binary files a/libs/jME/jme3-desktop-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-desktop-3.2.0.jar b/libs/jME/jme3-desktop-3.2.0.jar
deleted file mode 100644
index 13d89f60..00000000
Binary files a/libs/jME/jme3-desktop-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-effects-3.2.0-sources.jar b/libs/jME/jme3-effects-3.2.0-sources.jar
deleted file mode 100644
index 421c4a8c..00000000
Binary files a/libs/jME/jme3-effects-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-effects-3.2.0.jar b/libs/jME/jme3-effects-3.2.0.jar
deleted file mode 100644
index af051192..00000000
Binary files a/libs/jME/jme3-effects-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-jogg-3.2.0-sources.jar b/libs/jME/jme3-jogg-3.2.0-sources.jar
deleted file mode 100644
index 52d48266..00000000
Binary files a/libs/jME/jme3-jogg-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-jogg-3.2.0.jar b/libs/jME/jme3-jogg-3.2.0.jar
deleted file mode 100644
index dbfad488..00000000
Binary files a/libs/jME/jme3-jogg-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-lwjgl3-3.2.0-sources.jar b/libs/jME/jme3-lwjgl3-3.2.0-sources.jar
deleted file mode 100644
index 272cb1f3..00000000
Binary files a/libs/jME/jme3-lwjgl3-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-lwjgl3-3.2.0.jar b/libs/jME/jme3-lwjgl3-3.2.0.jar
deleted file mode 100644
index e44063a8..00000000
Binary files a/libs/jME/jme3-lwjgl3-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-plugins-3.2.0-sources.jar b/libs/jME/jme3-plugins-3.2.0-sources.jar
deleted file mode 100644
index 360a525a..00000000
Binary files a/libs/jME/jme3-plugins-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-plugins-3.2.0.jar b/libs/jME/jme3-plugins-3.2.0.jar
deleted file mode 100644
index 9851dd71..00000000
Binary files a/libs/jME/jme3-plugins-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jme3-terrain-3.2.0-sources.jar b/libs/jME/jme3-terrain-3.2.0-sources.jar
deleted file mode 100644
index a64363db..00000000
Binary files a/libs/jME/jme3-terrain-3.2.0-sources.jar and /dev/null differ
diff --git a/libs/jME/jme3-terrain-3.2.0.jar b/libs/jME/jme3-terrain-3.2.0.jar
deleted file mode 100644
index 0623069f..00000000
Binary files a/libs/jME/jme3-terrain-3.2.0.jar and /dev/null differ
diff --git a/libs/jME/jsr305-2.0.2.jar b/libs/jME/jsr305-2.0.2.jar
deleted file mode 100644
index 18163e68..00000000
Binary files a/libs/jME/jsr305-2.0.2.jar and /dev/null differ
diff --git a/libs/jME/jutils-1.0.0.jar b/libs/jME/jutils-1.0.0.jar
deleted file mode 100644
index cf407cfd..00000000
Binary files a/libs/jME/jutils-1.0.0.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-glfw-natives-linux.jar b/libs/jME/lwjgl-glfw-natives-linux.jar
deleted file mode 100644
index 56722dec..00000000
Binary files a/libs/jME/lwjgl-glfw-natives-linux.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-glfw-natives-macos.jar b/libs/jME/lwjgl-glfw-natives-macos.jar
deleted file mode 100644
index 24f83e14..00000000
Binary files a/libs/jME/lwjgl-glfw-natives-macos.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-glfw-natives-windows.jar b/libs/jME/lwjgl-glfw-natives-windows.jar
deleted file mode 100644
index 6ac6e799..00000000
Binary files a/libs/jME/lwjgl-glfw-natives-windows.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-glfw-sources.jar b/libs/jME/lwjgl-glfw-sources.jar
deleted file mode 100644
index 6e37d16d..00000000
Binary files a/libs/jME/lwjgl-glfw-sources.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-glfw.jar b/libs/jME/lwjgl-glfw.jar
deleted file mode 100644
index 39cb479e..00000000
Binary files a/libs/jME/lwjgl-glfw.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-jemalloc-natives-linux.jar b/libs/jME/lwjgl-jemalloc-natives-linux.jar
deleted file mode 100644
index 622f9615..00000000
Binary files a/libs/jME/lwjgl-jemalloc-natives-linux.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-jemalloc-natives-macos.jar b/libs/jME/lwjgl-jemalloc-natives-macos.jar
deleted file mode 100644
index ba6f734d..00000000
Binary files a/libs/jME/lwjgl-jemalloc-natives-macos.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-jemalloc-natives-windows.jar b/libs/jME/lwjgl-jemalloc-natives-windows.jar
deleted file mode 100644
index 4d6f647e..00000000
Binary files a/libs/jME/lwjgl-jemalloc-natives-windows.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-jemalloc-sources.jar b/libs/jME/lwjgl-jemalloc-sources.jar
deleted file mode 100644
index 621f10a3..00000000
Binary files a/libs/jME/lwjgl-jemalloc-sources.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-jemalloc.jar b/libs/jME/lwjgl-jemalloc.jar
deleted file mode 100644
index d2286b32..00000000
Binary files a/libs/jME/lwjgl-jemalloc.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-natives-linux.jar b/libs/jME/lwjgl-natives-linux.jar
deleted file mode 100644
index fcc72742..00000000
Binary files a/libs/jME/lwjgl-natives-linux.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-natives-macos.jar b/libs/jME/lwjgl-natives-macos.jar
deleted file mode 100644
index 9de309da..00000000
Binary files a/libs/jME/lwjgl-natives-macos.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-natives-windows.jar b/libs/jME/lwjgl-natives-windows.jar
deleted file mode 100644
index 163a706f..00000000
Binary files a/libs/jME/lwjgl-natives-windows.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-openal-natives-linux.jar b/libs/jME/lwjgl-openal-natives-linux.jar
deleted file mode 100644
index 77da6324..00000000
Binary files a/libs/jME/lwjgl-openal-natives-linux.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-openal-natives-macos.jar b/libs/jME/lwjgl-openal-natives-macos.jar
deleted file mode 100644
index f169b696..00000000
Binary files a/libs/jME/lwjgl-openal-natives-macos.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-openal-natives-windows.jar b/libs/jME/lwjgl-openal-natives-windows.jar
deleted file mode 100644
index b1e674de..00000000
Binary files a/libs/jME/lwjgl-openal-natives-windows.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-openal-sources.jar b/libs/jME/lwjgl-openal-sources.jar
deleted file mode 100644
index ddb3883e..00000000
Binary files a/libs/jME/lwjgl-openal-sources.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-openal.jar b/libs/jME/lwjgl-openal.jar
deleted file mode 100644
index 1f2407f4..00000000
Binary files a/libs/jME/lwjgl-openal.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-opencl-sources.jar b/libs/jME/lwjgl-opencl-sources.jar
deleted file mode 100644
index c58ecdec..00000000
Binary files a/libs/jME/lwjgl-opencl-sources.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-opencl.jar b/libs/jME/lwjgl-opencl.jar
deleted file mode 100644
index af07fd20..00000000
Binary files a/libs/jME/lwjgl-opencl.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-opengl-natives-linux.jar b/libs/jME/lwjgl-opengl-natives-linux.jar
deleted file mode 100644
index 433dbb83..00000000
Binary files a/libs/jME/lwjgl-opengl-natives-linux.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-opengl-natives-macos.jar b/libs/jME/lwjgl-opengl-natives-macos.jar
deleted file mode 100644
index e38c09cb..00000000
Binary files a/libs/jME/lwjgl-opengl-natives-macos.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-opengl-natives-windows.jar b/libs/jME/lwjgl-opengl-natives-windows.jar
deleted file mode 100644
index 223104e9..00000000
Binary files a/libs/jME/lwjgl-opengl-natives-windows.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-opengl-sources.jar b/libs/jME/lwjgl-opengl-sources.jar
deleted file mode 100644
index f157f985..00000000
Binary files a/libs/jME/lwjgl-opengl-sources.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-opengl.jar b/libs/jME/lwjgl-opengl.jar
deleted file mode 100644
index 8ed0165d..00000000
Binary files a/libs/jME/lwjgl-opengl.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-sources.jar b/libs/jME/lwjgl-sources.jar
deleted file mode 100644
index 30a44ca2..00000000
Binary files a/libs/jME/lwjgl-sources.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-stb-natives-linux.jar b/libs/jME/lwjgl-stb-natives-linux.jar
deleted file mode 100644
index 04db9a51..00000000
Binary files a/libs/jME/lwjgl-stb-natives-linux.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-stb-natives-macos.jar b/libs/jME/lwjgl-stb-natives-macos.jar
deleted file mode 100644
index dce4366e..00000000
Binary files a/libs/jME/lwjgl-stb-natives-macos.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-stb-natives-windows.jar b/libs/jME/lwjgl-stb-natives-windows.jar
deleted file mode 100644
index c5acef89..00000000
Binary files a/libs/jME/lwjgl-stb-natives-windows.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-stb-sources.jar b/libs/jME/lwjgl-stb-sources.jar
deleted file mode 100644
index eb97c857..00000000
Binary files a/libs/jME/lwjgl-stb-sources.jar and /dev/null differ
diff --git a/libs/jME/lwjgl-stb.jar b/libs/jME/lwjgl-stb.jar
deleted file mode 100644
index 578151f4..00000000
Binary files a/libs/jME/lwjgl-stb.jar and /dev/null differ
diff --git a/libs/jME/lwjgl.jar b/libs/jME/lwjgl.jar
deleted file mode 100644
index c1eaa82d..00000000
Binary files a/libs/jME/lwjgl.jar and /dev/null differ
diff --git a/libs/jME/retrace.jar b/libs/jME/retrace.jar
deleted file mode 100644
index c26d40cf..00000000
Binary files a/libs/jME/retrace.jar and /dev/null differ
diff --git a/libs/jME/simple-0.27.jar b/libs/jME/simple-0.27.jar
deleted file mode 100644
index 3911edd7..00000000
Binary files a/libs/jME/simple-0.27.jar and /dev/null differ
diff --git a/libs/jME/stack-alloc.jar b/libs/jME/stack-alloc.jar
deleted file mode 100644
index 3bd50f74..00000000
Binary files a/libs/jME/stack-alloc.jar and /dev/null differ
diff --git a/libs/jME/vecmath-1.3.1.jar b/libs/jME/vecmath-1.3.1.jar
deleted file mode 100644
index c5a756a6..00000000
Binary files a/libs/jME/vecmath-1.3.1.jar and /dev/null differ
diff --git a/libs/jME/xpp3-1.1.4c.jar b/libs/jME/xpp3-1.1.4c.jar
deleted file mode 100644
index a44765e0..00000000
Binary files a/libs/jME/xpp3-1.1.4c.jar and /dev/null differ
diff --git a/libs/jme-jfx-1.5.2-sources.jar b/libs/jme-jfx-1.5.2-sources.jar
deleted file mode 100644
index 757760f7..00000000
Binary files a/libs/jme-jfx-1.5.2-sources.jar and /dev/null differ
diff --git a/libs/jme-jfx-1.5.2.jar b/libs/jme-jfx-1.5.2.jar
deleted file mode 100644
index a68a8c07..00000000
Binary files a/libs/jme-jfx-1.5.2.jar and /dev/null differ
diff --git a/libs/richtextfx-0.7-M5-sources.jar b/libs/richtextfx-0.7-M5-sources.jar
deleted file mode 100644
index d51809e6..00000000
Binary files a/libs/richtextfx-0.7-M5-sources.jar and /dev/null differ
diff --git a/libs/richtextfx-fat-0.7-M5.jar b/libs/richtextfx-fat-0.7-M5.jar
deleted file mode 100644
index 3018881b..00000000
Binary files a/libs/richtextfx-fat-0.7-M5.jar and /dev/null differ
diff --git a/libs/rlib-fx-4.1.2-sources.jar b/libs/rlib-fx-4.1.2-sources.jar
deleted file mode 100644
index 97f94427..00000000
Binary files a/libs/rlib-fx-4.1.2-sources.jar and /dev/null differ
diff --git a/libs/rlib-fx-4.1.2.jar b/libs/rlib-fx-4.1.2.jar
deleted file mode 100644
index 47480ecf..00000000
Binary files a/libs/rlib-fx-4.1.2.jar and /dev/null differ
diff --git a/libs/svg/avalon-framework-4.1.3.jar b/libs/svg/avalon-framework-4.1.3.jar
deleted file mode 100644
index fd72580d..00000000
Binary files a/libs/svg/avalon-framework-4.1.3.jar and /dev/null differ
diff --git a/libs/svg/batik-anim-1.8-sources.jar b/libs/svg/batik-anim-1.8-sources.jar
deleted file mode 100644
index 7bd3d346..00000000
Binary files a/libs/svg/batik-anim-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-anim-1.8.jar b/libs/svg/batik-anim-1.8.jar
deleted file mode 100644
index 3f1a185a..00000000
Binary files a/libs/svg/batik-anim-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-awt-util-1.8-sources.jar b/libs/svg/batik-awt-util-1.8-sources.jar
deleted file mode 100644
index 13c53da7..00000000
Binary files a/libs/svg/batik-awt-util-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-awt-util-1.8.jar b/libs/svg/batik-awt-util-1.8.jar
deleted file mode 100644
index ce0be3cd..00000000
Binary files a/libs/svg/batik-awt-util-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-bridge-1.8-sources.jar b/libs/svg/batik-bridge-1.8-sources.jar
deleted file mode 100644
index da7f3dc5..00000000
Binary files a/libs/svg/batik-bridge-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-bridge-1.8.jar b/libs/svg/batik-bridge-1.8.jar
deleted file mode 100644
index f9fc68e1..00000000
Binary files a/libs/svg/batik-bridge-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-css-1.8-sources.jar b/libs/svg/batik-css-1.8-sources.jar
deleted file mode 100644
index a202bed6..00000000
Binary files a/libs/svg/batik-css-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-css-1.8.jar b/libs/svg/batik-css-1.8.jar
deleted file mode 100644
index 1cf2736e..00000000
Binary files a/libs/svg/batik-css-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-dom-1.8-sources.jar b/libs/svg/batik-dom-1.8-sources.jar
deleted file mode 100644
index d034e401..00000000
Binary files a/libs/svg/batik-dom-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-dom-1.8.jar b/libs/svg/batik-dom-1.8.jar
deleted file mode 100644
index 51d88f6a..00000000
Binary files a/libs/svg/batik-dom-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-ext-1.8-sources.jar b/libs/svg/batik-ext-1.8-sources.jar
deleted file mode 100644
index 2f8d4d56..00000000
Binary files a/libs/svg/batik-ext-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-ext-1.8.jar b/libs/svg/batik-ext-1.8.jar
deleted file mode 100644
index 6a09ca36..00000000
Binary files a/libs/svg/batik-ext-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-gvt-1.8-sources.jar b/libs/svg/batik-gvt-1.8-sources.jar
deleted file mode 100644
index 1f23133c..00000000
Binary files a/libs/svg/batik-gvt-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-gvt-1.8.jar b/libs/svg/batik-gvt-1.8.jar
deleted file mode 100644
index e3a00382..00000000
Binary files a/libs/svg/batik-gvt-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-parser-1.8-sources.jar b/libs/svg/batik-parser-1.8-sources.jar
deleted file mode 100644
index 16127628..00000000
Binary files a/libs/svg/batik-parser-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-parser-1.8.jar b/libs/svg/batik-parser-1.8.jar
deleted file mode 100644
index 01108ad7..00000000
Binary files a/libs/svg/batik-parser-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-script-1.8-sources.jar b/libs/svg/batik-script-1.8-sources.jar
deleted file mode 100644
index e3178d61..00000000
Binary files a/libs/svg/batik-script-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-script-1.8.jar b/libs/svg/batik-script-1.8.jar
deleted file mode 100644
index df0face7..00000000
Binary files a/libs/svg/batik-script-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-svg-dom-1.8-sources.jar b/libs/svg/batik-svg-dom-1.8-sources.jar
deleted file mode 100644
index 838be351..00000000
Binary files a/libs/svg/batik-svg-dom-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-svg-dom-1.8.jar b/libs/svg/batik-svg-dom-1.8.jar
deleted file mode 100644
index 8d7a9046..00000000
Binary files a/libs/svg/batik-svg-dom-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-svggen-1.8-sources.jar b/libs/svg/batik-svggen-1.8-sources.jar
deleted file mode 100644
index b1c58563..00000000
Binary files a/libs/svg/batik-svggen-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-svggen-1.8.jar b/libs/svg/batik-svggen-1.8.jar
deleted file mode 100644
index aebf1615..00000000
Binary files a/libs/svg/batik-svggen-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-transcoder-1.8-sources.jar b/libs/svg/batik-transcoder-1.8-sources.jar
deleted file mode 100644
index 3a444561..00000000
Binary files a/libs/svg/batik-transcoder-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-transcoder-1.8.jar b/libs/svg/batik-transcoder-1.8.jar
deleted file mode 100644
index aff308fc..00000000
Binary files a/libs/svg/batik-transcoder-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-util-1.8-sources.jar b/libs/svg/batik-util-1.8-sources.jar
deleted file mode 100644
index a442991d..00000000
Binary files a/libs/svg/batik-util-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-util-1.8.jar b/libs/svg/batik-util-1.8.jar
deleted file mode 100644
index cb1c63f1..00000000
Binary files a/libs/svg/batik-util-1.8.jar and /dev/null differ
diff --git a/libs/svg/batik-xml-1.8-sources.jar b/libs/svg/batik-xml-1.8-sources.jar
deleted file mode 100644
index 8486eb38..00000000
Binary files a/libs/svg/batik-xml-1.8-sources.jar and /dev/null differ
diff --git a/libs/svg/batik-xml-1.8.jar b/libs/svg/batik-xml-1.8.jar
deleted file mode 100644
index 9b02e6c3..00000000
Binary files a/libs/svg/batik-xml-1.8.jar and /dev/null differ
diff --git a/libs/svg/commons-io-1.3.1-sources.jar b/libs/svg/commons-io-1.3.1-sources.jar
deleted file mode 100644
index e5d78e9d..00000000
Binary files a/libs/svg/commons-io-1.3.1-sources.jar and /dev/null differ
diff --git a/libs/svg/commons-io-1.3.1.jar b/libs/svg/commons-io-1.3.1.jar
deleted file mode 100644
index 7affdefc..00000000
Binary files a/libs/svg/commons-io-1.3.1.jar and /dev/null differ
diff --git a/libs/svg/commons-logging-1.0.4-sources.jar b/libs/svg/commons-logging-1.0.4-sources.jar
deleted file mode 100644
index fc4bc9fc..00000000
Binary files a/libs/svg/commons-logging-1.0.4-sources.jar and /dev/null differ
diff --git a/libs/svg/commons-logging-1.0.4.jar b/libs/svg/commons-logging-1.0.4.jar
deleted file mode 100644
index b73a80fa..00000000
Binary files a/libs/svg/commons-logging-1.0.4.jar and /dev/null differ
diff --git a/libs/svg/javafxsvg-1.2.1-sources.jar b/libs/svg/javafxsvg-1.2.1-sources.jar
deleted file mode 100644
index e7237655..00000000
Binary files a/libs/svg/javafxsvg-1.2.1-sources.jar and /dev/null differ
diff --git a/libs/svg/javafxsvg-1.2.1.jar b/libs/svg/javafxsvg-1.2.1.jar
deleted file mode 100644
index d30cf3ee..00000000
Binary files a/libs/svg/javafxsvg-1.2.1.jar and /dev/null differ
diff --git a/libs/svg/log4j-1.2.6.jar b/libs/svg/log4j-1.2.6.jar
deleted file mode 100644
index be4a9176..00000000
Binary files a/libs/svg/log4j-1.2.6.jar and /dev/null differ
diff --git a/libs/svg/logkit-1.0.1-sources.jar b/libs/svg/logkit-1.0.1-sources.jar
deleted file mode 100644
index f870617f..00000000
Binary files a/libs/svg/logkit-1.0.1-sources.jar and /dev/null differ
diff --git a/libs/svg/logkit-1.0.1.jar b/libs/svg/logkit-1.0.1.jar
deleted file mode 100644
index d3250ee6..00000000
Binary files a/libs/svg/logkit-1.0.1.jar and /dev/null differ
diff --git a/libs/svg/xalan-2.7.0-sources.jar b/libs/svg/xalan-2.7.0-sources.jar
deleted file mode 100644
index dd8fa51b..00000000
Binary files a/libs/svg/xalan-2.7.0-sources.jar and /dev/null differ
diff --git a/libs/svg/xalan-2.7.0.jar b/libs/svg/xalan-2.7.0.jar
deleted file mode 100644
index 007be396..00000000
Binary files a/libs/svg/xalan-2.7.0.jar and /dev/null differ
diff --git a/libs/svg/xml-apis-1.3.04-source.jar b/libs/svg/xml-apis-1.3.04-source.jar
deleted file mode 100644
index d9c82cdc..00000000
Binary files a/libs/svg/xml-apis-1.3.04-source.jar and /dev/null differ
diff --git a/libs/svg/xml-apis-1.3.04.jar b/libs/svg/xml-apis-1.3.04.jar
deleted file mode 100644
index d42c0ea6..00000000
Binary files a/libs/svg/xml-apis-1.3.04.jar and /dev/null differ
diff --git a/libs/svg/xml-apis-ext-1.3.04.jar b/libs/svg/xml-apis-ext-1.3.04.jar
deleted file mode 100644
index a7869d68..00000000
Binary files a/libs/svg/xml-apis-ext-1.3.04.jar and /dev/null differ
diff --git a/libs/svg/xmlgraphics-commons-2.1-sources.jar b/libs/svg/xmlgraphics-commons-2.1-sources.jar
deleted file mode 100644
index e3d44641..00000000
Binary files a/libs/svg/xmlgraphics-commons-2.1-sources.jar and /dev/null differ
diff --git a/libs/svg/xmlgraphics-commons-2.1.jar b/libs/svg/xmlgraphics-commons-2.1.jar
deleted file mode 100644
index f917ca1b..00000000
Binary files a/libs/svg/xmlgraphics-commons-2.1.jar and /dev/null differ
diff --git a/src/main/java/com/jme3/scene/Spatial.java b/src/main/java/com/jme3/scene/Spatial.java
index 534f46c7..c0df8334 100644
--- a/src/main/java/com/jme3/scene/Spatial.java
+++ b/src/main/java/com/jme3/scene/Spatial.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009-2013 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,7 @@
*/
package com.jme3.scene;
+import com.jme3.anim.util.HasLocalTransform;
import com.jme3.asset.AssetKey;
import com.jme3.asset.CloneableSmartAsset;
import com.jme3.bounding.BoundingVolume;
@@ -48,18 +49,18 @@
import com.jme3.renderer.queue.RenderQueue.Bucket;
import com.jme3.renderer.queue.RenderQueue.ShadowMode;
import com.jme3.scene.control.Control;
+import com.jme3.util.SafeArrayList;
+import com.jme3.util.TempVars;
import com.jme3.util.clone.Cloner;
import com.jme3.util.clone.IdentityCloneFunction;
import com.jme3.util.clone.JmeCloneable;
-import com.jme3.util.SafeArrayList;
-import com.jme3.util.TempVars;
import java.io.IOException;
import java.util.*;
import java.util.logging.Logger;
/**
* Spatial defines the base class for scene graph nodes. It
- * maintains a link to a parent, it's local transforms and the world's
+ * maintains a link to a parent, its local transforms and the world's
* transforms. All other scene graph elements, such as {@link Node} and
* {@link Geometry} are subclasses of Spatial.
*
@@ -67,7 +68,7 @@
* @author Joshua Slack
* @version $Revision: 4075 $, $Data$
*/
-public abstract class Spatial implements Savable, Cloneable, Collidable, CloneableSmartAsset, JmeCloneable {
+public abstract class Spatial implements Savable, Cloneable, Collidable, CloneableSmartAsset, JmeCloneable, HasLocalTransform {
private static final Logger logger = Logger.getLogger(Spatial.class.getName());
@@ -573,8 +574,8 @@ public void lookAt(Vector3f position, Vector3f upVector) {
* Should be overridden by Node and Geometry.
*/
protected void updateWorldBound() {
- // the world bound of a leaf is the same as it's model bound
- // for a node, the world bound is a combination of all it's children
+ // the world bound of a leaf is the same as its model bound
+ // for a node, the world bound is a combination of all its children
// bounds
// -> handled by subclass
refreshFlags &= ~RF_BOUND;
@@ -972,7 +973,7 @@ protected void setParent(Node parent) {
}
/**
- * removeFromParent removes this Spatial from it's parent.
+ * removeFromParent removes this Spatial from its parent.
*
* @return true if it has a parent and performed the remove.
*/
@@ -1373,66 +1374,11 @@ public Spatial clone( boolean cloneMaterial ) {
}
/**
- * The old clone() method that did not use the new Cloner utility.
+ * The old clone() method that did not use the new Cloner utility.
*/
+ @Deprecated
public Spatial oldClone(boolean cloneMaterial) {
- try {
- Spatial clone = (Spatial) super.clone();
- if (worldBound != null) {
- clone.worldBound = worldBound.clone();
- }
- clone.worldLights = worldLights.clone();
- clone.localLights = localLights.clone();
-
- // Set the new owner of the light lists
- clone.localLights.setOwner(clone);
- clone.worldLights.setOwner(clone);
-
- clone.worldOverrides = new SafeArrayList<>(MatParamOverride.class);
- clone.localOverrides = new SafeArrayList<>(MatParamOverride.class);
-
- for (MatParamOverride override : localOverrides) {
- clone.localOverrides.add((MatParamOverride) override.clone());
- }
-
- // No need to force cloned to update.
- // This node already has the refresh flags
- // set below so it will have to update anyway.
- clone.worldTransform = worldTransform.clone();
- clone.localTransform = localTransform.clone();
-
- if (clone instanceof Node) {
- Node node = (Node) this;
- Node nodeClone = (Node) clone;
- nodeClone.children = new SafeArrayList(Spatial.class);
- for (Spatial child : node.children) {
- Spatial childClone = child.clone(cloneMaterial);
- childClone.parent = nodeClone;
- nodeClone.children.add(childClone);
- }
- }
-
- clone.parent = null;
- clone.setBoundRefresh();
- clone.setTransformRefresh();
- clone.setLightListRefresh();
- clone.setMatParamOverrideRefresh();
-
- clone.controls = new SafeArrayList(Control.class);
- for (int i = 0; i < controls.size(); i++) {
- Control newControl = controls.get(i).cloneForSpatial(clone);
- newControl.setSpatial(clone);
- clone.controls.add(newControl);
- }
-
- if (userData != null) {
- clone.userData = (HashMap) userData.clone();
- }
-
- return clone;
- } catch (CloneNotSupportedException ex) {
- throw new AssertionError();
- }
+ throw new UnsupportedOperationException();
}
/**
@@ -1442,9 +1388,6 @@ public Spatial oldClone(boolean cloneMaterial) {
* Note that meshes of geometries are not cloned explicitly, they
* are shared if static, or specially cloned if animated.
*
- * All controls will be cloned using the Control.cloneForSpatial method
- * on the clone.
- *
* @see Mesh#cloneForAnim()
*/
@Override
@@ -1879,4 +1822,4 @@ public boolean isVisible() {
public void setVisible(boolean visible) {
this.visible = visible;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/jme3/texture/Image.java b/src/main/java/com/jme3/texture/Image.java
index 5817cb59..c1b3f344 100644
--- a/src/main/java/com/jme3/texture/Image.java
+++ b/src/main/java/com/jme3/texture/Image.java
@@ -258,6 +258,7 @@ public enum Format {
* half-precision floating point red, green, and blue.
*
* Requires {@link Caps#FloatTexture}.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
*/
RGB16F(48,true),
@@ -272,6 +273,7 @@ public enum Format {
* single-precision floating point red, green, and blue.
*
* Requires {@link Caps#FloatTexture}.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
*/
RGB32F(96,true),
@@ -301,30 +303,189 @@ public enum Format {
*/
ETC1(4, false, true, false),
+ /**
+ * 8 bit signed int red.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
R8I(8),
+ /**
+ * 8 bit unsigned int red.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
R8UI(8),
+ /**
+ * 16 bit signed int red.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
R16I(16),
+ /**
+ * 16 bit unsigned int red.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
R16UI(16),
+ /**
+ * 32 bit signed int red.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
R32I(32),
+ /**
+ * 32 bit unsigned int red.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
R32UI(32),
+
+
+ /**
+ * 8 bit signed int red and green.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RG8I(16),
+ /**
+ * 8 bit unsigned int red and green.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RG8UI(16),
+ /**
+ * 16 bit signed int red and green.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RG16I(32),
+ /**
+ * 16 bit unsigned int red and green.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RG16UI(32),
+ /**
+ * 32 bit signed int red and green.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RG32I(64),
+ /**
+ * 32 bit unsigned int red and green.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RG32UI(64),
+
+ /**
+ * 8 bit signed int red, green and blue.
+ *
+ * Requires {@link Caps#IntegerTexture} to be supported for textures.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
+ */
RGB8I(24),
+ /**
+ * 8 bit unsigned int red, green and blue.
+ *
+ * Requires {@link Caps#IntegerTexture} to be supported for textures.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
+ */
RGB8UI(24),
+ /**
+ * 16 bit signed int red, green and blue.
+ *
+ * Requires {@link Caps#IntegerTexture} to be supported for textures.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
+ */
RGB16I(48),
+ /**
+ * 16 bit unsigned int red, green and blue.
+ *
+ * Requires {@link Caps#IntegerTexture} to be supported for textures.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
+ */
RGB16UI(48),
+ /**
+ * 32 bit signed int red, green and blue.
+ *
+ * Requires {@link Caps#IntegerTexture} to be supported for textures.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
+ */
RGB32I(96),
+ /**
+ * 32 bit unsigned int red, green and blue.
+ *
+ * Requires {@link Caps#IntegerTexture} to be supported for textures.
+ * May be supported for renderbuffers, but the OpenGL specification does not require it.
+ */
RGB32UI(96),
+
+
+ /**
+ * 8 bit signed int red, green, blue and alpha.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RGBA8I(32),
+ /**
+ * 8 bit unsigned int red, green, blue and alpha.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RGBA8UI(32),
+ /**
+ * 16 bit signed int red, green, blue and alpha.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RGBA16I(64),
+ /**
+ * 16 bit unsigned int red, green, blue and alpha.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RGBA16UI(64),
+ /**
+ * 32 bit signed int red, green, blue and alpha.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
RGBA32I(128),
- RGBA32UI(128)
+ /**
+ * 32 bit unsigned int red, green, blue and alpha.
+ *
+ * Requires {@link Caps#IntegerTexture}.
+ */
+ RGBA32UI(128),
+
+ /**
+ * half-precision floating point red.
+ *
+ * Requires {@link Caps#FloatTexture}.
+ */
+ R16F(16,true),
+
+ /**
+ * single-precision floating point red.
+ *
+ * Requires {@link Caps#FloatTexture}.
+ */
+ R32F(32,true),
+
+ /**
+ * half-precision floating point red and green.
+ *
+ * Requires {@link Caps#FloatTexture}.
+ */
+ RG16F(32,true),
+
+ /**
+ * single-precision floating point red and green.
+ *
+ * Requires {@link Caps#FloatTexture}.
+ */
+ RG32F(64,true),
;
private int bpp;
@@ -574,14 +735,14 @@ public Image(Format format, int width, int height, int depth, ArrayList data,
@@ -630,13 +791,13 @@ public Image(Format format, int width, int height, ByteBuffer data,
}
/**
- * @see {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, int[], boolean)}
+ * @see {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, int[], com.jme3.texture.image.ColorSpace)}
* @param format
* @param width
* @param height
* @param data
* @param mipMapSizes
- * @deprecated use {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, int[], boolean)}
+ * @deprecated use {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, int[], com.jme3.texture.image.ColorSpace)}
*/
@Deprecated
public Image(Format format, int width, int height, ByteBuffer data,
@@ -664,13 +825,13 @@ public Image(Format format, int width, int height, int depth, ArrayList data) {
@@ -698,12 +859,12 @@ public Image(Format format, int width, int height, ByteBuffer data, ColorSpace c
/**
- * @see {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, boolean)}
+ * @see {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, com.jme3.texture.image.ColorSpace)}
* @param format
* @param width
* @param height
* @param data
- * @deprecated use {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, boolean)}
+ * @deprecated use {@link #Image(com.jme3.texture.Image.Format, int, int, java.nio.ByteBuffer, com.jme3.texture.image.ColorSpace)}
*/
@Deprecated
public Image(Format format, int width, int height, ByteBuffer data) {
diff --git a/src/main/java/com/ss/editor/DevelopPluginStarter.java b/src/main/java/com/ss/builder/DevelopPluginStarter.java
similarity index 95%
rename from src/main/java/com/ss/editor/DevelopPluginStarter.java
rename to src/main/java/com/ss/builder/DevelopPluginStarter.java
index 94809b62..7af8e6c2 100644
--- a/src/main/java/com/ss/editor/DevelopPluginStarter.java
+++ b/src/main/java/com/ss/builder/DevelopPluginStarter.java
@@ -1,4 +1,4 @@
-package com.ss.editor;
+package com.ss.builder;
import org.jetbrains.annotations.NotNull;
diff --git a/src/main/java/com/ss/editor/EditorThread.java b/src/main/java/com/ss/builder/EditorThread.java
similarity index 89%
rename from src/main/java/com/ss/editor/EditorThread.java
rename to src/main/java/com/ss/builder/EditorThread.java
index 631bcbe2..a0e5e69a 100644
--- a/src/main/java/com/ss/editor/EditorThread.java
+++ b/src/main/java/com/ss/builder/EditorThread.java
@@ -1,7 +1,7 @@
-package com.ss.editor;
+package com.ss.builder;
-import com.ss.editor.annotation.FromAnyThread;
-import com.ss.editor.util.LocalObjects;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.util.LocalObjects;
import org.jetbrains.annotations.NotNull;
/**
diff --git a/src/main/java/com/ss/editor/FileExtensions.java b/src/main/java/com/ss/builder/FileExtensions.java
similarity index 98%
rename from src/main/java/com/ss/editor/FileExtensions.java
rename to src/main/java/com/ss/builder/FileExtensions.java
index 601d16bc..0e32df78 100644
--- a/src/main/java/com/ss/editor/FileExtensions.java
+++ b/src/main/java/com/ss/builder/FileExtensions.java
@@ -1,4 +1,4 @@
-package com.ss.editor;
+package com.ss.builder;
import com.ss.rlib.common.util.array.Array;
import org.jetbrains.annotations.NotNull;
diff --git a/src/main/java/com/ss/builder/JfxApplication.java b/src/main/java/com/ss/builder/JfxApplication.java
new file mode 100644
index 00000000..dc5c86b0
--- /dev/null
+++ b/src/main/java/com/ss/builder/JfxApplication.java
@@ -0,0 +1,541 @@
+package com.ss.builder;
+
+import static com.jme3.jfx.injfx.processor.FrameTransferSceneProcessor.TransferMode.ON_CHANGES;
+import static com.ss.builder.config.DefaultSettingsProvider.Defaults.PREF_DEFAULT_OPEN_GL;
+import static com.ss.builder.config.DefaultSettingsProvider.Defaults.PREF_DEFAULT_STOP_RENDER_ON_LOST_FOCUS;
+import static com.ss.builder.config.DefaultSettingsProvider.Preferences.PREF_ANALYTICS_GOOGLE;
+import static com.ss.builder.config.DefaultSettingsProvider.Preferences.PREF_OPEN_GL;
+import static com.ss.builder.config.DefaultSettingsProvider.Preferences.PREF_STOP_RENDER_ON_LOST_FOCUS;
+import static com.ss.rlib.common.util.ObjectUtils.notNull;
+import com.jme3.jfx.injfx.JmeToJfxIntegrator;
+import com.jme3.jfx.injfx.processor.FrameTransferSceneProcessor;
+import com.jme3.util.LWJGLBufferAllocator;
+import com.ss.builder.analytics.google.GAEvent;
+import com.ss.builder.analytics.google.GAnalytics;
+import com.ss.builder.annotation.BackgroundThread;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.annotation.FxThread;
+import com.ss.builder.annotation.JmeThread;
+import com.ss.builder.config.CommandLineConfig;
+import com.ss.builder.config.Config;
+import com.ss.builder.config.EditorConfig;
+import com.ss.builder.executor.impl.JmeThreadExecutor;
+import com.ss.builder.fx.builder.EditorFxSceneBuilder;
+import com.ss.builder.fx.css.CssRegistry;
+import com.ss.builder.fx.dialog.ConfirmDialog;
+import com.ss.builder.fx.event.FxEventManager;
+import com.ss.builder.fx.event.impl.*;
+import com.ss.builder.fx.scene.EditorFxScene;
+import com.ss.builder.manager.*;
+import com.ss.builder.plugin.api.RenderFilterRegistry;
+import com.ss.builder.task.CheckNewVersionTask;
+import com.ss.builder.util.EditorUtils;
+import com.ss.builder.util.OpenGLVersion;
+import com.ss.builder.util.TimeTracker;
+import com.ss.builder.util.svg.SvgImageLoaderFactory;
+import com.ss.rlib.common.logging.Logger;
+import com.ss.rlib.common.logging.LoggerLevel;
+import com.ss.rlib.common.logging.LoggerManager;
+import com.ss.rlib.common.logging.impl.FolderFileListener;
+import com.ss.rlib.common.manager.InitializeManager;
+import com.ss.rlib.common.util.ArrayUtils;
+import com.ss.rlib.common.util.FileUtils;
+import com.ss.rlib.common.util.Utils;
+import com.ss.rlib.common.util.array.Array;
+import com.ss.rlib.common.util.array.ArrayFactory;
+import com.ss.rlib.common.util.array.ConcurrentArray;
+import com.ss.rlib.fx.util.ObservableUtils;
+import javafx.application.Application;
+import javafx.application.Platform;
+import javafx.beans.value.ChangeListener;
+import javafx.scene.image.Image;
+import javafx.stage.Stage;
+import javafx.stage.StageStyle;
+import javafx.stage.Window;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.lwjgl.system.Configuration;
+
+import javax.imageio.ImageIO;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Collection;
+import java.util.concurrent.CountDownLatch;
+import java.util.logging.Level;
+
+/**
+ * The starter of the JavaFX application.
+ *
+ * @author JavaSaBr
+ */
+public class JfxApplication extends Application {
+
+ private static final Logger LOGGER = LoggerManager.getLogger(JfxApplication.class);
+
+ @Nullable
+ private static JfxApplication instance;
+
+ /**
+ * It's an internal method.
+ *
+ * @see EditorUtils
+ */
+ @Deprecated
+ @FromAnyThread
+ public static @NotNull JfxApplication getInstance() {
+ return notNull(instance);
+ }
+
+ /**
+ * The start application method.
+ */
+ public static void main(@NotNull String[] args) {
+
+ TimeTracker.getStartupTracker()
+ .start();
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_2)
+ .start();
+
+ configureLogger();
+
+ // need to disable to work on macos
+ Configuration.GLFW_CHECK_THREAD0.set(false);
+ // use jemalloc
+ Configuration.MEMORY_ALLOCATOR.set("jemalloc");
+
+ // JavaFX
+ System.setProperty("prism.lcdtext", "false");
+ //System.setProperty("prism.text", "t2k");
+
+ var editorConfig = EditorConfig.getInstance();
+ var openGLVersion = editorConfig.getEnum(PREF_OPEN_GL, PREF_DEFAULT_OPEN_GL);
+
+ // set a render if it isn't override
+ if(System.getProperty("jfx.background.render") == null) {
+ System.setProperty("jfx.background.render", openGLVersion.getRender());
+ }
+
+ System.setProperty(LWJGLBufferAllocator.PROPERTY_CONCURRENT_BUFFER_ALLOCATOR, "true");
+
+ CommandLineConfig.args(args);
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_2)
+ .finishAndStart(() -> "initialized configuration");
+
+ AsyncEventManager.CombinedAsyncEventHandlerBuilder.of(JfxApplication::createSceneProcessor)
+ .add(JmeContextCreatedEvent.EVENT_TYPE)
+ .add(FxContextCreatedEvent.EVENT_TYPE)
+ .add(ImageSystemInitializedEvent.EVENT_TYPE)
+ .add(AllPluginsExtensionsRegisteredEvent.EVENT_TYPE)
+ .buildAndRegister();
+
+ InitializeManager.register(ExecutorManager.class);
+ InitializeManager.register(FxEventManager.class);
+ InitializeManager.register(ClasspathManager.class);
+ InitializeManager.register(ResourceManager.class);
+ InitializeManager.register(JavaFxImageManager.class);
+ InitializeManager.register(FileIconManager.class);
+ InitializeManager.register(WorkspaceManager.class);
+ InitializeManager.register(CssRegistry.class);
+ InitializeManager.register(RenderFilterRegistry.class);
+ InitializeManager.register(PluginManager.class);
+ InitializeManager.register(RemoteControlManager.class);
+ InitializeManager.initialize();
+
+ new EditorThread(new ThreadGroup("JavaFX"),
+ JfxApplication::start, "JavaFX Launch").start();
+ new EditorThread(new ThreadGroup("LWJGL"),
+ JfxApplication::startJmeApplication, "LWJGL Render").start();
+
+ AsyncEventManager.getInstance()
+ .notify(new ManagersInitializedEvent());
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_2)
+ .finish(() -> "initializing of all managers");
+ }
+
+ @FxThread
+ private static void configureLogger() {
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .start();
+
+ // disable the standard logger
+ if (!Config.DEV_DEBUG) {
+ java.util.logging.Logger.getLogger("").setLevel(Level.WARNING);
+ } else {
+ java.util.logging.Logger.getLogger("").setLevel(Level.ALL);
+ }
+
+ // configure our logger
+ LoggerLevel.DEBUG.setEnabled(Config.DEV_DEBUG);
+ LoggerLevel.INFO.setEnabled(true);
+ LoggerLevel.ERROR.setEnabled(true);
+ LoggerLevel.WARNING.setEnabled(true);
+
+ LoggerManager.getLogger(AsyncEventManager.class)
+ .setEnabled(LoggerLevel.DEBUG, Config.DEV_DEBUG_ASYNC_EVENT_MANAGER);
+
+ var logFolder = Config.getFolderForLog();
+
+ if (!Files.exists(logFolder)) {
+ FileUtils.createDirectories(logFolder);
+ }
+
+ if (!LoggerLevel.DEBUG.isEnabled()) {
+ LoggerManager.addListener(new FolderFileListener(logFolder));
+ }
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .finish(() -> "configuring of the logger");
+ }
+
+ /**
+ * Start the new jME application.
+ */
+ @JmeThread
+ private static void startJmeApplication() {
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_2)
+ .start();
+
+ var application = JmeApplication.getInstance();
+ application.start();
+
+ var context = application.getContext();
+ var renderer = context.getRenderer();
+
+ if (renderer == null) {
+ var editorConfig = EditorConfig.getInstance();
+ editorConfig.set(PREF_OPEN_GL, OpenGLVersion.GL_20);
+ editorConfig.save();
+ }
+ }
+
+ /**
+ * Create a new focus listener.
+ *
+ * @return the new focus listener.
+ */
+ @FxThread
+ private static @NotNull ChangeListener makeFocusedListener() {
+ return (observable, oldValue, newValue) -> {
+
+ var jmeApplication = JmeApplication.getInstance();
+ var stage = EditorUtils.getFxStage();
+
+ if (newValue || stage.isFocused()) {
+ jmeApplication.setPaused(false);
+ return;
+ }
+
+ var editorConfig = EditorConfig.getInstance();
+
+ if (!editorConfig.getBoolean(PREF_STOP_RENDER_ON_LOST_FOCUS, PREF_DEFAULT_STOP_RENDER_ON_LOST_FOCUS)) {
+ jmeApplication.setPaused(false);
+ return;
+ }
+
+ var application = JfxApplication.getInstance();
+ var window = ArrayUtils.getInReadLock(application.openedWindows,
+ windows -> windows.findAny(Window::isFocused));
+
+ jmeApplication.setPaused(window == null);
+ };
+ }
+
+ @BackgroundThread
+ private static void createSceneProcessor() {
+ ExecutorManager.getInstance()
+ .addFxTask(JfxApplication::createSceneProcessorImpl);
+ }
+
+ @FxThread
+ private static void createSceneProcessorImpl() {
+
+ var jfxApplication = getInstance();
+ var jmeApplication = JmeApplication.getInstance();
+
+ var scene = jfxApplication.getScene();
+ var stage = jfxApplication.getStage();
+
+ var sceneProcessor = JmeToJfxIntegrator.bind(jmeApplication, scene.getCanvas(), jmeApplication.getViewPort());
+ sceneProcessor.setEnabled(false);
+ sceneProcessor.setTransferMode(ON_CHANGES);
+
+ jfxApplication.sceneProcessor = sceneProcessor;
+
+ stage.focusedProperty()
+ .addListener(makeFocusedListener());
+
+ ExecutorManager.getInstance()
+ .addBackgroundTask(scene::notifyFinishBuild);
+ }
+
+ /**
+ * Start.
+ */
+ @FromAnyThread
+ public static void start() {
+ launch();
+ }
+
+ /**
+ * The list of opened windows.
+ */
+ @NotNull
+ private final ConcurrentArray openedWindows;
+
+ /**
+ * The JavaFX scene.
+ */
+ @Nullable
+ private volatile EditorFxScene scene;
+
+ /**
+ * The scene processor.
+ */
+ @Nullable
+ private volatile FrameTransferSceneProcessor sceneProcessor;
+
+ /**
+ * The stage.
+ */
+ @Nullable
+ private Stage stage;
+
+ public JfxApplication() {
+ EditorUtils.setJfxApplication(this);
+ this.openedWindows = ArrayFactory.newConcurrentStampedLockArray(Window.class);
+ }
+
+ /**
+ * Request focus of this window.
+ */
+ public void requestFocus() {
+ notNull(stage).requestFocus();
+ }
+
+ /**
+ * Add the new opened window.
+ *
+ * @param window the new opened window.
+ */
+ @FxThread
+ public void addWindow(@NotNull Window window) {
+ window.focusedProperty().addListener(makeFocusedListener());
+ ArrayUtils.runInWriteLock(openedWindows, window, Collection::add);
+ }
+
+ /**
+ * Remove the opened window.
+ *
+ * @param window the opened window.
+ */
+ @FxThread
+ public void removeWindow(@NotNull Window window) {
+ ArrayUtils.runInWriteLock(openedWindows, window, Array::slowRemove);
+ }
+
+ /**
+ * Gets the last opened window.
+ *
+ * @return the last opened window.
+ */
+ @FxThread
+ public @NotNull Window getLastWindow() {
+ return notNull(ArrayUtils.getInReadLock(openedWindows, Array::last));
+ }
+
+ @Override
+ @FxThread
+ public void start(@NotNull Stage stage) {
+ JfxApplication.instance = this;
+ this.stage = stage;
+
+ addWindow(stage);
+ try {
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .start();
+
+ var icons = stage.getIcons();
+ icons.add(new Image("/ui/icons/app/256x256.png"));
+ icons.add(new Image("/ui/icons/app/64x64.png"));
+ icons.add(new Image("/ui/icons/app/48x48.png"));
+ icons.add(new Image("/ui/icons/app/32x32.png"));
+ icons.add(new Image("/ui/icons/app/24x24.png"));
+ icons.add(new Image("/ui/icons/app/16x16.png"));
+
+ var config = EditorConfig.getInstance();
+
+ stage.initStyle(StageStyle.DECORATED);
+ stage.setMinHeight(600);
+ stage.setMinWidth(800);
+ stage.setWidth(config.getScreenWidth());
+ stage.setHeight(config.getScreenHeight());
+ stage.setMaximized(config.isMaximized());
+ stage.setTitle(Config.TITLE);
+ stage.show();
+
+ if (!stage.isMaximized()) {
+ stage.centerOnScreen();
+ }
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .finishAndStart(() -> "initialized of the FX stage");
+
+ ObservableUtils.onChangeIf(stage.widthProperty(), number -> !stage.isMaximized(),
+ number -> config.setScreenWidth(number.intValue()));
+ ObservableUtils.onChangeIf(stage.heightProperty(), number -> !stage.isMaximized(),
+ number -> config.setScreenHeight(number.intValue()));
+
+ ObservableUtils.onChange(stage.maximizedProperty(), config::setMaximized);
+
+ AsyncEventManager.SingleAsyncEventHandlerBuilder.of(FxSceneAttachedEvent.EVENT_TYPE)
+ .add(this::initializeImageSystem)
+ .buildAndRegister();
+
+ ExecutorManager.getInstance()
+ .addBackgroundTask(this::buildScene);
+
+ } catch (Throwable e) {
+ LOGGER.error(this, e);
+ throw e;
+ }
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_2)
+ .finish(() -> "initializing of jFX application");
+ TimeTracker.getStartupTracker()
+ .finish(() -> "showing of the main window editor");
+ }
+
+ /**
+ * Initialize the image system.
+ */
+ @BackgroundThread
+ private void initializeImageSystem() {
+ var executorManager = ExecutorManager.getInstance();
+ executorManager.addFxTask(() -> {
+
+ SvgImageLoaderFactory.install();
+ try {
+ ImageIO.read(getClass().getResourceAsStream("/ui/icons/svg/picture.svg"));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ LOGGER.info("image system is initialized.");
+
+ AsyncEventManager.getInstance()
+ .notify(new ImageSystemInitializedEvent());
+ });
+ }
+
+ @Override
+ @FxThread
+ public void stop() throws Exception {
+ super.stop();
+ onExit();
+ }
+
+ /**
+ * On exit.
+ */
+ @FxThread
+ protected void onExit() {
+
+ GAnalytics.forceSendEvent(GAEvent.Category.APPLICATION,
+ GAEvent.Action.APPLICATION_CLOSED, GAEvent.Label.THE_EDITOR_APP_WAS_CLOSED);
+
+ var config = EditorConfig.getInstance();
+ config.save();
+
+ var waiter = new CountDownLatch(1);
+
+ var executor = JmeThreadExecutor.getInstance();
+ executor.addToExecute(() -> {
+ JmeApplication.getInstance().destroy();
+ waiter.countDown();
+ });
+
+ GAnalytics.waitForSend();
+ Utils.run(waiter::await);
+ }
+
+ /**
+ * Build the scene.
+ */
+ @BackgroundThread
+ private void buildScene() {
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_5)
+ .start();
+
+ this.scene = EditorFxSceneBuilder.build(notNull(stage));
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_5)
+ .finishAndStart(() -> "creating of the FX scene");
+
+ AsyncEventManager.getInstance()
+ .notify(new FxSceneCreatedEvent());
+
+ GAnalytics.forceSendEvent(GAEvent.Category.APPLICATION,
+ GAEvent.Action.APPLICATION_LAUNCHED, GAEvent.Label.THE_EDITOR_APP_WAS_LAUNCHED);
+
+ var executorManager = ExecutorManager.getInstance();
+ executorManager.addBackgroundTask(new CheckNewVersionTask());
+
+ var editorConfig = EditorConfig.getInstance();
+ if (editorConfig.isAnalyticsQuestion()) {
+ return;
+ }
+
+ editorConfig.set(PREF_ANALYTICS_GOOGLE, false);
+ editorConfig.save();
+
+ Platform.runLater(() -> {
+
+ var stage = notNull(getStage());
+ var confirmDialog = new ConfirmDialog(result -> {
+
+ editorConfig.setAnalyticsQuestion(true);
+ editorConfig.set(PREF_ANALYTICS_GOOGLE, Boolean.TRUE.equals(result));
+ editorConfig.save();
+
+ }, Messages.ANALYTICS_CONFIRM_DIALOG_MESSAGE);
+
+ confirmDialog.show(stage);
+ });
+ }
+
+ /**
+ * Get the current JavaFX scene.
+ *
+ * @return the JavaFX scene.
+ */
+ @FromAnyThread
+ public @NotNull EditorFxScene getScene() {
+ return notNull(scene, "Scene can't be null.");
+ }
+
+ /**
+ * Get the current stage of JavaFX.
+ *
+ * @return the current stage.
+ */
+ @FromAnyThread
+ public @NotNull Stage getStage() {
+ return notNull(stage);
+ }
+
+ /**
+ * Get the current scene processor of this application.
+ *
+ * @return the scene processor.
+ */
+ @FromAnyThread
+ public @NotNull FrameTransferSceneProcessor getSceneProcessor() {
+ return notNull(sceneProcessor, "Scene processor can't be null.");
+ }
+}
diff --git a/src/main/java/com/ss/editor/JmeApplication.java b/src/main/java/com/ss/builder/JmeApplication.java
similarity index 87%
rename from src/main/java/com/ss/editor/JmeApplication.java
rename to src/main/java/com/ss/builder/JmeApplication.java
index 641118a1..134eab25 100644
--- a/src/main/java/com/ss/editor/JmeApplication.java
+++ b/src/main/java/com/ss/builder/JmeApplication.java
@@ -1,8 +1,8 @@
-package com.ss.editor;
+package com.ss.builder;
import static com.jme3.environment.LightProbeFactory.makeProbe;
-import static com.ss.editor.config.DefaultSettingsProvider.Defaults.*;
-import static com.ss.editor.config.DefaultSettingsProvider.Preferences.*;
+import static com.ss.builder.config.DefaultSettingsProvider.Defaults.*;
+import static com.ss.builder.config.DefaultSettingsProvider.Preferences.*;
import static com.ss.rlib.common.util.ObjectUtils.notNull;
import com.jme3.app.DebugKeysAppState;
import com.jme3.asset.AssetNotFoundException;
@@ -18,7 +18,6 @@
import com.jme3.light.LightProbe;
import com.jme3.material.Material;
import com.jme3.material.TechniqueDef;
-import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.post.FilterPostProcessor;
import com.jme3.post.filters.FXAAFilter;
@@ -27,22 +26,24 @@
import com.jme3.renderer.RendererException;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Node;
-import com.ss.editor.analytics.google.GAnalytics;
-import com.ss.editor.annotation.FromAnyThread;
-import com.ss.editor.annotation.JmeThread;
-import com.ss.editor.asset.locator.FileSystemAssetLocator;
-import com.ss.editor.asset.locator.FolderAssetLocator;
-import com.ss.editor.config.Config;
-import com.ss.editor.config.EditorConfig;
-import com.ss.editor.executor.impl.JmeThreadExecutor;
+import com.ss.builder.analytics.google.GAnalytics;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.annotation.JmeThread;
+import com.ss.builder.config.Config;
+import com.ss.builder.config.EditorConfig;
+import com.ss.builder.executor.impl.JmeThreadExecutor;
+import com.ss.builder.fx.event.FxEventManager;
+import com.ss.builder.fx.event.impl.JmeContextCreatedEvent;
+import com.ss.builder.fx.event.impl.WindowChangeFocusEvent;
+import com.ss.builder.fx.util.UiUtils;
+import com.ss.builder.jme.asset.locator.FileSystemAssetLocator;
+import com.ss.builder.jme.asset.locator.FolderAssetLocator;
+import com.ss.builder.jme.filter.EditorFXAAFilter;
+import com.ss.builder.manager.AsyncEventManager;
+import com.ss.builder.manager.WorkspaceManager;
+import com.ss.builder.util.EditorUtils;
+import com.ss.builder.util.TimeTracker;
import com.ss.editor.extension.loader.SceneLoader;
-import com.ss.editor.filter.EditorFxaaFilter;
-import com.ss.editor.manager.ExecutorManager;
-import com.ss.editor.manager.InitializationManager;
-import com.ss.editor.manager.WorkspaceManager;
-import com.ss.editor.ui.event.FxEventManager;
-import com.ss.editor.ui.event.impl.WindowChangeFocusEvent;
-import com.ss.editor.util.EditorUtil;
import com.ss.rlib.common.logging.Logger;
import com.ss.rlib.common.logging.LoggerManager;
import com.ss.rlib.common.util.os.OperatingSystem;
@@ -64,7 +65,6 @@ public class JmeApplication extends JmeToJfxApplication {
/**
* The empty job adapter for handling creating {@link LightProbe}.
*/
- @NotNull
private static final JobProgressAdapter EMPTY_JOB_ADAPTER = new JobProgressAdapter<>() {
public void done(@NotNull LightProbe result) {
}
@@ -76,7 +76,7 @@ public void done(@NotNull LightProbe result) {
/**
* It's an internal method.
*
- * @see EditorUtil
+ * @see EditorUtils
*/
@Deprecated
@FromAnyThread
@@ -84,36 +84,6 @@ public void done(@NotNull LightProbe result) {
return JME_APPLICATION;
}
- /**
- * Prepare to start editor.
- *
- * @return the editor
- */
- @JmeThread
- static @NotNull JmeApplication prepareToStart() {
-
- if (Config.DEV_DEBUG) {
- System.err.println("config was loaded.");
- }
-
- try {
-
- var config = EditorConfig.getInstance();
- var settings = config.getSettings();
-
- JME_APPLICATION.setSettings(settings);
- JME_APPLICATION.setShowSettings(false);
- JME_APPLICATION.setDisplayStatView(false);
- JME_APPLICATION.setDisplayFps(false);
-
- } catch (Exception e) {
- LOGGER.warning(e);
- throw new RuntimeException(e);
- }
-
- return JME_APPLICATION;
- }
-
/**
* The main synchronizer of this application.
*/
@@ -181,9 +151,18 @@ public void done(@NotNull LightProbe result) {
private Material defaultMaterial;
private JmeApplication() {
- EditorUtil.setJmeApplication(this);
+ EditorUtils.setJmeApplication(this);
+
this.lock = new StampedLock();
this.previewNode = new Node("Preview Node");
+
+ var config = EditorConfig.getInstance();
+ var settings = config.getSettings();
+
+ setDisplayFps(false);
+ setSettings(settings);
+ setShowSettings(false);
+ setDisplayStatView(false);
}
/**
@@ -223,6 +202,11 @@ public void destroy() {
return super.getCamera();
}
+ @Override
+ public void initialize() {
+ super.initialize();
+ }
+
@Override
@JmeThread
public void simpleInitApp() {
@@ -249,7 +233,9 @@ public void simpleInitApp() {
var audioRenderer = getAudioRenderer();
audioRenderer.setEnvironment(new Environment(Environment.Garage));
- viewPort.setBackgroundColor(new ColorRGBA(50 / 255F, 50 / 255F, 50 / 255F, 1F));
+ var theme = editorConfig.getEnum(PREF_UI_THEME, PREF_DEFAULT_THEME);
+
+ viewPort.setBackgroundColor(UiUtils.from(theme.getBackgroundColor()));
cam.setFrustumPerspective(55, (float) cam.getWidth() / cam.getHeight(), 1f, Integer.MAX_VALUE);
defaultMaterial = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
@@ -265,14 +251,12 @@ public void simpleInitApp() {
var guiNode = getGuiNode();
guiNode.detachAllChildren();
- ExecutorManager.getInstance();
-
flyCam.setDragToRotate(true);
flyCam.setEnabled(false);
var postProcessor = getPostProcessor();
- fxaaFilter = new EditorFxaaFilter();
+ fxaaFilter = new EditorFXAAFilter();
fxaaFilter.setEnabled(editorConfig.getBoolean(PREF_FILTER_FXAA, PREF_DEFAULT_FXAA_FILTER));
fxaaFilter.setSubPixelShift(1.0f / 4.0f);
fxaaFilter.setVxOffset(0.0f);
@@ -298,10 +282,13 @@ public void simpleInitApp() {
createLightProbes();
stateManager.detach(stateManager.getState(DebugKeysAppState.class));
- var initializationManager = InitializationManager.getInstance();
- initializationManager.onAfterCreateJmeContext();
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_2)
+ .finishAndStart(() -> "initializing of jME application");
+
+ LOGGER.info("initialized.");
- new EditorThread(new ThreadGroup("JavaFX"), JfxApplication::start, "JavaFX Launch").start();
+ AsyncEventManager.getInstance()
+ .notify(new JmeContextCreatedEvent());
}
/**
diff --git a/src/main/java/com/ss/editor/Messages.java b/src/main/java/com/ss/builder/Messages.java
similarity index 99%
rename from src/main/java/com/ss/editor/Messages.java
rename to src/main/java/com/ss/builder/Messages.java
index 22305037..40c0daf7 100644
--- a/src/main/java/com/ss/editor/Messages.java
+++ b/src/main/java/com/ss/builder/Messages.java
@@ -1,4 +1,4 @@
-package com.ss.editor;
+package com.ss.builder;
import static java.util.ResourceBundle.getBundle;
import com.ss.rlib.common.util.PropertyLoader;
@@ -168,6 +168,7 @@ public class Messages {
public static final String MODEL_FILE_EDITOR_NODE_SPOT_LIGHT;
public static final String MODEL_FILE_EDITOR_NODE_LIGHT_PROBE;
public static final String MODEL_FILE_EDITOR_NODE_ANIM_CONTROL;
+ public static final String MODEL_FILE_EDITOR_NODE_ANIM_COMPOSER;
public static final String MODEL_FILE_EDITOR_NODE_PARTICLE_EMITTER_INFLUENCERS;
public static final String MODEL_FILE_EDITOR_NODE_PARTICLE_EMITTER_INFLUENCER_EMPTY;
public static final String MODEL_FILE_EDITOR_NODE_PARTICLE_EMITTER_INFLUENCER_DEFAULT;
@@ -859,6 +860,7 @@ public class Messages {
MODEL_FILE_EDITOR_NODE_SPOT_LIGHT = bundle.getString("ModelFileEditorNodeSpotLight");
MODEL_FILE_EDITOR_NODE_LIGHT_PROBE = bundle.getString("ModelFileEditorNodeLightProbe");
MODEL_FILE_EDITOR_NODE_ANIM_CONTROL = bundle.getString("ModelFileEditorNodeAnimControl");
+ MODEL_FILE_EDITOR_NODE_ANIM_COMPOSER = bundle.getString("ModelFileEditorNodeAnimComposer");
MODEL_FILE_EDITOR_NODE_PARTICLE_EMITTER_INFLUENCERS = bundle.getString("ModelFileEditorNodeParticleEmitterInfluencers");
MODEL_FILE_EDITOR_NODE_PARTICLE_EMITTER_INFLUENCER_EMPTY = bundle.getString("ModelFileEditorNodeParticleEmitterInfluencerEmpty");
MODEL_FILE_EDITOR_NODE_PARTICLE_EMITTER_INFLUENCER_DEFAULT = bundle.getString("ModelFileEditorNodeParticleEmitterInfluencerDefault");
diff --git a/src/main/java/com/ss/editor/analytics/google/GAEvent.java b/src/main/java/com/ss/builder/analytics/google/GAEvent.java
similarity index 98%
rename from src/main/java/com/ss/editor/analytics/google/GAEvent.java
rename to src/main/java/com/ss/builder/analytics/google/GAEvent.java
index 1158b184..36f14973 100644
--- a/src/main/java/com/ss/editor/analytics/google/GAEvent.java
+++ b/src/main/java/com/ss/builder/analytics/google/GAEvent.java
@@ -1,4 +1,4 @@
-package com.ss.editor.analytics.google;
+package com.ss.builder.analytics.google;
import org.jetbrains.annotations.NotNull;
diff --git a/src/main/java/com/ss/editor/analytics/google/GAnalytics.java b/src/main/java/com/ss/builder/analytics/google/GAnalytics.java
similarity index 96%
rename from src/main/java/com/ss/editor/analytics/google/GAnalytics.java
rename to src/main/java/com/ss/builder/analytics/google/GAnalytics.java
index 70c124f9..06d7325d 100644
--- a/src/main/java/com/ss/editor/analytics/google/GAnalytics.java
+++ b/src/main/java/com/ss/builder/analytics/google/GAnalytics.java
@@ -1,13 +1,14 @@
-package com.ss.editor.analytics.google;
+package com.ss.builder.analytics.google;
-import static com.ss.editor.config.DefaultSettingsProvider.Defaults.PREF_DEFAULT_ANALYTICS_GOOGLE;
-import static com.ss.editor.config.DefaultSettingsProvider.Preferences.PREF_ANALYTICS_GOOGLE;
+import static com.ss.builder.config.DefaultSettingsProvider.Defaults.PREF_DEFAULT_ANALYTICS_GOOGLE;
+import static com.ss.builder.config.DefaultSettingsProvider.Preferences.PREF_ANALYTICS_GOOGLE;
import static com.ss.rlib.common.util.StringUtils.isEmpty;
import static org.apache.http.impl.client.HttpClients.createMinimal;
-import com.ss.editor.EditorThread;
-import com.ss.editor.annotation.FromAnyThread;
-import com.ss.editor.config.Config;
-import com.ss.editor.config.EditorConfig;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.EditorThread;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.config.Config;
+import com.ss.builder.config.EditorConfig;
import com.ss.rlib.common.concurrent.util.ConcurrentUtils;
import com.ss.rlib.common.logging.Logger;
import com.ss.rlib.common.logging.LoggerManager;
@@ -270,7 +271,7 @@ private static void send(@NotNull final Map parameters) {
*/
private static void doSend(@NotNull final Map parameters) {
- final OperatingSystem operatingSystem = Config.OPERATING_SYSTEM;
+ final OperatingSystem operatingSystem = Config.getOperatingSystem();
final String distribution = operatingSystem.getDistribution();
final String os = StringUtils.isEmpty(distribution) ? operatingSystem.getName() + " " + operatingSystem.getVersion() : distribution;
diff --git a/src/main/java/com/ss/editor/analytics/google/HitType.java b/src/main/java/com/ss/builder/analytics/google/HitType.java
similarity index 95%
rename from src/main/java/com/ss/editor/analytics/google/HitType.java
rename to src/main/java/com/ss/builder/analytics/google/HitType.java
index c1fd5f90..1828380c 100644
--- a/src/main/java/com/ss/editor/analytics/google/HitType.java
+++ b/src/main/java/com/ss/builder/analytics/google/HitType.java
@@ -1,4 +1,4 @@
-package com.ss.editor.analytics.google;
+package com.ss.builder.analytics.google;
import org.jetbrains.annotations.NotNull;
diff --git a/src/main/java/com/ss/editor/annotation/BackgroundThread.java b/src/main/java/com/ss/builder/annotation/BackgroundThread.java
similarity index 87%
rename from src/main/java/com/ss/editor/annotation/BackgroundThread.java
rename to src/main/java/com/ss/builder/annotation/BackgroundThread.java
index 1858a6e9..1ff037ba 100644
--- a/src/main/java/com/ss/editor/annotation/BackgroundThread.java
+++ b/src/main/java/com/ss/builder/annotation/BackgroundThread.java
@@ -1,4 +1,4 @@
-package com.ss.editor.annotation;
+package com.ss.builder.annotation;
import java.lang.annotation.*;
diff --git a/src/main/java/com/ss/editor/annotation/FromAnyThread.java b/src/main/java/com/ss/builder/annotation/FromAnyThread.java
similarity index 92%
rename from src/main/java/com/ss/editor/annotation/FromAnyThread.java
rename to src/main/java/com/ss/builder/annotation/FromAnyThread.java
index 2083a579..999acc11 100644
--- a/src/main/java/com/ss/editor/annotation/FromAnyThread.java
+++ b/src/main/java/com/ss/builder/annotation/FromAnyThread.java
@@ -1,4 +1,4 @@
-package com.ss.editor.annotation;
+package com.ss.builder.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
diff --git a/src/main/java/com/ss/editor/annotation/FxThread.java b/src/main/java/com/ss/builder/annotation/FxThread.java
similarity index 92%
rename from src/main/java/com/ss/editor/annotation/FxThread.java
rename to src/main/java/com/ss/builder/annotation/FxThread.java
index e0a2064f..41e35d79 100644
--- a/src/main/java/com/ss/editor/annotation/FxThread.java
+++ b/src/main/java/com/ss/builder/annotation/FxThread.java
@@ -1,4 +1,4 @@
-package com.ss.editor.annotation;
+package com.ss.builder.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
diff --git a/src/main/java/com/ss/editor/annotation/JmeThread.java b/src/main/java/com/ss/builder/annotation/JmeThread.java
similarity index 92%
rename from src/main/java/com/ss/editor/annotation/JmeThread.java
rename to src/main/java/com/ss/builder/annotation/JmeThread.java
index 1cd13f5b..16a7cc7a 100644
--- a/src/main/java/com/ss/editor/annotation/JmeThread.java
+++ b/src/main/java/com/ss/builder/annotation/JmeThread.java
@@ -1,4 +1,4 @@
-package com.ss.editor.annotation;
+package com.ss.builder.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
diff --git a/src/main/java/com/ss/editor/config/CommandLineConfig.java b/src/main/java/com/ss/builder/config/CommandLineConfig.java
similarity index 81%
rename from src/main/java/com/ss/editor/config/CommandLineConfig.java
rename to src/main/java/com/ss/builder/config/CommandLineConfig.java
index c4b3358f..d41d669b 100644
--- a/src/main/java/com/ss/editor/config/CommandLineConfig.java
+++ b/src/main/java/com/ss/builder/config/CommandLineConfig.java
@@ -1,9 +1,8 @@
-package com.ss.editor.config;
+package com.ss.builder.config;
import org.jetbrains.annotations.NotNull;
import java.nio.file.Paths;
-import java.util.Map;
/**
* Parser the configuration from command-line arguments.
@@ -12,35 +11,31 @@
*/
public class CommandLineConfig {
- @NotNull
public static final String PREF_SERVER_API_PORT = "Server.api.port";
-
- @NotNull
public static final String PREF_SERVER_API_VERSION = "Server.api.version";
-
- @NotNull
public static final String PREF_EDITOR_ASSET_FOLDER = "Editor.assetFolder";
/**
* @param args the args
*/
- public static void args(final String[] args) {
+ public static void args(@NotNull String[] args) {
- final EditorConfig editorConfig = EditorConfig.getInstance();
+ var editorConfig = EditorConfig.getInstance();
- for (final String arg : args) {
+ for (var arg : args) {
if (!arg.contains("=")) {
continue;
}
- final String[] values = arg.split("=");
+ var values = arg.split("=");
+
if (values.length != 2) {
continue;
}
- final String name = values[0];
- final String value = values[1];
+ var name = values[0];
+ var value = values[1];
if ("Dev.debug".equals(name)) {
Config.DEV_DEBUG = Boolean.parseBoolean(value);
@@ -63,10 +58,10 @@ public static void args(final String[] args) {
}
}
- final Map env = System.getenv();
+ var env = System.getenv();
if (env.containsKey(PREF_SERVER_API_VERSION)) {
- final int version = Integer.parseInt(env.get(PREF_SERVER_API_VERSION));
+ var version = Integer.parseInt(env.get(PREF_SERVER_API_VERSION));
if (version == Config.SERVER_API_VERSION) {
System.exit(100);
} else {
@@ -77,6 +72,7 @@ public static void args(final String[] args) {
if (env.containsKey(PREF_SERVER_API_PORT)) {
Config.REMOTE_CONTROL_PORT = Integer.parseInt(env.get(PREF_SERVER_API_PORT));
}
+
if (env.containsKey(PREF_EDITOR_ASSET_FOLDER)) {
editorConfig.setCurrentAsset(Paths.get(env.get(PREF_EDITOR_ASSET_FOLDER)));
}
diff --git a/src/main/java/com/ss/builder/config/Config.java b/src/main/java/com/ss/builder/config/Config.java
new file mode 100644
index 00000000..9222583b
--- /dev/null
+++ b/src/main/java/com/ss/builder/config/Config.java
@@ -0,0 +1,221 @@
+package com.ss.builder.config;
+
+import com.eclipsesource.json.Json;
+import com.eclipsesource.json.JsonObject;
+import com.ss.builder.JmeApplication;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.util.EditorUtils;
+import com.ss.builder.util.TimeTracker;
+import com.ss.rlib.common.plugin.Version;
+import com.ss.rlib.common.util.Utils;
+import com.ss.rlib.common.util.VarTable;
+import com.ss.rlib.common.util.os.OperatingSystem;
+import org.jetbrains.annotations.NotNull;
+
+import java.awt.*;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+ * The configuration of this application.
+ *
+ * @author JavaSaBr
+ */
+public final class Config {
+
+ /**
+ * The path to config file in classpath.
+ */
+ private static final String CONFIG_RESOURCE_PATH = "/app-config.json";
+
+ /**
+ * The name of editor's folder in user home folder.
+ */
+ private static final String EDITOR_FOLDER_IN_USER_HOME = ".jmonkeybuilder";
+
+ /**
+ * The editor's title.
+ */
+ public static final String TITLE = "jMonkeyBuilder";
+
+ /**
+ * The editor's version.
+ */
+ public static final Version APP_VERSION = new Version("1.9.0");
+
+ /**
+ * The string version.
+ */
+ public static final String STRING_VERSION = APP_VERSION.toString();
+
+ /**
+ * The server API version.
+ */
+ public static final int SERVER_API_VERSION = 1;
+
+ /**
+ * The path to application folder.
+ */
+ public static final String PROJECT_PATH;
+
+ /**
+ * The graphics adapter.
+ */
+ private static GraphicsDevice graphicsDevice;
+
+ /**
+ * The operation system.
+ */
+ private static OperatingSystem operatingSystem;
+
+ /**
+ * The remote control port.
+ */
+ public static int REMOTE_CONTROL_PORT = -1;
+
+ /**
+ * The flag to enable debug mode.
+ */
+ public static boolean DEV_DEBUG;
+
+ /**
+ * The flag to enable camera debug mode.
+ */
+ public static boolean DEV_CAMERA_DEBUG;
+
+ /**
+ * The flag to enable camera checks debug mode.
+ */
+ public static boolean DEV_CAMERA_CHECKS_DEBUG;
+
+ /**
+ * The flag to enable transformations debug mode.
+ */
+ public static boolean DEV_TRANSFORMS_DEBUG;
+
+ /**
+ * The flag to enable JavaFX debug mode.
+ */
+ public static boolean DEV_DEBUG_JFX;
+
+ /**
+ * The flag to enable JavaFX mouse input debug mode.
+ */
+ public static boolean DEV_DEBUG_JFX_MOUSE_INPUT;
+
+ /**
+ * The flag to enable javaFX key input debug mode.
+ */
+ public static boolean DEV_DEBUG_JFX_KEY_INPUT;
+
+ /**
+ * The flag to enable startup debug mode.
+ */
+ public static boolean DEV_DEBUG_STARTUP;
+
+ /**
+ * The flag to enable debug of async event manager.
+ */
+ public static boolean DEV_DEBUG_ASYNC_EVENT_MANAGER;
+
+ /**
+ * The flag to enable PBR render.
+ */
+ public static boolean ENABLE_PBR;
+
+ /**
+ * The flag to enable 3D part of this editor.
+ */
+ public static boolean ENABLE_3D;
+
+ static {
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .start();
+
+ var vars = VarTable.newInstance();
+
+ try (var reader = new InputStreamReader(EditorUtils.requireInputStream(CONFIG_RESOURCE_PATH))) {
+
+ var object = (JsonObject) Json.parse(reader);
+ object.forEach(member -> vars.set(member.getName(), member.getValue().toString()));
+
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ DEV_DEBUG = vars.getBoolean("Dev.debug", false);
+ DEV_CAMERA_DEBUG = vars.getBoolean("Dev.cameraDebug", false);
+ DEV_CAMERA_CHECKS_DEBUG = vars.getBoolean("Dev.cameraChecksDebug", false);
+ DEV_TRANSFORMS_DEBUG = vars.getBoolean("Dev.transformsDebug", false);
+ DEV_DEBUG_JFX_MOUSE_INPUT = vars.getBoolean("Dev.jfxMouseInput", false);
+ DEV_DEBUG_JFX_KEY_INPUT = vars.getBoolean("Dev.jfxKeyInput", false);
+ DEV_DEBUG_JFX = vars.getBoolean("Dev.debugJFX", false);
+ DEV_DEBUG_STARTUP = vars.getBoolean("Dev.debugStartup", false);
+ DEV_DEBUG_ASYNC_EVENT_MANAGER = vars.getBoolean("Dev.debugAsyncEventManager", false);
+ ENABLE_PBR = vars.getBoolean("Graphics.enablePBR", true);
+ ENABLE_3D = vars.getBoolean("Graphics.enable3D", true);
+
+ PROJECT_PATH = Utils.getRootFolderFromClass(JmeApplication.class)
+ .toString();
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .finish(() -> "loading of the root config");
+
+ }
+
+ /**
+ * Get a folder to store log files.
+ *
+ * @return the path to a folder to store log files.
+ */
+ @FromAnyThread
+ public static @NotNull Path getFolderForLog() {
+ return getAppFolderInUserHome().resolve("log");
+ }
+
+ /**
+ * Get a path to the folder to store data in a user home.
+ *
+ * @return the path to the folder to store data in a user home.
+ */
+ @FromAnyThread
+ public static @NotNull Path getAppFolderInUserHome() {
+ var userHome = System.getProperty("user.home");
+ return Paths.get(userHome, EDITOR_FOLDER_IN_USER_HOME);
+ }
+
+ /**
+ * Get the information about OS.
+ *
+ * @return the information about OS.
+ */
+ @FromAnyThread
+ public synchronized static @NotNull OperatingSystem getOperatingSystem() {
+
+ if (operatingSystem == null) {
+ operatingSystem = new OperatingSystem();
+ }
+
+ return operatingSystem;
+ }
+
+ /**
+ * Get the information about used graphics device.
+ *
+ * @return the information about used graphics device.
+ */
+ @FromAnyThread
+ public synchronized static GraphicsDevice getGraphicsDevice() {
+
+
+ if (graphicsDevice == null) {
+ var graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ graphicsDevice = graphicsEnvironment.getDefaultScreenDevice();
+ }
+
+ return graphicsDevice;
+ }
+}
diff --git a/src/main/java/com/ss/builder/config/DefaultSettingsProvider.java b/src/main/java/com/ss/builder/config/DefaultSettingsProvider.java
new file mode 100644
index 00000000..e4c9bb0a
--- /dev/null
+++ b/src/main/java/com/ss/builder/config/DefaultSettingsProvider.java
@@ -0,0 +1,180 @@
+package com.ss.builder.config;
+
+import static com.ss.builder.config.DefaultSettingsProvider.Categories.*;
+import static com.ss.builder.config.DefaultSettingsProvider.Defaults.*;
+import static com.ss.builder.config.DefaultSettingsProvider.Preferences.*;
+import static com.ss.editor.extension.property.EditablePropertyType.*;
+import static com.ss.rlib.common.util.array.ArrayFactory.asArray;
+import com.jme3.math.Vector3f;
+import com.ss.builder.Messages;
+import com.ss.builder.annotation.FxThread;
+import com.ss.builder.fx.css.CssColorTheme;
+import com.ss.builder.plugin.api.settings.SettingsCategory;
+import com.ss.builder.plugin.api.settings.SettingsPropertyDefinition;
+import com.ss.builder.plugin.api.settings.SettingsProvider;
+import com.ss.builder.util.OpenGLVersion;
+import com.ss.rlib.common.util.array.Array;
+import com.ss.rlib.common.util.array.ArrayFactory;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * The default implementation of {@link SettingsProvider}
+ *
+ * @author JavaSaBr
+ */
+public class DefaultSettingsProvider implements SettingsProvider {
+
+ public interface Categories {
+ @NotNull SettingsCategory GRAPHICS = new SettingsCategory("core.graphics", Messages.SETTINGS_CATEGORY_GRAPHICS, 0);
+ @NotNull SettingsCategory EDITOR = new SettingsCategory("core.editor", Messages.SETTINGS_CATEGORY_EDITOR, 1);
+ @NotNull SettingsCategory OTHER = new SettingsCategory("core.other", Messages.SETTINGS_CATEGORY_OTHER, 2);
+ }
+
+ public interface Preferences {
+
+ @NotNull String PREF_OPEN_GL = "core.graphics.openGL.version";
+ @NotNull String PREF_ANISOTROPY = "core.graphics.anisotropy";
+ @NotNull String PREF_GAMMA_CORRECTION = "core.graphics.gammaCorrection";
+ @NotNull String PREF_FRAME_RATE = "core.graphics.frame.rate";
+ @NotNull String PREF_CAMERA_ANGLE = "core.graphics.camera.angle";
+ @NotNull String PREF_FILTER_FXAA = "core.graphics.filter.fxaa";
+ @NotNull String PREF_FILTER_TONEMAP = "core.graphics.filter.toneMap";
+ @NotNull String PREF_FILTER_TONEMAP_WHITE_POINT = "core.graphics.filter.toneMap.whitePoint";
+ @NotNull String PREF_STOP_RENDER_ON_LOST_FOCUS = "core.graphics.render.stopOnLostFocus";
+
+ @NotNull String PREF_USER_LIBRARY_FOLDER = "core.classpath.library.folder";
+ @NotNull String PREF_USER_CLASSES_FOLDER = "core.classpath.classes.folder";
+
+ @NotNull String PREF_UI_THEME = "core.ui.theme";
+ @NotNull String PREF_ANALYTICS_GOOGLE = "core.other.analytics.google";
+ @NotNull String PREF_NATIVE_FILE_CHOOSER = "core.other.native.file.chooser";
+
+ @NotNull String PREF_FAST_SKY_FOLDER = "core.editor.fast.sky.folder";
+ @NotNull String PREF_TANGENT_GENERATION = "core.editor.tangent.generation";
+ @NotNull String PREF_FLIPPED_TEXTURES = "core.editor.texture.flipped";
+ @NotNull String PREF_CAMERA_LAMP = "core.editor.camera.lamp";
+ }
+
+ public interface Defaults {
+
+ @NotNull OpenGLVersion PREF_DEFAULT_OPEN_GL = OpenGLVersion.GL_33;
+ @NotNull CssColorTheme PREF_DEFAULT_THEME = CssColorTheme.DARK;
+
+ @NotNull Vector3f PREF_DEFAULT_TONEMAP_WHITE_POINT = new Vector3f(11, 11, 11);
+
+ int PREF_DEFAULT_ANISOTROPY = 16;
+ int PREF_DEFAULT_FRAME_RATE = 60;
+ int PREF_DEFAULT_CAMERA_ANGLE = 75;
+
+ boolean PREF_DEFAULT_TONEMAP_FILTER = true;
+ boolean PREF_DEFAULT_GAMMA_CORRECTION = true;
+ boolean PREF_DEFAULT_NATIVE_FILE_CHOOSER = false;
+ boolean PREF_DEFAULT_FXAA_FILTER = true;
+ boolean PREF_DEFAULT_CAMERA_LIGHT = true;
+ boolean PREF_DEFAULT_TANGENT_GENERATION = true;
+ boolean PREF_DEFAULT_STOP_RENDER_ON_LOST_FOCUS = true;
+ boolean PREF_DEFAULT_FLIPPED_TEXTURES = true;
+ boolean PREF_DEFAULT_ANALYTICS_GOOGLE = false;
+ }
+
+ @NotNull
+ private static final Array ANISOTROPYCS = ArrayFactory.newArray(Integer.class);
+
+ @NotNull
+ private static final Set REQUIRED_RESTART_PREFS = new HashSet<>();
+
+ @NotNull
+ private static final Set REQUIRED_UPDATE_CLASSPATH_PREFS = new HashSet<>();
+
+ @NotNull
+ private static final Set REQUIRED_RESHAPE_PREFS = new HashSet<>();
+
+ static {
+ ANISOTROPYCS.add(0);
+ ANISOTROPYCS.add(2);
+ ANISOTROPYCS.add(4);
+ ANISOTROPYCS.add(8);
+ ANISOTROPYCS.add(16);
+ REQUIRED_RESTART_PREFS.add(PREF_ANISOTROPY);
+ REQUIRED_RESTART_PREFS.add(PREF_GAMMA_CORRECTION);
+ REQUIRED_RESTART_PREFS.add(PREF_UI_THEME);
+ REQUIRED_RESTART_PREFS.add(PREF_OPEN_GL);
+ REQUIRED_RESTART_PREFS.add(PREF_FRAME_RATE);
+ REQUIRED_UPDATE_CLASSPATH_PREFS.add(PREF_USER_LIBRARY_FOLDER);
+ REQUIRED_UPDATE_CLASSPATH_PREFS.add(PREF_USER_CLASSES_FOLDER);
+ REQUIRED_RESHAPE_PREFS.add(PREF_CAMERA_ANGLE);
+ }
+
+ @Override
+ @FxThread
+ public @NotNull Array getDefinitions() {
+
+ var editorConfig = EditorConfig.getInstance();
+
+ var glVersion = editorConfig.getEnum(PREF_OPEN_GL, PREF_DEFAULT_OPEN_GL);
+ var anisotropy = editorConfig.getInteger(PREF_ANISOTROPY, PREF_DEFAULT_ANISOTROPY);
+ var gammaCorrection = editorConfig.getBoolean(PREF_GAMMA_CORRECTION, PREF_DEFAULT_GAMMA_CORRECTION);
+ var frameRate = editorConfig.getInteger(PREF_FRAME_RATE, PREF_DEFAULT_FRAME_RATE);
+ var cameraAngle = editorConfig.getInteger(PREF_CAMERA_ANGLE, PREF_DEFAULT_CAMERA_ANGLE);
+ var fxaa = editorConfig.getBoolean(PREF_FILTER_FXAA, PREF_DEFAULT_FXAA_FILTER);
+ var stopRenderOnLostFocus = editorConfig.getBoolean(PREF_STOP_RENDER_ON_LOST_FOCUS, PREF_DEFAULT_STOP_RENDER_ON_LOST_FOCUS);
+ var tonemapFilter = editorConfig.getBoolean(PREF_FILTER_TONEMAP, PREF_DEFAULT_TONEMAP_FILTER);
+ var toneMapWhitePoint = editorConfig.getVector3f(PREF_FILTER_TONEMAP_WHITE_POINT, PREF_DEFAULT_TONEMAP_WHITE_POINT);
+
+ var result = Array.ofType(SettingsPropertyDefinition.class);
+ result.add(new SettingsPropertyDefinition(ENUM, Messages.SETTINGS_PROPERTY_OPEN_GL, PREF_OPEN_GL, GRAPHICS, glVersion));
+ result.add(new SettingsPropertyDefinition(OBJECT_FROM_LIST, Messages.SETTINGS_PROPERTY_ANISOTROPY, PREF_ANISOTROPY, GRAPHICS, anisotropy, ANISOTROPYCS));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_GAMMA_CORRECTION, PREF_GAMMA_CORRECTION, GRAPHICS, gammaCorrection));
+ result.add(new SettingsPropertyDefinition(INTEGER, Messages.SETTINGS_PROPERTY_FRAME_RATE, PREF_FRAME_RATE, GRAPHICS, frameRate, 10, 120));
+ result.add(new SettingsPropertyDefinition(INTEGER, Messages.SETTINGS_PROPERTY_CAMERA_ANGLE, PREF_CAMERA_ANGLE, GRAPHICS, cameraAngle, 45, 110));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_FXAA, PREF_FILTER_FXAA, GRAPHICS, fxaa));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_STOP_RENDER_ON_LOST_FOCUS, PREF_STOP_RENDER_ON_LOST_FOCUS, GRAPHICS, stopRenderOnLostFocus));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_TONEMAP_FILTER, PREF_FILTER_TONEMAP, GRAPHICS, tonemapFilter));
+ result.add(new SettingsPropertyDefinition(VECTOR_3F, asArray(PREF_FILTER_TONEMAP), Messages.SETTINGS_PROPERTY_TONEMAP_FILTER_WHITE_POINT, PREF_FILTER_TONEMAP_WHITE_POINT, GRAPHICS, toneMapWhitePoint));
+
+ var tangentGeneration = editorConfig.getBoolean(PREF_TANGENT_GENERATION, PREF_DEFAULT_TANGENT_GENERATION);
+ var flippedTextures = editorConfig.getBoolean(PREF_FLIPPED_TEXTURES, PREF_DEFAULT_FLIPPED_TEXTURES);
+ var cameraLight = editorConfig.getBoolean(PREF_CAMERA_LAMP, PREF_DEFAULT_CAMERA_LIGHT);
+ var fastSkyFolder = editorConfig.getFile(PREF_FAST_SKY_FOLDER);
+
+ result.add(new SettingsPropertyDefinition(EXTERNAL_FILE, Messages.SETTINGS_PROPERTY_FAST_SKY_FOLDER, PREF_FAST_SKY_FOLDER, EDITOR, fastSkyFolder));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_TANGENT_GENERATION, PREF_TANGENT_GENERATION, EDITOR, tangentGeneration));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_FLIPPED_TEXTURE, PREF_FLIPPED_TEXTURES, EDITOR, flippedTextures));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_EDITOR_CAMERA_LAMP, PREF_CAMERA_LAMP, EDITOR, cameraLight));
+
+ var theme = editorConfig.getEnum(PREF_UI_THEME, PREF_DEFAULT_THEME);
+ var libraryFolder = editorConfig.getFile(PREF_USER_LIBRARY_FOLDER);
+ var classesFolder = editorConfig.getFile(PREF_USER_CLASSES_FOLDER);
+ var googleAnalytics = editorConfig.getBoolean(PREF_ANALYTICS_GOOGLE, PREF_DEFAULT_ANALYTICS_GOOGLE);
+ var nativeFileChooser = editorConfig.getBoolean(PREF_NATIVE_FILE_CHOOSER, PREF_DEFAULT_NATIVE_FILE_CHOOSER);
+
+ result.add(new SettingsPropertyDefinition(ENUM, Messages.SETTINGS_PROPERTY_THEME, PREF_UI_THEME, OTHER, theme));
+ result.add(new SettingsPropertyDefinition(EXTERNAL_FILE, Messages.SETTINGS_PROPERTY_USER_LIBRARIES_FOLDER, PREF_USER_LIBRARY_FOLDER, OTHER, libraryFolder));
+ result.add(new SettingsPropertyDefinition(EXTERNAL_FILE, Messages.SETTINGS_PROPERTY_USER_CLASSES_FOLDER, PREF_USER_CLASSES_FOLDER, OTHER, classesFolder));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_GOOGLE_ANALYTICS, PREF_ANALYTICS_GOOGLE, OTHER, googleAnalytics));
+ result.add(new SettingsPropertyDefinition(BOOLEAN, Messages.SETTINGS_PROPERTY_NATIVE_FILE_CHOOSER, PREF_NATIVE_FILE_CHOOSER, OTHER, nativeFileChooser));
+
+ return result;
+ }
+
+ @Override
+ @FxThread
+ public boolean isRequiredRestart(@NotNull String propertyId) {
+ return REQUIRED_RESTART_PREFS.contains(propertyId);
+ }
+
+ @Override
+ @FxThread
+ public boolean isRequiredReshape3DView(@NotNull String propertyId) {
+ return REQUIRED_RESHAPE_PREFS.contains(propertyId);
+ }
+
+ @Override
+ @FxThread
+ public boolean isRequiredUpdateClasspath(@NotNull String propertyId) {
+ return REQUIRED_UPDATE_CLASSPATH_PREFS.contains(propertyId);
+ }
+}
diff --git a/src/main/java/com/ss/editor/document/DocumentConfig.java b/src/main/java/com/ss/builder/config/DocumentConfig.java
similarity index 97%
rename from src/main/java/com/ss/editor/document/DocumentConfig.java
rename to src/main/java/com/ss/builder/config/DocumentConfig.java
index edf53291..f64b71a6 100644
--- a/src/main/java/com/ss/editor/document/DocumentConfig.java
+++ b/src/main/java/com/ss/builder/config/DocumentConfig.java
@@ -1,4 +1,4 @@
-package com.ss.editor.document;
+package com.ss.builder.config;
import com.ss.rlib.common.data.AbstractStreamDocument;
import com.ss.rlib.common.util.VarTable;
diff --git a/src/main/java/com/ss/editor/config/EditorConfig.java b/src/main/java/com/ss/builder/config/EditorConfig.java
similarity index 85%
rename from src/main/java/com/ss/editor/config/EditorConfig.java
rename to src/main/java/com/ss/builder/config/EditorConfig.java
index ce20fa8f..f419319d 100644
--- a/src/main/java/com/ss/editor/config/EditorConfig.java
+++ b/src/main/java/com/ss/builder/config/EditorConfig.java
@@ -1,24 +1,23 @@
-package com.ss.editor.config;
+package com.ss.builder.config;
-import static com.ss.editor.config.DefaultSettingsProvider.Defaults.*;
-import static com.ss.editor.config.DefaultSettingsProvider.Preferences.*;
-import static com.ss.rlib.common.util.ClassUtils.unsafeCast;
-import static com.ss.rlib.common.util.ObjectUtils.notNull;
import com.jme3.asset.AssetEventListener;
import com.jme3.asset.AssetKey;
import com.jme3.asset.TextureKey;
import com.jme3.jfx.injfx.JmeToJfxIntegrator;
import com.jme3.math.Vector3f;
import com.jme3.system.AppSettings;
-import com.ss.editor.JmeApplication;
-import com.ss.editor.annotation.FromAnyThread;
-import com.ss.editor.util.EditorUtil;
+import com.ss.builder.JmeApplication;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.util.EditorUtils;
+import com.ss.builder.util.TimeTracker;
import com.ss.rlib.common.logging.Logger;
import com.ss.rlib.common.logging.LoggerManager;
+import com.ss.rlib.common.util.ClassUtils;
+import com.ss.rlib.common.util.ObjectUtils;
import com.ss.rlib.common.util.Utils;
import com.ss.rlib.common.util.dictionary.ConcurrentObjectDictionary;
import com.ss.rlib.common.util.dictionary.DictionaryFactory;
-import com.ss.rlib.common.util.dictionary.DictionaryUtils;
+import com.ss.rlib.common.util.dictionary.ObjectDictionary;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -30,6 +29,7 @@
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
+import java.util.Optional;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
@@ -149,43 +149,53 @@ public EditorConfig() {
* @return the setting's value or default.
*/
@FromAnyThread
- private @Nullable T get(@NotNull String id, @NotNull Class type, @Nullable T def) {
+ private synchronized @Nullable T get(@NotNull String id, @NotNull Class type, @Nullable T def) {
+
+ var value = settings.getInReadLock(id, ObjectDictionary::get);
- var value = DictionaryUtils.getInReadLock(settings, id, (objects, s) -> objects.get(id));
if (value == null) {
return def;
} else if (type.isInstance(value)) {
- return unsafeCast(value);
+ return ClassUtils.unsafeCast(value);
}
T result = null;
if (type == Boolean.class) {
+
if (value instanceof String) {
- result = unsafeCast(Boolean.valueOf(value.toString()));
+ result = ClassUtils.unsafeCast(Boolean.valueOf(value.toString()));
}
+
} else if (type == Integer.class) {
+
if (value instanceof String) {
- result = unsafeCast(Integer.valueOf(value.toString()));
+ result = ClassUtils.unsafeCast(Integer.valueOf(value.toString()));
}
+
} else if (type == Vector3f.class) {
+
if (value instanceof String) {
var values = value.toString().split(",");
var x = Float.parseFloat(values[0]);
var y = Float.parseFloat(values[1]);
var z = Float.parseFloat(values[2]);
- result = unsafeCast(new Vector3f(x, y, z));
+ result = ClassUtils.unsafeCast(new Vector3f(x, y, z));
}
+
} else if (Enum.class.isAssignableFrom(type)) {
- final Class enumType = unsafeCast(type);
+
+ Class enumType = ClassUtils.unsafeCast(type);
+
if (value instanceof String) {
var enumValue = Enum.valueOf(enumType, value.toString());
- result = unsafeCast(enumValue);
+ result = ClassUtils.unsafeCast(enumValue);
}
+
} else if (Path.class.isAssignableFrom(type)) {
if (value instanceof String) {
var uri = Utils.get(value.toString(), URI::new);
- result = unsafeCast(Paths.get(uri));
+ result = ClassUtils.unsafeCast(Paths.get(uri));
}
}
@@ -204,7 +214,7 @@ public EditorConfig() {
* @param value the setting's value.
*/
@FromAnyThread
- public void set(@NotNull String id, @Nullable Object value) {
+ public synchronized void set(@NotNull String id, @Nullable Object value) {
var stamp = settings.writeLock();
try {
@@ -231,7 +241,7 @@ public boolean getBoolean(@NotNull String id, boolean def) {
@FromAnyThread
public int getInteger(@NotNull String id, int def) {
- return notNull(get(id, Integer.class, def));
+ return ObjectUtils.notNull(get(id, Integer.class, def));
}
@FromAnyThread
@@ -246,12 +256,12 @@ public int getInteger(@NotNull String id, int def) {
@FromAnyThread
public > @NotNull T getEnum(@NotNull String id, @NotNull T def) {
- return notNull(get(id, unsafeCast(def.getClass()), def));
+ return ObjectUtils.notNull(get(id, ClassUtils.unsafeCast(def.getClass()), def));
}
@FromAnyThread
public @NotNull Vector3f getVector3f(@NotNull String id, @NotNull Vector3f def) {
- return notNull(get(id, Vector3f.class, def));
+ return ObjectUtils.notNull(get(id, Vector3f.class, def));
}
@FromAnyThread
@@ -303,7 +313,7 @@ public void assetLoaded(@NotNull AssetKey key) {
@Override
public void assetRequested(@NotNull AssetKey key) {
if (key instanceof TextureKey) {
- ((TextureKey) key).setAnisotropy(getInteger(PREF_ANISOTROPY, PREF_DEFAULT_ANISOTROPY));
+ ((TextureKey) key).setAnisotropy(getInteger(DefaultSettingsProvider.Preferences.PREF_ANISOTROPY, DefaultSettingsProvider.Defaults.PREF_DEFAULT_ANISOTROPY));
}
}
@@ -317,6 +327,27 @@ public void assetRequested(@NotNull AssetKey key) {
return currentAsset;
}
+ /**
+ * Get an optional of the current asset folder.
+ *
+ * @return the optional of the current asset folder.
+ */
+ @FromAnyThread
+ public @NotNull Optional getCurrentAssetOpt() {
+ return Optional.ofNullable(currentAsset);
+ }
+
+ /**
+ * Get the current asset folder with checking not null.
+ *
+ * @return the current asset folder.
+ * @throws NullPointerException id the current asset is null.
+ */
+ @FromAnyThread
+ public @NotNull Path requiredCurrentAsset() {
+ return ObjectUtils.notNull(currentAsset);
+ }
+
/**
* Set the current asset folder.
*
@@ -499,11 +530,11 @@ public AppSettings getSettings() {
var settings = new AppSettings(true);
settings.setFrequency(displayMode.getRefreshRate());
- settings.setGammaCorrection(getBoolean(PREF_GAMMA_CORRECTION, PREF_DEFAULT_GAMMA_CORRECTION));
+ settings.setGammaCorrection(getBoolean(DefaultSettingsProvider.Preferences.PREF_GAMMA_CORRECTION, DefaultSettingsProvider.Defaults.PREF_DEFAULT_GAMMA_CORRECTION));
settings.setResizable(true);
// settings.putBoolean("GraphicsDebug", true);
- JmeToJfxIntegrator.prepareSettings(settings, getInteger(PREF_FRAME_RATE, PREF_DEFAULT_FRAME_RATE));
+ JmeToJfxIntegrator.prepareSettings(settings, getInteger(DefaultSettingsProvider.Preferences.PREF_FRAME_RATE, DefaultSettingsProvider.Defaults.PREF_DEFAULT_FRAME_RATE));
return settings;
}
@@ -513,6 +544,9 @@ public AppSettings getSettings() {
*/
private void init() {
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .start();
+
var prefs = Preferences.userNodeForPackage(JmeApplication.class);
var stamp = settings.writeLock();
try {
@@ -546,7 +580,7 @@ private void init() {
this.currentAsset = null;
}
- var cameraAngle = getInteger(PREF_CAMERA_ANGLE, PREF_DEFAULT_CAMERA_ANGLE);
+ var cameraAngle = getInteger(DefaultSettingsProvider.Preferences.PREF_CAMERA_ANGLE, DefaultSettingsProvider.Defaults.PREF_DEFAULT_CAMERA_ANGLE);
System.setProperty("jfx.frame.transfer.camera.angle", String.valueOf(cameraAngle));
@@ -558,7 +592,7 @@ private void init() {
var lastOpenedAssets = getLastOpenedAssets();
try {
- lastOpenedAssets.addAll(EditorUtil.deserialize(byteArray));
+ lastOpenedAssets.addAll(EditorUtils.deserialize(byteArray));
for (var iterator = lastOpenedAssets.iterator(); iterator.hasNext(); ) {
@@ -573,6 +607,9 @@ private void init() {
} catch (RuntimeException e) {
LOGGER.warning(e);
}
+
+ TimeTracker.getStartupTracker(TimeTracker.STARTPUL_LEVEL_3)
+ .finish(() -> "loading of the editor config");
}
/**
@@ -596,7 +633,7 @@ public synchronized void save() {
} else if (value instanceof Path) {
prefs.put(key, ((Path) value).toUri().toString());
} else if (value instanceof Vector3f) {
- final Vector3f vector = (Vector3f) value;
+ var vector = (Vector3f) value;
prefs.put(key, vector.getX() + "," + vector.getY() + "," + vector.getZ());
} else {
prefs.put(key, value.toString());
@@ -627,7 +664,7 @@ public synchronized void save() {
}
prefs.putByteArray(PREF_ASSET_LAST_OPENED_ASSETS,
- EditorUtil.serialize((Serializable) getLastOpenedAssets()));
+ EditorUtils.serialize((Serializable) getLastOpenedAssets()));
try {
prefs.flush();
diff --git a/src/main/java/com/ss/builder/editor/EditorDescriptor.java b/src/main/java/com/ss/builder/editor/EditorDescriptor.java
new file mode 100644
index 00000000..e5bbbb43
--- /dev/null
+++ b/src/main/java/com/ss/builder/editor/EditorDescriptor.java
@@ -0,0 +1,131 @@
+package com.ss.builder.editor;
+
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.rlib.common.util.array.Array;
+import javafx.scene.image.Image;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.concurrent.Callable;
+
+/**
+ * The class to describe an editor.
+ *
+ * @author JavaSar
+ */
+public class EditorDescriptor {
+
+ /**
+ * The list of supported extensions.
+ */
+ @NotNull
+ private final Array extensions;
+
+ /**
+ * The editor constructor.
+ */
+ @NotNull
+ private final Callable constructor;
+
+ /**
+ * The editor name.
+ */
+ @NotNull
+ private final String editorName;
+
+ /**
+ * The editor id.
+ */
+ @NotNull
+ private final String editorId;
+
+ /**
+ * The icon.
+ */
+ @Nullable
+ private Image icon;
+
+ public EditorDescriptor(
+ @NotNull Callable constructor,
+ @NotNull String editorName,
+ @NotNull String editorId,
+ @NotNull String... extensions
+ ) {
+ this.extensions = Array.of(extensions);
+ this.constructor = constructor;
+ this.editorName = editorName;
+ this.editorId = editorId;
+ }
+
+ public EditorDescriptor(
+ @NotNull Callable constructor,
+ @NotNull String editorName,
+ @NotNull String editorId,
+ @NotNull Array extensions
+ ) {
+ this.extensions = Array.of(extensions.toArray(String.class));
+ this.constructor = constructor;
+ this.editorName = editorName;
+ this.editorId = editorId;
+ }
+
+ /**
+ * Get the editor id.
+ *
+ * @return the editor id.
+ */
+ @FromAnyThread
+ public @NotNull String getEditorId() {
+ return editorId;
+ }
+
+ /**
+ * Get list of supported extensions.
+ *
+ * @return the list of supported extensions.
+ */
+ @FromAnyThread
+ public @NotNull Array getExtensions() {
+ return extensions;
+ }
+
+ /**
+ * Get the editor's constructor.
+ *
+ * @return the editor's constructor.
+ */
+ @FromAnyThread
+ public @NotNull Callable getConstructor() {
+ return constructor;
+ }
+
+ /**
+ * Get the editor's name.
+ *
+ * @return the editor's name.
+ */
+ @FromAnyThread
+ public @NotNull String getEditorName() {
+ return editorName;
+ }
+
+ /**
+ * Get the editor's icon.
+ *
+ * @return the editor's icon or null.
+ */
+ @FromAnyThread
+ public @Nullable Image getIcon() {
+ return icon;
+ }
+
+ @Override
+ public String toString() {
+ return "EditorDescription{" +
+ "extensions=" + extensions +
+ ", constructor=" + constructor +
+ ", editorName='" + editorName + '\'' +
+ ", editorId='" + editorId + '\'' +
+ '}';
+ }
+}
diff --git a/src/main/java/com/ss/builder/editor/EditorRegistry.java b/src/main/java/com/ss/builder/editor/EditorRegistry.java
new file mode 100644
index 00000000..46b06264
--- /dev/null
+++ b/src/main/java/com/ss/builder/editor/EditorRegistry.java
@@ -0,0 +1,216 @@
+package com.ss.builder.editor;
+
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.editor.impl.*;
+import com.ss.builder.editor.impl.audio.AudioViewerEditor;
+import com.ss.builder.editor.impl.material.MaterialFileEditor;
+import com.ss.builder.editor.impl.model.ModelFileEditor;
+import com.ss.builder.editor.impl.scene.SceneFileEditor;
+import com.ss.builder.util.EditorUtils;
+import com.ss.rlib.common.logging.Logger;
+import com.ss.rlib.common.logging.LoggerManager;
+import com.ss.rlib.common.plugin.extension.ExtensionPoint;
+import com.ss.rlib.common.plugin.extension.ExtensionPointManager;
+import com.ss.rlib.common.util.FileUtils;
+import com.ss.rlib.common.util.array.Array;
+import com.ss.rlib.common.util.dictionary.ConcurrentObjectDictionary;
+import com.ss.rlib.common.util.dictionary.ObjectDictionary;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Supplier;
+
+/**
+ * THe registry of editors.
+ *
+ * @author JavaSaBr
+ */
+public class EditorRegistry {
+
+ private static final Logger LOGGER = LoggerManager.getLogger(EditorRegistry.class);
+
+ public static final String ALL_FORMATS = "*";
+
+ /**
+ * @see EditorDescriptor
+ */
+ public static final String EP_DESCRIPTORS = "EditorRegistry#descriptors";
+
+ private static final ExtensionPoint DESCRIPTORS =
+ ExtensionPointManager.register(EP_DESCRIPTORS);
+
+ private static final Supplier> ARRAY_FACTORY =
+ Array.supplier(EditorDescriptor.class);
+
+ private static final EditorRegistry INSTANCE = new EditorRegistry();
+
+ public static @NotNull EditorRegistry getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * The table with editor descriptions.
+ */
+ @NotNull
+ private final ConcurrentObjectDictionary> editorDescriptors;
+
+ /**
+ * The table with mapping editor id to editor description.
+ */
+ @NotNull
+ private final ConcurrentObjectDictionary editorIdToDescriptor;
+
+ /**
+ * True if this registry was fully initialized.
+ */
+ @NotNull
+ private final AtomicBoolean initialized;
+
+ private EditorRegistry() {
+ this.initialized = new AtomicBoolean(false);
+ this.editorDescriptors = ConcurrentObjectDictionary.ofType(String.class, Array.class);
+ this.editorIdToDescriptor = ConcurrentObjectDictionary.ofType(String.class, EditorDescriptor.class);
+
+ DESCRIPTORS.register(TextFileEditor.DESCRIPTOR)
+ .register(MaterialFileEditor.DESCRIPTOR)
+ .register(ModelFileEditor.DESCRIPTOR)
+ .register(ImageViewerEditor.DESCRIPTOR)
+ .register(GlslFileEditor.DESCRIPTOR)
+ .register(MaterialDefinitionFileEditor.DESCRIPTOR)
+ .register(AudioViewerEditor.DESCRIPTOR)
+ .register(SceneFileEditor.DESCRIPTOR);
+
+ LOGGER.info("initialized.");
+ }
+
+ @FromAnyThread
+ private void checkAndInitialize() {
+ if (initialized.compareAndSet(false, true)) {
+ DESCRIPTORS.getExtensions().forEach(this::register);
+ }
+ }
+
+ /**
+ * Add the new descriptor.
+ *
+ * @param descriptor the descriptor of the editor.
+ */
+ @FromAnyThread
+ private void register(@NotNull EditorDescriptor descriptor) {
+
+ descriptor.getExtensions()
+ .forEach(descriptor, this::register);
+
+ editorIdToDescriptor
+ .runInWriteLock(descriptor.getEditorId(), descriptor, ObjectDictionary::put);
+ }
+
+ @FromAnyThread
+ private void register(@NotNull String extension, @NotNull EditorDescriptor descriptor) {
+ editorDescriptors.runInWriteLock(extension, descriptor,
+ (dict, ext, toAdd) -> dict.get(ext, ARRAY_FACTORY).add(toAdd));
+ }
+
+ /**
+ * Get an editor description by the editor id.
+ *
+ * @param editorId the editor id.
+ * @return the description or null.
+ */
+ @FromAnyThread
+ public @Nullable EditorDescriptor getDescription(@NotNull String editorId) {
+ checkAndInitialize();
+ return editorIdToDescriptor
+ .getInReadLock(editorId, ObjectDictionary::get);
+ }
+
+ /**
+ * Create an editor for the file.
+ *
+ * @param file the edited file.
+ * @return the editor for this file or null.
+ */
+ @FromAnyThread
+ public @Nullable FileEditor createEditorFor(@NotNull Path file) {
+ checkAndInitialize();
+
+ if (Files.isDirectory(file)) {
+ return null;
+ }
+
+ var extension = FileUtils.getExtension(file);
+ var descriptions = editorDescriptors.get(extension);
+
+ EditorDescriptor description;
+
+ if (descriptions != null) {
+ description = descriptions.first();
+ } else {
+ descriptions = editorDescriptors.get(ALL_FORMATS);
+ description = descriptions == null ? null : descriptions.first();
+ }
+
+ if (description == null) {
+ return null;
+ }
+
+ var constructor = description.getConstructor();
+ try {
+ return constructor.call();
+ } catch (Exception e) {
+ EditorUtils.handleException(LOGGER, this, e);
+ }
+
+ return null;
+ }
+
+ /**
+ * Create an editor for the file.
+ *
+ * @param descriptor the editor descriptor.
+ * @param file the edited file.
+ * @return the editor or null.
+ */
+ @FromAnyThread
+ public @Nullable FileEditor createEditorFor(@NotNull EditorDescriptor descriptor, @NotNull Path file) {
+ checkAndInitialize();
+
+ var constructor = descriptor.getConstructor();
+ try {
+ return constructor.call();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Gets available editors for.
+ *
+ * @param file the file
+ * @return the list of available editors for the file.
+ */
+ @FromAnyThread
+ public @NotNull Array getAvailableEditorsFor(@NotNull Path file) {
+ checkAndInitialize();
+
+ var result = Array.ofType(EditorDescriptor.class);
+ var extension = FileUtils.getExtension(file);
+
+ var descriptions = editorDescriptors.get(extension);
+
+ if (descriptions != null) {
+ result.addAll(descriptions);
+ }
+
+ var universal = editorDescriptors.get(ALL_FORMATS);
+
+ if (universal != null) {
+ result.addAll(universal);
+ }
+
+ return result;
+ }
+}
diff --git a/src/main/java/com/ss/builder/editor/FileEditor.java b/src/main/java/com/ss/builder/editor/FileEditor.java
new file mode 100644
index 00000000..8e4a0cf5
--- /dev/null
+++ b/src/main/java/com/ss/builder/editor/FileEditor.java
@@ -0,0 +1,159 @@
+package com.ss.builder.editor;
+
+import com.ss.builder.annotation.BackgroundThread;
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.annotation.FxThread;
+import com.ss.builder.editor.event.FileEditorEvent;
+import com.ss.builder.fx.editor.layout.EditorLayout;
+import com.ss.builder.fx.editor.part.ui.EditorUiPart;
+import com.ss.builder.jme.editor.part3d.Editor3dPart;
+import com.ss.builder.jme.editor.part3d.event.Editor3dPartEvent;
+import com.ss.rlib.common.util.array.Array;
+import javafx.beans.property.BooleanProperty;
+import javafx.event.Event;
+import javafx.scene.Parent;
+import javafx.scene.layout.BorderPane;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.nio.file.Path;
+import java.util.concurrent.CompletableFuture;
+
+/**
+ * The interface for implementing file editor.
+ *
+ * @author JavaSaBr
+ */
+public interface FileEditor {
+
+ /**
+ * Get a visible page of this editor
+ *
+ * @return the visible page of this editor
+ */
+ @FxThread
+ @Deprecated
+ @NotNull Parent getUiPage();
+
+ /**
+ * Get an area to place 3D scene.
+ *
+ * @return the area to place 3D scene.
+ */
+ @FxThread
+ @Deprecated
+ default @Nullable BorderPane get3dArea() {
+ return null;
+ }
+
+ /**
+ * Get this editor's layout.
+ *
+ * @return this editor's layout.
+ */
+ @FxThread
+ @NotNull EditorLayout getLayout();
+
+ /**
+ * Get the file name of the current opened file.
+ *
+ * @return the file name of the current opened file.
+ */
+ @FxThread
+ @NotNull String getFileName();
+
+ /**
+ * Get the editing file.
+ *
+ * @return the editing file.
+ */
+ @FxThread
+ @NotNull Path getFile();
+
+ /**
+ * Open the file.
+ *
+ * @param file the file.
+ */
+ @BackgroundThread
+ void openFile(@NotNull Path file);
+
+ /**
+ * Dirty property boolean property.
+ *
+ * @return the dirty property of this editor.
+ */
+ @FxThread
+ @NotNull BooleanProperty dirtyProperty();
+
+ /**
+ * Return true if the current file was changed.
+ *
+ * @return true if the current file was changed.
+ */
+ @FromAnyThread
+ boolean isDirty();
+
+ /**
+ * Save new changes.
+ */
+ @FromAnyThread
+ @NotNull CompletableFuture save();
+
+ /**
+ * Get the editor's 3D parts.
+ *
+ * @return the editor's 3D parts.
+ */
+ @FxThread
+ default @NotNull Array get3dParts() {
+ return Array.empty();
+ }
+
+ /**
+ * Get the editor's UI parts.
+ *
+ * @return the editor's UI parts.
+ */
+ @FxThread
+ default @NotNull Array getUiParts() {
+ return Array.empty();
+ }
+
+ /**
+ * Notify this editor about the happened event.
+ *
+ * @param event the editor's event.
+ */
+ @FromAnyThread
+ void notify(@NotNull FileEditorEvent event);
+
+ /**
+ * Notify this editor about the happened event.
+ *
+ * @param event the editor's event.
+ */
+ @FromAnyThread
+ void notify(@NotNull Editor3dPartEvent event);
+
+ /**
+ * Get the editor's descriptor.
+ *
+ * @return the editor's descriptor.
+ */
+ @FromAnyThread
+ @NotNull EditorDescriptor getDescriptor();
+
+ /**
+ * Return true if the point is inside in the editing area.
+ *
+ * @param sceneX the scene x
+ * @param sceneY the scene y
+ * @param eventType the event type.
+ * @return true if the point is inside in the editing area.
+ */
+ @FxThread
+ default boolean isInside(double sceneX, double sceneY, @NotNull Class extends Event> eventType) {
+ return false;
+ }
+}
diff --git a/src/main/java/com/ss/builder/editor/FileEditorUtils.java b/src/main/java/com/ss/builder/editor/FileEditorUtils.java
new file mode 100644
index 00000000..d0c6499b
--- /dev/null
+++ b/src/main/java/com/ss/builder/editor/FileEditorUtils.java
@@ -0,0 +1,29 @@
+package com.ss.builder.editor;
+
+import com.ss.builder.jme.editor.part3d.impl.Base3dSceneEditor3dPart;
+import com.ss.builder.editor.state.impl.Editor3dEditorState;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * The utility class.
+ *
+ * @author JavaSaBr
+ */
+public class FileEditorUtils {
+
+ public static void loadCameraState(
+ @NotNull Editor3dEditorState editorState,
+ @NotNull Base3dSceneEditor3dPart editor3dPart
+ ) {
+
+ var cameraLocation = editorState.getCameraLocation();
+
+ var hRotation = editorState.getCameraHRotation();
+ var vRotation = editorState.getCameraVRotation();
+ var tDistance = editorState.getCameraTargetDistance();
+ var cameraSpeed = editorState.getCameraFlySpeed();
+
+ /** FIXME ExecutorManager.getInstance()
+ .addJmeTask(() -> editor3dPart.applyState(cameraLocation, hRotation, vRotation, tDistance, cameraFlySpeed));*/
+ }
+}
diff --git a/src/main/java/com/ss/builder/editor/UndoableFileEditor.java b/src/main/java/com/ss/builder/editor/UndoableFileEditor.java
new file mode 100644
index 00000000..51def9e1
--- /dev/null
+++ b/src/main/java/com/ss/builder/editor/UndoableFileEditor.java
@@ -0,0 +1,20 @@
+package com.ss.builder.editor;
+
+import com.ss.builder.annotation.FromAnyThread;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.concurrent.CompletableFuture;
+
+/**
+ * The interface to mark an editor that it supports undo/redo methods.
+ *
+ * @author JavaSaBr
+ */
+public interface UndoableFileEditor extends FileEditor {
+
+ @FromAnyThread
+ @NotNull CompletableFuture undo();
+
+ @FromAnyThread
+ @NotNull CompletableFuture redo();
+}
diff --git a/src/main/java/com/ss/builder/editor/event/AbstractFileEditorEvent.java b/src/main/java/com/ss/builder/editor/event/AbstractFileEditorEvent.java
new file mode 100644
index 00000000..559e27f9
--- /dev/null
+++ b/src/main/java/com/ss/builder/editor/event/AbstractFileEditorEvent.java
@@ -0,0 +1,28 @@
+package com.ss.builder.editor.event;
+
+import com.ss.builder.annotation.FromAnyThread;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * The base implementation of a file editor's event.
+ *
+ * @author JavaSaBr
+ */
+public abstract class AbstractFileEditorEvent implements FileEditorEvent {
+
+ /**
+ * The event's source.
+ */
+ @NotNull
+ protected final S source;
+
+ protected AbstractFileEditorEvent(@NotNull S source) {
+ this.source = source;
+ }
+
+ @Override
+ @FromAnyThread
+ public @NotNull S getSource() {
+ return source;
+ }
+}
diff --git a/src/main/java/com/ss/builder/editor/event/CameraChangedFileEditorEvent.java b/src/main/java/com/ss/builder/editor/event/CameraChangedFileEditorEvent.java
new file mode 100644
index 00000000..d0a99c53
--- /dev/null
+++ b/src/main/java/com/ss/builder/editor/event/CameraChangedFileEditorEvent.java
@@ -0,0 +1,34 @@
+package com.ss.builder.editor.event;
+
+import com.ss.builder.annotation.FromAnyThread;
+import com.ss.builder.jme.editor.part3d.control.impl.CameraEditor3dPartControl.CameraState;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * The event about that editor's camera was changed.
+ *
+ * @author JavaSaBr
+ */
+public class CameraChangedFileEditorEvent extends AbstractFileEditorEvent