From c476374eaaedafbb369f6d29359361be102f8b44 Mon Sep 17 00:00:00 2001 From: Effyiex Date: Sun, 22 May 2022 15:26:33 +0200 Subject: [PATCH] Changable Framerate --- JWA-Source/de/prplx/jwa/JWebApplet.java | 12 +++++++++++- JWA-Source/de/prplx/jwa/resources/WebInterface.html | 4 +++- Test-App/de/prplx/jwa/JWATestApp.java | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/JWA-Source/de/prplx/jwa/JWebApplet.java b/JWA-Source/de/prplx/jwa/JWebApplet.java index 9848b9b..859b01f 100644 --- a/JWA-Source/de/prplx/jwa/JWebApplet.java +++ b/JWA-Source/de/prplx/jwa/JWebApplet.java @@ -68,12 +68,22 @@ public void setHandshake(JWAHandshake handshake) { this.handshake = handshake; } + private int webFrameRate = 24; + + public void setFramerate(int framerate) { + this.webFrameRate = framerate; + } + + public int getFrameRate() { + return webFrameRate; + } + public void setWebInterface(String webInterface) { this.webInterface = webInterface; } public String getWebInterface() { - return webInterface; + return webInterface.replace("/*FRAMERATE*/", String.valueOf(webFrameRate)); } public void setDefaultScene(JWAScene scene) { diff --git a/JWA-Source/de/prplx/jwa/resources/WebInterface.html b/JWA-Source/de/prplx/jwa/resources/WebInterface.html index 2ca2faf..720ffd9 100644 --- a/JWA-Source/de/prplx/jwa/resources/WebInterface.html +++ b/JWA-Source/de/prplx/jwa/resources/WebInterface.html @@ -7,7 +7,9 @@ loading...