Merge pull request #69 from yyued/2.5.0_matte-dev

2.5.0 matte dev
This commit is contained in:
PonyCui
2019-06-18 19:34:11 +08:00
committed by GitHub
14 changed files with 1166 additions and 975 deletions

View File

@@ -64,4 +64,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 7f6714245d47e69d2933463289e4c4d6de65b831
COCOAPODS: 1.6.0.beta.2
COCOAPODS: 1.6.1

View File

@@ -12,6 +12,9 @@
63712E6821787A45001AE014 /* SVGAAudioEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = 63712E6721787A45001AE014 /* SVGAAudioEntity.m */; };
63E817012178809D001D2D62 /* SVGAAudioLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E817002178809D001D2D62 /* SVGAAudioLayer.m */; };
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 */; };
71A8679B22B8CF7400176CD6 /* Goddess.svga in Resources */ = {isa = PBXBuildFile; fileRef = 71A8679A22B8CF7400176CD6 /* 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 */; };
@@ -65,6 +68,9 @@
63E816FF2178809D001D2D62 /* SVGAAudioLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAAudioLayer.h; sourceTree = "<group>"; };
63E817002178809D001D2D62 /* SVGAAudioLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SVGAAudioLayer.m; sourceTree = "<group>"; };
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>"; };
71A8679A22B8CF7400176CD6 /* 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>"; };
@@ -241,6 +247,9 @@
90D7C9FA1F7E2AA3006E74F0 /* Samples */ = {
isa = PBXGroup;
children = (
71A8679A22B8CF7400176CD6 /* Goddess.svga */,
71A8679022B7785100176CD6 /* matteRect.svga */,
71A8679222B7853600176CD6 /* matteBitmap.svga */,
71418C92225E6F710029C69E /* mutiMatte.svga */,
63712E6421787950001AE014 /* heartbeat.svga */,
90D7CA1A1F7FB114006E74F0 /* rose_1.5.0.svga */,
@@ -356,8 +365,11 @@
63712E6521787950001AE014 /* heartbeat.svga in Resources */,
90A676EB1D13A6DF008A69F3 /* Main.storyboard in Resources */,
90CB64F91EF297E800DAA382 /* SVGAPlayer React-Info.plist in Resources */,
71A8679122B7785100176CD6 /* matteRect.svga in Resources */,
71A8679322B7853600176CD6 /* matteBitmap.svga in Resources */,
90D7CA1C1F7FB114006E74F0 /* rose_1.5.0.svga in Resources */,
90D7CA1B1F7FB114006E74F0 /* rose_2.0.0.svga in Resources */,
71A8679B22B8CF7400176CD6 /* Goddess.svga in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -21,20 +21,139 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cmN-DO-oLC" customClass="SVGAPlayer">
<view contentMode="scaleAspectFit" translatesAutoresizingMaskIntoConstraints="NO" id="cmN-DO-oLC" customClass="SVGAPlayer">
<rect key="frame" x="16" y="162" width="343" height="343"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="cmN-DO-oLC" secondAttribute="height" multiplier="1:1" id="xm5-jB-e5a"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wYi-Zk-AVg">
<rect key="frame" x="30" y="587" width="315" height="80"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nzQ-nh-YFU">
<rect key="frame" x="135.5" y="18" width="44" height="44"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="BBw-Gf-lHK"/>
<constraint firstAttribute="height" constant="44" id="PZv-dO-Dxw"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onChangeColor:" destination="BYZ-38-t0r" eventType="touchUpInside" id="qR9-fm-dml"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1KI-hV-KzV">
<rect key="frame" x="79.5" y="18" width="44" height="44"/>
<color key="backgroundColor" red="0.0" green="0.59215686274509804" blue="0.84313725490196079" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="P2X-tz-zcv"/>
<constraint firstAttribute="width" constant="44" id="TwF-QM-bTJ"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onChangeColor:" destination="BYZ-38-t0r" eventType="touchUpInside" id="bz7-1Y-Odw"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZFx-1M-QhD">
<rect key="frame" x="23.5" y="18" width="44" height="44"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="Ozd-yt-2wZ"/>
<constraint firstAttribute="width" constant="44" id="eOU-Cz-Va3"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onChangeColor:" destination="BYZ-38-t0r" eventType="touchUpInside" id="L4f-gv-JP2"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9P0-Rv-Pwe">
<rect key="frame" x="247.5" y="18" width="44" height="44"/>
<color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="ZTT-TU-aMl"/>
<constraint firstAttribute="width" constant="44" id="wtj-BS-0wu"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onChangeColor:" destination="BYZ-38-t0r" eventType="touchUpInside" id="UeC-V2-v5z"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V7z-xZ-hZc">
<rect key="frame" x="191.5" y="18" width="44" height="44"/>
<color key="backgroundColor" red="0.0078431372549019607" green="0.80000000000000004" blue="0.46274509803921571" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="bbS-rX-Yel"/>
<constraint firstAttribute="height" constant="44" id="ixM-sM-yua"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onChangeColor:" destination="BYZ-38-t0r" eventType="touchUpInside" id="6ER-sX-gVb"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="1KI-hV-KzV" firstAttribute="centerY" secondItem="wYi-Zk-AVg" secondAttribute="centerY" id="4yE-m6-GTl"/>
<constraint firstItem="ZFx-1M-QhD" firstAttribute="centerX" secondItem="wYi-Zk-AVg" secondAttribute="centerX" multiplier="0.29" id="73h-vL-GYo"/>
<constraint firstItem="9P0-Rv-Pwe" firstAttribute="centerY" secondItem="wYi-Zk-AVg" secondAttribute="centerY" id="9Vu-MU-riY"/>
<constraint firstAttribute="height" constant="80" id="GB4-Jm-gUd"/>
<constraint firstItem="V7z-xZ-hZc" firstAttribute="centerX" secondItem="wYi-Zk-AVg" secondAttribute="centerX" multiplier="1.35" id="Gm0-rp-tEs"/>
<constraint firstItem="V7z-xZ-hZc" firstAttribute="centerY" secondItem="wYi-Zk-AVg" secondAttribute="centerY" id="TEd-cI-bF0"/>
<constraint firstItem="ZFx-1M-QhD" firstAttribute="centerY" secondItem="wYi-Zk-AVg" secondAttribute="centerY" id="dg1-pi-u5L"/>
<constraint firstItem="1KI-hV-KzV" firstAttribute="centerX" secondItem="wYi-Zk-AVg" secondAttribute="centerX" multiplier="0.65" id="gWN-yB-hcj"/>
<constraint firstItem="nzQ-nh-YFU" firstAttribute="centerX" secondItem="wYi-Zk-AVg" secondAttribute="centerX" id="hxT-ei-gFa"/>
<constraint firstItem="nzQ-nh-YFU" firstAttribute="centerY" secondItem="wYi-Zk-AVg" secondAttribute="centerY" id="pCt-mM-cFi"/>
<constraint firstItem="9P0-Rv-Pwe" firstAttribute="centerX" secondItem="wYi-Zk-AVg" secondAttribute="centerX" multiplier="1.71" id="r4N-pw-XTz"/>
</constraints>
</view>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="iu9-fO-pPv">
<rect key="frame" x="24" y="549" width="327" height="31"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="0iR-Ol-uxF"/>
</constraints>
<connections>
<action selector="onSlide:" destination="BYZ-38-t0r" eventType="valueChanged" id="ra7-7t-qog"/>
</connections>
</slider>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="wYi-Zk-AVg" secondAttribute="bottom" id="1Yo-HY-RGm"/>
<constraint firstItem="wYi-Zk-AVg" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="30" id="Anv-E0-INT"/>
<constraint firstItem="cmN-DO-oLC" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="HF3-PL-7Ua"/>
<constraint firstAttribute="trailing" secondItem="wYi-Zk-AVg" secondAttribute="trailing" constant="30" id="RKP-BR-fhw"/>
<constraint firstItem="cmN-DO-oLC" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="V4O-Ov-ZmN"/>
<constraint firstItem="cmN-DO-oLC" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="aSq-Gs-nkk"/>
<constraint firstItem="iu9-fO-pPv" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="10" id="bJf-cY-y2d"/>
<constraint firstAttribute="trailingMargin" secondItem="iu9-fO-pPv" secondAttribute="trailing" constant="10" id="oNb-um-6Qz"/>
<constraint firstAttribute="trailingMargin" secondItem="cmN-DO-oLC" secondAttribute="trailing" id="vsb-Wl-Nhq"/>
<constraint firstItem="wYi-Zk-AVg" firstAttribute="top" secondItem="iu9-fO-pPv" secondAttribute="bottom" constant="8" id="wjk-LT-TP4"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Samples" id="fYC-8C-nQt">
@@ -50,7 +169,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-15" y="36"/>
<point key="canvasLocation" x="-15.199999999999999" y="35.532233883058474"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="r3U-AC-YtV">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -21,7 +21,6 @@ static SVGAParser *parser;
- (void)viewDidLoad {
[super viewDidLoad];
self.aPlayer.delegate = self;
self.aPlayer.loops = 0;
self.aPlayer.clearsAfterStop = YES;
@@ -30,14 +29,46 @@ static SVGAParser *parser;
}
- (IBAction)onChange:(id)sender {
[parser parseWithNamed:@"mutiMatte"
inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
if (videoItem != nil) {
self.aPlayer.videoItem = videoItem;
[self.aPlayer startAnimation];
}
} failureBlock:^(NSError * _Nonnull error) {
}];
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 parseWithNamed:@"Goddess" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
// if (videoItem != nil) {
// self.aPlayer.videoItem = videoItem;
// [self.aPlayer startAnimation];
// }
// } failureBlock:nil];
}
- (IBAction)onSlide:(UISlider *)sender {
[self.aPlayer stepToPercentage:sender.value andPlay:NO];
}
- (IBAction)onChangeColor:(UIButton *)sender {
self.view.backgroundColor = sender.backgroundColor;
}
@end

View File

@@ -142,11 +142,12 @@ static NSArray *_contentLayers;
[self.videoItem.sprites enumerateObjectsUsingBlock:^(SVGAVideoSpriteEntity * _Nonnull sprite, NSUInteger idx, BOOL * _Nonnull stop) {
UIImage *bitmap;
if (sprite.imageKey != nil) {
if (self.dynamicObjects[sprite.imageKey] != nil) {
bitmap = self.dynamicObjects[sprite.imageKey];
NSString *bitmapKey = [sprite.imageKey stringByDeletingPathExtension];
if (self.dynamicObjects[bitmapKey] != nil) {
bitmap = self.dynamicObjects[bitmapKey];
}
else {
bitmap = self.videoItem.images[sprite.imageKey];
bitmap = self.videoItem.images[bitmapKey];
}
}
SVGAContentLayer *contentLayer = [sprite requestLayerWithBitmap:bitmap];

View File

@@ -85,7 +85,7 @@ static NSCache *videoCache;
if (imageData != nil) {
UIImage *image = [[UIImage alloc] initWithData:imageData scale:2.0];
if (image != nil) {
[images setObject:image forKey:key];
[images setObject:image forKey:[key stringByDeletingPathExtension]];
}
}
}
@@ -208,6 +208,7 @@ static NSCache *videoCache;
@property (nonatomic, copy) NSString *imageKey;
@property (nonatomic, copy) NSArray<SVGAVideoSpriteFrameEntity *> *frames;
@property (nonatomic, copy) NSString *matteKey;
@end

View File

@@ -15,8 +15,8 @@
@interface SVGAVideoSpriteEntity : NSObject
@property (nonatomic, readonly) NSString *imageKey;
@property (nonatomic, readonly) NSString *matteKey;
@property (nonatomic, readonly) NSArray<SVGAVideoSpriteFrameEntity *> *frames;
@property (nonatomic, readonly) NSString *matteKey;
- (instancetype)initWithJSONObject:(NSDictionary *)JSONObject;
- (instancetype)initWithProtoObject:(SVGAProtoSpriteEntity *)protoObject;

View File

@@ -29,9 +29,9 @@
[frames addObject:[[SVGAVideoSpriteFrameEntity alloc] initWithJSONObject:obj]];
}
}];
_matteKey = matteKey;
_imageKey = imageKey;
_frames = frames;
_matteKey = matteKey;
}
}
}
@@ -43,6 +43,7 @@
if (self) {
if ([protoObject isKindOfClass:[SVGAProtoSpriteEntity class]]) {
NSString *imageKey = protoObject.imageKey;
NSString *matteKey = protoObject.matteKey;
NSArray<NSDictionary *> *protoFrames = [protoObject.framesArray copy];
if ([imageKey isKindOfClass:[NSString class]] && [protoFrames isKindOfClass:[NSArray class]]) {
NSMutableArray<SVGAVideoSpriteFrameEntity *> *frames = [[NSMutableArray alloc] init];
@@ -53,6 +54,7 @@
}];
_imageKey = imageKey;
_frames = frames;
_matteKey = matteKey;
}
}
}

View File

@@ -4,13 +4,13 @@
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers.h>
#import <Protobuf/GPBProtocolBuffers.h>
#else
#import "GPBProtocolBuffers.h"
#import "GPBProtocolBuffers.h"
#endif
#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
@@ -45,23 +45,23 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Enum SVGAProtoShapeEntity_ShapeType
typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeType) {
/**
* Value used if any message's field encounters a value that is not defined
* by this enum. The message will also have C functions to get/set the rawValue
* of the field.
**/
SVGAProtoShapeEntity_ShapeType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
/** 路径 */
SVGAProtoShapeEntity_ShapeType_Shape = 0,
/** 矩形 */
SVGAProtoShapeEntity_ShapeType_Rect = 1,
/** 圆形 */
SVGAProtoShapeEntity_ShapeType_Ellipse = 2,
/** 与前帧一致 */
SVGAProtoShapeEntity_ShapeType_Keep = 3,
/**
* Value used if any message's field encounters a value that is not defined
* by this enum. The message will also have C functions to get/set the rawValue
* of the field.
**/
SVGAProtoShapeEntity_ShapeType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
/** 路径 */
SVGAProtoShapeEntity_ShapeType_Shape = 0,
/** 矩形 */
SVGAProtoShapeEntity_ShapeType_Rect = 1,
/** 圆形 */
SVGAProtoShapeEntity_ShapeType_Ellipse = 2,
/** 与前帧一致 */
SVGAProtoShapeEntity_ShapeType_Keep = 3,
};
GPBEnumDescriptor *SVGAProtoShapeEntity_ShapeType_EnumDescriptor(void);
@@ -75,15 +75,15 @@ BOOL SVGAProtoShapeEntity_ShapeType_IsValidValue(int32_t value);
#pragma mark - Enum SVGAProtoShapeEntity_ShapeStyle_LineCap
typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeStyle_LineCap) {
/**
* Value used if any message's field encounters a value that is not defined
* by this enum. The message will also have C functions to get/set the rawValue
* of the field.
**/
SVGAProtoShapeEntity_ShapeStyle_LineCap_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
SVGAProtoShapeEntity_ShapeStyle_LineCap_LineCapButt = 0,
SVGAProtoShapeEntity_ShapeStyle_LineCap_LineCapRound = 1,
SVGAProtoShapeEntity_ShapeStyle_LineCap_LineCapSquare = 2,
/**
* Value used if any message's field encounters a value that is not defined
* by this enum. The message will also have C functions to get/set the rawValue
* of the field.
**/
SVGAProtoShapeEntity_ShapeStyle_LineCap_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
SVGAProtoShapeEntity_ShapeStyle_LineCap_LineCapButt = 0,
SVGAProtoShapeEntity_ShapeStyle_LineCap_LineCapRound = 1,
SVGAProtoShapeEntity_ShapeStyle_LineCap_LineCapSquare = 2,
};
GPBEnumDescriptor *SVGAProtoShapeEntity_ShapeStyle_LineCap_EnumDescriptor(void);
@@ -97,15 +97,15 @@ BOOL SVGAProtoShapeEntity_ShapeStyle_LineCap_IsValidValue(int32_t value);
#pragma mark - Enum SVGAProtoShapeEntity_ShapeStyle_LineJoin
typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeStyle_LineJoin) {
/**
* Value used if any message's field encounters a value that is not defined
* by this enum. The message will also have C functions to get/set the rawValue
* of the field.
**/
SVGAProtoShapeEntity_ShapeStyle_LineJoin_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
SVGAProtoShapeEntity_ShapeStyle_LineJoin_LineJoinMiter = 0,
SVGAProtoShapeEntity_ShapeStyle_LineJoin_LineJoinRound = 1,
SVGAProtoShapeEntity_ShapeStyle_LineJoin_LineJoinBevel = 2,
/**
* Value used if any message's field encounters a value that is not defined
* by this enum. The message will also have C functions to get/set the rawValue
* of the field.
**/
SVGAProtoShapeEntity_ShapeStyle_LineJoin_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
SVGAProtoShapeEntity_ShapeStyle_LineJoin_LineJoinMiter = 0,
SVGAProtoShapeEntity_ShapeStyle_LineJoin_LineJoinRound = 1,
SVGAProtoShapeEntity_ShapeStyle_LineJoin_LineJoinBevel = 2,
};
GPBEnumDescriptor *SVGAProtoShapeEntity_ShapeStyle_LineJoin_EnumDescriptor(void);
@@ -134,10 +134,10 @@ BOOL SVGAProtoShapeEntity_ShapeStyle_LineJoin_IsValidValue(int32_t value);
#pragma mark - SVGAProtoMovieParams
typedef GPB_ENUM(SVGAProtoMovieParams_FieldNumber) {
SVGAProtoMovieParams_FieldNumber_ViewBoxWidth = 1,
SVGAProtoMovieParams_FieldNumber_ViewBoxHeight = 2,
SVGAProtoMovieParams_FieldNumber_Fps = 3,
SVGAProtoMovieParams_FieldNumber_Frames = 4,
SVGAProtoMovieParams_FieldNumber_ViewBoxWidth = 1,
SVGAProtoMovieParams_FieldNumber_ViewBoxHeight = 2,
SVGAProtoMovieParams_FieldNumber_Fps = 3,
SVGAProtoMovieParams_FieldNumber_Frames = 4,
};
@interface SVGAProtoMovieParams : GPBMessage
@@ -159,13 +159,14 @@ typedef GPB_ENUM(SVGAProtoMovieParams_FieldNumber) {
#pragma mark - SVGAProtoSpriteEntity
typedef GPB_ENUM(SVGAProtoSpriteEntity_FieldNumber) {
SVGAProtoSpriteEntity_FieldNumber_ImageKey = 1,
SVGAProtoSpriteEntity_FieldNumber_FramesArray = 2,
SVGAProtoSpriteEntity_FieldNumber_ImageKey = 1,
SVGAProtoSpriteEntity_FieldNumber_FramesArray = 2,
SVGAProtoSpriteEntity_FieldNumber_MatteKey = 3,
};
@interface SVGAProtoSpriteEntity : GPBMessage
/** 元件所对应的位图键名, 如果 imageKey 含有 .vector 后缀,该 sprite 为矢量图层。 */
/** 元件所对应的位图键名, 如果 imageKey 含有 .vector 后缀,该 sprite 为矢量图层 含有 .matte 后缀,该 sprite 为遮罩图层。 */
@property(nonatomic, readwrite, copy, null_resettable) NSString *imageKey;
/** 帧列表 */
@@ -173,15 +174,19 @@ typedef GPB_ENUM(SVGAProtoSpriteEntity_FieldNumber) {
/** The number of items in @c framesArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger framesArray_Count;
/** 被遮罩图层的 matteKey 对应的是其遮罩图层的 imageKey. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *matteKey;
@end
#pragma mark - SVGAProtoAudioEntity
typedef GPB_ENUM(SVGAProtoAudioEntity_FieldNumber) {
SVGAProtoAudioEntity_FieldNumber_AudioKey = 1,
SVGAProtoAudioEntity_FieldNumber_StartFrame = 2,
SVGAProtoAudioEntity_FieldNumber_EndFrame = 3,
SVGAProtoAudioEntity_FieldNumber_StartTime = 4,
SVGAProtoAudioEntity_FieldNumber_AudioKey = 1,
SVGAProtoAudioEntity_FieldNumber_StartFrame = 2,
SVGAProtoAudioEntity_FieldNumber_EndFrame = 3,
SVGAProtoAudioEntity_FieldNumber_StartTime = 4,
SVGAProtoAudioEntity_FieldNumber_TotalTime = 5,
};
@interface SVGAProtoAudioEntity : GPBMessage
@@ -198,15 +203,18 @@ typedef GPB_ENUM(SVGAProtoAudioEntity_FieldNumber) {
/** 音频播放起始时间(相对音频长度) */
@property(nonatomic, readwrite) int32_t startTime;
/** 音频总长度 */
@property(nonatomic, readwrite) int32_t totalTime;
@end
#pragma mark - SVGAProtoLayout
typedef GPB_ENUM(SVGAProtoLayout_FieldNumber) {
SVGAProtoLayout_FieldNumber_X = 1,
SVGAProtoLayout_FieldNumber_Y = 2,
SVGAProtoLayout_FieldNumber_Width = 3,
SVGAProtoLayout_FieldNumber_Height = 4,
SVGAProtoLayout_FieldNumber_X = 1,
SVGAProtoLayout_FieldNumber_Y = 2,
SVGAProtoLayout_FieldNumber_Width = 3,
SVGAProtoLayout_FieldNumber_Height = 4,
};
@interface SVGAProtoLayout : GPBMessage
@@ -224,12 +232,12 @@ typedef GPB_ENUM(SVGAProtoLayout_FieldNumber) {
#pragma mark - SVGAProtoTransform
typedef GPB_ENUM(SVGAProtoTransform_FieldNumber) {
SVGAProtoTransform_FieldNumber_A = 1,
SVGAProtoTransform_FieldNumber_B = 2,
SVGAProtoTransform_FieldNumber_C = 3,
SVGAProtoTransform_FieldNumber_D = 4,
SVGAProtoTransform_FieldNumber_Tx = 5,
SVGAProtoTransform_FieldNumber_Ty = 6,
SVGAProtoTransform_FieldNumber_A = 1,
SVGAProtoTransform_FieldNumber_B = 2,
SVGAProtoTransform_FieldNumber_C = 3,
SVGAProtoTransform_FieldNumber_D = 4,
SVGAProtoTransform_FieldNumber_Tx = 5,
SVGAProtoTransform_FieldNumber_Ty = 6,
};
@interface SVGAProtoTransform : GPBMessage
@@ -251,19 +259,19 @@ typedef GPB_ENUM(SVGAProtoTransform_FieldNumber) {
#pragma mark - SVGAProtoShapeEntity
typedef GPB_ENUM(SVGAProtoShapeEntity_FieldNumber) {
SVGAProtoShapeEntity_FieldNumber_Type = 1,
SVGAProtoShapeEntity_FieldNumber_Shape = 2,
SVGAProtoShapeEntity_FieldNumber_Rect = 3,
SVGAProtoShapeEntity_FieldNumber_Ellipse = 4,
SVGAProtoShapeEntity_FieldNumber_Styles = 10,
SVGAProtoShapeEntity_FieldNumber_Transform = 11,
SVGAProtoShapeEntity_FieldNumber_Type = 1,
SVGAProtoShapeEntity_FieldNumber_Shape = 2,
SVGAProtoShapeEntity_FieldNumber_Rect = 3,
SVGAProtoShapeEntity_FieldNumber_Ellipse = 4,
SVGAProtoShapeEntity_FieldNumber_Styles = 10,
SVGAProtoShapeEntity_FieldNumber_Transform = 11,
};
typedef GPB_ENUM(SVGAProtoShapeEntity_Args_OneOfCase) {
SVGAProtoShapeEntity_Args_OneOfCase_GPBUnsetOneOfCase = 0,
SVGAProtoShapeEntity_Args_OneOfCase_Shape = 2,
SVGAProtoShapeEntity_Args_OneOfCase_Rect = 3,
SVGAProtoShapeEntity_Args_OneOfCase_Ellipse = 4,
SVGAProtoShapeEntity_Args_OneOfCase_GPBUnsetOneOfCase = 0,
SVGAProtoShapeEntity_Args_OneOfCase_Shape = 2,
SVGAProtoShapeEntity_Args_OneOfCase_Rect = 3,
SVGAProtoShapeEntity_Args_OneOfCase_Ellipse = 4,
};
@interface SVGAProtoShapeEntity : GPBMessage
@@ -311,7 +319,7 @@ void SVGAProtoShapeEntity_ClearArgsOneOfCase(SVGAProtoShapeEntity *message);
#pragma mark - SVGAProtoShapeEntity_ShapeArgs
typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeArgs_FieldNumber) {
SVGAProtoShapeEntity_ShapeArgs_FieldNumber_D = 1,
SVGAProtoShapeEntity_ShapeArgs_FieldNumber_D = 1,
};
@interface SVGAProtoShapeEntity_ShapeArgs : GPBMessage
@@ -324,11 +332,11 @@ typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeArgs_FieldNumber) {
#pragma mark - SVGAProtoShapeEntity_RectArgs
typedef GPB_ENUM(SVGAProtoShapeEntity_RectArgs_FieldNumber) {
SVGAProtoShapeEntity_RectArgs_FieldNumber_X = 1,
SVGAProtoShapeEntity_RectArgs_FieldNumber_Y = 2,
SVGAProtoShapeEntity_RectArgs_FieldNumber_Width = 3,
SVGAProtoShapeEntity_RectArgs_FieldNumber_Height = 4,
SVGAProtoShapeEntity_RectArgs_FieldNumber_CornerRadius = 5,
SVGAProtoShapeEntity_RectArgs_FieldNumber_X = 1,
SVGAProtoShapeEntity_RectArgs_FieldNumber_Y = 2,
SVGAProtoShapeEntity_RectArgs_FieldNumber_Width = 3,
SVGAProtoShapeEntity_RectArgs_FieldNumber_Height = 4,
SVGAProtoShapeEntity_RectArgs_FieldNumber_CornerRadius = 5,
};
@interface SVGAProtoShapeEntity_RectArgs : GPBMessage
@@ -349,10 +357,10 @@ typedef GPB_ENUM(SVGAProtoShapeEntity_RectArgs_FieldNumber) {
#pragma mark - SVGAProtoShapeEntity_EllipseArgs
typedef GPB_ENUM(SVGAProtoShapeEntity_EllipseArgs_FieldNumber) {
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_X = 1,
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_Y = 2,
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_RadiusX = 3,
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_RadiusY = 4,
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_X = 1,
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_Y = 2,
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_RadiusX = 3,
SVGAProtoShapeEntity_EllipseArgs_FieldNumber_RadiusY = 4,
};
@interface SVGAProtoShapeEntity_EllipseArgs : GPBMessage
@@ -374,15 +382,15 @@ typedef GPB_ENUM(SVGAProtoShapeEntity_EllipseArgs_FieldNumber) {
#pragma mark - SVGAProtoShapeEntity_ShapeStyle
typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeStyle_FieldNumber) {
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_Fill = 1,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_Stroke = 2,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_StrokeWidth = 3,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineCap = 4,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineJoin = 5,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_MiterLimit = 6,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineDashI = 7,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineDashIi = 8,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineDashIii = 9,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_Fill = 1,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_Stroke = 2,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_StrokeWidth = 3,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineCap = 4,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineJoin = 5,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_MiterLimit = 6,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineDashI = 7,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineDashIi = 8,
SVGAProtoShapeEntity_ShapeStyle_FieldNumber_LineDashIii = 9,
};
@interface SVGAProtoShapeEntity_ShapeStyle : GPBMessage
@@ -447,10 +455,10 @@ void SetSVGAProtoShapeEntity_ShapeStyle_LineJoin_RawValue(SVGAProtoShapeEntity_S
#pragma mark - SVGAProtoShapeEntity_ShapeStyle_RGBAColor
typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber) {
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_R = 1,
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_G = 2,
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_B = 3,
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_A = 4,
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_R = 1,
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_G = 2,
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_B = 3,
SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber_A = 4,
};
@interface SVGAProtoShapeEntity_ShapeStyle_RGBAColor : GPBMessage
@@ -468,11 +476,11 @@ typedef GPB_ENUM(SVGAProtoShapeEntity_ShapeStyle_RGBAColor_FieldNumber) {
#pragma mark - SVGAProtoFrameEntity
typedef GPB_ENUM(SVGAProtoFrameEntity_FieldNumber) {
SVGAProtoFrameEntity_FieldNumber_Alpha = 1,
SVGAProtoFrameEntity_FieldNumber_Layout = 2,
SVGAProtoFrameEntity_FieldNumber_Transform = 3,
SVGAProtoFrameEntity_FieldNumber_ClipPath = 4,
SVGAProtoFrameEntity_FieldNumber_ShapesArray = 5,
SVGAProtoFrameEntity_FieldNumber_Alpha = 1,
SVGAProtoFrameEntity_FieldNumber_Layout = 2,
SVGAProtoFrameEntity_FieldNumber_Transform = 3,
SVGAProtoFrameEntity_FieldNumber_ClipPath = 4,
SVGAProtoFrameEntity_FieldNumber_ShapesArray = 5,
};
@interface SVGAProtoFrameEntity : GPBMessage
@@ -503,11 +511,11 @@ typedef GPB_ENUM(SVGAProtoFrameEntity_FieldNumber) {
#pragma mark - SVGAProtoMovieEntity
typedef GPB_ENUM(SVGAProtoMovieEntity_FieldNumber) {
SVGAProtoMovieEntity_FieldNumber_Version = 1,
SVGAProtoMovieEntity_FieldNumber_Params = 2,
SVGAProtoMovieEntity_FieldNumber_Images = 3,
SVGAProtoMovieEntity_FieldNumber_SpritesArray = 4,
SVGAProtoMovieEntity_FieldNumber_AudiosArray = 5,
SVGAProtoMovieEntity_FieldNumber_Version = 1,
SVGAProtoMovieEntity_FieldNumber_Params = 2,
SVGAProtoMovieEntity_FieldNumber_Images = 3,
SVGAProtoMovieEntity_FieldNumber_SpritesArray = 4,
SVGAProtoMovieEntity_FieldNumber_AudiosArray = 5,
};
@interface SVGAProtoMovieEntity : GPBMessage

File diff suppressed because it is too large Load Diff