Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: Update res.
  • Loading branch information
errnull committed Oct 15, 2019
commit 00b6cb303c838b76c6d562a7221b4b152e5773b3
4 changes: 4 additions & 0 deletions SVGAPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
71418C93225E6F710029C69E /* mutiMatte.svga in Resources */ = {isa = PBXBuildFile; fileRef = 71418C92225E6F710029C69E /* mutiMatte.svga */; };
71A8679122B7785100176CD6 /* matteRect.svga in Resources */ = {isa = PBXBuildFile; fileRef = 71A8679022B7785100176CD6 /* matteRect.svga */; };
71A8679322B7853600176CD6 /* matteBitmap.svga in Resources */ = {isa = PBXBuildFile; fileRef = 71A8679222B7853600176CD6 /* matteBitmap.svga */; };
71DAA8A52355B3ED006608A1 /* Goddess.svga in Resources */ = {isa = PBXBuildFile; fileRef = 71DAA8A42355B3ED006608A1 /* Goddess.svga */; };
80D4C7254846B96B9C6EED83 /* libPods-SVGAPlayer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DDA5FF396660C7C932DF9B8 /* libPods-SVGAPlayer.a */; };
904D41F81D223DD20085A21A /* SVGABezierPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 904D41F71D223DD20085A21A /* SVGABezierPath.m */; };
9052FC631E6EB8D4007BC925 /* SVGAExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9052FC621E6EB8D4007BC925 /* SVGAExporter.m */; };
Expand Down Expand Up @@ -69,6 +70,7 @@
71418C92225E6F710029C69E /* mutiMatte.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = mutiMatte.svga; sourceTree = "<group>"; };
71A8679022B7785100176CD6 /* matteRect.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = matteRect.svga; sourceTree = "<group>"; };
71A8679222B7853600176CD6 /* matteBitmap.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = matteBitmap.svga; sourceTree = "<group>"; };
71DAA8A42355B3ED006608A1 /* Goddess.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = Goddess.svga; sourceTree = "<group>"; };
8AD65028FA2D122A34DC4A63 /* Pods-SVGAPlayer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SVGAPlayer.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SVGAPlayer/Pods-SVGAPlayer.debug.xcconfig"; sourceTree = "<group>"; };
904D41F61D223DD20085A21A /* SVGABezierPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGABezierPath.h; sourceTree = "<group>"; };
904D41F71D223DD20085A21A /* SVGABezierPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGABezierPath.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -245,6 +247,7 @@
90D7C9FA1F7E2AA3006E74F0 /* Samples */ = {
isa = PBXGroup;
children = (
71DAA8A42355B3ED006608A1 /* Goddess.svga */,
71A8679022B7785100176CD6 /* matteRect.svga */,
71A8679222B7853600176CD6 /* matteBitmap.svga */,
71418C92225E6F710029C69E /* mutiMatte.svga */,
Expand Down Expand Up @@ -366,6 +369,7 @@
71A8679322B7853600176CD6 /* matteBitmap.svga in Resources */,
90D7CA1C1F7FB114006E74F0 /* rose_1.5.0.svga in Resources */,
90D7CA1B1F7FB114006E74F0 /* rose_2.0.0.svga in Resources */,
71DAA8A52355B3ED006608A1 /* Goddess.svga in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
64 changes: 32 additions & 32 deletions SVGAPlayer/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,38 @@ - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
}

- (IBAction)onChange:(id)sender {
// NSArray *items = @[
// @"https://github.com/yyued/SVGA-Samples/blob/master/EmptyState.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/HamburgerArrow.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/PinJump.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/TwitterHeart.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/Walkthrough.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/angel.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/halloween.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/kingset.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/posche.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/matteBitmap.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/matteBitmap_1.x.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/matteRect.svga?raw=true",
// @"https://github.com/yyued/SVGA-Samples/blob/master/mutiMatte.svga?raw=true",
// ];
// [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
// [parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]]
// completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
// if (videoItem != nil) {
// self.aPlayer.videoItem = videoItem;
// [self.aPlayer startAnimation];
// }
// } failureBlock:nil];
[parser parseWithURL:[NSURL URLWithString:@"https://github.com/svga/SVGA-Samples/raw/master_aep/BitmapColorArea1.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
if (videoItem != nil) {
self.aPlayer.videoItem = videoItem;
[self.aPlayer setImageWithURL:[NSURL URLWithString: @"https://i.imgur.com/vd4GuUh.png"] forKey:@"matte_EEKdlEml.matte"];
[self.aPlayer startAnimation];
}
} failureBlock:nil];
NSArray *items = @[
@"https://github.com/yyued/SVGA-Samples/blob/master/EmptyState.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/HamburgerArrow.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/PinJump.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/TwitterHeart.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/Walkthrough.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/angel.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/halloween.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/kingset.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/posche.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true",
@"https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true",


];
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]]
completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
if (videoItem != nil) {
self.aPlayer.videoItem = videoItem;
[self.aPlayer startAnimation];
}
} failureBlock:nil];
// [parser parseWithURL:[NSURL URLWithString:@"https://github.com/svga/SVGA-Samples/raw/master_aep/BitmapColorArea1.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
// if (videoItem != nil) {
// self.aPlayer.videoItem = videoItem;
// [self.aPlayer setImageWithURL:[NSURL URLWithString: @"https://i.imgur.com/vd4GuUh.png"] forKey:@"matte_EEKdlEml.matte"];
// [self.aPlayer startAnimation];
// }
// } failureBlock:nil];
}

- (IBAction)onSliderClick:(UISlider *)sender {
Expand Down