[WIP] Stickers editor

This commit is contained in:
Ilya Laktyushin
2024-04-06 18:08:20 +04:00
parent 698a74b6b6
commit 7c6651db34
7 changed files with 63 additions and 19 deletions

View File

@@ -86,6 +86,16 @@ public class DrawingStickerEntityView: DrawingEntityView {
var currentSize: CGSize?
public var updated: () -> Void = {}
public var duration: Double? {
if let animationNode = self.animationNode, animationNode.currentFrameCount > 1 {
return Double(animationNode.currentFrameCount) / Double(animationNode.currentFrameRate)
} else if let videoNode = self.videoNode {
return videoNode.duration
} else {
return nil
}
}
init(context: AccountContext, entity: DrawingStickerEntity) {
self.imageNode = TransformImageNode()