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) {
47
47
}
48
48
49
49
@Suppress(" DEPRECATION" )
50
- fun random () = kotlin.js.Math .random()
50
+ private fun random () = kotlin.js.Math .random()
51
51
52
52
class Application {
53
53
private val body get() = document.body!!
@@ -140,7 +140,6 @@ class Application {
140
140
println (" Delayed #$index for a while at ${timer.time} , resumed and turned" )
141
141
}
142
142
}
143
-
144
143
}
145
144
}
146
145
@@ -190,7 +189,7 @@ class AnimationTimer {
190
189
val newTime = window.awaitAnimationFrame()
191
190
val dt = newTime - time
192
191
time = newTime
193
- return dt
192
+ return dt.coerceAtMost( 500.0 ) // at most half a second
194
193
}
195
194
196
195
fun reset (): Double {
You can’t perform that action at this time.
0 commit comments