Add house

This commit is contained in:
austin 2021-07-09 23:54:06 -04:00
parent 61aace7b37
commit ca38589f70
4 changed files with 16 additions and 2 deletions

BIN
assets/Models/building1.fbx Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

View File

@ -62,7 +62,7 @@
"/Textures/GoblinEyes.png" "/Textures/GoblinEyes.png"
] ]
}, },
"Models/person1walkanim.fbx" : { "Models/person1animpass2.fbx" : {
"makehuman1" : [ "makehuman1" : [
"/Textures/skin1.png", "/Textures/skin1.png",
"/Textures/skin1.png" "/Textures/skin1.png"
@ -71,6 +71,12 @@
"/Textures/w1.png", "/Textures/w1.png",
"/Textures/w1.png" "/Textures/w1.png"
] ]
},
"Models/building1.fbx" : {
"Cube.001" : [
"/Textures/building_diffuse.png",
"/Textures/building_diffuse.png"
]
} }
} }
} }

View File

@ -26,6 +26,7 @@ import electrosphere.menu.MenuUtils;
import electrosphere.net.NetUtils; import electrosphere.net.NetUtils;
import electrosphere.net.client.ClientNetworking; import electrosphere.net.client.ClientNetworking;
import electrosphere.net.server.Server; import electrosphere.net.server.Server;
import electrosphere.renderer.ActorUtils;
import electrosphere.renderer.Model; import electrosphere.renderer.Model;
import electrosphere.renderer.RenderUtils; import electrosphere.renderer.RenderUtils;
import electrosphere.renderer.assetmanager.AssetDataStrings; import electrosphere.renderer.assetmanager.AssetDataStrings;
@ -470,7 +471,7 @@ public class LoadingThread extends Thread {
// EntityUtils.getEntityScale(creature).set(0.01f); // EntityUtils.getEntityScale(creature).set(0.01f);
// } // }
//trees \:D/
for(int i = 0; i < 10; i++){ for(int i = 0; i < 10; i++){
Random rand = new Random(); Random rand = new Random();
String treePath = "Models/tree1.fbx"; String treePath = "Models/tree1.fbx";
@ -479,6 +480,13 @@ public class LoadingThread extends Thread {
// EntityUtils.getEntityRotation(tree).rotateAxis((float)-Math.PI/2.0f, new Vector3f(1,0,0)); // EntityUtils.getEntityRotation(tree).rotateAxis((float)-Math.PI/2.0f, new Vector3f(1,0,0));
} }
String buildingPath = "Models/building1.fbx";
Entity building = EntityUtils.spawnDrawableEntity(buildingPath);
EntityUtils.getPosition(building).set(5,1.2f,5);
EntityUtils.getScale(building).set(0.5f);
EntityUtils.getRotation(building).rotateLocalY((float)(Math.PI));
// ActorUtils.applyBlenderTransformer(building);
//spawn evil goblin //spawn evil goblin
Entity goblin = CreatureUtils.spawnBasicCreature("Goblin"); Entity goblin = CreatureUtils.spawnBasicCreature("Goblin");
EntityUtils.getPosition(goblin).set(30, 0, 30); EntityUtils.getPosition(goblin).set(30, 0, 30);