asset data strings work
This commit is contained in:
parent
009af5cc3e
commit
62b6c16573
@ -1860,6 +1860,7 @@ Filter room solver to only include rooms that are enter-able
|
||||
(05/18/2025)
|
||||
Solve for furniture placement inside rectangular rooms
|
||||
Visualize furniture placement slots
|
||||
AssetDataStrings work
|
||||
|
||||
|
||||
|
||||
|
||||
@ -262,6 +262,7 @@ public class Globals {
|
||||
AssetDataStrings.POSE_EMPTY,
|
||||
AssetDataStrings.UNITSPHERE,
|
||||
AssetDataStrings.UNITCYLINDER,
|
||||
AssetDataStrings.UNITCAPSULE,
|
||||
AssetDataStrings.UNITCUBE,
|
||||
AssetDataStrings.MODEL_BLOCK_SINGLE,
|
||||
};
|
||||
|
||||
@ -22,7 +22,7 @@ public class AssetDataStrings {
|
||||
*/
|
||||
public static final String UNITSPHERE = "unitSphere";
|
||||
public static final String UNITCYLINDER = "unitCylinder";
|
||||
public static final String UNITCAPSULE = "unitCylinder";
|
||||
public static final String UNITCAPSULE = "Models/basic/geometry/unitcapsule.glb";
|
||||
public static final String UNITCUBE = "unitCube";
|
||||
public static final String MODEL_PARTICLE = "particleModel";
|
||||
public static final String TEXTURE_PARTICLE = "particleTexture";
|
||||
@ -35,6 +35,9 @@ public class AssetDataStrings {
|
||||
*/
|
||||
public static final String TEXTURE_TEAL_TRANSPARENT = "Textures/color/transparent_teal.png";
|
||||
public static final String TEXTURE_RED_TRANSPARENT = "Textures/transparent_red.png";
|
||||
public static final String TEXTURE_YELLOW_TRANSPARENT = "Textures/color/transparent_yellow.png";
|
||||
public static final String TEXTURE_BLUE_TRANSPARENT = "Textures/transparent_blue.png";
|
||||
public static final String TEXTURE_GREY_TRANSPARENT = "Textures/transparent_grey.png";
|
||||
public static final String TEXTURE_BLACK = "Textures/b1.png";
|
||||
public static final String TEXTURE_WHITE = "Textures/w1.png";
|
||||
public static final String TEXTURE_OFF_WHITE = "Textures/ow1.png";
|
||||
|
||||
@ -147,7 +147,7 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
}
|
||||
if(data.getGridAlignedData() != null){
|
||||
GridAlignedData gridAlignedData = data.getGridAlignedData();
|
||||
Texture texture = Globals.assetManager.fetchTexture("Textures/transparent_blue.png");
|
||||
Texture texture = Globals.assetManager.fetchTexture(AssetDataStrings.TEXTURE_BLUE_TRANSPARENT);
|
||||
if(texture != null){
|
||||
texture.bind(openGLState);
|
||||
}
|
||||
@ -190,35 +190,35 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
switch(data.getType()){
|
||||
case HitboxData.HITBOX_TYPE_BLOCK_CONNECTED: {
|
||||
if(shapeStatus.getHadCollision()){
|
||||
return "Textures/color/transparent_yellow.png";
|
||||
return AssetDataStrings.TEXTURE_YELLOW_TRANSPARENT;
|
||||
}
|
||||
if(shapeStatus.isActive()){
|
||||
return "Textures/transparent_blue.png";
|
||||
return AssetDataStrings.TEXTURE_BLUE_TRANSPARENT;
|
||||
}
|
||||
return "Textures/transparent_grey.png";
|
||||
return AssetDataStrings.TEXTURE_GREY_TRANSPARENT;
|
||||
}
|
||||
case HitboxData.HITBOX_TYPE_HIT:
|
||||
case HitboxData.HITBOX_TYPE_HIT_CONNECTED: {
|
||||
if(shapeStatus.getHadCollision()){
|
||||
return "Textures/color/transparent_yellow.png";
|
||||
return AssetDataStrings.TEXTURE_YELLOW_TRANSPARENT;
|
||||
}
|
||||
if(shapeStatus.isActive()){
|
||||
if(shapeStatus.isBlockOverride()){
|
||||
return "Textures/transparent_blue.png";
|
||||
return AssetDataStrings.TEXTURE_BLUE_TRANSPARENT;
|
||||
}
|
||||
return "Textures/transparent_red.png";
|
||||
return AssetDataStrings.TEXTURE_RED_TRANSPARENT;
|
||||
}
|
||||
return "Textures/transparent_grey.png";
|
||||
return AssetDataStrings.TEXTURE_GREY_TRANSPARENT;
|
||||
}
|
||||
case HitboxData.HITBOX_TYPE_HURT:
|
||||
case HitboxData.HITBOX_TYPE_HURT_CONNECTED: {
|
||||
if(shapeStatus.getHadCollision()){
|
||||
return "Textures/color/transparent_yellow.png";
|
||||
return AssetDataStrings.TEXTURE_YELLOW_TRANSPARENT;
|
||||
}
|
||||
return "Textures/transparent_grey.png";
|
||||
return AssetDataStrings.TEXTURE_GREY_TRANSPARENT;
|
||||
}
|
||||
}
|
||||
return "Textures/transparent_grey.png";
|
||||
return AssetDataStrings.TEXTURE_GREY_TRANSPARENT;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -236,7 +236,7 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
case CollidableTemplate.COLLIDABLE_TYPE_CYLINDER: {
|
||||
if((physicsGraphicsModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITCYLINDER)) != null){
|
||||
//set color based on collision status, type, etc
|
||||
Texture texture = Globals.assetManager.fetchTexture("Textures/transparent_blue.png");
|
||||
Texture texture = Globals.assetManager.fetchTexture(AssetDataStrings.TEXTURE_BLUE_TRANSPARENT);
|
||||
if(texture != null){
|
||||
texture.bind(openGLState);
|
||||
}
|
||||
@ -254,7 +254,7 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
case CollidableTemplate.COLLIDABLE_TYPE_CUBE: {
|
||||
if((physicsGraphicsModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITCUBE)) != null){
|
||||
//set color based on collision status, type, etc
|
||||
Texture texture = Globals.assetManager.fetchTexture("Textures/transparent_blue.png");
|
||||
Texture texture = Globals.assetManager.fetchTexture(AssetDataStrings.TEXTURE_BLUE_TRANSPARENT);
|
||||
if(texture != null){
|
||||
texture.bind(openGLState);
|
||||
}
|
||||
@ -273,7 +273,7 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
case CollidableTemplate.COLLIDABLE_TYPE_CAPSULE: {
|
||||
if((physicsGraphicsModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITCAPSULE)) != null){
|
||||
//set color based on collision status, type, etc
|
||||
Texture texture = Globals.assetManager.fetchTexture("Textures/transparent_blue.png");
|
||||
Texture texture = Globals.assetManager.fetchTexture(AssetDataStrings.TEXTURE_BLUE_TRANSPARENT);
|
||||
if(texture != null){
|
||||
texture.bind(openGLState);
|
||||
}
|
||||
@ -328,7 +328,7 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
if(geom instanceof DCapsule){
|
||||
DCapsule capsuleView = (DCapsule)geom;
|
||||
HitboxState shapeStatus = hitboxState.getShapeStatus(geom);
|
||||
if((hitboxModel = Globals.assetManager.fetchModel("Models/basic/geometry/unitcapsule.glb")) != null){
|
||||
if((hitboxModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITCYLINDER)) != null){
|
||||
//set color based on collision status, type, etc
|
||||
Texture texture = Globals.assetManager.fetchTexture(getHitboxColor(shapeStatus,shapeStatus.getHitboxData()));
|
||||
if(texture != null){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user