Skip to content

Commit

Permalink
lint fix and move to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ashqal committed Jul 2, 2016
1 parent 4dab2fc commit cae5c59
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions MD360Player4iOS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "MD360Player4iOS"
s.version = "0.3.1"
s.version = "1.0.0"
s.summary = "It is a lite library to render 360 degree panorama video for iOS."

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -78,7 +78,7 @@ Pod::Spec.new do |s|
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/ashqal/MD360Player4iOS.git", :tag => "0.3.1" }
s.source = { :git => "https://github.com/ashqal/MD360Player4iOS.git", :tag => "1.0.0" }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
6 changes: 3 additions & 3 deletions MD360Player4iOS/PlayerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ - (void) initParams:(NSURL*)url{
@"DOME180_UPPER",[NSNumber numberWithInt:MDModeProjectionDome180Upper],
@"DOME230_UPPER",[NSNumber numberWithInt:MDModeProjectionDome230Upper],
@"STEREO",[NSNumber numberWithInt:MDModeProjectionStereoSphere],
@"PLANE_FIT",[NSNumber numberWithInt:MDModeProjectionPlaneFit],
@"PLANE_CROP",[NSNumber numberWithInt:MDModeProjectionPlaneCrop],
@"PLANE_FULL",[NSNumber numberWithInt:MDModeProjectionPlaneFull],
//@"PLANE_FIT",[NSNumber numberWithInt:MDModeProjectionPlaneFit],
//@"PLANE_CROP",[NSNumber numberWithInt:MDModeProjectionPlaneCrop],
//@"PLANE_FULL",[NSNumber numberWithInt:MDModeProjectionPlaneFull],
nil];

__block MDVRLibrary *blockVRLib = self.vrLibrary;
Expand Down
2 changes: 1 addition & 1 deletion MD360Player4iOS/VideoPlayerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ - (void) initPlayer{
[config setContainer:self view:self.view];

// optional
[config projectionMode:MDModeProjectionDome180];
[config projectionMode:MDModeProjectionStereoSphere];
[config displayMode:MDModeDisplayNormal];
[config interactiveMode:MDModeInteractiveTouch];
[config pinchEnabled:true];
Expand Down
2 changes: 1 addition & 1 deletion MDVRLibrary/MDVRLibrary.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@
5E1EE71E1CBEA5ED004E0B79 /* MDAbsObject3D.m */,
5E59F6371D242A6B002DADC9 /* MDSphere3D.m */,
5E59F6391D242AFC002DADC9 /* MDStereoSphere3D.m */,
5E6151C21D277574008DAD4E /* MDDome3D.m */,
5E6151BF1D2768DD008DAD4E /* MDObject3DHelper.h */,
5E1EE7431CBEA832004E0B79 /* vrlibraw.bundle */,
5E6151C01D2768DD008DAD4E /* MDObject3DHelper.m */,
5E6151C21D277574008DAD4E /* MDDome3D.m */,
);
name = object3D;
sourceTree = "<group>";
Expand Down
1 change: 0 additions & 1 deletion MDVRLibrary/MDVRLibrary/MD360Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@class MD360Renderer;
@interface MD360RendererBuilder : NSObject
- (void) setTexture:(MD360Texture*) texture;
- (void) setObject3D:(MDAbsObject3D*) object3D;
- (void) setDisplayStrategyManager:(MDDisplayStrategyManager*) displayStrategyManager;
- (void) setProjectionStrategyManager:(MDProjectionStrategyManager*) projectionStrategyManager;
- (MD360Renderer*) build;
Expand Down
2 changes: 1 addition & 1 deletion MDVRLibrary/MDVRLibrary/MD360Renderer.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ @interface MD360RendererBuilder()
@property (nonatomic,readonly) NSArray* directors;
@property (nonatomic,readonly) MD360Texture* texture;
@property (nonatomic,weak) MDDisplayStrategyManager* displayStrategyManager;
@property (nonatomic,weak) MDDisplayStrategyManager* projectionStrategyManager;
@property (nonatomic,weak) MDProjectionStrategyManager* projectionStrategyManager;
@end

@implementation MD360RendererBuilder
Expand Down
12 changes: 6 additions & 6 deletions MDVRLibrary/MDVRLibrary/MDDome3D.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#import "MDAbsObject3D.h"

@interface MDDome3D(){
float degree;
BOOL isUpper;
float mDegree;
BOOL mIsUpper;
float prevRatio;
float* pScaledTexCoordinateBuffer;
float* mScaledTexCoordinateBuffer;
Expand All @@ -27,8 +27,8 @@ - (instancetype)initWithSizeContext:(MDSizeContext*) sizeContext degree:(float)
self = [super init];
if (self) {
self.sizeContext = sizeContext;
self->degree = degree;
self->isUpper = isUpper;
self->mDegree = degree;
self->mIsUpper = isUpper;
self->prevRatio = 1.0f;
}
return self;
Expand Down Expand Up @@ -81,7 +81,7 @@ - (void) executeLoad {
int generateDome (float radius, int numSlices, MDDome3D* object3D) {
int i;
int j;
float percent = object3D->degree / 360.0f;
float percent = object3D->mDegree / 360.0f;
int numParallels = numSlices >> 1;
int numVertices = ( numParallels + 1 ) * ( numSlices + 1 );
int numParallelActual = numParallels * percent;
Expand All @@ -92,7 +92,7 @@ int generateDome (float radius, int numSlices, MDDome3D* object3D) {
float* texCoords = malloc ( sizeof(float) * 2 * numVertices );
short* indices = malloc ( sizeof(short) * numIndices );

int upper = object3D->isUpper ? 1 : -1;
int upper = object3D->mIsUpper ? 1 : -1;

for ( i = 0; i < numParallelActual + 1; i++ ) {
for ( j = 0; j < numSlices + 1; j++ ) {
Expand Down
2 changes: 2 additions & 0 deletions MDVRLibrary/MDVRLibrary/MDModeStrategy.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ - (void) switchMode{
[self switchMode:[nextMode intValue]];
}


#pragma mark abstract
- (id) createStrategy:(int)mode{ return nil; }
- (NSArray*) createModes{ return nil; }
@end


10 changes: 5 additions & 5 deletions MDVRLibrary/MDVRLibrary/MDProjectionStrategy.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ - (MD360Director*) createDirector:(int) index{

#pragma mark DomeProjection
@interface DomeProjection : AbsProjectionMode{
float degree;
BOOL isUpper;
float mDegree;
BOOL mIsUpper;
}
@property (nonatomic,strong) MDAbsObject3D* object3D;
@property (nonatomic,weak) MDSizeContext* sizeContext;
Expand All @@ -104,14 +104,14 @@ - (instancetype)initWithSizeContext:(MDSizeContext*) sizeContext degree:(float)d
self = [super init];
if (self) {
self.sizeContext = sizeContext;
self->degree = degree;
self->isUpper = isUpper;
self->mDegree = degree;
self->mIsUpper = isUpper;
}
return self;
}

- (void) on{
self.object3D = [[MDDome3D alloc]initWithSizeContext:self.sizeContext degree:self->degree isUpper:self->isUpper];
self.object3D = [[MDDome3D alloc]initWithSizeContext:self.sizeContext degree:self->mDegree isUpper:self->mIsUpper];
[MDObject3DHelper loadObj:self.object3D];
}

Expand Down

0 comments on commit cae5c59

Please sign in to comment.