Skip to content

Commit

Permalink
Refac
Browse files Browse the repository at this point in the history
  • Loading branch information
armin-reichert committed Jan 7, 2025
1 parent 6f590e1 commit 87628c8
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,26 @@ protected void invalidated() {
private final SubScene fxSubScene;
protected final Scores3D scores3D;

protected final AmbientLight ambientLight;
protected GameLevel3D level3D;
private Animation levelCompleteAnimation;

public PlayScene3D() {
var ambientLight = new AmbientLight();
ambientLight = new AmbientLight();
ambientLight.colorProperty().bind(PY_3D_LIGHT_COLOR);

var axes = new CoordinateSystem();
axes.visibleProperty().bind(PY_3D_AXES_VISIBLE);

scores3D = new Scores3D(SCORE_TEXT, HIGH_SCORE_TEXT);

// last child is placeholder for level 3D
getChildren().addAll(scores3D, axes, ambientLight, new Group());

// initial size is irrelevant, it is bound to parent scene later
fxSubScene = new SubScene(this, 42, 42, true, SceneAntialiasing.BALANCED);
fxSubScene.setFill(Color.TRANSPARENT);
fxSubScene.cameraProperty().bind(perspectiveNamePy.map(name -> perspective().getCamera()));
ambientLight.colorProperty().bind(PY_3D_LIGHT_COLOR);
axes.visibleProperty().bind(PY_3D_AXES_VISIBLE);
}

@Override
Expand Down

0 comments on commit 87628c8

Please sign in to comment.