This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalFoundationApi::class) | |
@Composable | |
fun AnimatedBallGrid( | |
numBalls: Int = 32, | |
numBallsPrRow: Int = 7, | |
) { | |
// viewModel contains an observable list of balls | |
val viewModel: BallsViewModel by remember { mutableStateOf(BallsViewModel(numBalls)) } // TODO: Use injection instead | |
var animationSpeed: AnimationSpeed by remember { mutableStateOf(AnimationSpeed.Fast) } |