Exemplo n.º 1
0
        private CATransform3D YawTransform(nfloat yawAngle)
        {
            var radians = yawAngle.ToRadians();

            var yawTransform         = CATransform3D.MakeRotation(radians, 0.0f, -1.0f, 0.0f);
            var orientationTransform = OrientationTransform();

            return(orientationTransform.Concat(yawTransform));
        }
Exemplo n.º 2
0
        public AnimationBuilder RotateDegrees(nfloat fromDegrees, nfloat toDegrees, double delaySeconds, double durationSeconds)
        {
            // chip rotation
            var animateRotate = CABasicAnimation.FromKeyPath("transform.rotation.z");

            animateRotate.TimingFunction = this.EasingFunction;
            if (durationSeconds > 0)
            {
                animateRotate.Duration = durationSeconds;
            }
            if (delaySeconds > 0)
            {
                animateRotate.BeginTime = delaySeconds;
            }
            animateRotate.FillMode            = CAFillMode.Forwards;
            animateRotate.RemovedOnCompletion = false;
            animateRotate.From = NSNumber.FromNFloat(fromDegrees.ToRadians());
            animateRotate.To   = NSNumber.FromNFloat(toDegrees.ToRadians());

            this.Animations.Add(animateRotate);
            this.EnsureTotalDuration(delaySeconds, durationSeconds);

            return(this);
        }
Exemplo n.º 3
0
        private CATransform3D RollTransform(nfloat rollAngle)
        {
            var radians = rollAngle.ToRadians();

            return(CATransform3D.MakeRotation(radians, 0.0f, 0.0f, 1.0f));
        }