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
| import SwiftUI | |
| struct AnimationDefinition { | |
| let frames: ClosedRange<Int> | |
| let frameDuration: TimeInterval | |
| let loop: Bool | |
| init(frames: ClosedRange<Int>, frameDuration: TimeInterval = 0.1, loop: Bool = false) { | |
| self.frames = frames | |
| self.frameDuration = frameDuration |
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 | |
| fun SpriteSheet( | |
| modifier: Modifier = Modifier, | |
| spriteSheetResId: Int, // e.g., R.drawable.my_spritesheet | |
| frameWidth: Int, // Width of each frame in pixels | |
| frameHeight: Int, // Height of each frame in pixels | |
| animations: Map<String, Pair<Int, Int>>, // Name to (startFrame, endFrame) | |
| currentAnimation: String, // Name of the animation to loop | |
| frameDurationMillis: Long = 100L // Time per frame | |
| ) { |
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
| jQuery(function ($) { | |
| function applyTranslation(stringInfo, currentLanguage) { | |
| const elements = $(stringInfo.selector); | |
| if (!elements.length) { | |
| return; | |
| } | |
| const translation = stringInfo.translations |