We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import Foundation import Macaw class StudioView: MacawView { required init?(coder aDecoder: NSCoder) { super.init(node: Group(contents: []), coder: aDecoder) let animationGroup = Group(contents: []) let animation = animationGroup.contentsVar.animation({ t in let shape = Shape( form: Arc( ellipse: Ellipse( cx: (Double(self.bounds.width) / 2), cy: (Double(self.bounds.height) / 2), rx: 150.0, ry: 150.0), shift: -M_PI / 2 + 0.05, extent: 2 * M_PI * t - 0.1 ), stroke: Stroke(fill: Color.red, width: 4) ) return [shape] }) let playBtn = Shape( form: Rect( x: Double(self.bounds.width) / 2 - 50, y: Double(self.bounds.height) / 2 - 50, w: 100, h: 100 ), fill: Color.red ) let text = Text( text: "START", align: .mid, place: Transform.move( dx: (Double(self.bounds.width) / 2), dy: (Double(self.bounds.height) / 2) ), opaque: false ) playBtn.onTap { _ in animation.play() } self.node = [playBtn, text, animationGroup].group() } }
Please note: after removing 0.05/0.1 constants blinking effect is disappeared.
The text was updated successfully, but these errors were encountered:
vhailor13
No branches or pull requests
Please note: after removing 0.05/0.1 constants blinking effect is disappeared.
The text was updated successfully, but these errors were encountered: