mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 13:15:35 +03:00
Shape animation initial node fix
This commit is contained in:
parent
26b000392c
commit
03f3245b7e
@ -9,18 +9,21 @@
|
||||
class ShapeAnimation: AnimationImpl<Shape> {
|
||||
convenience init(animatedNode: Shape, finalValue: Shape, animationDuration: Double, delay: Double = 0.0, autostart: Bool = false, fps: UInt = 30) {
|
||||
|
||||
let nodeId = animatedNode.id
|
||||
let interpolationFunc = { (t: Double) -> Shape in
|
||||
if t == 0 {
|
||||
return Shape(form: animatedNode.form,
|
||||
fill: animatedNode.fill,
|
||||
stroke: animatedNode.stroke,
|
||||
place: animatedNode.place,
|
||||
opaque: animatedNode.opaque,
|
||||
opacity: animatedNode.opacity,
|
||||
clip: animatedNode.clip,
|
||||
effect: animatedNode.effect,
|
||||
visible: animatedNode.visible,
|
||||
tag: animatedNode.tag)
|
||||
let initialNode = Node.nodeBy(id: nodeId) as! Shape
|
||||
|
||||
return Shape(form: initialNode.form,
|
||||
fill: initialNode.fill,
|
||||
stroke: initialNode.stroke,
|
||||
place: initialNode.place,
|
||||
opaque: initialNode.opaque,
|
||||
opacity: initialNode.opacity,
|
||||
clip: initialNode.clip,
|
||||
effect: initialNode.effect,
|
||||
visible: initialNode.visible,
|
||||
tag: initialNode.tag)
|
||||
}
|
||||
|
||||
return finalValue
|
||||
|
Loading…
Reference in New Issue
Block a user