File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
js/example-frontend-js/src/main/kotlin Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ private fun HTMLElement.setPosition(x: Double, y: Double) {
4747}
4848
4949@Suppress(" DEPRECATION" )
50- fun random () = kotlin.js.Math .random()
50+ private fun random () = kotlin.js.Math .random()
5151
5252class Application {
5353 private val body get() = document.body!!
@@ -140,7 +140,6 @@ class Application {
140140 println (" Delayed #$index for a while at ${timer.time} , resumed and turned" )
141141 }
142142 }
143-
144143 }
145144 }
146145
@@ -190,7 +189,7 @@ class AnimationTimer {
190189 val newTime = window.awaitAnimationFrame()
191190 val dt = newTime - time
192191 time = newTime
193- return dt
192+ return dt.coerceAtMost( 500.0 ) // at most half a second
194193 }
195194
196195 fun reset (): Double {
You can’t perform that action at this time.
0 commit comments