Skip to content

Latest commit

 

History

426 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

J3Engine

J3Engine Logo

A (Work-In-Progress) CAD-inspired 3D Geometry Editor written in Java from scratch using only the Java Standard Library and Swing's 2D drawing capabilities.

all with no existing, external 3D library used. all code to project and transform and others are handcrafted. See Vector3

J3Engine is a standalone desktop app.

(This project comes in 2 versions, this version the actual hobby project development and then the PAT version with the features being enar identical with only a few minor differences)

Installation & Run

Man just run the .jar or .msi man with like Java 21 and you good.

Screenshots & Features

Screenshot showcasing a complex scene with muliple prisms, a cone, some broken geometry a curve and 3 triangles stacked along the Z axis. Also shows the "camera orbit" command feedback.

  • Complex 3D scene with multiple geometry types
  • Prisms, cone, curves, triangles
  • Camera orbit command
  • 3D rendering and spatial layering

Screenshot showcasing the command palette's typing hints and suggestions as the user types "prism" command which expects a Vector3 object

  • Command palette
  • Live command suggestions
  • Typed argument hints
  • Vector3/Color/UUID(reoslve to referenced object) support

Screenshot as a continution of the above, where the prism is in a ghost form as the user can use the arrow keys to increase the radius or side amount. The properties and layers panels are also open

  • Ghost/preview geometry
  • Interactive prism creation
  • Keyboard controlled radius/side count
  • Properties panel
  • Layers panel

Screenshot as a continution of above where the current scene is depicted in wireframe mode and is in the process of being selected with a yellow square. The layers panel now has the new prism from before and the properties panel has generic properies which all show (multiple values)

  • Wireframe view mode
  • Rectangle based selection
  • Multi-object selection
  • Layers panel
  • Properties panel with generic/multiple types

Screenshot showcasing the in-app documentation along side having loaded a completely different engine theme called "Espresso" Which changes the colours of UI and the backgorund to be a warm brown as compared to the default engine colour being a "corporate" teal hue. The user also has a sub-menu open having clicked tje Geometry Tools button from the Toolbox next to the properties button.

  • In-app documentation. See
  • Other engine themes.
  • Geometry Tools toolbox submenu

Screenshot showcasing the user having loaded another much brighter blue theme, along side having typed "e" in the command palette which gives the user all the command sstarting or containing "e" along with the option to right-click to autocomplete. There is also, a Grid2dPanel being showcased which acts as a 2D drafting canvas for creating points and lines in a 2D panel then projecting it by defining the plane the points may live on. The projection is shown in the world and the position of the mouse is shown too.

  • Custom theme support
  • Command palette suggestions and autocomplete (Right click)
  • 2d drafting via Grid2dPanel
  • Creating points and lines in 2D and projecting then into 3D
  • Mouse-position feedback

Screenshot showcasing the transform rotate subcommand working on a prism where the user has selected the X handle and a circle and axis appear showing the user how the object selected will rotate.

  • transform rotate command
  • interactive rotate handles
  • Rotation axis visualization
  • Object transformation preview

Screenshot showcasing the properties panel. A line is selected and by the object count, it can be deduced its 2 points have also been selected however the combo box within the panel shows "line", so the properties panel will filter all other objects and only show the properties of selected lines hence showing all properties for the line that was once hidden.

  • Properties panel output
  • Object-type filtering
  • Generic properties
  • Selection of dependent geometry (line, with it's points)

Highlight Commands

(See Aliases to see how command and subcommand aliases work)

(All links below link to the source code of the command/tool)

  • transform <subcommand> - Transform a selection of objects
    • transform translate [p|f|t] : Translate tool
    • transform rotate [p|f|t] <vector3?> : Rotate tool
    • transform scale [p|v|t] : Scale tool
    • transform qtrans : Quick-Translate tool
  • camera <subcommand> - Camera commands
    • camera orbit : Orbit tool (Change the camera yaw/pitch or orbit around world centre)
  • clipboard <subcommand> - Clipboard related commands (keybinded to CTRL+C and CTRL+V)
    • clipboard copy : Copies the current selection to the J3Engine clipbaord
    • clipboard paste : Pastes whatever is in the J3Engine clipboard
  • extrude <triangle?> : Extrude a given triangle into a solid (or a selection if no triangle input is given)
  • prism <vector3> <vector3> <vector3?> <vector3?> <vector3?> <vector3?> : Creates a prism
  • join <subcommand?> : Joins a selection of points or otherwise into new geometry
    • Depending on what's selected, the command may call the appropriate subcommand o your behalf.
    • join line <point> <point> <point?> : Joins 2 points into a line or 3 points into a curve.
  • measure <subcommand?> : Measures the given geometry
    • Similar selection based handling semantics as join
    • measure line <vector3> <vector3> : Measure the distance between 2 positions
    • measure area <vector3> <Vector3> <vector3> : Measure the area between 3 positions as a triangle
    • measure volume <thing> : Measure the volume of a given Thing.
  • explode <any> : Explodes all geometry into constituent points, decimating all relationships and not storing in history.
  • debug <subcommand> : Commands for debugging mostly random engine internals. Such as echoing within the command palette or other stuff
  • ui <subcommand> : UI related commands.
    • ui toggle [history|grid2d|properties|...] : Toggle the visibility of floating panel ui.
  • create [point|tri|prism|...] : Create new geometry on the fly
  • engine <subcommand> : Engine related subcommands
    • engine exit <boolean> : Run the engine shutdown sequence
    • engine files : Open the location of J3Engine user files where things such as custom themes, preferences, log files, projects frame relating things are.
  • select <any> : Selects the given geometry.
  • help <any> : Provides help on the given command.

About

A CPU-based, CAD-inspired 3D object modelling app & internal graphics engine made purely in Java, designed to create and manipulate 3D objects with minimal processing overhead and no GPU dependency.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages