Procházet zdrojové kódy

Fix color on models

____tbvns____ před 6 měsíci
rodič
revize
b0c396784a

+ 5 - 13
PowerGDEditor/src/main/java/xyz/tbvns/Models/GDModel.java

@@ -34,10 +34,10 @@ public class GDModel implements Renderable {
                     VertexAttributes.Usage.Position | VertexAttributes.Usage.Normal,
                     new Material(
                             ColorAttribute.createDiffuse(
-                                    face.color.getRed(),
-                                    face.color.getGreen(),
-                                    face.color.getBlue(),
-                                    face.color.getAlpha()
+                                    (float) face.color.getRed() / 255,
+                                    (float) face.color.getGreen() / 255,
+                                    (float) face.color.getBlue() / 255,
+                                    1
                             )
                     )
             );
@@ -51,15 +51,7 @@ public class GDModel implements Renderable {
                 );
 
             } else {
-                meshBuilder.setColor(face.color.getRed(), face.color.getGreen(), face.color.getBlue(), face.color.getAlpha());
-                meshBuilder.triangle(
-                        new Vector3(face.points.get(0).x, face.points.get(0).y, face.points.get(0).z),
-                        Color.BLACK,
-                        new Vector3(face.points.get(1).x, face.points.get(1).y, face.points.get(1).z),
-                        Color.BLACK,
-                        new Vector3(face.points.get(2).x, face.points.get(2).y, face.points.get(2).z),
-                        Color.BLACK
-                );
+                throw new RuntimeException("Triangles are not yet supported !");
             }
         }
         return builder.end();

+ 2 - 0
PowerGDEditor/src/main/java/xyz/tbvns/ui/Elements/Timeline.java

@@ -2,6 +2,7 @@ package xyz.tbvns.ui.Elements;
 
 import com.badlogic.gdx.Gdx;
 import imgui.ImGui;
+import imgui.extension.imguizmo.ImGuizmo;
 import imgui.flag.ImGuiWindowFlags;
 import xyz.tbvns.ui.Element;
 
@@ -11,6 +12,7 @@ public class Timeline implements Element {
         ImGui.begin("TimeMenu", ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoMove);
         ImGui.setWindowSize(Gdx.graphics.getWidth(), 201);
         ImGui.setWindowPos(0, Gdx.graphics.getHeight() - 201);
+
         ImGui.end();
     }
 }