refactor: rename MyFirstScene to MinimalExample
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 15 Mar 2026 22:46:16 +0000 (00:46 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 15 Mar 2026 22:46:16 +0000 (00:46 +0200)
Rename class for clarity - it's the minimal working example from

the documentation.

src/main/java/eu/svjatoslav/sixth/e3d/examples/MinimalExample.java [new file with mode: 0644]
src/main/java/eu/svjatoslav/sixth/e3d/examples/MyFirstScene.java [deleted file]
src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/ApplicationListPanel.java

diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/MinimalExample.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/MinimalExample.java
new file mode 100644 (file)
index 0000000..af755e8
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Sixth 3D engine demos. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
+ *
+ */
+package eu.svjatoslav.sixth.e3d.examples;
+
+import eu.svjatoslav.sixth.e3d.geometry.Point3D;
+import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
+import eu.svjatoslav.sixth.e3d.math.Transform;
+import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
+import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
+import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.solid.SolidPolygonRectangularBox;
+
+/**
+ * Minimal example demonstrating how to create a basic 3D scene.
+ * <p>
+ * Creates a window with a single red box. This is the "Create Your First 3D Scene"
+ * example from the Sixth 3D documentation.
+ */
+public class MinimalExample {
+
+    /**
+     * Entry point for the minimal scene demo.
+     * @param args command line arguments (ignored)
+     */
+    public static void main(String[] args) {
+        ViewFrame viewFrame = new ViewFrame();
+        ShapeCollection shapes = viewFrame.getViewPanel().getRootShapeCollection();
+
+        Transform boxTransform = new Transform(new Point3D(0, 0, 0), 0, 0);
+        SolidPolygonRectangularBox box = new SolidPolygonRectangularBox(
+                new Point3D(-50, -50, -50),
+                new Point3D(50, 50, 50),
+                Color.RED
+        );
+        box.setTransform(boxTransform);
+        shapes.addShape(box);
+
+        viewFrame.getViewPanel().getCamera().getTransform().setTranslation(new Point3D(0, -100, -300));
+
+        viewFrame.getViewPanel().ensureRenderThreadStarted();
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/MyFirstScene.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/MyFirstScene.java
deleted file mode 100644 (file)
index ffef135..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Sixth 3D engine demos. Author: Svjatoslav Agejenko.
- * This project is released under Creative Commons Zero (CC0) license.
- *
- */
-package eu.svjatoslav.sixth.e3d.examples;
-
-import eu.svjatoslav.sixth.e3d.geometry.Point3D;
-import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
-import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
-import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
-import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.solid.SolidPolygonRectangularBox;
-
-/**
- * Minimal example demonstrating how to create a basic 3D scene.
- * <p>
- * Creates a window with a single red box. This is the "Create Your First 3D Scene"
- * example from the Sixth 3D documentation.
- */
-public class MyFirstScene {
-
-    /**
-     * Entry point for the minimal scene demo.
-     * @param args command line arguments (ignored)
-     */
-    public static void main(String[] args) {
-        ViewFrame viewFrame = new ViewFrame();
-        ShapeCollection shapes = viewFrame.getViewPanel().getRootShapeCollection();
-
-        Transform boxTransform = new Transform(new Point3D(0, 0, 0), 0, 0);
-        SolidPolygonRectangularBox box = new SolidPolygonRectangularBox(
-                new Point3D(-50, -50, -50),
-                new Point3D(50, 50, 50),
-                Color.RED
-        );
-        box.setTransform(boxTransform);
-        shapes.addShape(box);
-
-        viewFrame.getViewPanel().getCamera().getTransform().setTranslation(new Point3D(0, -100, -300));
-
-        viewFrame.getViewPanel().ensureRenderThreadStarted();
-    }
-}
\ No newline at end of file
index f34148c..bd0d9a8 100644 (file)
@@ -7,7 +7,7 @@
 package eu.svjatoslav.sixth.e3d.examples.launcher;
 
 import eu.svjatoslav.sixth.e3d.examples.GraphDemo;
-import eu.svjatoslav.sixth.e3d.examples.MyFirstScene;
+import eu.svjatoslav.sixth.e3d.examples.MinimalExample;
 import eu.svjatoslav.sixth.e3d.examples.OctreeDemo;
 import eu.svjatoslav.sixth.e3d.examples.RandomPolygonsDemo;
 import eu.svjatoslav.sixth.e3d.examples.RainingNumbersDemo;
@@ -33,9 +33,9 @@ class ApplicationListPanel extends JPanel {
     private record DemoEntry(String name, String description, AbstractAction action) {}
 
     private static final DemoEntry[] DEMOS = {
-        new DemoEntry("My First Scene",
+        new DemoEntry("Minimal Example",
                 "Minimal example showing a single red box",
-                new ShowMyFirstScene()),
+                new ShowMinimalExample()),
         new DemoEntry("Volumetric Octree",
                 "Octree-based rendering with on-demand raytracing",
                 new ShowOctree()),
@@ -107,14 +107,14 @@ class ApplicationListPanel extends JPanel {
                 .addGroup(horizontalDescGroup));
     }
 
-    private static class ShowMyFirstScene extends AbstractAction {
-        ShowMyFirstScene() {
-            putValue(NAME, "My First Scene");
+    private static class ShowMinimalExample extends AbstractAction {
+        ShowMinimalExample() {
+            putValue(NAME, "Minimal Example");
         }
 
         @Override
         public void actionPerformed(final ActionEvent e) {
-            MyFirstScene.main(null);
+            MinimalExample.main(null);
         }
     }