1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-11 05:05:23 +03:00

Fix wrong hair initial posotion

This commit is contained in:
Alisa Mylnikova 2018-11-30 16:52:36 +07:00
parent 52dc2d9bc8
commit 2aac5dad1c

View File

@ -148,7 +148,7 @@ fileprivate func generateShapeAnimation(from: Shape, to: Shape, animation: Shape
let scaleAnimation = CABasicAnimation(keyPath: "transform")
scaleAnimation.duration = duration
let parentPos = AnimationUtils.absolutePosition(animation.nodeRenderer?.parentRenderer)
let fromPos = parentPos.concat(with: to.place)
let fromPos = parentPos.concat(with: from.place)
let toPos = parentPos.concat(with: to.place)
scaleAnimation.fromValue = CATransform3DMakeAffineTransform(fromPos.toCG())
scaleAnimation.toValue = CATransform3DMakeAffineTransform(toPos.toCG())