Class Pseudo3D

java.lang.Object
javafx.application.Application
xyz.jeremynoesen.pseudo3d.Pseudo3D

public class Pseudo3D
extends javafx.application.Application
Starting point of all functions of Pseudo3D
  • Nested Class Summary

    Nested classes/interfaces inherited from class javafx.application.Application

    javafx.application.Application.Parameters
  • Field Summary

    Fields inherited from class javafx.application.Application

    STYLESHEET_CASPIAN, STYLESHEET_MODENA
  • Constructor Summary

    Constructors
    Constructor Description
    Pseudo3D()  
  • Method Summary

    Modifier and Type Method Description
    static Scene getActiveScene()
    Get the active Pseudo3D Scene
    static javafx.scene.canvas.Canvas getCanvas()
    Get the main Canvas
    static float getRenderDeltaTime()
    Get the delta time for the previous iteration of the render loop
    static javafx.scene.Scene getScene()
    Get the JavaFX Scene the main Canvas is placed on
    static float getTickDeltaTime()
    Get the delta time for the previous iteration of the tick loop
    static boolean isResizable()
    Check if the main window is resizable
    static void launch​(int width, int height, float framerate, float tickSpeed, boolean fixedDeltaTime, boolean resizable, java.lang.String title)
    Launch the instance of the Application
    static void setActiveScene​(Scene activeScene)
    Set a new Pseudo3D Scene to be active
    static void setPaused​(boolean paused)
    Pause or unpause the game loops
    void start​(javafx.stage.Stage primaryStage)
    Start the application
    void stop()
    Stop the Application

    Methods inherited from class javafx.application.Application

    getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pseudo3D

      public Pseudo3D()
  • Method Details

    • launch

      public static void launch​(int width, int height, float framerate, float tickSpeed, boolean fixedDeltaTime, boolean resizable, java.lang.String title)
      Launch the instance of the Application
      Parameters:
      width - Width of window
      height - Height of window
      framerate - Framerate for rendering in frames per second
      tickSpeed - Tick speed for physics in hertz
      fixedDeltaTime - Whether the delta time is a fixed value
      resizable - Resizable status
      title - Window title
    • start

      public void start​(javafx.stage.Stage primaryStage)
      Start the application
      Specified by:
      start in class javafx.application.Application
      Parameters:
      primaryStage - Primary Stage of the Application
    • stop

      public void stop() throws java.lang.Exception
      Stop the Application
      Overrides:
      stop in class javafx.application.Application
      Throws:
      java.lang.Exception - If stopping fails
    • setPaused

      public static void setPaused​(boolean paused)
      Pause or unpause the game loops
      Parameters:
      paused - True to pause
    • getCanvas

      public static javafx.scene.canvas.Canvas getCanvas()
      Get the main Canvas
      Returns:
      Main Canvas
    • getScene

      public static javafx.scene.Scene getScene()
      Get the JavaFX Scene the main Canvas is placed on
      Returns:
      JavaFX Scene the main Canvas is placed on
    • isResizable

      public static boolean isResizable()
      Check if the main window is resizable
      Returns:
      True if the main window is resizable
    • getActiveScene

      public static Scene getActiveScene()
      Get the active Pseudo3D Scene
      Returns:
      Active Pseudo3D Scene
    • setActiveScene

      public static void setActiveScene​(Scene activeScene)
      Set a new Pseudo3D Scene to be active
      Parameters:
      activeScene - Pseudo3D Scene
    • getTickDeltaTime

      public static float getTickDeltaTime()
      Get the delta time for the previous iteration of the tick loop
      Returns:
      Delta time in seconds
    • getRenderDeltaTime

      public static float getRenderDeltaTime()
      Get the delta time for the previous iteration of the render loop
      Returns:
      Delta time in seconds