Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flipped mosaic pieces snap perfectly all together #58

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun FlashCard(
modifier = Modifier
.fillMaxSize()
.graphicsLayer {
rotationY = 180f
scaleX = -1f
}
) {
back(modifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Alignment.Companion.BottomCenter
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -44,7 +43,6 @@ import com.bumble.livemosaic.model.mosaic2Entries
import com.bumble.livemosaic.model.mosaic3Entries
import com.bumble.livemosaic.ui.LocalAutoPlayFlow
import com.bumble.livemosaic.ui.appyx_dark
import com.bumble.livemosaic.ui.colors
import kotlin.random.Random

private val animationSpec = spring<Float>(
Expand Down Expand Up @@ -84,8 +82,6 @@ class MosaicNode(

override fun resolve(mosaicPiece: MosaicPiece, buildContext: BuildContext): Node =
node(buildContext) { modifier ->
val colorIdx = rememberSaveable(mosaicPiece) { Random.nextInt(colors.size) }

Box(
modifier = modifier
.fillMaxWidth(1f / config.columns)
Expand Down