feat(rendering): update example HelloWorld
@@ -2,16 +2,15 @@ package nullengine.client.rendering.example;
import nullengine.client.rendering.application.RenderableApplication;
import nullengine.client.rendering.gl.shape.Box;
-import nullengine.client.rendering.gl.shape.Pane;
import nullengine.client.rendering.scene.Geometry;
import nullengine.util.Color;
-import org.joml.Vector2f;
import org.joml.Vector3f;
import org.lwjgl.glfw.GLFW;
import java.lang.management.ManagementFactory;
public class HelloWorld extends RenderableApplication {
+
FlyCameraInput cameraInput;
public static void main(String[] args) {
@@ -29,12 +28,13 @@ public class HelloWorld extends RenderableApplication {
cameraInput = new FlyCameraInput(mainViewPort.getCamera());
cameraInput.bindWindow(manager.getPrimaryWindow());
- Geometry geometry = new Geometry(new Pane(new Vector2f(1, 0.5f), new Vector2f(-1, -0.5f), Color.WHITE));
+ Box box = new Box(new Vector3f(0, 0, 0), 1, Color.WHITE);
+ Geometry geometry = new Geometry(box);
+ geometry.setTranslation(0, 0, -5);
mainScene.getChildren().add(geometry);
- mainScene.getChildren().add(new Geometry(new Box(new Vector3f(1, 0.5f, -10), new Vector3f(-1, -0.5f, -5), Color.WHITE)));
manager.getPrimaryWindow().getCursor().disableCursor();
- System.out.println("Ready!");
+ System.out.println("Hello World!");
}
@Override
