This file contains hidden or 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
| fun Modifier.vignetteShader( | |
| intensity: Float, | |
| decayFactor: Float, | |
| ) = this then runtimeShader(shader) { | |
| uniform("intensity", intensity) | |
| uniform("decayFactor", decayFactor) | |
| } |
This file contains hidden or 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
| - name: Commit and push | |
| run: | | |
| git config user.email "mmartos@degirona.info" | |
| git config user.name "Manuel Martos Roldán" | |
| git checkout --orphan gh-pages | |
| git reset --hard | |
| git --work-tree=composeApp/build/dist/wasmJs/productionExecutable add . | |
| git commit -m "Upload gh-pages" | |
| git push origin gh-pages --force |
This file contains hidden or 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
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - uses: gradle/wrapper-validation-action@v1 | |
| - uses: gradle/gradle-build-action@v2 | |
| with: | |
| cache-read-only: ${{ env.MAIN_BRANCH != 'true' }} | |
| - name: Build | |
| run: > |
This file contains hidden or 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
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.LOTTIE_VIEWER_TOKEN }} | |
This file contains hidden or 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
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
This file contains hidden or 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
| name: Deploy Kotlin/wasm to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
This file contains hidden or 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
| actual fun createFileStore(): FileStore = FileStore { fileDesc -> | |
| flow { | |
| (fileDesc as? JsFileDesc)?.run { | |
| suspendCoroutine { continuation -> | |
| val reader = FileReader() | |
| reader.onload = { | |
| continuation.resume(reader.result.toString()) | |
| } | |
| reader.readAsText(fileDesc.file) | |
| }.run { emit(this) } |
This file contains hidden or 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
| fun interface FileStore { | |
| suspend fun readFileContent(fileDesc: FileDesc): Flow<String> | |
| } | |
| expect fun createFileStore(): FileStore | |
This file contains hidden or 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 | |
| actual fun Modifier.onDragAndDrop( | |
| onDragStart: () -> Unit, | |
| onDragExit: () -> Unit, | |
| onSingleFileDropped: (FileDesc) -> Unit, | |
| ): Modifier = composed { | |
| DisposableEffect(LocalWindowInfo.current) { | |
| registerDragAndDropListener( | |
| onDragOver = { onDragStart() }, | |
| onDragLeave = { onDragExit() }, |
This file contains hidden or 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
| external fun registerDragAndDropListener( | |
| onDragOver: () -> Unit, | |
| onDragLeave: () -> Unit, | |
| onDrop: (JsAny) -> Unit, | |
| ) | |
| external fun unregisterDragAndDropListener() | |
NewerOlder