This commit is contained in:
2025-05-10 04:12:32 +02:00
parent bf9406f924
commit 1a31e419cc
7 changed files with 314 additions and 23 deletions

View File

@@ -86,10 +86,18 @@ system.result("server::ping", pong => {
function handleOptionsChanges(key, value) {
system.call("game::optionSet", { key, value })
const span = document.querySelector(`span#${key}`)
if (span) {
span.innerText = Math.floor(value)
}
}
function handleSettingsChanges(key, value) {
system.call("settings::set", { key, value })
const span = document.querySelector(`span#${key == "ram" ? "currentRam" : key}`)
if (span) {
span.innerText = key == "ram" ? Math.floor(value.max / 1024) + " G" : value
}
}
system.result("game::parseOptions", options => {
@@ -121,6 +129,9 @@ system.result("player::profile", playerProfile => {
console.log(playerProfile)
})
system.result("oculus::getdefaultshaderset", boolean => {
sildurs_shader.checked = boolean
})
window.onload = () => {
system.call("hardware::ramInformation")
@@ -128,5 +139,6 @@ window.onload = () => {
system.call("server::ping")
system.call("player::profile")
system.call("settings::read")
system.call("oculus::getdefaultshaderset")
startAudio()
}