Skip to content

Commit

Permalink
Merge pull request #58 from manuel-martos/pixel-perfect-snap
Browse files Browse the repository at this point in the history
Make flipped mosaic pieces snap perfectly all together
  • Loading branch information
mmartosdev authored Oct 26, 2023
2 parents 4580eb0 + bfbe051 commit 2e61e65
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
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

0 comments on commit 2e61e65

Please sign in to comment.