Skip to content

Commit 45b4911

Browse files
committed
refactoring
1 parent df0d784 commit 45b4911

1 file changed

Lines changed: 14 additions & 25 deletions

File tree

src/main/java/com/ss/editor/Editor.java

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ public void simpleInitApp() {
280280

281281
// create preview view port
282282
previewCamera = cam.clone();
283+
283284
previewViewPort = renderManager.createPostView("Preview viewport", previewCamera);
284285
previewViewPort.setClearFlags(true, true, true);
285286
previewViewPort.attachScene(previewNode);
@@ -293,7 +294,6 @@ public void simpleInitApp() {
293294
flyCam.setDragToRotate(true);
294295
flyCam.setEnabled(false);
295296

296-
297297
final FilterPostProcessor postProcessor = getPostProcessor();
298298

299299
fxaaFilter = new FXAAFilter();
@@ -534,8 +534,7 @@ public void updatePreviewLightProbe(@NotNull final JobProgressAdapter<LightProbe
534534
/**
535535
* @return the light probe.
536536
*/
537-
@Nullable
538-
private LightProbe getLightProbe() {
537+
private @Nullable LightProbe getLightProbe() {
539538
return lightProbe;
540539
}
541540

@@ -544,24 +543,21 @@ private LightProbe getLightProbe() {
544543
*
545544
* @return The preview view port.
546545
*/
547-
@NotNull
548-
public ViewPort getPreviewViewPort() {
546+
public @NotNull ViewPort getPreviewViewPort() {
549547
return notNull(previewViewPort);
550548
}
551549

552550
/**
553551
* @return the preview light probe.
554552
*/
555-
@Nullable
556-
private LightProbe getPreviewLightProbe() {
553+
private @Nullable LightProbe getPreviewLightProbe() {
557554
return previewLightProbe;
558555
}
559556

560557
/**
561558
* @return the environment camera.
562559
*/
563-
@Nullable
564-
private EnvironmentCamera getEnvironmentCamera() {
560+
private @Nullable EnvironmentCamera getEnvironmentCamera() {
565561
return environmentCamera;
566562
}
567563

@@ -570,16 +566,14 @@ private EnvironmentCamera getEnvironmentCamera() {
570566
*
571567
* @return the camera for preview.
572568
*/
573-
@NotNull
574-
public Camera getPreviewCamera() {
569+
public @NotNull Camera getPreviewCamera() {
575570
return notNull(previewCamera);
576571
}
577572

578573
/**
579574
* @return the preview environment camera.
580575
*/
581-
@Nullable
582-
private EnvironmentCamera getPreviewEnvironmentCamera() {
576+
private @Nullable EnvironmentCamera getPreviewEnvironmentCamera() {
583577
return previewEnvironmentCamera;
584578
}
585579

@@ -588,8 +582,7 @@ private EnvironmentCamera getPreviewEnvironmentCamera() {
588582
*
589583
* @return the node for preview.
590584
*/
591-
@NotNull
592-
public Node getPreviewNode() {
585+
public @NotNull Node getPreviewNode() {
593586
return notNull(previewNode);
594587
}
595588

@@ -598,8 +591,7 @@ public Node getPreviewNode() {
598591
*
599592
* @return the filter of color correction.
600593
*/
601-
@NotNull
602-
public ToneMapFilter getToneMapFilter() {
594+
public @NotNull ToneMapFilter getToneMapFilter() {
603595
return notNull(toneMapFilter);
604596
}
605597

@@ -608,17 +600,16 @@ public ToneMapFilter getToneMapFilter() {
608600
*
609601
* @return The FXAA filter.
610602
*/
611-
public FXAAFilter getFXAAFilter() {
612-
return fxaaFilter;
603+
public @NotNull FXAAFilter getFXAAFilter() {
604+
return notNull(fxaaFilter);
613605
}
614606

615607
/**
616608
* Gets translucent bucket filter.
617609
*
618610
* @return the translucent bucket filter.
619611
*/
620-
@NotNull
621-
public TonegodTranslucentBucketFilter getTranslucentBucketFilter() {
612+
public @NotNull TonegodTranslucentBucketFilter getTranslucentBucketFilter() {
622613
return notNull(translucentBucketFilter);
623614
}
624615

@@ -636,8 +627,7 @@ void setPaused(final boolean paused) {
636627
*
637628
* @return the gui font.
638629
*/
639-
@Nullable
640-
public BitmapFont getGuiFont() {
630+
public @Nullable BitmapFont getGuiFont() {
641631
return notNull(guiFont);
642632
}
643633

@@ -646,8 +636,7 @@ public BitmapFont getGuiFont() {
646636
*
647637
* @return the default material.
648638
*/
649-
@NotNull
650-
public Material getDefaultMaterial() {
639+
public @NotNull Material getDefaultMaterial() {
651640
return notNull(defaultMaterial);
652641
}
653642
}

0 commit comments

Comments
 (0)