Hair!
This commit is contained in:
parent
26a999de28
commit
c919d5c8ce
@ -90,6 +90,35 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"itemId" : "hairshort1",
|
||||
"modelPath": "Models/itemEntityShorts.fbx",
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
"ARMOR",
|
||||
"TARGETABLE"
|
||||
],
|
||||
"collidable": {
|
||||
"type" : "CUBE",
|
||||
"dimension1" : 0.1,
|
||||
"dimension2" : 0.1,
|
||||
"dimension3" : 0.35,
|
||||
"offsetX" : 0,
|
||||
"offsetY" : 0.05,
|
||||
"offsetZ" : 0
|
||||
},
|
||||
"equipWhitelist" : [
|
||||
{
|
||||
"creatureId" : "human",
|
||||
"model" : "Models/hairshort1.fbx",
|
||||
"meshList" : [
|
||||
"Hair"
|
||||
],
|
||||
"meshMaskList" : []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
BIN
assets/Models/hairshort1.fbx
Normal file
BIN
assets/Models/hairshort1.fbx
Normal file
Binary file not shown.
@ -68,12 +68,88 @@
|
||||
"/Textures/GoblinEyes.png"
|
||||
]
|
||||
},
|
||||
"Models/person1animpass2.fbx" : {
|
||||
"makehuman1" : [
|
||||
"Models/baseman.fbx" : {
|
||||
"Torso" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"high-poly" : [
|
||||
"HandLeft" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"ForearmLeft" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"BicepLeft" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"HandRight" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"ForearmRight" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"BicepRight" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"FootLeft" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"FootRight" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"LowerLegLeft" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"LowerLegRight" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"UpperLegLeft" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"UpperLegRight" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"Shorts" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"ShoulderLeft" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"ShoulderRight" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"Head" : [
|
||||
"/Textures/skin1.png",
|
||||
"/Textures/skin1.png"
|
||||
],
|
||||
"EyebrowRight" : [
|
||||
"/Textures/b1.png",
|
||||
"/Textures/b1.png"
|
||||
],
|
||||
"EyebrowLeft" : [
|
||||
"/Textures/b1.png",
|
||||
"/Textures/b1.png"
|
||||
],
|
||||
"EyeRight" : [
|
||||
"/Textures/w1.png",
|
||||
"/Textures/w1.png"
|
||||
],
|
||||
"EyeLeft" : [
|
||||
"/Textures/w1.png",
|
||||
"/Textures/w1.png"
|
||||
]
|
||||
@ -131,6 +207,18 @@
|
||||
"/Textures/w1.png",
|
||||
"/Textures/w1.png"
|
||||
]
|
||||
},
|
||||
"Models/shorts1.fbx" : {
|
||||
"ClothingItem" : [
|
||||
"/Textures/b1.png",
|
||||
"/Textures/b1.png"
|
||||
]
|
||||
},
|
||||
"Models/hairshort1.fbx" : {
|
||||
"Hair" : [
|
||||
"/Textures/b1.png",
|
||||
"/Textures/b1.png"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
171
pom.xml
171
pom.xml
@ -198,91 +198,90 @@
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assemble-all</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<includeProjectDependencies>false</includeProjectDependencies>
|
||||
<includePluginDependencies>true</includePluginDependencies>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
<!-- <classpathScope>compile</classpathScope> -->
|
||||
<arguments>
|
||||
<argument>-cp</argument>
|
||||
<argument>target/classes;target/Renderer-0.1-jar-with-dependencies.jar</argument>
|
||||
<argument>electrosphere.main.Main</argument>
|
||||
</arguments>
|
||||
<!-- <classesDirectory>${project.basedir}/target/classes</classesDirectory> -->
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>Telephone</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-jar</argument>
|
||||
<argument>Telephone-0.2.1.jar</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assemble-all</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
|
||||
</execution>
|
||||
<!-- <execution>
|
||||
<id>Telephone</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-jar</argument>
|
||||
<argument>Telephone-0.2.1.jar</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution> -->
|
||||
</executions>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<includeProjectDependencies>false</includeProjectDependencies>
|
||||
<includePluginDependencies>true</includePluginDependencies>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
<!-- <classpathScope>compile</classpathScope> -->
|
||||
<arguments>
|
||||
<argument>-cp</argument>
|
||||
<argument>target/classes;target/Renderer-0.1-jar-with-dependencies.jar</argument>
|
||||
<argument>electrosphere.main.Main</argument>
|
||||
</arguments>
|
||||
<!-- <classesDirectory>${project.basedir}/target/classes</classesDirectory> -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -35,8 +35,8 @@ public class AudioEngine {
|
||||
|
||||
|
||||
public AudioEngine() {
|
||||
soundBufferList = new ArrayList();
|
||||
soundSourceMap = new HashMap();
|
||||
soundBufferList = new ArrayList<AudioBuffer>();
|
||||
soundSourceMap = new HashMap<String,AudioSource>();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
|
||||
@ -624,7 +624,12 @@ public class LoadingThread extends Thread {
|
||||
//attach ai to evil goblin
|
||||
// MindlessAttacker.attachToCreature(goblin);
|
||||
OpportunisticAttacker.attachToCreature(goblin);
|
||||
|
||||
|
||||
Entity shorts = ItemUtils.spawnBasicItem("shorts1");
|
||||
EntityUtils.getPosition(shorts).set(new Vector3f(2,1,1));
|
||||
Entity hair = ItemUtils.spawnBasicItem("hairshort1");
|
||||
EntityUtils.getPosition(hair).set(new Vector3f(1,1,1));
|
||||
|
||||
// goblin = CreatureUtils.spawnBasicCreature("Goblin");
|
||||
// CollisionObjUtils.positionCharacter(goblin, new Vector3f(3, 0, 4));
|
||||
// EntityUtils.getScale(goblin).set(0.005f);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package electrosphere.game.config;
|
||||
|
||||
import electrosphere.logger.LoggerInterface;
|
||||
import electrosphere.main.Globals;
|
||||
import electrosphere.util.FileUtils;
|
||||
|
||||
@ -132,6 +133,7 @@ public class UserSettings {
|
||||
|
||||
|
||||
public static void loadUserSettings(){
|
||||
LoggerInterface.loggerStartup.INFO("Load user settings");
|
||||
Globals.userSettings = FileUtils.loadObjectFromAssetPath("/Config/settings.json", UserSettings.class);
|
||||
if(Globals.userSettings == null){
|
||||
Globals.userSettings = getDefault();
|
||||
|
||||
@ -15,12 +15,15 @@ public class LoggerInterface {
|
||||
public static Logger loggerGameLogic;
|
||||
public static Logger loggerRenderer;
|
||||
public static Logger loggerEngine;
|
||||
public static Logger loggerStartup;
|
||||
|
||||
public static void initLoggers(){
|
||||
loggerStartup = new Logger(LogLevel.WARNING);
|
||||
loggerNetworking = new Logger(LogLevel.WARNING);
|
||||
loggerFileIO = new Logger(LogLevel.WARNING);
|
||||
loggerGameLogic = new Logger(LogLevel.WARNING);
|
||||
loggerRenderer = new Logger(LogLevel.WARNING);
|
||||
loggerEngine = new Logger(LogLevel.WARNING);
|
||||
loggerStartup.INFO("Initialized loggers");
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ import electrosphere.game.server.world.ServerWorldData;
|
||||
import electrosphere.game.server.world.MacroData;
|
||||
import electrosphere.game.server.datacell.DataCellManager;
|
||||
import electrosphere.game.simulation.MicroSimulation;
|
||||
import electrosphere.logger.LoggerInterface;
|
||||
import electrosphere.menu.Menu;
|
||||
import electrosphere.net.client.ClientNetworking;
|
||||
import electrosphere.net.server.Player;
|
||||
@ -319,15 +320,9 @@ public class Globals {
|
||||
|
||||
|
||||
public static void initGlobals(){
|
||||
|
||||
LoggerInterface.loggerStartup.INFO("Initialize global variables");
|
||||
//load in default texture map
|
||||
Gson gson = new Gson();
|
||||
// try {
|
||||
//deserializes the texture map from its default path using gson
|
||||
//also done in one line
|
||||
textureMapDefault = FileUtils.loadObjectFromAssetPath("Textures/default_texture_map.json", TextureMap.class);
|
||||
// textureMapDefault = gson.fromJson(Files.newBufferedReader(new File(Thread.currentThread().getContextClassLoader().getResource("Textures/default_texture_map.json").getFile()).toPath()), TextureMap.class); //only the best of coding practices :)
|
||||
// } catch (IOException ex) { ex.printStackTrace(); } //TODO: handle better :tm:
|
||||
textureMapDefault = FileUtils.loadObjectFromAssetPath("Textures/default_texture_map.json", TextureMap.class);
|
||||
//create entity manager
|
||||
entityManager = new EntityManager();
|
||||
//temporary hold for skybox colors
|
||||
@ -352,6 +347,7 @@ public class Globals {
|
||||
}
|
||||
|
||||
public static void initDefaultAudioResources(){
|
||||
LoggerInterface.loggerStartup.INFO("Loading default audio resources");
|
||||
Globals.assetManager.addAudioPathToQueue("/Audio/MenuBackspace.ogg");
|
||||
Globals.assetManager.addAudioPathToQueue("/Audio/MenuBadOption.ogg");
|
||||
Globals.assetManager.addAudioPathToQueue("/Audio/MenuChangeOption.ogg");
|
||||
@ -359,6 +355,7 @@ public class Globals {
|
||||
}
|
||||
|
||||
public static void initDefaultGraphicalResources(){
|
||||
LoggerInterface.loggerStartup.INFO("Loading default graphical resources");
|
||||
//create default textures
|
||||
Globals.assetManager.addTexturePathtoQueue("Textures/default_diffuse.png");
|
||||
Globals.assetManager.addTexturePathtoQueue("Textures/default_specular.png");
|
||||
|
||||
@ -112,12 +112,12 @@ public class Main {
|
||||
// I N I T I A L I Z A T I O N
|
||||
//
|
||||
//
|
||||
|
||||
//load user settings
|
||||
UserSettings.loadUserSettings();
|
||||
|
||||
|
||||
//initialize logging interfaces
|
||||
LoggerInterface.initLoggers();
|
||||
|
||||
//load user settings
|
||||
UserSettings.loadUserSettings();
|
||||
|
||||
//controls
|
||||
initControlHandler();
|
||||
@ -191,10 +191,12 @@ public class Main {
|
||||
Globals.initDefaultAudioResources();
|
||||
|
||||
//fire off a loading thread for the title menus/screen
|
||||
LoggerInterface.loggerStartup.INFO("Fire off loading thread");
|
||||
Globals.loadingThread = new LoadingThread(LoadingThread.LOAD_TITLE_MENU);
|
||||
Globals.loadingThread.start();
|
||||
|
||||
//recapture the screen for rendering
|
||||
LoggerInterface.loggerStartup.INFO("Recapture screen");
|
||||
RenderUtils.recaptureScreen();
|
||||
|
||||
///
|
||||
@ -399,6 +401,7 @@ public class Main {
|
||||
|
||||
|
||||
public static void initControlHandler(){
|
||||
LoggerInterface.loggerStartup.INFO("Initialize control handler");
|
||||
Globals.controlHandler = ControlHandler.generateExampleControlsMap();
|
||||
// Globals.controlHandler = FileLoadingUtils.loadModelObjectFromBakedJsonFile("/Config/keybinds.json",ControlHandler.class);
|
||||
}
|
||||
|
||||
@ -116,6 +116,7 @@ public class RenderingEngine {
|
||||
|
||||
|
||||
public void createOpenglContext(){
|
||||
LoggerInterface.loggerRenderer.INFO("Create OpenGL Context");
|
||||
//Initializes opengl
|
||||
glfwInit();
|
||||
//Gives hints to glfw to control how opengl will be used
|
||||
|
||||
Loading…
Reference in New Issue
Block a user