Sonntag, 14. September 2014

JavaFX-3D-Editor - Update 11.1

This week I didn't commit new features, beacuse there where several bugs in the last update.

The bugfixes:

  •  API-comments to implement new painting tools
  • nested CGOs can be saved

JAR and sources: https://github.com/gundermann/JFX3D


Sonntag, 7. September 2014

JavaFx-3D-Editor - Update 11

It's been two weeks ago since you heard something of the Fx3De from myself.


The reason is that I tried to make the code of the program a bit more comfortable in order to make it easyer to implement new painting tools.
During this I change the notation of the .dxml-files. 

If you had already saved some 3d-models - sorry.
Joke! - If you have a .dxml-file you could use them with this update too.
The only thing you have to do for it, is to convert the files. 
Therefore you can use the converter-program I commited here: 
https://drive.google.com/file/d/0B1zC0qGiWz40ZDU2UUFMNXp4Mlk/edit?usp=sharing

Just choose your existing old .dxml-file and save it in the second step.
The editor will load the model with no difference.

Unfourtunally with this update you won't get any new tool.
But in this post you can read how to build your own painting tools:


If you want to try it - feel free to do it. But please sent me the code so that I can check this and give you the right to commit it ;-)

Have fun with the new update.

Source: https://github.com/gundermann/JFX3D

How to create new painting tools on Fx3De

Here I want to explain to you how to implement new painting tools for the Fx3De.

There are almost  steps to get a additional painting tool. I will show an example. (Ellipse)

1. This is the main steps. Here you have to define your tool. So first of all you need a class which extends from AbstractPaintableObject3D. 


 public class Ellipse3D extends AbstractPaintableObject3D

After this add all umimpleneted methods.

@Override

 public void changeHeightTo(double d) {
  // TODO Auto-generated method stub

  }

  @Override
 public void changeWidthTo(double d) {
  // TODO Auto-generated method stub

  }

  @Override
 public void paint(double x, double y, double initinalX, double initinalY) {
  // TODO Auto-generated method stub

  }

  @Override
 public DoubleProperty getHeightProperty() {
  // TODO Auto-generated method stub
  return null;
 }

  @Override
 public DoubleProperty getWidthProperty() {
  // TODO Auto-generated method stub
  return null;
 }

  @Override
 public Object3DFactory getFactory() {
  // TODO Auto-generated method stub
  return null;
 }

  @Override
 protected Class getShapeClass() {
  // TODO Auto-generated method stub
  return null;
 }

Done this you have to define the behavior by filling the mehtods in this class. The description of the methods will help you to da this.

If you implement the methods you can define additional properties of your new painting tool.
You do this by annotations. Notice that every property needs a Property-Annotation and a PropertyChange-Annotation. Consequently you need two methods. If you are not familliar with the Property-Framework please read this post:
http://javafxstuff.blogspot.de/2014/08/properiesonchange.html

Here is the example:

@Override

 public void changeHeightTo(double d) {
  // TODO Auto-generated method stub

  }

  @Override
 public void changeWidthTo(double d) {
  // TODO Auto-generated method stub

  }

  @Override
 public void paint(double x, double y, double initinalX, double initinalY) {
  // TODO Auto-generated method stub

  }

  @Override
 public DoubleProperty getHeightProperty() {
  // TODO Auto-generated method stub
  return null;
 }

  @Override
 public DoubleProperty getWidthProperty() {
  // TODO Auto-generated method stub
  return null;
 }

  @Override
 public Object3DFactory getFactory() {
  // TODO Auto-generated method stub
  return null;
 }

  @Override
 protected Class getShapeClass() {
  // TODO Auto-generated method stub
  return null;
 }


2. Implement a Factory. The Factory needs to entends the Object3DFactory. Just implement the unimplemented methods and the getInstance method:

public class Ellipse3DFactory extends Object3DFactory {

  private static Object3DFactory _instance;

  @Override
 public Object3D createPlainObject3D() {
  return new Ellipse3D();
 }

  public static Object3DFactory getInstance() {
  if(_instance == null)
   _instance = new Ellipse3DFactory();
  return _instance;
 }

  @Override
 public String getType() {
  return "Ellipse";
 }

}




3. Set up a Painting-Value for the new painting tool in the Painting-Enum:

Rectangle, Ellipse, None;


4. Connect the Painting-Value from the Painting-Enum with the Factory. You do this in the FactoryPaintingAssoziator. Just extends the map in the method getFactoryFromPaintingMode:

public Map getFactoryFormPaintingMode() {
  Map paintingStartListener = new HashMap();
  paintingStartListener.put(Painting.Rectangle,
    Rectangle3DFactory.getInstance());
  paintingStartListener.put(Painting.Ellipse,
    Ellipse3DFactory.getInstance());
  return paintingStartListener;
 }


6. To persist the new painting tool you also have to connect the factory with a preference-type. You do this by extendsing the map in the method getFactoryFromPreference of the FactoryPreferenceTypeAssoziator:


public Object3DFactory getFactoryFormPreference(String type) {
  Map paintingStartListener = new HashMap();
  paintingStartListener
    .put("Rectangle", Rectangle3DFactory.getInstance());
  paintingStartListener.put("Ellipse", Ellipse3DFactory.getInstance());
  paintingStartListener.put("complex",
    ComplexObject3DFactory.getInstance());
  return paintingStartListener.get(type);
 }


Notice that the String refered to the Factory has to be equal to the value returned by the method getType in the factory-class.

7. UI changes.
To choose your new painting tool you have to change the UI. So open the paintingmenu.fxml with the SceneBuilder and add a new button. During that son't forgett to define an On-Action-Method for this button. Done this you have to implement the On-Action-Method in the PaintingMenuController:

@FXML
 public void selectPaintEllipse() {
  actualPaintingArea.initPainting(Painting.Ellipse);
 }


I hope it works :-D
If not please sent me an email: gundermann.niels.ng@googlemail.com

Sonntag, 24. August 2014

JavaFX-3D-Editor - Update 10

Hey hey, this is update 10 of the JavaFX-3D-Editor (Fx3De).

With this update you got two new features. 



  1.  A loading bar in the menu bar.
  2.  The ability to zoom into the painting area.


Check out the sources and try it: github.com/gundermann/JFX3D

For a whole list of features check out the full description: javafxstuff.blogspot.de/p/javafx-3d-editor.html

Dienstag, 19. August 2014

ProperiesOnChange

This little feature is an extraction of my JavaFX-3D-Editor you can see on the post: http://javafxstuff.blogspot.de/p/javafx-3d-editor.html

It is about Objects including properties. Properties may has to be changed during the execution of a program. JavaFX gives a nice implementation for properties. One benefit of them is binding. That means that you can bind two properties. Let's say we bind property A to B.
If I change the value of property B, the value of A will be updated by the JavaFX Framework. I use this feature very often.
This little implementation (I don't want to call it framework, because it too small) provides a UI to change properties of an object. This properties can be bind to an other property and will be updated as soon as you change the property in the UI.

You can find the implementation on: https://drive.google.com/file/d/0B1zC0qGiWz40U2hWc0oyQWlLNEk/edit?usp=sharing

Just include the jar-file into your build-path.

The following little example shows the using of the PropertiesOnChange.



  1. Include the jar-file into your build-path.
  2. Set up you Class including the properties
    public class TestPropertyObject {
    
     DoubleProperty testProperty = new SimpleDoubleProperty();
    
     @Property(hasChildren=false, name="test")
     public DoubleProperty getTestProperty() {
      return testProperty;
     }
    
     @PropertyChange(hasChildren = false, name = "test")
     public void setTestProperty(double value) {
      this.testProperty.set(value);
      System.out.println(getTestProperty().get());
     }
    }
    
  3. Include the UI into a stage and set up the property-object to the UI.
    public class Lauch extends Application {
    
     @Override
     public void start(Stage stage) throws Exception {
      GUIManipulatingMenu guiManipulatingMenu = new GUIManipulatingMenu();
      guiManipulatingMenu.setPropertyObject(new TestPropertyObject());
      
      Scene s = new Scene(guiManipulatingMenu);
      stage.setScene(s);
      stage.show();
    
     }
     
     public static void main(String[] args) {
      launch(args);
     }
    
  4. Do some changes!


Give me some feedback, please ;-)

Sonntag, 17. August 2014

JavaFX-3D-Editor - Update 9

Here comes the latest update of the JavaFX-3D-editor.

With this update you are able to work with animations.





Unfortunately you cannot save them. But you can show them. 
Just select an GO and open the menu "Animation". There you can setup the time and the properties you want to change.

Watch the Video to get an idea of the handling of animations:



Have fun!

If you want to contact me use my emailadress: gundermann.niels.ng@googlemail.com

Or follw me on twitter: https://twitter.com/NGJFXaA

You will find the sources on github: https://github.com/gundermann/JFX3D

Mittwoch, 13. August 2014

JavaFx-3D-Editor Patch 8.1

This is a bugfix from the last update (8). If you noticed you can not save an ellipse. You can paint them and modify them but there was no chance to persist them.

With this patch you will be able to do this!

So check out the latest version of the JavaFx-3d-Editor.

Source: https://github.com/gundermann/JFX3D

Follow on twitter: https://twitter.com/NGJFXaA

Mittwoch, 6. August 2014

JavaFx-3D-Editor - Update 8

With this update the JavaFx-3D-Editor got a new design. You don’t have to handle different windows and put them in position. There is one window which contains all menus you need to create your 3D model.
Notice many of the features form other updates are unnecessary for now. (E.g. the M-Button of the menus)




I said something about animation of graphic-objects in further posts. This function doesn’t come with this update. It will be published with the next ;-)


Have a look at the sources: https://github.com/gundermann/JFX3D

Or load the JavaFx-3D-Editor as jar-file: https://github.com/gundermann/JFX3D/blob/master/3D/jfx3Deditor.jar

If you want to give comments as personal message use my email-adress: gundermann.niels.ng@googlemail.com

Follow on twitter: @NGJFXaA

And share it!

Samstag, 2. August 2014

SubScene works

Year it works!

The SubScene comming with java8 solved the problem I had with the including of a perspective camera into a node that is a child of a main scene.

So the new gui is prepared:



But there is another propblem comming with the SubScene:


  1. The nodes inserted into the root element of the SubScene are rendered quiet bad. Looks like I have to repaint them sometimes.
  2. The performance was better when using a separated Stage. You won't record that while handling a little amount of graphic elements. But if you load this house you will see the problem. 


No update for a long long time

The reason for the fact that there is no update since weeks is the restructure of the gui. I didin't like the many  moveable views any more. So there is the time for a new ui where you can act into one window. It is more useable than many windows.

To set the position of the menus was no problem.
In futur you will find them on the left side.
The MenuBar on top of the old design will stay.
The different PaintingAreas will fix their position next to the menus, like you can see in pic 1.

pic 1



But there is (or actually was) a propblem. To work with 3D graphics you need a perspective camera on your scene. When I separeted the PaintingArea it was no problem because I used a single stage with a scene for every Painting Area. Now I want to integrate the PaintingArea and can not use a scene. Of cause, I can set up a perspective camera to the main scene. But if I do this, every 3D graphic object could lay over any menu. That doesn't look cute and is not useable.

But I read that java 8 will fix the problem with subscene ;-)
Hope it works.

Dienstag, 29. Juli 2014

Step 8 - Building a house

Next step is to beginn with the building of the roof.
You have to build four brown rectangle to a big wood. The first four woods are on top of the last row of stone blocks. The other ones are rotated by 45° in  both directions of the z-axis. Five of them in the one direction and 5 in the other direction. Then every two woods rotated in different directions have to cover each other on the top. That is for the piek. Then you have to set them on top of the four woods on top of the stone blocks. Pay attention to the position of the piek. The piek has to be in the middle of the house.
I know there are some blocks lost. But I had no time to fix this.

This is the file to load the actual building: https://drive.google.com/file/d/0B1zC0qGiWz40ZkdWa1RMSVpoY28/edit?usp=sharing

Give comments and share, please.

Freitag, 25. Juli 2014

Animations with JavaFx-3D editor

This is a new feature of the JavaFx-3D editor comming soon.

See the video to get an idea of it.

If you want to try it, see the branch animation in the repo on github: https://github.com/gundermann/JFX3D
ATTENTION: only some properties are availeble for animation (rotation and position). And animation can not be saved jet.

If you are interested share this post, please.
For bugs and feedback send me an email, please.

Sonntag, 20. Juli 2014

Step 7 - Building a house

Here comes a new part of the example of building a house with the JavaFX-3D-Editor.

Without a door you can't get in. So there is a little wooded door on the front site. You will see it in the picture. Therefore I build wood with 6 brown rectangles. 5 big woods for the front and 2 little once for the back. Between the 5 gib woods I set a little space so that you can look trough them. If you want to know how to build this door please load the appended file called step7.dxml into the JavaFX-3D-Editor and split the component called door. (You will find the file in the whole example at the link below) Maybe it is better to summarize all other componentes to a componente calle house to differentiate them from the door components.



Can look through the door


Have a look at the whole example: http://javafxstuff.blogspot.de/p/javafx-3d-editor-building-house.html

If you try it please send me some feedback or wishes.
I hope I can show you some new features this week but the weather in germany is not good for coding ;-)

For feedback you got my email adress: gundermann.niels.ng@googlemail.com

You can download the sources on github: https://github.com/gundermann/JFX3D

And also follow me on twitter: @NGJFXaA

Sonntag, 13. Juli 2014

Building a house - Step 6

It takes time to build it up. I found some bug I had to fix last week. So I only can show you three big
walls. Next week I need a door for the house- Somebody who want to try out?






This is the dxml-file for this step: https://drive.google.com/file/d/0B1zC0qGiWz40YXlzOFpLT2pOaVU/edit?usp=sharing

Also follow on twitter: @NGJFXaA

Sonntag, 6. Juli 2014

JavaFX 3D Editor - Update 7

Here is the description of the new update. This week I only fixed some bugs. I found them by building a model of a house. You can follow the project on this site: http://javafxstuff.blogspot.com/p/javafx-3d-editor-building-house.html

Also follow on twitter for latest updates and bugfixes: @NGJFXaA


Here are the updates:
  1. If you save complex graphic objects (cgo) you will find some new tags in the dxml-file. These tags are used to save the name an position of the cgo.
    --> ATTENTION: dxml-schema had changed!!!
  2. Making a copy of an graphic object (go) will duplicate the right og. In the past it doesn't matter if you copieed a second or following og. The editor had inserted the first duplicated og.
  3. The background of a cgo is transparent and not white anymore.
  4. If you delete a og from the components menu it will be deleted from the painting area.
For errors and feedbacks plaese send me an email: gundermann.niels.ng@googlemail.com

You can find the sources on: https://github.com/gundermann/JFX3D

Samstag, 28. Juni 2014

JavaFX 3D Editor - Update 6

Sorry but it takes two weeks for this update.
I thought I could do implement some more features as I did, but there was only a little time during the two weeks.

To get the latest updates and information about new features follow us on twitter: @NGJFXaA

See how it looks like:


Let's see what I have realized:


  1. The "M"-Button
    You will find this button on every menu of the editor. It provides the moving of these menus. But I have to say that it is not very useable, because you have to stick over the button by moving the mouse.
  2. Settings for complex Objects
    Do you imagine what Complex-Objects are? They are a summarizing of typical 3D-Objects. Because of the different properties of 3D-Objects, Complex-Objects only have position- and rotation-properties.
  3. Separation of menus
    If you remember the manipulation-menu contains the properties of the selected 3D-object and the list of all used 3D-objects in the painting-area. These two different view are separated now. You will find the list of 3D-objects into the "Components Menu".
  4. Contexmenu for the list of components
    If you do a right-click into the "Components Menu" you will see a contextmenu. There you can copy, paste or delete the selected components. Mutliselection is also availeble. But there are several bugs in this release, so pay ATTENTION! If you selecte more than one component you can put them in a complex-object by opening the contexmenu and choose "summarize".
  5. Dimensiongrid and axis
    Axis are avalileble for the second time! If you have an look at the "Dimension Menu" you will see two new buttons. The button "Show Axis" obviously will show the x-, y-, and z-Axis in the actual painting-area. The other button "Show Grid" shows not a grid for now. It shows the three levels between the axis.
I hope that I don't forgot some new features. Otherwise you will find them on your own. Have fun with the editor and play or model some 3D-graphics.

Send me what you have done by email, please.

You also can send me some bugs and errors - I know there are many of them. But I'm not ready yet.

Here our email-address: gundermann.niels.ng@googlemail.com
And here are the sources: https://github.com/gundermann/JFX3D

Montag, 16. Juni 2014

JavaFX 3D Editor - Update 5

Eine Woche ist schon wieder vergangen und damit ist auch wieder ein neues Update fällig. Für alle, die gerne mit Farben herumspielen ist dieses Update wahrscheinlich das wichtigste überhaupt.

Was gibt es also an neuen Sachen im Editor:


  1. Die Menüs haben sich etwas geändert. Diese ganzen Verschachtelungen waren nicht ganz zu Benutzerfreundlich, wie ich mir Anfangs dachte (naja, wir lernen aus unseren Fehler - wird nicht der letzte gewesen sein). Schaut es euch einfach an und urteilt selbst.
  2. Wer schon etwas mit dem Editor entworfen und gespeichert hat, wird sich jetzt ärgern. Die Rotationsachsen der einzelnen Komponenten haben sich (ein letztes Mal geändert). So wie die Rotationsachsen jetzt festgelegt werden, lassen sich die Rotationen der Grafiken meiner Meinung nach besser nachvollziehen. Aber urteilt selbst ;-)
  3. Die einzelnen Komponenten des 3D-Objekts können jeweils ausgewählt und dann verändert werden. Das ist keine Neuerung. Es hat mich jedoch gestört, dass ich eine Komponente ausgewählt habe und nicht sofort sehen konnte, welche ich ausgewählt habe. Um das erkennen zu können, hat die jeweils aktuelle Komponente einen rot-gestrichelten Rahmen, wie im Bild unten zu erkennen ist.
  4. Viele viele bunte Farben. Wer vormals in die gespeicherten Dateien geguckt hat, dem ist vielleicht aufgefallen, dass dort ein Feld "color" zu finden ist. Das wurde BISHER beim Einlesen der Datei nicht beachtet. Nun ist es möglich den einzelnen Komponenten Farben zu verpassen. Im Bild unten ist dies auch zu sehen. Das Anpassen der Farben ist eine Veränderung einer Komponenten und bedingt das vorherige Auswählen dieser.
  5. Im Ordner description befindet sich die Schema-Datei für die dxml-Dateien.

Das war es schon. War ja auch nur ein Wochenende Zeit ;-).
Ich freue mich wie immer über Kritiken und Anregungen.
Hier sind die Quellen: https://github.com/gundermann/JFX3D
Und meine E-Mail Adresse: gundermann.niels.ng@googlemail.com

Dienstag, 10. Juni 2014

JavaFX 3D Editor - fxml-Definition

Der Aufbau der dxml-Dateien gleicht dem einer einfachen xml-Datei. Ein Schema (xsd) habe ich bisher noch nicht angefertigt. Da die dxml-Dateien derzeit nur mit Attributen umgewandelt werden können, die ein Rechteck beschreiben, wird die Beschreibung des Aufbaus hoffentlich auch ohne Schema-Datei verständlich sein.

Das Wurzelelement der Datei träge die Bezeichnung „shape_definition“. Die einzelnen Elemente, die umgewandelt werden sollen, werden innerhalb des Wurzelelementes untereinander weg definiert.

Eine beispielhafte Definition sieht dabei wie folgt aus:

<shape_definition>
<rect x-coordinate="123" y-coordinate="321" z-coordinate="0" height="100" width="100" xr="45" yr="90" zr="2" color="#FFFFFF"/>
</shape_definition>


Die Farbe (color) wird derzeit nicht beachtet, kann aber für spätere Releases manuell definiert werden.
x-, y- und z-coordinate geben die Position an, an dem die Grafic erstellt wird. Ausgehend von diesem Punkt, werden Höhe (height), Breite (width) und die Rotationen um die X-, Y- und Z-Achse (xr, yr, zr) angepasst.

Andere Typen (im Beispiel rect) können noch nicht vom Editor interpretiert werden.

JavaFX 3D Editor - Update 4

Eigentlich wollte ich für das nächste Update zwei Wochen brauchen. Ich habe es nun aber doch in einer geschafft ;-)
Jetzt kann man auch wirklich etwas mit dem 3D-Editor anfangen.

Was ist neu?

Neu ist vor allem die Speicher- und Lade-Funktion von entsprechenden Dateien. Bei den Dateien handelt es sich um dxml-Dateien, die wie xml-Dateien aufgebaut sind und Attribute enthalten, die sich vom Editor in 3D-Grafiken umwandeln lässt.
Den Aufbau dieser dxml-Dateien werde ich in einem anderen Post beschreiben.
Mit dem Editor können momentan nur Rechtecke gezeichnet werden. Von daher habe ich die Umwandlung von Attributen der dxml-Dateien in 3D-Grafik-Objekte vorerst nur auf Rechtecke beschränkt.

Jedem neuen Zeichenbereich muss jetzt ein eindeutiger Name gegeben werden. Wird der Bereich durch das Laden einer Datei erzeugt, ist der Dateiname der Name des Bereichs. Dadurch ist es bessere Nachvollziehbar, in welchem Bereich gerade gearbeitet wird.

Die Bezeichnungen einzelnen Komponenten in der Komponentenübersicht im Manipulationsmenü sind keine kryptische Objektbezeichnungen mehr. Hier findet sich die Bezeichnung des Komponenten-Typs wieder (bspw. Rechteck).

Die Rotationsachsen der Komponenten wurden nochmals angepasst. Hier wird es auch noch weitere Änderungen geben (so ganz gefällt mir das noch nicht). Deshalb kann es möglich sein, dass gespeicherte Grafiken in späteren Releases etwas „verdreht“ sind.

Im Dimensionsmenü ist die Rotation nun auch mittels der Slider möglich. An dieser Stelle in der Info-Box wird auch der aktuelle Rotations-Winkel ausgewiesen.

Hier ist  wieder die Aktuelle Ansicht:



In einem anderen Post werden ich noch erläutern, wie neue Tools zum erstellen anderer Komponenten implementiert werden können. 
Wer helfen möchte kann dann helfen ;-)

Hier nochmal die Quellen: https://github.com/gundermann/JFX3D

Und meine Email-Adresse für Fragen und Anmerkungen: gundermann.niels.ng@googlemail.com

Montag, 2. Juni 2014

JavaFX 3D Editor - Update 3

Heute wieder etwas verspätet das 3. Update. In der letzten Woche habe ich es lediglich geschafft einige Bugs auszubauen und die Rotation der einzelnen Elemente über des Manipulationsmenü zu ermöglichen.

Hier nochmal ein grober Überblick über das derzeitige Programm:



Im nächsten Update wird das Speichern und Laden von 3D-Grafiken bereitgestellt. Ich kann nicht versprechen, dass ich es innerhalb einer Woche schaffe. Deshalb kann es sein, dass das wöchentliche Update am kommenden Sonntag ausfällt und ich eine Woche später etwas mehr zu berichten haben, als in der Vergangenheit.

Der Code wird im Laufe des Tages auf github zur Verfügung stehen: https://github.com/gundermann/JFX3D.git


Fragen und Anmerkungen sind immer gerne gesehen: gundermann.niels.ng@googlemail.com

Sonntag, 25. Mai 2014

JavaFX 3D Editor - Update 2

Da ist schon wieder eine Woche vorbei. Und damit wird es auch Zeit für ein neues Update.
Hier ein Überblick:


Was ist diese Woche alles neu dazugekommen?
  1.  Ausbau des Manipulations-Menü
    Hier sind jetzt die gezeichneten Komponenten zu sehen und auszuwählen. Weiterhin kann die Position der Komponente manipuliert werden. Dabei können zum einen die (+) - und (-)-Schaltflächen verwendet werden und zum anderen kann die Position auch direkt in die Felder eingegeben werden.

    Für die Leute, die auch in den Code gucken:
  2. Strukturierung
    Die Struktur hat sich etwas verändert. Sämtliche Menüs befinden sich nun in einem extra Package. Alles in einem GUI-Package war zu unübersichtlich.
  3. Graphic-Objekte
    Die Graphic-Objekt erben jetzt von einer eigenen Superklasse. Damit sind die Objekte keine Instanzen von der Klasse javafx.scene.Node. In den aktuellen Klassen kann mittels der Methode "asNode()" eine javafx.scene.Node erzeugt werden, die dann auf anderen scenes gerendert werden kann. Dadurch wurde ein weitaus höherer Abstraktionsgrad erreicht. Ihr könnt die Klasse Rectangle3D ja mal mit den vorherigen Revisionen vergleichen. Sollten jetzt neue Graphic-Klassen hinzukommen, müssen sie von Object3D erben. Den Großteil der benötigten Methoden bekommen sie damit schon mitgeliefert. Ein Manko ist immer noch, dass zu jeder Graphic-Klasse eine javafx.scene.Node angegeben werden muss.
  4. Shape-Builder
    Der Shape-Builder ist eine neue allgemeine Klasse, die es erlaubt Objekte einer Graphic-Klasse zu erzeugen. Sie ist so komzipiert, dass die entsprechende Graphic-Klasse mit angegeben werden muss.

Code ist immer noch hier im master zu finden: https://github.com/gundermann/JFX3D.git
Und Fehler und wünsche gehen weiterhin an: niels.gundermann.ng@googlemail.com

Sonntag, 18. Mai 2014

JavaFX 3D Editor - Update 1

Was gibt es neues?

Diese Woche habe ich nicht viel Zeit gehabt. Außerdem habe ich Probleme bei der Rotation des gesamten Grafik oder einzelnen Grafiken.

Von daher gibt es nur kleine Neuerungen in dieser Woche.


  1. Erweiterung des Dimensions Menüs

    Hier gibt es jetzt eine Infobox, in der die aktuellen Rotationswinkel einzusehen sind. Desweiteren kann man hier sämtliche Rotationen zurücksetzen.
    Weiterhin kann man sich die Achsen anzeigen lassen. Diese rotieren zwar mit - entsprechen jedoch nicht den Rotationsachsen. (Hier muss ich noch etwas machen)
  2. Manipulation der Komponenten im Manipulations Menü

    Das Manipulations Menü bietet die Möglichkeit, die einzelnen Komponenten zu verändern. Derzeit können die Komponenten nur in drei Dimensionen verschoben werden. Die Komponente, die verändert wird, wird durch die Auswahl im Zeichnen Menü bestimmt. Dies wird sich mit dem nächsten Update ändern, da das Zeichnen Menü nichts mit den schon bestehenden Komponenten zu tun hat, sondern nur für die Erzeugung neuer Komponenten benötigt wird.
  3. Neue Positionen für die Menüs


Hier noch einmal der Link: https://github.com/gundermann/JFX3D.git

Und meine E-Mail Adresse für Fehlermeldung und Wünsche ;-)
gundermann.niels.ng@googlemail.com

Sonntag, 11. Mai 2014

JavaFX 3D Editor

Mein JavaFX-3D-Editor. Was kann der eigentlich?
Momentan handelt es sich dabei um ein minimalistisches Paint, das in der Lage sein soll, 3D-Grafiken zu visualisieren.

Auch wenn der zündende Gedanke zur Auswahl dieses Projektes "PAINT ist doch toll" war, habe ich mich bei der Aufmachung für einen gimp-ähnlichen Stil entschieden. Von daher sieht das Programm nach dem Start nach nichts aus, wie man im folgenden Bild sieht.


Von den Menüpunkten "Edit" und "Help" sollte man sich vorerst nicht beeindrucken lassen - unter denen passiert noch gar nichts ;-)

Auch das Schließen via File->Close ist noch nicht umgesetzt - ja ich weiß: "Was geht da überhaupt?!".
Also mache ich mal mit dem weiter, was überhaupt geht.

Die Schaltfläche "New Object" sieht aus, als könnte sie schon funktionieren. Wenn man darauf klickt passiert sogar etwas. Dabei wird eine neue Arbeitsoberfläche angelegt, auf dem die Grafiken erstellt werden können. Das sieht erstmal unspektakulär aus:

Was aber im Hauptmenü auffällt ist, dass die Schaltflächen "Dimension Menu" und "Painting Menu" sowie die Auswahlbox aktiv wurden. Beim Klick auf die beiden Menu-Schaltflächen öffnet sich das jeweilige Menu. Die Beiden Menüs werden ich im Anschluss erklären. die Auswahlbox bestimmt auf welche Arbeitsoberfläche sich die Menüs beziehen. Insofern ist es auch möglich mit mehreren Arbeitsflächen gleichzeitig zu arbeiten.

Mit Hilfe des Dimensions Menü kann man die 3D-Objekte in den entsprechenden Achsen drehen, um sich sein Kunstwerk mal von allen Seiten aus zu betrachten. Die Rotation funktioniert bei aktivierter Rotation über das Ziehen mit der Maus über die entsprechende Arbeitsfläche bei gedrückter linker Maustaste (Die Drag-Funktion).


Mit Hilfe des Zeichen Menü werden erstens die Komponenten in der ausgewählter Arbeitsfläche aufgelistet und zweiten kann man hier die Tools zum Zeichnen anzeigen lassen. Wobei derzeit nur das Rechteck funktioniert.


Wo ich schon wieder bei nicht funktionierenden Dingen bin - Speichern kann man die Grafiken auch noch nicht ;-)

Ich würde mich freuen, wenn ihr ein bisschen mit dem Editor herumspielt und mir eure Meinung schreibt.
Auch über Fehlermeldungen, Verbesserungsvorschläge und Verbesserungswünsche würdeich mich sehr freuen.

Follow on twitter: @NGJFXaA

Email: gundermann.niels.ng@googlemail.com

Wer möchte, kann sich den Code auch auf GitHub angucken:
https://github.com/gundermann/JFX3D/tree/peter