Skip to content

Instantly share code, notes, and snippets.

@C4Code
Created April 9, 2013 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save C4Code/5349368 to your computer and use it in GitHub Desktop.
Save C4Code/5349368 to your computer and use it in GitHub Desktop.
Movie, animated, distorted.
//
// C4WorkSpace.m
// Notification Tutorial
//
// Created by Travis Kirton.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *text;
C4Movie *movie;
}
-(void)setup {
text = [C4Shape shapeFromString:@"MOVIE" withFont:[C4Font fontWithName:@"Avenir-Black" size:200]];
movie = [C4Movie movieNamed:@"inception.mov"];
text.center = movie.center;
movie.mask = text;
movie.anchorPoint = CGPointMake(0.5, 1.5f);
movie.center = self.canvas.center;
movie.perspectiveDistance = 1000.0f;
movie.loops = YES;
[self.canvas addMovie:movie];
[self runMethod:@"animate" afterDelay:0.25f];
}
-(void)animate {
[movie play];
movie.animationDuration = 8.0f;
movie.animationOptions = LINEAR | REPEAT;
movie.rotationX = TWO_PI;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment