Skip to content

Commit

Permalink
Fix beauty spot and draw mode line
Browse files Browse the repository at this point in the history
  • Loading branch information
armin-reichert committed Aug 4, 2024
1 parent 5525786 commit 75a3e32
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ public MsPacMan3D(GameContext context, Pac msPacMan, double size, Model3D model3
hipSwaying = new HipSwaying(bodyGroup);
hipSwaying.setWinnetouchMode(false);

// for wireframe mode
Stream.of(PacModel3D.MESH_ID_EYES, PacModel3D.MESH_ID_HEAD, PacModel3D.MESH_ID_PALATE)
.map(id -> meshViewById(bodyGroup, id))
.forEach(meshView -> meshView.drawModeProperty().bind(drawModePy));
meshViewById(body, PacModel3D.MESH_ID_EYES).drawModeProperty().bind(drawModePy);
meshViewById(body, PacModel3D.MESH_ID_HEAD).drawModeProperty().bind(drawModePy);
meshViewById(body, PacModel3D.MESH_ID_PALATE).drawModeProperty().bind(drawModePy);
meshViewById(jaw, PacModel3D.MESH_ID_HEAD).drawModeProperty().bind(drawModePy);
meshViewById(jaw, PacModel3D.MESH_ID_PALATE).drawModeProperty().bind(drawModePy);
}

@Override
Expand Down
10 changes: 5 additions & 5 deletions ui-3d/src/main/java/de/amr/games/pacman/ui3d/level/PacMan3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,11 @@ public PacMan3D(GameContext context, Pac pacMan, double size, Model3D model3D) {
context.assets().color("pacman.color.eyes"),
context.assets().color("pacman.color.palate")
);
meshViewById(body, PacModel3D.MESH_ID_EYES).drawModeProperty().bind(drawModePy);
meshViewById(body, PacModel3D.MESH_ID_HEAD).drawModeProperty().bind(drawModePy);
meshViewById(body, PacModel3D.MESH_ID_PALATE).drawModeProperty().bind(drawModePy);

jaw = PacModel3D.createPacSkull(
model3D, size,
context.assets().color("pacman.color.head"),
context.assets().color("pacman.color.palate"));
meshViewById(jaw, PacModel3D.MESH_ID_HEAD).drawModeProperty().bind(drawModePy);
meshViewById(jaw, PacModel3D.MESH_ID_PALATE).drawModeProperty().bind(drawModePy);

bodyGroup.getChildren().addAll(body, jaw);
bodyGroup.getTransforms().add(rotation);
Expand All @@ -108,6 +103,11 @@ public PacMan3D(GameContext context, Pac pacMan, double size, Model3D model3D) {
headBanging = new HeadBanging(bodyGroup);
headBanging.setStrokeMode(false);

meshViewById(body, PacModel3D.MESH_ID_EYES).drawModeProperty().bind(drawModePy);
meshViewById(body, PacModel3D.MESH_ID_HEAD).drawModeProperty().bind(drawModePy);
meshViewById(body, PacModel3D.MESH_ID_PALATE).drawModeProperty().bind(drawModePy);
meshViewById(jaw, PacModel3D.MESH_ID_HEAD).drawModeProperty().bind(drawModePy);
meshViewById(jaw, PacModel3D.MESH_ID_PALATE).drawModeProperty().bind(drawModePy);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ static Group createFemaleParts(double pacSize, Color hairBowColor, Color hairBow
pearlRight.setMaterial(pearlMaterial);

var beautySpot = new Sphere(0.5);
beautySpot.getTransforms().addAll(new Translate(-2.5, -4.5, pacSize * 0.33));
beautySpot.setMaterial(coloredMaterial(Color.rgb(100, 100, 100)));
beautySpot.getTransforms().addAll(new Translate(-4.5, -5.5, -2));
beautySpot.setMaterial(coloredMaterial(Color.rgb(120, 120, 120)));

var silicone = coloredMaterial(boobsColor);

Expand Down

0 comments on commit 75a3e32

Please sign in to comment.