From: Svjatoslav Agejenko Date: Tue, 24 Feb 2026 21:59:31 +0000 (+0200) Subject: Added AGENTS.md documenting project structure, building, and running instructions. X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=sixth-3d-demos.git Added AGENTS.md documenting project structure, building, and running instructions. --- diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a388798 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,105 @@ +# Project Overview + +Sixth 3D Demos is a collection of demo applications showcasing the Sixth 3D rendering engine. It features interactive 3D visualizations including Conway's Game of Life, galaxy simulations, and various geometric demos. + +## Build and Test Commands + +### Build the project +```bash +mvn clean package +``` + +### Compile only (without packaging) +```bash +mvn clean compile +``` + +### Run the application +```bash +java -jar target/sixth-3d-demos.jar +``` + +### Generate API documentation +```bash +mvn javadoc:javadoc +``` + +### Run a specific demo directly +```bash +# Run the launcher +java -cp target/sixth-3d-demos.jar eu.svjatoslav.sixth.e3d.examples.launcher.Main + +# Run Game of Life demo +java -cp target/sixth-3d-demos.jar eu.svjatoslav.sixth.e3d.examples.life_demo.Main + +# Run Point Cloud Galaxy demo +java -cp target/sixth-3d-demos.jar eu.svjatoslav.sixth.e3d.examples.galaxy_demo.PointCloudDemo +``` + +### Testing +This project currently has no automated tests. Testing is done manually by running the demo applications. + +## Code Organization + +``` +src/main/java/eu/svjatoslav/sixth/e3d/examples/ +├── launcher/ - Application launcher and GUI +│ ├── Main.java - Main entry point +│ └── ApplicationListPanel.java +├── life_demo/ - Conway's Game of Life 3D demo +│ ├── Main.java +│ ├── Cell.java +│ ├── Matrix.java +│ └── Star.java +├── galaxy_demo/ - Galaxy simulation demo +│ ├── Galaxy.java +│ └── PointCloudDemo.java +├── RandomPolygonsDemo.java +├── OctreeDemo.java +├── GraphDemo.java +├── TextEditorDemo.java +├── TextEditorDemo2.java +├── RainingNumbersDemo.java +└── package-info.java +``` + +## Code Style Guidelines + +### Java Version +- Java 8 (source and target compatibility) + +### Indentation and Formatting +- Use 4 spaces for indentation (no tabs) + +## External Dependencies + +| Dependency | Version | Description | +|------------|---------|-------------| +| sixth-3d | 1.3-SNAPSHOT | 3D rendering engine | +| svjatoslavcommons | 1.8 | Utility library | + +Both are available from the svjatoslav.eu Maven repository. + +## Common Patterns in This Codebase + +### Creating a Demo Application +1. Create a class with a `main` method +2. Create a `ViewFrame` to display the 3D scene +3. Get the `ShapeCollection` from the view panel +4. Add shapes to the collection +5. Optionally set up user input handling + +### Extending AbstractCompositeShape +Use this pattern for creating composite 3D objects: +```java +public class MyShape extends AbstractCompositeShape { + public MyShape(Transform transform) { + super(transform); + // Add child shapes using addShape() + } +} +``` + +### Handling User Input +Implement `MouseInteractionController` for mouse events, or extend input tracker classes for keyboard input. +