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
@Composable | |
fun Warp( | |
modifier: Modifier = Modifier, | |
novasInFrame: Int = 5, | |
acceleration: Int = 15, | |
cometFactor: Float = 0.2f, | |
lineWidth: Dp = 1.dp, | |
) { | |
val particles = remember { arrayListOf<Particle>() } | |
var frame by remember { mutableLongStateOf(0L) } |
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
class OverlengthHighlightVisualTransformation( | |
private val maxLength: Int, | |
private val highlightColor: Color | |
) : VisualTransformation { | |
override fun filter(text: AnnotatedString) = TransformedText( | |
buildAnnotatedString { | |
append(text.take(maxLength).toString()) | |
if (text.length > maxLength) | |
withStyle(style = SpanStyle(background = highlightColor)) { | |
append(text.substring(maxLength, text.length)) |
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
import androidx.compose.foundation.gestures.awaitFirstDown | |
import androidx.compose.foundation.gestures.calculateCentroidSize | |
import androidx.compose.foundation.gestures.calculatePan | |
import androidx.compose.foundation.gestures.calculateZoom | |
import androidx.compose.foundation.gestures.forEachGesture | |
import androidx.compose.ui.geometry.Offset | |
import androidx.compose.ui.input.pointer.AwaitPointerEventScope | |
import androidx.compose.ui.input.pointer.PointerInputScope | |
import androidx.compose.ui.input.pointer.positionChanged | |
import androidx.compose.ui.util.fastAny |
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
# depends on this plugin https://github.com/konifar/gradle-unused-resources-remover-plugin | |
name: Daily Resource Clean Up | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
remove-resource: | |
runs-on: ubuntu-latest |
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
atk = 1 # ステータス画面に表示されている偽ATK値 | |
str = 1 # 弓ならDEX, WizならINT | |
luk = 1 | |
dex = 1 # 弓ならSTR | |
refine_atk = 0 # ステータス画面の精錬物理攻撃 | |
ignore_def = 0.00 # ステータス画面の物理防御無視 | |
def_penetration = 0.00 # ステータス画面の物理防御貫通 | |
enemy_def = 0 # 敵DEF かかしは0 | |
ignored_enemy_def = enemy_def * (1 - ignore_def) |
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
import android.util.SparseArray | |
import androidx.activity.ComponentActivity | |
import androidx.fragment.app.Fragment | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.LifecycleEventObserver | |
import androidx.lifecycle.LifecycleOwner | |
import androidx.recyclerview.widget.RecyclerView.RecycledViewPool | |
class RecycledViewPoolFactory { |
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
package io.moyuru.simplelinearlayoutmanager | |
import android.os.Parcel | |
import android.os.Parcelable | |
import android.view.View | |
import androidx.recyclerview.widget.RecyclerView | |
import androidx.recyclerview.widget.RecyclerView.Recycler | |
import androidx.recyclerview.widget.RecyclerView.State | |
import kotlin.math.max | |
import kotlin.math.min |