voxel selection popout fixes
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-09-10 19:32:09 -04:00
parent f70844c74b
commit 3fd97d415a
9 changed files with 15 additions and 14 deletions

View File

@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file #maven.buildNumber.plugin properties file
#Sun Sep 08 21:41:56 EDT 2024 #Tue Sep 10 19:22:32 EDT 2024
buildNumber=325 buildNumber=326

View File

@ -717,6 +717,7 @@ Fix cursor visuals
Fix jump/fall/land animations being buggy and inconsistent between client/server Fix jump/fall/land animations being buggy and inconsistent between client/server
Remove extraneous println's Remove extraneous println's
Fix empty item slot not showing underneath dragged item Fix empty item slot not showing underneath dragged item
Fix voxel selection popout rendering, nav logic
# TODO # TODO

View File

@ -160,7 +160,7 @@ public class Globals {
public static boolean RUN_CLIENT = true; public static boolean RUN_CLIENT = true;
public static boolean RUN_HIDDEN = false; //glfw session will be created with hidden window public static boolean RUN_HIDDEN = false; //glfw session will be created with hidden window
public static boolean RUN_AUDIO = true; public static boolean RUN_AUDIO = true;
public static boolean RUN_SCRIPTS = false; public static boolean RUN_SCRIPTS = true;
public static int clientCharacterID; public static int clientCharacterID;
public static NetConfig netConfig = null; public static NetConfig netConfig = null;

View File

@ -12,7 +12,6 @@ import electrosphere.game.server.world.ServerWorldData;
import electrosphere.server.content.ServerContentManager; import electrosphere.server.content.ServerContentManager;
import electrosphere.server.datacell.GriddedDataCellManager; import electrosphere.server.datacell.GriddedDataCellManager;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.ServerDataCell;
import electrosphere.util.FileUtils; import electrosphere.util.FileUtils;
/** /**

View File

@ -53,7 +53,7 @@ public class MenuGeneratorsLevelEditor {
static final int SIDE_PANEL_WIDTH = 500; static final int SIDE_PANEL_WIDTH = 500;
//is the voxel selection window open //is the voxel selection window open
static boolean voxelWindowOpen = false; protected static boolean voxelWindowOpen = false;
//vertical offset from cursor position to spawn things at //vertical offset from cursor position to spawn things at
static final Vector3d cursorVerticalOffset = new Vector3d(0,0.05,0); static final Vector3d cursorVerticalOffset = new Vector3d(0,0.05,0);

View File

@ -70,7 +70,8 @@ public class MenuGeneratorsTerrainEditing {
scrollable.setFlexDirection(YogaFlexDirection.Row); scrollable.setFlexDirection(YogaFlexDirection.Row);
scrollable.setAlignItems(YogaAlignment.Start); scrollable.setAlignItems(YogaAlignment.Start);
rVal.setOnNavigationCallback(new NavigationEventCallback() {public boolean execute(NavigationEvent event){ rVal.setOnNavigationCallback(new NavigationEventCallback() {public boolean execute(NavigationEvent event){
WindowUtils.closeWindow(WindowStrings.LEVEL_EDTIOR_SIDE_PANEL); WindowUtils.closeWindow(WindowStrings.VOXEL_TYPE_SELECTION);
MenuGeneratorsLevelEditor.voxelWindowOpen = false;
return false; return false;
}}); }});

View File

@ -126,6 +126,7 @@ public class MenuGeneratorsLevelEditor {
//values to creat the level with //values to creat the level with
LevelDescription inFlightLevel = new LevelDescription(); LevelDescription inFlightLevel = new LevelDescription();
SceneFile sceneFile = SceneFile.createSceneFile(); SceneFile sceneFile = SceneFile.createSceneFile();
sceneFile.setCreateSaveInstance(true);
inFlightLevel.setSceneFile(sceneFile); inFlightLevel.setSceneFile(sceneFile);
@ -188,10 +189,6 @@ public class MenuGeneratorsLevelEditor {
}, DEFAULT_GRID_SIZE / (float)GriddedDataCellManager.MAX_GRID_SIZE) }, DEFAULT_GRID_SIZE / (float)GriddedDataCellManager.MAX_GRID_SIZE)
); );
sceneFile.getRealmDescriptor().setGriddedRealmSize(DEFAULT_GRID_SIZE); sceneFile.getRealmDescriptor().setGriddedRealmSize(DEFAULT_GRID_SIZE);
griddedRealmControls.addChild(InputMacros.createToggle("Create Scene File", false, (ValueChangeEvent event) -> {
sceneFile.setCreateSaveInstance(event.getAsBoolean());
}));
} }
rVal.addChild(griddedRealmControls); rVal.addChild(griddedRealmControls);

View File

@ -127,8 +127,8 @@ public class ImagePanel extends StandardElement implements DrawableElement, Drag
float ndcWidth = (float)getInternalWidth()/parentWidth; float ndcWidth = (float)getInternalWidth()/parentWidth;
float ndcHeight = (float)getInternalHeight()/parentHeight; float ndcHeight = (float)getInternalHeight()/parentHeight;
float ndcX = (float)(getAbsoluteX())/parentWidth; float ndcX = (float)(getInternalX() + parentPosX)/parentWidth;
float ndcY = (float)(getAbsoluteY())/parentHeight; float ndcY = (float)(getInternalY() + parentPosY)/parentHeight;
boxPosition = new Vector3f(ndcX,ndcY,0); boxPosition = new Vector3f(ndcX,ndcY,0);
boxDimensions = new Vector3f(ndcWidth,ndcHeight,0); boxDimensions = new Vector3f(ndcWidth,ndcHeight,0);
@ -144,6 +144,9 @@ public class ImagePanel extends StandardElement implements DrawableElement, Drag
openGLState.glBindFramebuffer(GL_FRAMEBUFFER, parentFramebufferPointer); openGLState.glBindFramebuffer(GL_FRAMEBUFFER, parentFramebufferPointer);
openGLState.glViewport(parentWidth, parentHeight); openGLState.glViewport(parentWidth, parentHeight);
renderPipelineState.setUseMaterial(true);
renderPipelineState.setBufferNonStandardUniforms(true);
if(planeModel != null){ if(planeModel != null){
planeModel.pushUniformToMesh("plane", "mPosition", boxPosition); planeModel.pushUniformToMesh("plane", "mPosition", boxPosition);
planeModel.pushUniformToMesh("plane", "mDimension", boxDimensions); planeModel.pushUniformToMesh("plane", "mDimension", boxDimensions);

View File

@ -192,8 +192,8 @@ public class SaveUtils {
LoggerInterface.loggerEngine.INFO("Load world data from scene " + saveName); LoggerInterface.loggerEngine.INFO("Load world data from scene " + saveName);
serverWorldData = ServerWorldData.loadWorldData(saveName, true); serverWorldData = ServerWorldData.loadWorldData(saveName, true);
} else { } else {
//The scene is neither defined in the save itself nor in the assets scene files //The world data is neither defined in the save itself nor in the assets scene files
throw new IllegalStateException("Trying to load a save that does not contain a scene!"); throw new IllegalStateException("Trying to load a save that does not contain world data!");
} }
//load scene file //load scene file