aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/phenax/utils/program.kt
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-08-30 22:41:25 +0530
committerAkshay Nair <phenax5@gmail.com>2026-08-30 22:41:28 +0530
commitfecebfd39809f862e098805219b15c50588bb81a (patch)
treef600ad9667ab4d087113fad0f6898d61ade97cfc /src/main/kotlin/phenax/utils/program.kt
parent326474823ca31ad8ae424dd1d991c0330f2b3db4 (diff)
downloadart-playground-openrndr-fecebfd39809f862e098805219b15c50588bb81a.tar.gz
art-playground-openrndr-fecebfd39809f862e098805219b15c50588bb81a.zip
Development setup + toggling recording
Diffstat (limited to 'src/main/kotlin/phenax/utils/program.kt')
-rw-r--r--src/main/kotlin/phenax/utils/program.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/kotlin/phenax/utils/program.kt b/src/main/kotlin/phenax/utils/program.kt
new file mode 100644
index 0000000..2d3e04b
--- /dev/null
+++ b/src/main/kotlin/phenax/utils/program.kt
@@ -0,0 +1,9 @@
+package phenax.utils
+
+fun recordDuration(durationSeconds: Int) {
+ System.setProperty("phenax.record.frameCount", (60 * durationSeconds).toString())
+}
+
+fun recordDuration(): Int? = System.getProperty("phenax.record.frameCount")?.toIntOrNull()
+
+fun recordingEnabled(): Boolean = System.getenv("RECORD") != null