Skip to content

Commit

Permalink
WIP #12: correct DAMCON team selection rendering, alpha tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmaxfrank committed Jan 30, 2016
1 parent 60d9494 commit d30e90c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Damcon implements MouseListener, MouseMotionListener, MouseWheelLis
private static final int WIDTH = 400, HEIGHT = 300;

private static final Color WIREFRAME_COLOR = Color.BLUE;
private static final float ALPHA = 0.9f;
private static final float WIREFRAME_ALPHA = 0.95f;

private static final Transform3D DEFAULT_CAMERA_VIEW = new Transform3D(new double[] {
0.6954015757171349d, 0.4658852009660681d, -0.5471449789689495d, -2.0244364221851137d,
Expand Down Expand Up @@ -252,7 +252,7 @@ private static Appearance getWireframeAppearance(int line_attributes_pattern) {
Appearance appearance = new Appearance();

// Set transparency
TransparencyAttributes transparency = new TransparencyAttributes(TransparencyAttributes.NICEST, ALPHA);
TransparencyAttributes transparency = new TransparencyAttributes(TransparencyAttributes.NICEST, WIREFRAME_ALPHA);
appearance.setTransparencyAttributes(transparency);

// Enable automatic anti-aliasing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class InternalNode extends InternalSelectable {
private VesselNode vesselNode;

public InternalNode(VesselNode vessel_node) {
alpha = 0.3f;
alpha = 0.4f;

this.vesselNode = vessel_node;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class InternalTeam extends InternalSelectable {
public InternalTeam(EngineeringConsoleManager.EnhancedDamconStatus damcon_status) {
this.status = damcon_status;

alpha = 0.1f;
alpha = 0.25f;

this.branchGroup = new BranchGroup();

Expand All @@ -32,7 +32,6 @@ public InternalTeam(EngineeringConsoleManager.EnhancedDamconStatus damcon_status
updatePos(this.status.getX(), this.status.getY(), this.status.getZ());
this.transformGroup.addChild(sphere);
this.transformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);

this.branchGroup.addChild(transformGroup);
}

Expand All @@ -51,16 +50,6 @@ public void updateHealth(float pct) {
sphere.setAppearance(appearanceFromHealthPercentage());
}

@Override
public Appearance appearanceFromHealthPercentage() {
Appearance app = super.appearanceFromHealthPercentage();

// TODO: > damcon team coloration?
app.setMaterial(new Material(BLACK, new Color3f(0f, 0f, 1f), BLACK, BLACK, SHININESS));

return app;
}

@Override
public String toString() {
return this.status.toString();
Expand Down

0 comments on commit d30e90c

Please sign in to comment.