Open Dreagvor opened 4 years ago
how can I scale node of svg image?
after this block of code i'm not getting my layer scaled, but getting translated by poing
self.node.nodeBy(tag: nodeTag)?.onTouchPressed({ [unowned self] (touch) in guard let nodeShape = self.node.nodeBy(tag: nodeTag) as? Shape else { return } let animation = nodeShape.placeVar.animation(to: Transform.scale(sx: 2, sy: 2), during: 0.4) animation.play() })
Hi @Dreagvor,
Make sure you take into account your current place. For example, you can use:
let animation = nodeShape.placeVar.animation(to: nodeShape.place.scale(sx: 2, sy: 2), during: 0.4)
how can I scale node of svg image?
after this block of code i'm not getting my layer scaled, but getting translated by poing