├── documentation
├── razeBanner.png
├── Blender
│ └── BlenderWorkshopImages
│ │ ├── uvEditing.png
│ │ ├── localViewMap1.png
│ │ ├── localViewMap2.png
│ │ ├── modeSelector.png
│ │ ├── editModeAndLayers.png
│ │ ├── editingInterface.png
│ │ ├── emulationSelection.png
│ │ ├── interfaceSettings.png
│ │ └── removingTheTimeline.png
└── Overview
│ └── overview.md
├── Utilites
└── blenderLaunch.command
├── Raze
├── Products
│ ├── RazeCore.framework
│ │ ├── RazeCore
│ │ ├── Info.plist
│ │ ├── Modules
│ │ │ └── module.modulemap
│ │ └── Headers
│ │ │ ├── RZXRenderable.h
│ │ │ ├── RZXUpdateable.h
│ │ │ ├── NSValue+RZXExtensions.h
│ │ │ ├── RazeCore.h
│ │ │ ├── RZXQuadMesh.h
│ │ │ ├── RZXDynamicTexture.h
│ │ │ ├── RZXStaticTexture.h
│ │ │ ├── RZXTexture.h
│ │ │ ├── RZXCamera.h
│ │ │ ├── RZXTransform3D.h
│ │ │ ├── RZXGLView.h
│ │ │ ├── RZXMesh.h
│ │ │ ├── RZXGPUObject.h
│ │ │ └── RZXBase.h
│ ├── RazeScene.framework
│ │ ├── RazeScene
│ │ ├── Info.plist
│ │ ├── Modules
│ │ │ └── module.modulemap
│ │ └── Headers
│ │ │ ├── RZXScene.h
│ │ │ ├── RazeScene.h
│ │ │ ├── RZXSceneView.h
│ │ │ ├── RZXModelNode.h
│ │ │ ├── RZXNode.h
│ │ │ ├── RZXTextNode.h
│ │ │ └── RZXNode+RZXAnimation.h
│ ├── RazeUIKit.framework
│ │ ├── RazeUIKit
│ │ ├── Info.plist
│ │ ├── Modules
│ │ │ └── module.modulemap
│ │ └── Headers
│ │ │ ├── RazeUIKit.h
│ │ │ ├── RZXViewTexture.h
│ │ │ └── RZXEffectView.h
│ ├── RazeEffects.framework
│ │ ├── Info.plist
│ │ ├── RazeEffects
│ │ ├── Modules
│ │ │ └── module.modulemap
│ │ └── Headers
│ │ │ ├── RZXGrayscaleEffect.h
│ │ │ ├── RZXBlurEffect.h
│ │ │ ├── RZXPassthroughEffect.h
│ │ │ ├── RZXImageFilter.h
│ │ │ ├── RZXConvolutionEffect.h
│ │ │ ├── RZXCompositeEffect.h
│ │ │ ├── RazeEffects.h
│ │ │ ├── RZXClothEffect.h
│ │ │ ├── RZXADSPhongEffect.h
│ │ │ └── RZXEffect.h
│ └── RazeAnimation.framework
│ │ ├── Info.plist
│ │ ├── RazeAnimation
│ │ ├── Modules
│ │ └── module.modulemap
│ │ └── Headers
│ │ ├── RazeCore+RZXAnimation.h
│ │ ├── RZXBasicAnimation.h
│ │ ├── RZXAnimatable.h
│ │ ├── RZXInterpolator.h
│ │ ├── CAAnimation+RZXExtensions.h
│ │ ├── RazeAnimation.h
│ │ └── RZXAnimationBase.h
├── Raze.xcodeproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── RazeEffects
│ ├── RZXGrayscaleEffect.h
│ ├── RZXBlurEffect.h
│ ├── RZXPassthroughEffect.h
│ ├── RZXImageFilter.h
│ ├── RZXConvolutionEffect.h
│ ├── RZXCompositeEffect.h
│ ├── RazeEffects.h
│ ├── RZXClothEffect.h
│ ├── Info.plist
│ ├── RZXADSPhongEffect.h
│ ├── RZXGrayscaleEffect.m
│ ├── RZXPassthroughEffect.m
│ ├── RZXEffect.h
│ ├── RZXADSPhongEffect.m
│ ├── RZXConvolutionEffect.m
│ └── RZXCompositeEffect.m
├── RazeAnimation
│ ├── RazeCore+RZXAnimation.h
│ ├── RZXBasicAnimation.h
│ ├── Private
│ │ ├── RZXValueProxy.h
│ │ ├── CAAnimation+RZXPrivateExtensions.h
│ │ ├── RZXAnimationState.h
│ │ └── RZXAnimationState.m
│ ├── RZXAnimatable.h
│ ├── RZXInterpolator.h
│ ├── CAAnimation+RZXExtensions.h
│ ├── RazeAnimation.h
│ ├── RazeCore+RZXAnimation.m
│ ├── RZXAnimationBase.h
│ ├── Info.plist
│ ├── RZXBasicAnimation.m
│ └── CAAnimation+RZXExtensions.m
├── RazeUIKit
│ ├── RazeUIKit.h
│ ├── Info.plist
│ ├── RZXViewTexture.h
│ ├── RZXEffectView.h
│ └── RZXViewTexture.m
├── RazeCore
│ ├── RZXRenderable.h
│ ├── RZXUpdateable.h
│ ├── NSValue+RZXExtensions.h
│ ├── Private
│ │ ├── RZXCache.h
│ │ ├── RZXRenderLoop.h
│ │ ├── RZXRenderLoop.m
│ │ └── RZXCache.m
│ ├── RazeCore.h
│ ├── RZXQuadMesh.h
│ ├── Info.plist
│ ├── RZXDynamicTexture.h
│ ├── RZXStaticTexture.h
│ ├── RZXTexture.h
│ ├── NSValue+RZXExtensions.m
│ ├── RZXCamera.h
│ ├── RZXTransform3D.h
│ ├── RZXGLView.h
│ ├── RZXGPUObject.m
│ ├── RZXMesh.h
│ ├── RZXGPUObject.h
│ ├── RZXTexture.m
│ ├── RZXBase.h
│ ├── RZXCamera.m
│ ├── RZXStaticTexture.m
│ └── RZXQuadMesh.m
├── RazeScene
│ ├── RZXScene.h
│ ├── RazeScene.h
│ ├── RZXSceneView.h
│ ├── RZXModelNode.h
│ ├── RZXScene.m
│ ├── Info.plist
│ ├── RZXSceneView.m
│ ├── RZXNode.h
│ ├── RZXTextNode.h
│ ├── RZXModelNode.m
│ └── RZXNode+RZXAnimation.h
├── RazeCoreTests
│ ├── Info.plist
│ └── RazeCoreTests.m
├── RazeSceneTests
│ ├── Info.plist
│ └── RazeSceneTests.m
├── RazeUIKitTests
│ ├── Info.plist
│ └── RazeUIKitTests.m
├── RazeAnimationTests
│ ├── Info.plist
│ └── RazeAnimationTests.m
└── RazeEffectsTests
│ ├── Info.plist
│ └── RazeEffectsTests.m
├── Example
└── RazeEffectsDemo
│ ├── RazeEffectsDemo
│ ├── Images.xcassets
│ │ ├── Contents.json
│ │ ├── rzlogo.imageset
│ │ │ ├── rzlogo.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Info.plist
│ ├── ViewController.m
│ ├── AppDelegate.m
│ └── Base.lproj
│ │ └── LaunchScreen.xib
│ └── RazeEffectsDemo.xcodeproj
│ └── project.xcworkspace
│ └── contents.xcworkspacedata
├── Sandbox
├── Raze Scene Sandbox
│ ├── Raze Scene Sandbox
│ │ ├── greyTexture.png
│ │ ├── rzUnicorn.png
│ │ ├── marshmellow.mesh
│ │ ├── officeBanner.mesh
│ │ ├── officeScreen.mesh
│ │ ├── officeTexture.png
│ │ ├── retroOffice.mesh
│ │ ├── razeRedTexture.png
│ │ ├── RZXViewNode.h
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── ViewController.h
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── RZXViewNode.m
│ │ ├── Info.plist
│ │ ├── AppDelegate.m
│ │ ├── RZXExampleSceneviewController.m
│ │ └── Base.lproj
│ │ │ └── LaunchScreen.xib
│ ├── Raze Scene Sandbox.xcodeproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Raze Scene SandboxTests
│ │ ├── Info.plist
│ │ └── Raze_Scene_SandboxTests.m
└── Sandbox.xcworkspace
│ └── contents.xcworkspacedata
├── .gitignore
├── LICENSE
└── README.md
/documentation/razeBanner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/razeBanner.png
--------------------------------------------------------------------------------
/Utilites/blenderLaunch.command:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 | /Applications/Blender/blender.app/Contents/MacOS/blender
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/RazeCore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeCore.framework/RazeCore
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeCore.framework/Info.plist
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/RazeScene:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeScene.framework/RazeScene
--------------------------------------------------------------------------------
/Raze/Products/RazeUIKit.framework/RazeUIKit:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeUIKit.framework/RazeUIKit
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeEffects.framework/Info.plist
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeScene.framework/Info.plist
--------------------------------------------------------------------------------
/Raze/Products/RazeUIKit.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeUIKit.framework/Info.plist
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeAnimation.framework/Info.plist
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/RazeEffects:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeEffects.framework/RazeEffects
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/RazeAnimation:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Raze/Products/RazeAnimation.framework/RazeAnimation
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/uvEditing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/uvEditing.png
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/greyTexture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/greyTexture.png
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/rzUnicorn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/rzUnicorn.png
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/localViewMap1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/localViewMap1.png
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/localViewMap2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/localViewMap2.png
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/modeSelector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/modeSelector.png
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module RazeCore {
2 | umbrella header "RazeCore.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/marshmellow.mesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/marshmellow.mesh
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/officeBanner.mesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/officeBanner.mesh
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/officeScreen.mesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/officeScreen.mesh
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/officeTexture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/officeTexture.png
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/retroOffice.mesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/retroOffice.mesh
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module RazeScene {
2 | umbrella header "RazeScene.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Raze/Products/RazeUIKit.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module RazeUIKit {
2 | umbrella header "RazeUIKit.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/razeRedTexture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/razeRedTexture.png
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/editModeAndLayers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/editModeAndLayers.png
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/editingInterface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/editingInterface.png
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/emulationSelection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/emulationSelection.png
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/interfaceSettings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/interfaceSettings.png
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module RazeEffects {
2 | umbrella header "RazeEffects.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/documentation/Blender/BlenderWorkshopImages/removingTheTimeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/documentation/Blender/BlenderWorkshopImages/removingTheTimeline.png
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module RazeAnimation {
2 | umbrella header "RazeAnimation.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/Images.xcassets/rzlogo.imageset/rzlogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rightpoint/Raze/HEAD/Example/RazeEffectsDemo/RazeEffectsDemo/Images.xcassets/rzlogo.imageset/rzlogo.png
--------------------------------------------------------------------------------
/Raze/Raze.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // RazeEffectsDemo
4 | //
5 | // Created by Rob Visentin on 1/15/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXGrayscaleEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXGrayscaleEffect.h
3 | // RazeEffects
4 | //
5 | // Created by Rob Visentin on 7/21/15.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * A grayscale 2D effect
12 | */
13 | @interface RZXGrayscaleEffect : RZXEffect
14 |
15 | + (instancetype)effect;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RazeCore+RZXAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeCore+RZXAnimation.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Adds KVC compliance for GLKit math types for Raze objects.
12 | */
13 | @interface NSObject (RZXAnimation)
14 | @end
15 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXGrayscaleEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXGrayscaleEffect.h
3 | // RazeEffects
4 | //
5 | // Created by Rob Visentin on 7/21/15.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * A grayscale 2D effect
12 | */
13 | @interface RZXGrayscaleEffect : RZXEffect
14 |
15 | + (instancetype)effect;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Sandbox/Sandbox.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Headers/RazeCore+RZXAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeCore+RZXAnimation.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Adds KVC compliance for GLKit math types for Raze objects.
12 | */
13 | @interface NSObject (RZXAnimation)
14 | @end
15 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RZXBasicAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXBasicAnimation.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/13/15.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXBasicAnimation : CABasicAnimation
11 |
12 | + (instancetype)animationWithKeyPath:(NSString *)path options:(RZXAnimationOptions)options;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Headers/RZXBasicAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXBasicAnimation.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/13/15.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXBasicAnimation : CABasicAnimation
11 |
12 | + (instancetype)animationWithKeyPath:(NSString *)path options:(RZXAnimationOptions)options;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // RazeEffectsDemo
4 | //
5 | // Created by Rob Visentin on 1/15/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/RZXViewNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXViewNode.h
3 | // Raze Scene Sandbox
4 | //
5 | // Created by Rob Visentin on 8/7/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | @import RazeUIKit;
10 |
11 | #import
12 |
13 | @interface RZXViewNode : RZXModelNode
14 |
15 | + (instancetype)nodeWithView:(UIView *)view;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Raze Scene Sandbox
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Raze/RazeUIKit/RazeUIKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeUIKit.h
3 | //
4 | // Created by Rob Visentin on 4/17/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | FOUNDATION_EXPORT double RazeUIKitVersionNumber;
11 | FOUNDATION_EXPORT const unsigned char RazeUIKitVersionString[];
12 |
13 | #import
14 | #import
15 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXBlurEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXBlurEffect.h
3 | //
4 | // Created by Rob Visentin on 1/16/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Blur 2D Effect
12 | */
13 | @interface RZXBlurEffect : RZXEffect
14 |
15 | @property (assign, nonatomic) GLfloat sigma;
16 |
17 | + (instancetype)effectWithSigma:(GLfloat)sigma;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXRenderable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXRenderable.h
3 | //
4 | // Created by Rob Visentin on 1/14/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Protocol for any object to be renderered. Requires - (void)rzx_render
12 | */
13 | @protocol RZXRenderable
14 |
15 | /**
16 | * Render the object
17 | */
18 | - (void)rzx_render;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Raze/Products/RazeUIKit.framework/Headers/RazeUIKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeUIKit.h
3 | //
4 | // Created by Rob Visentin on 4/17/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | FOUNDATION_EXPORT double RazeUIKitVersionNumber;
11 | FOUNDATION_EXPORT const unsigned char RazeUIKitVersionString[];
12 |
13 | #import
14 | #import
15 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // RazeEffectsDemo
4 | //
5 | // Created by Rob Visentin on 1/15/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXBlurEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXBlurEffect.h
3 | //
4 | // Created by Rob Visentin on 1/16/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Blur 2D Effect
12 | */
13 | @interface RZXBlurEffect : RZXEffect
14 |
15 | @property (assign, nonatomic) GLfloat sigma;
16 |
17 | + (instancetype)effectWithSigma:(GLfloat)sigma;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Raze Scene Sandbox
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/Images.xcassets/rzlogo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "rzlogo.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXRenderable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXRenderable.h
3 | //
4 | // Created by Rob Visentin on 1/14/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Protocol for any object to be renderered. Requires - (void)rzx_render
12 | */
13 | @protocol RZXRenderable
14 |
15 | /**
16 | * Render the object
17 | */
18 | - (void)rzx_render;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/Private/RZXValueProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXValueProxy.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/25/15.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXValueProxy : NSObject
11 |
12 | @property (weak, nonatomic) id proxyOwner;
13 | @property (copy, nonatomic) NSString *proxiedKey;
14 |
15 | - (instancetype)initWithBytes:(const void *)value objCType:(const char *)type;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RZXAnimatable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXAnimatable.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import
9 |
10 | @class RZXInterpolator;
11 |
12 | @protocol RZXAnimatable
13 |
14 | + (RZXInterpolator *)rzx_interpolatorForKey:(NSString *)key;
15 |
16 | @end
17 |
18 | @interface NSObject (RZXAnimatable)
19 |
20 | + (void)rzx_addKVCComplianceForGLKTypes;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXScene.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RZXScene : RZXNode
12 |
13 | /**
14 | * The parent node of a scene.
15 | *
16 | * @param effect effect to apply to the scene
17 | *
18 | * @return RZXScene
19 | */
20 | + (instancetype)sceneWithEffect:(RZXEffect *)effect;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Headers/RZXAnimatable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXAnimatable.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import
9 |
10 | @class RZXInterpolator;
11 |
12 | @protocol RZXAnimatable
13 |
14 | + (RZXInterpolator *)rzx_interpolatorForKey:(NSString *)key;
15 |
16 | @end
17 |
18 | @interface NSObject (RZXAnimatable)
19 |
20 | + (void)rzx_addKVCComplianceForGLKTypes;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Headers/RZXScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXScene.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RZXScene : RZXNode
12 |
13 | /**
14 | * The parent node of a scene.
15 | *
16 | * @param effect effect to apply to the scene
17 | *
18 | * @return RZXScene
19 | */
20 | + (instancetype)sceneWithEffect:(RZXEffect *)effect;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXUpdateable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXUpdateable.h
3 | //
4 | // Created by Rob Visentin on 3/6/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | Protocol for any object that will be updated typically as part of a update/rendering
12 | */
13 | @protocol RZXUpdateable
14 |
15 | /**
16 | * Update method to typically be called per frame
17 | *
18 | * @param dt time elapsed since last update
19 | */
20 | - (void)rzx_update:(NSTimeInterval)dt;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXUpdateable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXUpdateable.h
3 | //
4 | // Created by Rob Visentin on 3/6/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | Protocol for any object that will be updated typically as part of a update/rendering
12 | */
13 | @protocol RZXUpdateable
14 |
15 | /**
16 | * Update method to typically be called per frame
17 | *
18 | * @param dt time elapsed since last update
19 | */
20 | - (void)rzx_update:(NSTimeInterval)dt;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RazeScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeScene.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 5/1/15.
6 | //
7 | //
8 | /**
9 | The header file for all Scene Components
10 | */
11 |
12 | #import
13 |
14 | FOUNDATION_EXPORT double RazeSceneVersionNumber;
15 |
16 | FOUNDATION_EXPORT const unsigned char RazeSceneVersionString[];
17 |
18 | #import
19 | #import
20 | #import
21 | #import
22 | #import
23 | #import
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXPassthroughEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXPassthroughEffect.h
3 | // Raze
4 | //
5 | // Created by Rob Visentin on 6/19/15.
6 | //
7 | //
8 |
9 | #import
10 |
11 | OBJC_EXTERN NSString* const kRZXEffectPassthroughVSH2D;
12 | OBJC_EXTERN NSString* const kRZXEffectPassthroughVSH3D;
13 | OBJC_EXTERN NSString* const kRZXEffectPassthroughFSH;
14 |
15 | /**
16 | * Generic effects applying the minimum values needed for a simple 2D or 3D effect
17 | */
18 | @interface RZXPassthroughEffect : RZXEffect
19 |
20 | + (instancetype)effect2D;
21 | + (instancetype)effect3D;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RZXInterpolator.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXInterpolator.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXInterpolator : NSObject
11 |
12 | + (instancetype)floatInterpolator;
13 | + (instancetype)vec2Interpolator;
14 | + (instancetype)vec3Interpolator;
15 | + (instancetype)vec4Interpolator;
16 | + (instancetype)quaternionInterpolator;
17 |
18 | - (id)invertValue:(id)value;
19 |
20 | - (id)addValue:(id)val1 toValue:(id)val2;
21 |
22 | - (id)interpolatedValueFrom:(id)fromValue to:(id)toValue t:(float)t;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXImageFilter.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXImageFilter.h
3 | // RazeEffects
4 | //
5 | // Created by Rob Visentin on 7/23/15.
6 | //
7 |
8 | #import
9 |
10 | @class RZXEffect;
11 |
12 | /**
13 | * Applies an effect to an image
14 | */
15 | @interface RZXImageFilter : NSObject
16 |
17 | @property (assign, nonatomic) CGImageRef sourceImage;
18 | @property (strong, nonatomic) RZXEffect *effect;
19 |
20 | - (instancetype)initWithSourceImage:(CGImageRef)sourceImage effect:(RZXEffect *)effect;
21 |
22 | - (CGImageRef)outputImage NS_RETURNS_INNER_POINTER CF_RETURNS_NOT_RETAINED;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Headers/RazeScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeScene.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 5/1/15.
6 | //
7 | //
8 | /**
9 | The header file for all Scene Components
10 | */
11 |
12 | #import
13 |
14 | FOUNDATION_EXPORT double RazeSceneVersionNumber;
15 |
16 | FOUNDATION_EXPORT const unsigned char RazeSceneVersionString[];
17 |
18 | #import
19 | #import
20 | #import
21 | #import
22 | #import
23 | #import
24 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXPassthroughEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXPassthroughEffect.h
3 | // Raze
4 | //
5 | // Created by Rob Visentin on 6/19/15.
6 | //
7 | //
8 |
9 | #import
10 |
11 | OBJC_EXTERN NSString* const kRZXEffectPassthroughVSH2D;
12 | OBJC_EXTERN NSString* const kRZXEffectPassthroughVSH3D;
13 | OBJC_EXTERN NSString* const kRZXEffectPassthroughFSH;
14 |
15 | /**
16 | * Generic effects applying the minimum values needed for a simple 2D or 3D effect
17 | */
18 | @interface RZXPassthroughEffect : RZXEffect
19 |
20 | + (instancetype)effect2D;
21 | + (instancetype)effect3D;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Headers/RZXInterpolator.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXInterpolator.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXInterpolator : NSObject
11 |
12 | + (instancetype)floatInterpolator;
13 | + (instancetype)vec2Interpolator;
14 | + (instancetype)vec3Interpolator;
15 | + (instancetype)vec4Interpolator;
16 | + (instancetype)quaternionInterpolator;
17 |
18 | - (id)invertValue:(id)value;
19 |
20 | - (id)addValue:(id)val1 toValue:(id)val2;
21 |
22 | - (id)interpolatedValueFrom:(id)fromValue to:(id)toValue t:(float)t;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXImageFilter.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXImageFilter.h
3 | // RazeEffects
4 | //
5 | // Created by Rob Visentin on 7/23/15.
6 | //
7 |
8 | #import
9 |
10 | @class RZXEffect;
11 |
12 | /**
13 | * Applies an effect to an image
14 | */
15 | @interface RZXImageFilter : NSObject
16 |
17 | @property (assign, nonatomic) CGImageRef sourceImage;
18 | @property (strong, nonatomic) RZXEffect *effect;
19 |
20 | - (instancetype)initWithSourceImage:(CGImageRef)sourceImage effect:(RZXEffect *)effect;
21 |
22 | - (CGImageRef)outputImage NS_RETURNS_INNER_POINTER CF_RETURNS_NOT_RETAINED;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXConvolutionEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXConvolutionEffect.h
3 | // RazeEffects
4 | //
5 | // Created by Rob Visentin on 7/23/15.
6 | //
7 |
8 | #import
9 |
10 | OBJC_EXTERN GLKMatrix3 const kRZXConvoultionKernelIdentity;
11 | OBJC_EXTERN NSString* const kRZXEffectConvolutionVSH;
12 |
13 | /**
14 | * Convolution 2D effect
15 | */
16 | @interface RZXConvolutionEffect : RZXEffect
17 |
18 | @property (assign, nonatomic) GLKMatrix3 kernel;
19 |
20 | // Post processing src e.g. @"rgb = normalize(rgb);"
21 | + (instancetype)effectWithKernel:(GLKMatrix3)kernel postProcessing:(NSString *)postProcessingSrc;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/Private/CAAnimation+RZXPrivateExtensions.h:
--------------------------------------------------------------------------------
1 | //
2 | // CAAnimation+RZXPrivateExtensions.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import
9 |
10 | @class RZXAnimationState;
11 | @class RZXInterpolator;
12 |
13 | @interface CAAnimation (RZXPrivateExtensions)
14 |
15 | @property (strong, nonatomic, readonly) RZXAnimationState *rzx_state;
16 |
17 | - (float)rzx_interpolationFactorForTime:(CFTimeInterval)currentTime;
18 |
19 | - (id)rzx_interpolateAtTime:(CFTimeInterval)time withInterpolator:(RZXInterpolator *)interpolator currentValue:(id)currentValue;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXConvolutionEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXConvolutionEffect.h
3 | // RazeEffects
4 | //
5 | // Created by Rob Visentin on 7/23/15.
6 | //
7 |
8 | #import
9 |
10 | OBJC_EXTERN GLKMatrix3 const kRZXConvoultionKernelIdentity;
11 | OBJC_EXTERN NSString* const kRZXEffectConvolutionVSH;
12 |
13 | /**
14 | * Convolution 2D effect
15 | */
16 | @interface RZXConvolutionEffect : RZXEffect
17 |
18 | @property (assign, nonatomic) GLKMatrix3 kernel;
19 |
20 | // Post processing src e.g. @"rgb = normalize(rgb);"
21 | + (instancetype)effectWithKernel:(GLKMatrix3)kernel postProcessing:(NSString *)postProcessingSrc;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXSceneView.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXSceneView.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RZXScene;
12 |
13 | /**
14 | * An RZXGLView with a scene attached. All update and display calls will update and display the attached scene.
15 | */
16 | @interface RZXSceneView : RZXGLView
17 |
18 | // TODO: elimineate confusion between two seperate core renderables (scene here and model in RZXGLView)
19 | @property (strong, nonatomic) RZXScene *scene;
20 |
21 | - (instancetype)initWithFrame:(CGRect)frame scene:(RZXScene *)scene;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXCompositeEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXCompositeEffect.h
3 | //
4 | // Created by Rob Visentin on 1/16/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Helper class for managing two effects at the same time
12 | */
13 | @interface RZXCompositeEffect : RZXEffect
14 |
15 | @property (strong, nonatomic, readonly) RZXEffect *firstEffect;
16 | @property (strong, nonatomic, readonly) RZXEffect *secondEffect;
17 |
18 | @property (strong, nonatomic, readonly) RZXEffect *currentEffect;
19 |
20 | + (instancetype)compositeEffectWithFirstEffect:(RZXEffect *)first secondEffect:(RZXEffect *)second;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Raze Scene Sandbox
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 | // This demo uses a blender model built by soloarforge and released under teh Creative Commons Attribution-ShareAlike License. The blender model was modified by changing its colors using UV mapping. The original model can be found at htttp://www.blendswap.com/blends/view/76269.
9 |
10 |
11 |
12 | #import
13 | @import RazeCore;
14 | @import RazeScene;
15 | @import RazeEffects;
16 |
17 | @interface ViewController : UIViewController
18 |
19 |
20 | @end
21 |
22 |
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Headers/RZXSceneView.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXSceneView.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RZXScene;
12 |
13 | /**
14 | * An RZXGLView with a scene attached. All update and display calls will update and display the attached scene.
15 | */
16 | @interface RZXSceneView : RZXGLView
17 |
18 | // TODO: elimineate confusion between two seperate core renderables (scene here and model in RZXGLView)
19 | @property (strong, nonatomic) RZXScene *scene;
20 |
21 | - (instancetype)initWithFrame:(CGRect)frame scene:(RZXScene *)scene;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/CAAnimation+RZXExtensions.h:
--------------------------------------------------------------------------------
1 | //
2 | // CAAnimation+RZXExtensions.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | @interface CAAnimation (RZXExtensions)
12 |
13 | @property (copy, nonatomic, setter=rzx_setStartBlock:) RZXAnimationStartBlock rzx_startBlock;
14 |
15 | @property (copy, nonatomic, setter=rzx_setCompletionBlock:) RZXAnimationCompletionBlock rzx_completionBlock;
16 |
17 | @property (assign, nonatomic, readonly, getter=rzx_isFinished) BOOL rzx_finished;
18 |
19 | - (void)rzx_applyToObject:(id)object;
20 | - (void)rzx_interrupt;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RazeAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeAnimation.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 |
10 | //! Project version number for RazeAnimation.
11 | FOUNDATION_EXPORT double RazeAnimationVersionNumber;
12 |
13 | //! Project version string for RazeAnimation.
14 | FOUNDATION_EXPORT const unsigned char RazeAnimationVersionString[];
15 |
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXCompositeEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXCompositeEffect.h
3 | //
4 | // Created by Rob Visentin on 1/16/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Helper class for managing two effects at the same time
12 | */
13 | @interface RZXCompositeEffect : RZXEffect
14 |
15 | @property (strong, nonatomic, readonly) RZXEffect *firstEffect;
16 | @property (strong, nonatomic, readonly) RZXEffect *secondEffect;
17 |
18 | @property (strong, nonatomic, readonly) RZXEffect *currentEffect;
19 |
20 | + (instancetype)compositeEffectWithFirstEffect:(RZXEffect *)first secondEffect:(RZXEffect *)second;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Headers/CAAnimation+RZXExtensions.h:
--------------------------------------------------------------------------------
1 | //
2 | // CAAnimation+RZXExtensions.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | @interface CAAnimation (RZXExtensions)
12 |
13 | @property (copy, nonatomic, setter=rzx_setStartBlock:) RZXAnimationStartBlock rzx_startBlock;
14 |
15 | @property (copy, nonatomic, setter=rzx_setCompletionBlock:) RZXAnimationCompletionBlock rzx_completionBlock;
16 |
17 | @property (assign, nonatomic, readonly, getter=rzx_isFinished) BOOL rzx_finished;
18 |
19 | - (void)rzx_applyToObject:(id)object;
20 | - (void)rzx_interrupt;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Headers/RazeAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeAnimation.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 |
10 | //! Project version number for RazeAnimation.
11 | FOUNDATION_EXPORT double RazeAnimationVersionNumber;
12 |
13 | //! Project version string for RazeAnimation.
14 | FOUNDATION_EXPORT const unsigned char RazeAnimationVersionString[];
15 |
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 |
--------------------------------------------------------------------------------
/Raze/RazeCore/NSValue+RZXExtensions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSValue+RZXExtensions.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | /**
12 | * Translates GLKit math types to and from NSValue
13 | */
14 | @interface NSValue (RZXExtensions)
15 |
16 | + (instancetype)rzx_valueWithVec2:(GLKVector2)vec2;
17 | + (instancetype)rzx_valueWithVec3:(GLKVector3)vec3;
18 | + (instancetype)rzx_valueWithVec4:(GLKVector4)vec4;
19 | + (instancetype)rzx_valueWithQuaternion:(GLKQuaternion)quaternion;
20 |
21 | - (GLKVector2)rzx_vec2Value;
22 | - (GLKVector3)rzx_vec3Value;
23 | - (GLKVector4)rzx_vec4Value;
24 | - (GLKQuaternion)rzx_quaternionValue;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RazeEffects.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeEffects.h
3 | //
4 | // Created by Rob Visentin on 4/17/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | FOUNDATION_EXPORT double RazeEffectsVersionNumber;
11 | FOUNDATION_EXPORT const unsigned char RazeEffectsVersionString[];
12 |
13 | #import
14 | #import
15 | #import
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RazeCore+RZXAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // RazeCore+RZXAnimation.m
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 |
10 | #import
11 | #import
12 | #import
13 | #import
14 |
15 | @implementation NSObject (RZXAnimation)
16 |
17 | + (void)load
18 | {
19 | @autoreleasepool {
20 | [[RZXTransform3D class] rzx_addKVCComplianceForGLKTypes];
21 | [[RZXCamera class] rzx_addKVCComplianceForGLKTypes];
22 | [[RZXEffect class] rzx_addKVCComplianceForGLKTypes];
23 | [[RZXGLView class] rzx_addKVCComplianceForGLKTypes];
24 | }
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/NSValue+RZXExtensions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSValue+RZXExtensions.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | /**
12 | * Translates GLKit math types to and from NSValue
13 | */
14 | @interface NSValue (RZXExtensions)
15 |
16 | + (instancetype)rzx_valueWithVec2:(GLKVector2)vec2;
17 | + (instancetype)rzx_valueWithVec3:(GLKVector3)vec3;
18 | + (instancetype)rzx_valueWithVec4:(GLKVector4)vec4;
19 | + (instancetype)rzx_valueWithQuaternion:(GLKQuaternion)quaternion;
20 |
21 | - (GLKVector2)rzx_vec2Value;
22 | - (GLKVector3)rzx_vec3Value;
23 | - (GLKVector4)rzx_vec4Value;
24 | - (GLKQuaternion)rzx_quaternionValue;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RazeEffects.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeEffects.h
3 | //
4 | // Created by Rob Visentin on 4/17/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | FOUNDATION_EXPORT double RazeEffectsVersionNumber;
11 | FOUNDATION_EXPORT const unsigned char RazeEffectsVersionString[];
12 |
13 | #import
14 | #import
15 | #import
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXModelNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXModeNodel.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RZXMesh;
12 | @class RZXTexture;
13 |
14 | /**
15 | * The basic node used for 3D Models. It contains a mesh object containing the model's construction data and a texture object that will be applied to the model.
16 | */
17 | @interface RZXModelNode : RZXNode
18 |
19 | // Contains the model data used by this node
20 | @property (strong, nonatomic) RZXMesh *mesh;
21 |
22 | // 2D texture to be applied to the mesh
23 | @property (strong, nonatomic) RZXTexture *texture;
24 |
25 | + (instancetype)modelNodeWithMesh:(RZXMesh *)mesh texture:(RZXTexture *)texture;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXClothEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXClothEffect.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Waving Cloth Effect
12 | */
13 | @interface RZXClothEffect : RZXEffect
14 |
15 | @property (assign, nonatomic) GLKVector2 anchors;
16 |
17 | @property (assign, nonatomic) GLfloat waveCount;
18 | @property (assign, nonatomic) GLfloat waveAmplitude;
19 | @property (assign, nonatomic) GLfloat waveVelocity;
20 |
21 | @property (assign, nonatomic) GLKVector3 lightOffset;
22 | @property (assign, nonatomic) GLKVector3 ambientLight;
23 | @property (assign, nonatomic) GLKVector3 diffuseLight;
24 | @property (assign, nonatomic) GLKVector3 specularLight;
25 |
26 | + (instancetype)effect;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Headers/RZXModelNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXModeNodel.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RZXMesh;
12 | @class RZXTexture;
13 |
14 | /**
15 | * The basic node used for 3D Models. It contains a mesh object containing the model's construction data and a texture object that will be applied to the model.
16 | */
17 | @interface RZXModelNode : RZXNode
18 |
19 | // Contains the model data used by this node
20 | @property (strong, nonatomic) RZXMesh *mesh;
21 |
22 | // 2D texture to be applied to the mesh
23 | @property (strong, nonatomic) RZXTexture *texture;
24 |
25 | + (instancetype)modelNodeWithMesh:(RZXMesh *)mesh texture:(RZXTexture *)texture;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Raze/RazeCore/Private/RZXCache.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXCache.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXCache : NSObject
11 |
12 | - (void)cacheObject:(id)object forKey:(id)key;
13 |
14 | // These are not "true" -retain, -release calls, but rather used for the cache's
15 | // own internal reference count.
16 | - (void)retainObjectForKey:(id)key;
17 | - (void)releaseObjectForKey:(id)key;
18 |
19 | - (id)objectForKey:(id)key;
20 |
21 | - (void)removeObjectForKey:(id)key;
22 | - (void)removeAllObjects;
23 |
24 | @end
25 |
26 | @interface RZXCache (RZXSubscripting)
27 |
28 | - (id)objectForKeyedSubscript:(id)key;
29 | - (void)setObject:(id)obj forKeyedSubscript:(id )key;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RZXAnimationBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXAnimationBase.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/13/15.
6 | //
7 |
8 | #import
9 |
10 | #ifndef RZXAnimationBase_h
11 | #define RZXAnimationBase_h
12 |
13 | typedef NS_OPTIONS(NSUInteger, RZXAnimationOptions) {
14 | kRZXAnimationOptionRepeat = 1 << 0,
15 | kRZXAnimationOptionAutoReverse = 1 << 1,
16 |
17 | kRZXAnimationOptionCurveLinear = 0 << 8, // default
18 | kRZXAnimationOptionCurveEaseIn = 1 << 8,
19 | kRZXAnimationOptionCurveEaseOut = 2 << 8,
20 | kRZXAnimationOptionCurveEaseInOut = 3 << 8
21 | };
22 |
23 | typedef void (^RZXAnimationStartBlock)(CAAnimation *animation);
24 | typedef void (^RZXAnimationCompletionBlock)(CAAnimation *animation, BOOL finished);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXScene.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXScene.m
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "RZXScene.h"
12 |
13 | @implementation RZXScene
14 |
15 | + (instancetype)sceneWithEffect:(RZXEffect *)effect
16 | {
17 | return [[RZXScene alloc] initWithEffect:effect];
18 | }
19 |
20 | - (instancetype)init
21 | {
22 | return [self initWithEffect:[RZXPassthroughEffect effect3D]];
23 | }
24 |
25 | - (instancetype)initWithEffect:(RZXEffect *)effect
26 | {
27 | self = [super init];
28 | if (self) {
29 | self.effect = effect;
30 | }
31 | return self;
32 | }
33 |
34 | - (void)rzx_bindGL
35 | {
36 | // no-op. The scene object itself isn't renderable
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXClothEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXClothEffect.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Waving Cloth Effect
12 | */
13 | @interface RZXClothEffect : RZXEffect
14 |
15 | @property (assign, nonatomic) GLKVector2 anchors;
16 |
17 | @property (assign, nonatomic) GLfloat waveCount;
18 | @property (assign, nonatomic) GLfloat waveAmplitude;
19 | @property (assign, nonatomic) GLfloat waveVelocity;
20 |
21 | @property (assign, nonatomic) GLKVector3 lightOffset;
22 | @property (assign, nonatomic) GLKVector3 ambientLight;
23 | @property (assign, nonatomic) GLKVector3 diffuseLight;
24 | @property (assign, nonatomic) GLKVector3 specularLight;
25 |
26 | + (instancetype)effect;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RazeCore.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeCore.h
3 | //
4 | // Created by Rob Visentin on 4/17/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | FOUNDATION_EXPORT double RazeCoreVersionNumber;
11 | FOUNDATION_EXPORT const unsigned char RazeCoreVersionString[];
12 |
13 | #import
14 | #import
15 | #import
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 | #import
23 | #import
24 | #import
25 | #import
26 | #import
27 |
--------------------------------------------------------------------------------
/Raze/RazeCoreTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Raze/RazeSceneTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Raze/RazeUIKitTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Raze/Products/RazeAnimation.framework/Headers/RZXAnimationBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXAnimationBase.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/13/15.
6 | //
7 |
8 | #import
9 |
10 | #ifndef RZXAnimationBase_h
11 | #define RZXAnimationBase_h
12 |
13 | typedef NS_OPTIONS(NSUInteger, RZXAnimationOptions) {
14 | kRZXAnimationOptionRepeat = 1 << 0,
15 | kRZXAnimationOptionAutoReverse = 1 << 1,
16 |
17 | kRZXAnimationOptionCurveLinear = 0 << 8, // default
18 | kRZXAnimationOptionCurveEaseIn = 1 << 8,
19 | kRZXAnimationOptionCurveEaseOut = 2 << 8,
20 | kRZXAnimationOptionCurveEaseInOut = 3 << 8
21 | };
22 |
23 | typedef void (^RZXAnimationStartBlock)(CAAnimation *animation);
24 | typedef void (^RZXAnimationCompletionBlock)(CAAnimation *animation, BOOL finished);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/Raze/RazeAnimationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Raze/RazeEffectsTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXQuadMesh.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXQuadMesh.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 1/10/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | OBJC_EXTERN NSInteger const kRZXQuadMeshMaxSubdivisions;
12 |
13 | /**
14 | * A procedurally generated rectangular mesh.
15 | */
16 | @interface RZXQuadMesh : RZXMesh
17 |
18 | /** Initialize a basic quad. */
19 | + (instancetype)quad;
20 |
21 | /** Initialize a quad with a specific number of subdivisions. */
22 | + (instancetype)quadWithSubdivisionLevel:(NSInteger)subdivisons;
23 |
24 | @end
25 |
26 | @interface RZXQuadMesh (RZXUnavailable)
27 |
28 | // The mesh data will be procedurally generated rather then loaded from a file.
29 | + (instancetype)meshWithName:(NSString *)name usingCache:(BOOL)useCache UNAVAILABLE_ATTRIBUTE;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RazeCore.h:
--------------------------------------------------------------------------------
1 | //
2 | // RazeCore.h
3 | //
4 | // Created by Rob Visentin on 4/17/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | FOUNDATION_EXPORT double RazeCoreVersionNumber;
11 | FOUNDATION_EXPORT const unsigned char RazeCoreVersionString[];
12 |
13 | #import
14 | #import
15 | #import
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 | #import
23 | #import
24 | #import
25 | #import
26 | #import
27 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene SandboxTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXQuadMesh.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXQuadMesh.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 1/10/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | OBJC_EXTERN NSInteger const kRZXQuadMeshMaxSubdivisions;
12 |
13 | /**
14 | * A procedurally generated rectangular mesh.
15 | */
16 | @interface RZXQuadMesh : RZXMesh
17 |
18 | /** Initialize a basic quad. */
19 | + (instancetype)quad;
20 |
21 | /** Initialize a quad with a specific number of subdivisions. */
22 | + (instancetype)quadWithSubdivisionLevel:(NSInteger)subdivisons;
23 |
24 | @end
25 |
26 | @interface RZXQuadMesh (RZXUnavailable)
27 |
28 | // The mesh data will be procedurally generated rather then loaded from a file.
29 | + (instancetype)meshWithName:(NSString *)name usingCache:(BOOL)useCache UNAVAILABLE_ATTRIBUTE;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Raze/RazeCore/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Raze/RazeScene/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Raze/RazeUIKit/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Raze/RazeCore/Private/RZXRenderLoop.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXRenderLoop.h
3 | //
4 | // Created by Rob Visentin on 1/10/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | @interface RZXRenderLoop : NSObject
12 |
13 | @property (assign, nonatomic, readonly) CFTimeInterval lastRender;
14 | @property (assign, nonatomic, readonly, getter=isRunning) BOOL running;
15 |
16 | @property (assign, nonatomic, readonly, getter=isValid) BOOL valid;
17 |
18 | @property (assign, nonatomic) BOOL automaticallyResumeWhenForegrounded; // default YES
19 |
20 | @property (assign, nonatomic) NSInteger preferredFPS; // default 30
21 |
22 | + (instancetype)renderLoop;
23 |
24 | - (void)setUpdateTarget:(id)updateTarget;
25 | - (void)setRenderTarget:(id)renderTarget;
26 |
27 | - (void)run;
28 | - (void)stop;
29 |
30 | - (void)invalidate;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXADSPhongEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXADSPhongEffect.h
3 | // Raze
4 | //
5 | // Created by John Stricker on 6/22/15.
6 | //
7 | //
8 |
9 | #import
10 |
11 | /**
12 | * This effect is design for generic purpose display of 3D models. It incorporates a single light, and use ADS (ambient, diffise, and specular) constants to describe the effects of that single light on the model. The lighting effects are applied per fragment (aka Phong shading).
13 | */
14 | @interface RZXADSPhongEffect : RZXEffect
15 |
16 | @property (assign, nonatomic) GLKVector4 lightPosition;
17 | @property (assign, nonatomic) GLKVector3 lightIntensity;
18 | @property (assign, nonatomic) GLKVector3 ambientReflection;
19 | @property (assign, nonatomic) GLKVector3 diffuseReflection;
20 | @property (assign, nonatomic) GLKVector3 specularReflection;
21 | @property (assign, nonatomic) GLfloat specularShininess;
22 |
23 | +(instancetype)effect;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXADSPhongEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXADSPhongEffect.h
3 | // Raze
4 | //
5 | // Created by John Stricker on 6/22/15.
6 | //
7 | //
8 |
9 | #import
10 |
11 | /**
12 | * This effect is design for generic purpose display of 3D models. It incorporates a single light, and use ADS (ambient, diffise, and specular) constants to describe the effects of that single light on the model. The lighting effects are applied per fragment (aka Phong shading).
13 | */
14 | @interface RZXADSPhongEffect : RZXEffect
15 |
16 | @property (assign, nonatomic) GLKVector4 lightPosition;
17 | @property (assign, nonatomic) GLKVector3 lightIntensity;
18 | @property (assign, nonatomic) GLKVector3 ambientReflection;
19 | @property (assign, nonatomic) GLKVector3 diffuseReflection;
20 | @property (assign, nonatomic) GLKVector3 specularReflection;
21 | @property (assign, nonatomic) GLfloat specularShininess;
22 |
23 | +(instancetype)effect;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/Private/RZXAnimationState.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXAnimationState.h
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 |
10 | @class CAAnimation;
11 |
12 | @interface RZXAnimationState : NSObject
13 |
14 | @property (assign, nonatomic, getter=isStarted) BOOL started;
15 | @property (assign, nonatomic, getter=isFinished) BOOL finished;
16 |
17 | @property (assign, nonatomic) CFTimeInterval currentTime;
18 | @property (assign, nonatomic) float repetition;
19 |
20 | // if animation is absolute, this is the initial value of the animated property
21 | @property (strong, nonatomic) id initialValue;
22 |
23 | // if animation is absolute, this is the target value of the animated property
24 | @property (strong, nonatomic) id targetValue;
25 |
26 | // the interpolated value applied so far
27 | @property (strong, nonatomic) id appliedValue;
28 |
29 | - (BOOL)updateWithAnimation:(CAAnimation *)animation;
30 |
31 | @end
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/RZXViewNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXViewNode.m
3 | // Raze Scene Sandbox
4 | //
5 | // Created by Rob Visentin on 8/7/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import "RZXViewNode.h"
10 |
11 | @interface RZXViewNode ()
12 |
13 | @property (weak, nonatomic) UIView *view;
14 |
15 | @end
16 |
17 | @implementation RZXViewNode
18 |
19 | + (instancetype)nodeWithView:(UIView *)view
20 | {
21 | RZXViewNode *node = [super node];
22 | node.view = view;
23 |
24 | return node;
25 | }
26 |
27 | - (BOOL)setupGL
28 | {
29 | self.texture = [RZXViewTexture textureWithSize:self.view.frame.size];
30 |
31 | return [super setupGL];
32 | }
33 |
34 | - (void)rzx_update:(NSTimeInterval)dt
35 | {
36 | if ( [self.texture isKindOfClass:[RZXViewTexture class]] ) {
37 | [(RZXViewTexture *)self.texture updateWithView:self.view synchronous:YES];
38 | }
39 |
40 | [super rzx_update:dt];
41 | }
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXDynamicTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXDynamicTexture.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 |
12 | typedef void (^RZXTextureRenderBlock)(id self, CGContextRef ctx);
13 |
14 | /**
15 | * A texture that is expected to be modified with each update call. Core video pixel buffers are used for rapid texture generation. (Note that on the simulator this approach is not used and dynamic textures will perform exceptionally poorly.
16 | */
17 | @interface RZXDynamicTexture : RZXTexture
18 |
19 |
20 | @property (assign, nonatomic, readonly) CGFloat scale;
21 |
22 | // Initialize a dynamic texture. Screen scale is typcially UIScreen.MainScreen.Scale
23 | + (instancetype)textureWithSize:(CGSize)size scale:(CGFloat)scale;
24 |
25 | - (void)updateWithBlock:(RZXTextureRenderBlock)renderBlock;
26 |
27 | - (CGImageRef)createImageRepresentation CF_RETURNS_RETAINED;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Raze/RazeCoreTests/RazeCoreTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // RazeCoreTests.m
3 | // RazeCoreTests
4 | //
5 | // Created by Rob Visentin on 4/17/15.
6 | //
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface RazeCoreTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation RazeCoreTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Raze/RazeSceneTests/RazeSceneTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // RazeSceneTests.m
3 | // RazeSceneTests
4 | //
5 | // Created by John Stricker on 5/1/15.
6 | //
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface RazeSceneTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation RazeSceneTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Raze/RazeUIKitTests/RazeUIKitTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // RazeUIKitTests.m
3 | // RazeUIKitTests
4 | //
5 | // Created by Rob Visentin on 4/17/15.
6 | //
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface RazeUIKitTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation RazeUIKitTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXDynamicTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXDynamicTexture.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 |
12 | typedef void (^RZXTextureRenderBlock)(id self, CGContextRef ctx);
13 |
14 | /**
15 | * A texture that is expected to be modified with each update call. Core video pixel buffers are used for rapid texture generation. (Note that on the simulator this approach is not used and dynamic textures will perform exceptionally poorly.
16 | */
17 | @interface RZXDynamicTexture : RZXTexture
18 |
19 |
20 | @property (assign, nonatomic, readonly) CGFloat scale;
21 |
22 | // Initialize a dynamic texture. Screen scale is typcially UIScreen.MainScreen.Scale
23 | + (instancetype)textureWithSize:(CGSize)size scale:(CGFloat)scale;
24 |
25 | - (void)updateWithBlock:(RZXTextureRenderBlock)renderBlock;
26 |
27 | - (CGImageRef)createImageRepresentation CF_RETURNS_RETAINED;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Raze/RazeEffectsTests/RazeEffectsTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // RazeEffectsTests.m
3 | // RazeEffectsTests
4 | //
5 | // Created by Rob Visentin on 4/17/15.
6 | //
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface RazeEffectsTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation RazeEffectsTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Raze/RazeAnimationTests/RazeAnimationTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // RazeAnimationTests.m
3 | // RazeAnimationTests
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface RazeAnimationTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation RazeAnimationTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXStaticTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXStaticTexture.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * A texture whose contents are not expected to be updated frequently, as in the case of most models.
12 | */
13 | @interface RZXStaticTexture : RZXTexture
14 |
15 | @property (copy, nonatomic, readonly) NSString *fileName;
16 |
17 | // Load texture from a file. If using the cache and this file was loaded previously, then the texture will make use of a previously created OpenGL texture buffer
18 | + (instancetype)textureFromFile:(NSString *)fileName usingCache:(BOOL)useCache;
19 |
20 | //Load a texture from a file and also generate mipmaps of the texture. If available, Mipmaps will be automatically utlized by Raze and will maintain texture clarity when using a large texture that appears on a small object (or an object that will at times be far away and appear small).
21 | + (instancetype)mipmappedTextureFromFile:(NSString *)fileName usingCache:(BOOL)useCache;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXStaticTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXStaticTexture.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * A texture whose contents are not expected to be updated frequently, as in the case of most models.
12 | */
13 | @interface RZXStaticTexture : RZXTexture
14 |
15 | @property (copy, nonatomic, readonly) NSString *fileName;
16 |
17 | // Load texture from a file. If using the cache and this file was loaded previously, then the texture will make use of a previously created OpenGL texture buffer
18 | + (instancetype)textureFromFile:(NSString *)fileName usingCache:(BOOL)useCache;
19 |
20 | //Load a texture from a file and also generate mipmaps of the texture. If available, Mipmaps will be automatically utlized by Raze and will maintain texture clarity when using a large texture that appears on a small object (or an object that will at times be far away and appear small).
21 | + (instancetype)mipmappedTextureFromFile:(NSString *)fileName usingCache:(BOOL)useCache;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene SandboxTests/Raze_Scene_SandboxTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Raze_Scene_SandboxTests.m
3 | // Raze Scene SandboxTests
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface Raze_Scene_SandboxTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation Raze_Scene_SandboxTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Raizlabs
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXSceneView.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXSceneView.m
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @implementation RZXSceneView
13 |
14 | - (instancetype)initWithFrame:(CGRect)frame scene:(RZXScene *)scene
15 | {
16 | self = [self initWithFrame:frame];
17 | if (self) {
18 | self.scene = scene;
19 | }
20 | return self;
21 | }
22 |
23 | - (void)setScene:(RZXScene *)scene
24 | {
25 | _scene = scene;
26 |
27 | [_context runBlock:^(RZXGLContext *context) {
28 | [scene setupGL];
29 | }];
30 |
31 | self.model = scene;
32 | }
33 |
34 | - (void)setupGL
35 | {
36 | [super setupGL];
37 |
38 | [self.scene setupGL];
39 | }
40 |
41 | #pragma mark - drawing
42 |
43 | - (void)rzx_update:(NSTimeInterval)dt
44 | {
45 | [super rzx_update:dt];
46 | [self.scene rzx_update:dt];
47 | }
48 |
49 | - (void)display
50 | {
51 | self.scene.resolution = GLKVector2Make(_backingWidth, _backingHeight);
52 | [super display];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Raze/RazeUIKit/RZXViewTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXViewTexture.h
3 | //
4 | // Created by Rob Visentin on 1/9/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | /**
12 | * Creates a dynamic texture from a UIView.
13 | */
14 | @interface RZXViewTexture : RZXDynamicTexture
15 |
16 | + (instancetype)textureWithSize:(CGSize)size;
17 |
18 | /**
19 | * Renders the contents of the given view into the receiver's texture buffer.
20 | *
21 | * @param view The view to render to the receiver's texture buffer.
22 | * @param synchronous Whether the rendering should be performed synchronously.
23 | *
24 | * @note This method uses drawViewHierarchyInRect to render the view.
25 | * Although not documented, this method is NOT threadsafe (specifically when layers are added or removed during view rendering).
26 | * Updating the texture asynchronously is significantly more performant,
27 | * but if there is question whether or not async will be safe, then pass YES for the synchronous parameter.
28 | */
29 | - (void)updateWithView:(UIView *)view synchronous:(BOOL)synchronous;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Raze/Products/RazeUIKit.framework/Headers/RZXViewTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXViewTexture.h
3 | //
4 | // Created by Rob Visentin on 1/9/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | /**
12 | * Creates a dynamic texture from a UIView.
13 | */
14 | @interface RZXViewTexture : RZXDynamicTexture
15 |
16 | + (instancetype)textureWithSize:(CGSize)size;
17 |
18 | /**
19 | * Renders the contents of the given view into the receiver's texture buffer.
20 | *
21 | * @param view The view to render to the receiver's texture buffer.
22 | * @param synchronous Whether the rendering should be performed synchronously.
23 | *
24 | * @note This method uses drawViewHierarchyInRect to render the view.
25 | * Although not documented, this method is NOT threadsafe (specifically when layers are added or removed during view rendering).
26 | * Updating the texture asynchronously is significantly more performant,
27 | * but if there is question whether or not async will be safe, then pass YES for the synchronous parameter.
28 | */
29 | - (void)updateWithView:(UIView *)view synchronous:(BOOL)synchronous;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXTexture.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 |
10 | OBJC_EXTERN NSString* const kRZXTextureMinFilterKey; /** Default GL_NEAREST */
11 | OBJC_EXTERN NSString* const kRZXTextureMagFilterKey; /** Default GL_LINEAR */
12 | OBJC_EXTERN NSString* const kRZXTextureSWrapKey; /** Default GL_REPEAT */
13 | OBJC_EXTERN NSString* const kRZXTextureTWrapKey; /** Default GL_REPEAT */
14 |
15 | #pragma clang diagnostic push
16 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
17 |
18 | /**
19 | * Base 2D image texture class. Textures in use should be subclasses: RZXStaticTexture or RZXDynamicTexture.
20 | */
21 | @interface RZXTexture : RZXGPUObject {
22 | @protected
23 | GLuint _name;
24 | CGSize _size;
25 | }
26 |
27 | /**
28 | * Returns the width and height of the texture.
29 | * @note If the texture is not yet loaded, it will be loaded in the default context before returning.
30 | */
31 | @property (assign, nonatomic, readonly) CGSize size;
32 |
33 | - (void)applyOptions:(NSDictionary *)options;
34 |
35 | - (void)attachToFramebuffer:(GLenum)framebuffer;
36 |
37 | @end
38 |
39 | #pragma clang diagnostic pop
40 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXTexture.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 |
10 | OBJC_EXTERN NSString* const kRZXTextureMinFilterKey; /** Default GL_NEAREST */
11 | OBJC_EXTERN NSString* const kRZXTextureMagFilterKey; /** Default GL_LINEAR */
12 | OBJC_EXTERN NSString* const kRZXTextureSWrapKey; /** Default GL_REPEAT */
13 | OBJC_EXTERN NSString* const kRZXTextureTWrapKey; /** Default GL_REPEAT */
14 |
15 | #pragma clang diagnostic push
16 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
17 |
18 | /**
19 | * Base 2D image texture class. Textures in use should be subclasses: RZXStaticTexture or RZXDynamicTexture.
20 | */
21 | @interface RZXTexture : RZXGPUObject {
22 | @protected
23 | GLuint _name;
24 | CGSize _size;
25 | }
26 |
27 | /**
28 | * Returns the width and height of the texture.
29 | * @note If the texture is not yet loaded, it will be loaded in the default context before returning.
30 | */
31 | @property (assign, nonatomic, readonly) CGSize size;
32 |
33 | - (void)applyOptions:(NSDictionary *)options;
34 |
35 | - (void)attachToFramebuffer:(GLenum)framebuffer;
36 |
37 | @end
38 |
39 | #pragma clang diagnostic pop
40 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/RZXBasicAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXBasicAnimation.m
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/13/15.
6 | //
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @implementation RZXBasicAnimation
13 |
14 | + (instancetype)animationWithKeyPath:(NSString *)path options:(RZXAnimationOptions)options
15 | {
16 | RZXBasicAnimation *animation = [self animationWithKeyPath:path];
17 |
18 | if ( options & kRZXAnimationOptionRepeat ) {
19 | animation.repeatCount = HUGE_VALF;
20 | }
21 |
22 | if ( options & kRZXAnimationOptionAutoReverse ) {
23 | animation.autoreverses = YES;
24 | }
25 |
26 | if ( options & kRZXAnimationOptionCurveEaseIn ) {
27 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
28 | }
29 | else if ( options & kRZXAnimationOptionCurveEaseOut ) {
30 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
31 | }
32 | else if ( options & kRZXAnimationOptionCurveEaseInOut ) {
33 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
34 | }
35 |
36 | return animation;
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Raze/RazeCore/NSValue+RZXExtensions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSValue+RZXExtensions.m
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/24/15.
6 | //
7 |
8 | #import "NSValue+RZXExtensions.h"
9 |
10 | @implementation NSValue (RZXExtensions)
11 |
12 | + (instancetype)rzx_valueWithVec2:(GLKVector2)vec2
13 | {
14 | return [self valueWithBytes:vec2.v objCType:@encode(GLKVector2)];
15 | }
16 |
17 | + (instancetype)rzx_valueWithVec3:(GLKVector3)vec3
18 | {
19 | return [self valueWithBytes:vec3.v objCType:@encode(GLKVector3)];
20 | }
21 |
22 | + (instancetype)rzx_valueWithVec4:(GLKVector4)vec4
23 | {
24 | return [self valueWithBytes:vec4.v objCType:@encode(GLKVector4)];
25 | }
26 |
27 | + (instancetype)rzx_valueWithQuaternion:(GLKQuaternion)quaternion
28 | {
29 | return [self valueWithBytes:quaternion.q objCType:@encode(GLKQuaternion)];
30 | }
31 |
32 | - (GLKVector2)rzx_vec2Value
33 | {
34 | GLKVector2 v;
35 | [self getValue:v.v];
36 | return v;
37 | }
38 |
39 | - (GLKVector3)rzx_vec3Value
40 | {
41 | GLKVector3 v;
42 | [self getValue:v.v];
43 | return v;
44 | }
45 |
46 | - (GLKVector4)rzx_vec4Value
47 | {
48 | GLKVector4 v;
49 | [self getValue:v.v];
50 | return v;
51 | }
52 |
53 | - (GLKQuaternion)rzx_quaternionValue
54 | {
55 | GLKQuaternion q;
56 | [self getValue:q.q];
57 | return q;
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationLandscapeLeft
36 | UIInterfaceOrientationLandscapeRight
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXCamera.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXCamera.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * An object representing a projective camera.
12 | */
13 | @interface RZXCamera : NSObject
14 |
15 | @property (strong, nonatomic) RZXTransform3D *transform;
16 |
17 | /** A unit vector in the "up" direction. Default is (0, 1, 0) */
18 | @property (nonatomic, assign) GLKVector3 up;
19 |
20 | @property (nonatomic, assign) float fieldOfView;
21 |
22 | @property (nonatomic, assign) float aspectRatio;
23 |
24 | /** The near clipping plane. Must be positive. */
25 | @property (nonatomic, assign) float near;
26 |
27 | /** The far clipping plane. Must be positive. */
28 | @property (nonatomic, assign) float far;
29 |
30 | /** The current view matrix based on the camera's transform and up properties. */
31 | @property (nonatomic, readonly) GLKMatrix4 viewMatrix;
32 |
33 | /** The current projection matrix of the camera based on the fieldOfView, aspectRatio, near, and far properties.
34 | * @note This value is cached, so is not recomputed unless a contributing property changes.
35 | */
36 | @property (nonatomic, readonly) GLKMatrix4 projectionMatrix;
37 |
38 | + (instancetype)cameraWithFieldOfView:(float)fov aspectRatio:(float)aspectRatio nearClipping:(float)near farClipping:(float)far;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXCamera.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXCamera.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * An object representing a projective camera.
12 | */
13 | @interface RZXCamera : NSObject
14 |
15 | @property (strong, nonatomic) RZXTransform3D *transform;
16 |
17 | /** A unit vector in the "up" direction. Default is (0, 1, 0) */
18 | @property (nonatomic, assign) GLKVector3 up;
19 |
20 | @property (nonatomic, assign) float fieldOfView;
21 |
22 | @property (nonatomic, assign) float aspectRatio;
23 |
24 | /** The near clipping plane. Must be positive. */
25 | @property (nonatomic, assign) float near;
26 |
27 | /** The far clipping plane. Must be positive. */
28 | @property (nonatomic, assign) float far;
29 |
30 | /** The current view matrix based on the camera's transform and up properties. */
31 | @property (nonatomic, readonly) GLKMatrix4 viewMatrix;
32 |
33 | /** The current projection matrix of the camera based on the fieldOfView, aspectRatio, near, and far properties.
34 | * @note This value is cached, so is not recomputed unless a contributing property changes.
35 | */
36 | @property (nonatomic, readonly) GLKMatrix4 projectionMatrix;
37 |
38 | + (instancetype)cameraWithFieldOfView:(float)fov aspectRatio:(float)aspectRatio nearClipping:(float)near farClipping:(float)far;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXNode.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import
12 | #import
13 | #import
14 |
15 | @class RZXTransform3D;
16 | @class RZXEffect;
17 | @class RZXCamera;
18 |
19 | /**
20 | * The base unit of any scene object. In most cases anything applied to a node (transform, camera, effect, animation) will also be applied to that node's children if the child node does not have a value specified.
21 | */
22 | @interface RZXNode : RZXGPUObject
23 |
24 | @property (strong, nonatomic) RZXTransform3D *transform;
25 | @property (strong, nonatomic) RZXEffect *effect;
26 | @property (strong, nonatomic) RZXCamera *camera;
27 |
28 | @property (assign, nonatomic) GLKVector2 resolution;
29 |
30 | @property (copy, nonatomic, readonly) NSArray *children;
31 | @property (weak, nonatomic, readonly) RZXNode *parent;
32 |
33 | + (instancetype)node;
34 |
35 | - (void)addChild:(RZXNode *)child;
36 | - (void)insertChild:(RZXNode *)child atIndex:(NSUInteger)index;
37 |
38 | - (void)removeFromParent;
39 |
40 | - (GLKMatrix4)modelMatrix;
41 | - (GLKMatrix4)viewMatrix;
42 | - (GLKMatrix4)projectionMatrix;
43 |
44 | - (void)addAnimation:(CAAnimation *)animation forKey:(NSString *)key;
45 | - (CAAnimation *)animationForKey:(NSString *)key;
46 | - (void)removeAnimationForKey:(NSString *)key;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Headers/RZXNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXNode.h
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import
12 | #import
13 | #import
14 |
15 | @class RZXTransform3D;
16 | @class RZXEffect;
17 | @class RZXCamera;
18 |
19 | /**
20 | * The base unit of any scene object. In most cases anything applied to a node (transform, camera, effect, animation) will also be applied to that node's children if the child node does not have a value specified.
21 | */
22 | @interface RZXNode : RZXGPUObject
23 |
24 | @property (strong, nonatomic) RZXTransform3D *transform;
25 | @property (strong, nonatomic) RZXEffect *effect;
26 | @property (strong, nonatomic) RZXCamera *camera;
27 |
28 | @property (assign, nonatomic) GLKVector2 resolution;
29 |
30 | @property (copy, nonatomic, readonly) NSArray *children;
31 | @property (weak, nonatomic, readonly) RZXNode *parent;
32 |
33 | + (instancetype)node;
34 |
35 | - (void)addChild:(RZXNode *)child;
36 | - (void)insertChild:(RZXNode *)child atIndex:(NSUInteger)index;
37 |
38 | - (void)removeFromParent;
39 |
40 | - (GLKMatrix4)modelMatrix;
41 | - (GLKMatrix4)viewMatrix;
42 | - (GLKMatrix4)projectionMatrix;
43 |
44 | - (void)addAnimation:(CAAnimation *)animation forKey:(NSString *)key;
45 | - (CAAnimation *)animationForKey:(NSString *)key;
46 | - (void)removeAnimationForKey:(NSString *)key;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.raizlabs.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXTextNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXTextNode.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | #if TARGET_OS_IPHONE
12 | #import
13 | #else
14 | #import
15 | #endif
16 |
17 | typedef NS_ENUM(NSUInteger, RZXHorizontalAlignment) {
18 | RZXHorizontalAlignmentCenter,
19 | RZXHorizontalAlignmentLeft,
20 | RZXHorizontalAlignmentRight
21 | };
22 |
23 | typedef NS_ENUM(NSUInteger, RZXVerticalAlignment) {
24 | RZXVerticalAlignmentCenter,
25 | RZXVerticalAlignmentTop,
26 | RZXVerticalAlignmentBottom
27 | };
28 |
29 | @class RZXFont;
30 | @class RZXColor;
31 |
32 | /**
33 | * A model node whose model is a quad upon which is drawn a texture created from text
34 | */
35 | @interface RZXTextNode : RZXModelNode
36 |
37 | @property (copy, nonatomic) NSString *text;
38 |
39 | @property (strong, nonatomic) RZXFont *font;
40 | @property (strong, nonatomic) RZXColor *textColor;
41 |
42 | @property (assign, nonatomic) NSLineBreakMode lineBreakMode;
43 | @property (assign, nonatomic) NSTextAlignment textAlignment;
44 |
45 | @property (copy, nonatomic) NSAttributedString *attributedText;
46 |
47 | @property (assign, nonatomic) RZXHorizontalAlignment horizontalAlignment;
48 | @property (assign, nonatomic) RZXVerticalAlignment verticalAlignment;
49 |
50 | // TODO: this is currently specified in screen points. Ideally this should be in GL units.
51 | @property (assign, nonatomic) CGSize boundingSize;
52 |
53 | + (instancetype)nodeWithText:(NSString *)text;
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Raze/RazeScene/RZXModelNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXModelNode.m
3 | // RazeScene
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | @implementation RZXModelNode
14 |
15 | + (instancetype)modelNodeWithMesh:(RZXMesh *)mesh texture:(RZXTexture *)texture
16 | {
17 | return [[self alloc] initWithMesh:mesh texture:texture];
18 | }
19 |
20 | - (instancetype)initWithMesh:(RZXMesh *)mesh texture:(RZXTexture *)texture
21 | {
22 | self = [super init];
23 | if (self) {
24 | _mesh = mesh;
25 | _texture = texture;
26 | }
27 | return self;
28 | }
29 |
30 | - (RZXTexture *)texture
31 | {
32 | if ( _texture == nil ) {
33 | _texture = [[RZXTexture alloc] init];
34 | }
35 | return _texture;
36 | }
37 |
38 | - (RZXMesh *)mesh
39 | {
40 | if ( _mesh == nil ) {
41 | _mesh = [[RZXMesh alloc] init];
42 | }
43 | return _mesh;
44 | }
45 |
46 | #pragma mark - RZXRenderable
47 |
48 | - (void)rzx_render
49 | {
50 | [self.mesh rzx_render];
51 |
52 | [super rzx_render];
53 | }
54 |
55 | #pragma mark - RZXGPUObject overrides
56 |
57 | - (BOOL)setupGL
58 | {
59 | return ([super setupGL] && [self.texture setupGL] && [self.mesh setupGL]);
60 | }
61 |
62 | - (BOOL)bindGL
63 | {
64 | return ([super bindGL] && [self.texture bindGL] && [self.mesh bindGL]);
65 | }
66 |
67 | - (void)teardownGL
68 | {
69 | [super teardownGL];
70 |
71 | [self.texture teardownGL];
72 | [self.mesh teardownGL];
73 | }
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/Raze/Products/RazeScene.framework/Headers/RZXTextNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXTextNode.h
3 | // RazeCore
4 | //
5 | // Created by Rob Visentin on 6/29/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | #if TARGET_OS_IPHONE
12 | #import
13 | #else
14 | #import
15 | #endif
16 |
17 | typedef NS_ENUM(NSUInteger, RZXHorizontalAlignment) {
18 | RZXHorizontalAlignmentCenter,
19 | RZXHorizontalAlignmentLeft,
20 | RZXHorizontalAlignmentRight
21 | };
22 |
23 | typedef NS_ENUM(NSUInteger, RZXVerticalAlignment) {
24 | RZXVerticalAlignmentCenter,
25 | RZXVerticalAlignmentTop,
26 | RZXVerticalAlignmentBottom
27 | };
28 |
29 | @class RZXFont;
30 | @class RZXColor;
31 |
32 | /**
33 | * A model node whose model is a quad upon which is drawn a texture created from text
34 | */
35 | @interface RZXTextNode : RZXModelNode
36 |
37 | @property (copy, nonatomic) NSString *text;
38 |
39 | @property (strong, nonatomic) RZXFont *font;
40 | @property (strong, nonatomic) RZXColor *textColor;
41 |
42 | @property (assign, nonatomic) NSLineBreakMode lineBreakMode;
43 | @property (assign, nonatomic) NSTextAlignment textAlignment;
44 |
45 | @property (copy, nonatomic) NSAttributedString *attributedText;
46 |
47 | @property (assign, nonatomic) RZXHorizontalAlignment horizontalAlignment;
48 | @property (assign, nonatomic) RZXVerticalAlignment verticalAlignment;
49 |
50 | // TODO: this is currently specified in screen points. Ideally this should be in GL units.
51 | @property (assign, nonatomic) CGSize boundingSize;
52 |
53 | + (instancetype)nodeWithText:(NSString *)text;
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXGrayscaleEffect.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXGrayscaleEffect.m
3 | // RazeEffects
4 | //
5 | // Created by Rob Visentin on 7/21/15.
6 | //
7 |
8 | #import
9 |
10 | static NSString* const kRZXEffectIntensityVSH = RZX_SHADER_SRC(
11 | uniform mat4 u_MVPMatrix;
12 |
13 | attribute vec4 a_position;
14 | attribute vec2 a_texCoord0;
15 |
16 | varying vec2 v_texCoord0;
17 |
18 | void main(void)
19 | {
20 | v_texCoord0 = a_texCoord0;
21 | gl_Position = u_MVPMatrix * a_position;
22 | });
23 |
24 | static NSString* const kRZXEffectIntensityFSH = RZX_SHADER_SRC(
25 | const highp vec3 W = vec3(0.2125, 0.7154, 0.0721);
26 |
27 | uniform lowp sampler2D u_Texture;
28 |
29 | varying highp vec2 v_texCoord0;
30 |
31 | void main()
32 | {
33 | lowp vec4 texel = texture2D(u_Texture, v_texCoord0);
34 | highp float luminance = dot(texel.rgb, W);
35 | gl_FragColor = vec4(vec3(luminance), texel.a);
36 | });
37 |
38 | @implementation RZXGrayscaleEffect
39 |
40 | + (instancetype)effect
41 | {
42 | RZXGrayscaleEffect *effect = [RZXGrayscaleEffect effectWithVertexShader:kRZXEffectIntensityVSH fragmentShader:kRZXEffectIntensityFSH];
43 | effect.mvpUniform = @"u_MVPMatrix";
44 |
45 | return effect;
46 | }
47 |
48 | - (BOOL)link
49 | {
50 | [self bindAttribute:@"a_position" location:kRZXVertexAttribPosition];
51 | [self bindAttribute:@"a_texCoord0" location:kRZXVertexAttribTexCoord];
52 |
53 | return [super link];
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXTransform3D.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXTransform3D.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXTransform3D : NSObject
11 |
12 | @property (nonatomic, assign) GLKVector3 translation;
13 | @property (nonatomic, assign) GLKQuaternion rotation;
14 | @property (nonatomic, assign) GLKVector3 scale;
15 |
16 | /**
17 | * Returns the current TRS matrix from the translation, rotation, and scale properties.
18 | * @note This matrix is cached, and therefore is not recomputed unless a contributing property changes.
19 | */
20 | @property (nonatomic, readonly) GLKMatrix4 modelMatrix;
21 |
22 | + (instancetype)transform;
23 | + (instancetype)transformWithTranslation:(GLKVector3)trans rotation:(GLKQuaternion)rot scale:(GLKVector3)scale;
24 |
25 | // delta is added to current value
26 | - (void)translateXBy:(float)dx;
27 | - (void)translateYBy:(float)dy;
28 | - (void)translateZBy:(float)dz;
29 |
30 | // current value is set to given value
31 | - (void)translateXTo:(float)tx;
32 | - (void)translateYTo:(float)ty;
33 | - (void)translateZTo:(float)tz;
34 |
35 | // current value is multiplied by delta
36 | - (void)scaleXBy:(float)dx;
37 | - (void)scaleYBy:(float)dy;
38 | - (void)scaleZBy:(float)dz;
39 |
40 | // current value is set to given value
41 | - (void)scaleXTo:(float)sx;
42 | - (void)scaleYTo:(float)sy;
43 | - (void)scaleZTo:(float)sz;
44 |
45 | // current rotation is multiplied by given quaternion
46 | - (void)rotateXBy:(float)angle;
47 | - (void)rotateYBy:(float)angle;
48 | - (void)rotateZBy:(float)angle;
49 | - (void)rotateBy:(GLKQuaternion)rotation;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXTransform3D.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXTransform3D.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @interface RZXTransform3D : NSObject
11 |
12 | @property (nonatomic, assign) GLKVector3 translation;
13 | @property (nonatomic, assign) GLKQuaternion rotation;
14 | @property (nonatomic, assign) GLKVector3 scale;
15 |
16 | /**
17 | * Returns the current TRS matrix from the translation, rotation, and scale properties.
18 | * @note This matrix is cached, and therefore is not recomputed unless a contributing property changes.
19 | */
20 | @property (nonatomic, readonly) GLKMatrix4 modelMatrix;
21 |
22 | + (instancetype)transform;
23 | + (instancetype)transformWithTranslation:(GLKVector3)trans rotation:(GLKQuaternion)rot scale:(GLKVector3)scale;
24 |
25 | // delta is added to current value
26 | - (void)translateXBy:(float)dx;
27 | - (void)translateYBy:(float)dy;
28 | - (void)translateZBy:(float)dz;
29 |
30 | // current value is set to given value
31 | - (void)translateXTo:(float)tx;
32 | - (void)translateYTo:(float)ty;
33 | - (void)translateZTo:(float)tz;
34 |
35 | // current value is multiplied by delta
36 | - (void)scaleXBy:(float)dx;
37 | - (void)scaleYBy:(float)dy;
38 | - (void)scaleZBy:(float)dz;
39 |
40 | // current value is set to given value
41 | - (void)scaleXTo:(float)sx;
42 | - (void)scaleYTo:(float)sy;
43 | - (void)scaleZTo:(float)sz;
44 |
45 | // current rotation is multiplied by given quaternion
46 | - (void)rotateXBy:(float)angle;
47 | - (void)rotateYBy:(float)angle;
48 | - (void)rotateZBy:(float)angle;
49 | - (void)rotateBy:(GLKQuaternion)rotation;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Raze/RazeAnimation/Private/RZXAnimationState.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXAnimationState.m
3 | // RazeAnimation
4 | //
5 | // Created by Rob Visentin on 7/10/15.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | @implementation RZXAnimationState
12 |
13 | - (BOOL)updateWithAnimation:(CAAnimation *)animation
14 | {
15 | BOOL reset = NO;
16 |
17 | NSTimeInterval duration = animation.duration;
18 | float repeatCount = animation.repeatCount;
19 | CFTimeInterval repeatDuration = animation.repeatDuration;
20 |
21 | if ( self.currentTime > 0.0 && !self.isStarted ) {
22 | self.started = YES;
23 | reset = YES;
24 | }
25 |
26 | if ( repeatCount > 0.0f && self.repetition >= repeatCount + 1 ) {
27 | CFTimeInterval remainingTime = fmod(repeatCount * duration, duration);
28 |
29 | self.currentTime = remainingTime > 0.0 ? remainingTime : duration;
30 | self.repetition = repeatCount;
31 | self.finished = YES;
32 | }
33 | else if ( repeatDuration > 0.0 && self.repetition * duration >= repeatDuration ) {
34 | CFTimeInterval remainingTime = fmod(repeatDuration, duration);
35 |
36 | self.currentTime = remainingTime > 0.0 ? remainingTime : duration;
37 | self.repetition = repeatDuration / duration;
38 | self.finished = YES;
39 | }
40 | else if ( self.currentTime >= duration ) {
41 | if ( repeatCount > 0.0f || repeatDuration > 0.0 ) {
42 | self.currentTime -= duration;
43 | reset = YES;
44 | }
45 | else {
46 | self.currentTime = duration;
47 | self.finished = YES;
48 | }
49 | }
50 |
51 | return reset;
52 | }
53 |
54 | @end
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXGLView.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXGLView.h
3 | //
4 | // Created by Rob Visentin on 3/15/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 | #import
11 | #import
12 |
13 | @class RZXGLContext;
14 |
15 | #pragma clang diagnostic push
16 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
17 |
18 | /**
19 | * UIView with a CAEAGLayer, used for all OpenGL rendering.
20 | * Subclasses should be used to perform more nuanced rendering.
21 | */
22 | @interface RZXGLView : UIView {
23 | @protected
24 | RZXGLContext *_context;
25 |
26 | // buffer indices for frame buffer, color render buffer, and depth render buffer
27 | GLuint _fbo;
28 | GLuint _crb;
29 | GLuint _drb;
30 |
31 | // buffer indices for multisampling
32 | GLuint _msFbo;
33 | GLuint _msCrb;
34 | GLuint _msDrb;
35 |
36 | GLint _backingWidth;
37 | GLint _backingHeight;
38 | }
39 |
40 | /** Frames per second specified between 1 and 60. */
41 | @property (assign, nonatomic) IBInspectable NSInteger framesPerSecond;
42 |
43 | /* Multisample level specified between 0 and 4. */
44 | @property (assign, nonatomic) IBInspectable GLsizei multisampleLevel;
45 |
46 | // Pausing will stop the render loop
47 | @property (assign, nonatomic, getter=isPaused) BOOL paused;
48 |
49 | // Model for the view
50 | @property (strong, nonatomic) id model;
51 |
52 | @property (nonatomic, readonly) RZXGPUObjectTeardownBlock teardownHandler;
53 |
54 | - (void)setupGL;
55 | - (void)teardownGL;
56 |
57 | - (void)display;
58 |
59 | @end
60 |
61 | #pragma clang diagnostic pop
62 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXGLView.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXGLView.h
3 | //
4 | // Created by Rob Visentin on 3/15/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 | #import
11 | #import
12 |
13 | @class RZXGLContext;
14 |
15 | #pragma clang diagnostic push
16 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
17 |
18 | /**
19 | * UIView with a CAEAGLayer, used for all OpenGL rendering.
20 | * Subclasses should be used to perform more nuanced rendering.
21 | */
22 | @interface RZXGLView : UIView {
23 | @protected
24 | RZXGLContext *_context;
25 |
26 | // buffer indices for frame buffer, color render buffer, and depth render buffer
27 | GLuint _fbo;
28 | GLuint _crb;
29 | GLuint _drb;
30 |
31 | // buffer indices for multisampling
32 | GLuint _msFbo;
33 | GLuint _msCrb;
34 | GLuint _msDrb;
35 |
36 | GLint _backingWidth;
37 | GLint _backingHeight;
38 | }
39 |
40 | /** Frames per second specified between 1 and 60. */
41 | @property (assign, nonatomic) IBInspectable NSInteger framesPerSecond;
42 |
43 | /* Multisample level specified between 0 and 4. */
44 | @property (assign, nonatomic) IBInspectable GLsizei multisampleLevel;
45 |
46 | // Pausing will stop the render loop
47 | @property (assign, nonatomic, getter=isPaused) BOOL paused;
48 |
49 | // Model for the view
50 | @property (strong, nonatomic) id model;
51 |
52 | @property (nonatomic, readonly) RZXGPUObjectTeardownBlock teardownHandler;
53 |
54 | - (void)setupGL;
55 | - (void)teardownGL;
56 |
57 | - (void)display;
58 |
59 | @end
60 |
61 | #pragma clang diagnostic pop
62 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXGPUObject.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXGPUObject.m
3 | // Raze
4 | //
5 | // Created by Rob Visentin on 7/16/15.
6 | //
7 | //
8 |
9 | #import "RZXGPUObject.h"
10 |
11 | @interface RZXGPUObject ()
12 |
13 | @property (strong, nonatomic, readwrite) RZXGLContext *configuredContext;
14 |
15 | @end
16 |
17 | @implementation RZXGPUObject
18 |
19 | - (RZXGPUObjectTeardownBlock)teardownHandler
20 | {
21 | return nil;
22 | }
23 |
24 | - (BOOL)setupGL
25 | {
26 | // TODO: when supporting multiple contexts, also ensure that the current context is the configured context
27 | BOOL setup = (self.configuredContext != nil);
28 |
29 | if ( !setup ) {
30 | // TODO: when supporting multiple contexts, also teardown in previous context
31 |
32 | RZXGLContext *currentContext = [RZXGLContext currentContext];
33 |
34 | if ( currentContext != nil ) {
35 | self.configuredContext = currentContext;
36 | setup = YES;
37 | }
38 | else {
39 | RZXLog(@"Failed to setup %@: No active context!", NSStringFromClass([self class]));
40 | }
41 | }
42 |
43 | return setup;
44 | }
45 |
46 | - (BOOL)bindGL
47 | {
48 | // TODO: when supporting multiple contexts, also ensure that the current context is the configured context
49 | BOOL bound = (self.configuredContext != nil);
50 |
51 | if ( !bound ) {
52 | bound = [self setupGL];
53 | }
54 |
55 | return bound;
56 | }
57 |
58 | - (void)teardownGL
59 | {
60 | if ( self.configuredContext != nil && self.teardownHandler != nil ) {
61 | [self.configuredContext runBlock:self.teardownHandler wait:NO];
62 | }
63 |
64 | self.configuredContext = nil;
65 | }
66 |
67 | - (void)dealloc
68 | {
69 | [self teardownGL];
70 | }
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/Raze/RazeCore/RZXMesh.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXMesh.h
3 | // RazeCore
4 | //
5 | // Created by John Stricker on 3/19/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | OBJC_EXTERN NSString* const kRZXMeshFileExtension;
13 |
14 | typedef struct _RZXBufferSet {
15 | GLuint vbo, ibo;
16 | } RZXBufferSet;
17 |
18 | #pragma clang diagnostic push
19 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
20 |
21 | /**
22 | * Represents an object stored in OpenGL Memory by default loaded from a .mesh file.
23 | * Currently .mesh files are created from Blender via an export script that can be found in the Utilities folder of this SDK.
24 | */
25 | @interface RZXMesh : RZXGPUObject {
26 | @protected
27 | GLuint _vao;
28 | RZXBufferSet _bufferSet;
29 | GLuint _indexCount;
30 |
31 | // TODO: this is a hack until meshes are more unified
32 | BOOL (^_configurationBlock)(RZXMesh *self);
33 | }
34 |
35 | /** Max width, height, and depth of the mesh. */
36 | @property (nonatomic, readonly) GLKVector3 bounds;
37 |
38 | /** The key to use when caching the mesh. */
39 | @property (nonatomic, readonly) NSString *cacheKey;
40 |
41 | // Load .mesh file. Use of cache means that if this file has already been loaded, then the buffer values will simply be copied rather then reloading the file and creating a new OpenGL VAO.
42 | /**
43 | * Creates a new RZXMesh object.
44 | *
45 | * @param name The name of the .mesh file to load. The main bundle will be searched for a .mesh file with this name.
46 | * @param useCache If YES, the mesh checks the cache for an existing VAO object before creating a new one.
47 | * If none is found, a new object is created and then cached.
48 | *
49 | */
50 | + (instancetype)meshWithName:(NSString *)name usingCache:(BOOL)useCache;
51 |
52 | @end
53 |
54 | #pragma clang diagnostic pop
55 |
--------------------------------------------------------------------------------
/Raze/Products/RazeCore.framework/Headers/RZXMesh.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXMesh.h
3 | // RazeCore
4 | //
5 | // Created by John Stricker on 3/19/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | OBJC_EXTERN NSString* const kRZXMeshFileExtension;
13 |
14 | typedef struct _RZXBufferSet {
15 | GLuint vbo, ibo;
16 | } RZXBufferSet;
17 |
18 | #pragma clang diagnostic push
19 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
20 |
21 | /**
22 | * Represents an object stored in OpenGL Memory by default loaded from a .mesh file.
23 | * Currently .mesh files are created from Blender via an export script that can be found in the Utilities folder of this SDK.
24 | */
25 | @interface RZXMesh : RZXGPUObject {
26 | @protected
27 | GLuint _vao;
28 | RZXBufferSet _bufferSet;
29 | GLuint _indexCount;
30 |
31 | // TODO: this is a hack until meshes are more unified
32 | BOOL (^_configurationBlock)(RZXMesh *self);
33 | }
34 |
35 | /** Max width, height, and depth of the mesh. */
36 | @property (nonatomic, readonly) GLKVector3 bounds;
37 |
38 | /** The key to use when caching the mesh. */
39 | @property (nonatomic, readonly) NSString *cacheKey;
40 |
41 | // Load .mesh file. Use of cache means that if this file has already been loaded, then the buffer values will simply be copied rather then reloading the file and creating a new OpenGL VAO.
42 | /**
43 | * Creates a new RZXMesh object.
44 | *
45 | * @param name The name of the .mesh file to load. The main bundle will be searched for a .mesh file with this name.
46 | * @param useCache If YES, the mesh checks the cache for an existing VAO object before creating a new one.
47 | * If none is found, a new object is created and then cached.
48 | *
49 | */
50 | + (instancetype)meshWithName:(NSString *)name usingCache:(BOOL)useCache;
51 |
52 | @end
53 |
54 | #pragma clang diagnostic pop
55 |
--------------------------------------------------------------------------------
/Raze/RazeUIKit/RZXEffectView.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXEffectView.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 | #import
11 |
12 | @interface RZXEffectView : RZXGLView
13 |
14 | /**
15 | * The effect to apply to the source view.
16 | * @see RZXEffect
17 | */
18 | @property (strong, nonatomic) RZXEffect *effect;
19 |
20 | /**
21 | * The transform with which to render the source view.
22 | */
23 | @property (strong, nonatomic) RZXTransform3D *effectTransform;
24 |
25 | /**
26 | * Whether the contents of the view texture are updated each frame.
27 | * If the source view contents never change, set this property to NO for best performance.
28 | */
29 | @property (assign, nonatomic, getter=isDynamic) IBInspectable BOOL dynamic;
30 |
31 | /**
32 | * Whether the view texture should be updated synchronously. Default NO.
33 | * @see RZXViewTexture
34 | */
35 | @property (assign, nonatomic) BOOL synchronousUpdate;
36 |
37 | /**
38 | * Creates a new RZXEffect view that will apply an RZXEffect to a given view.
39 | *
40 | * @param view The view to apply an effect to. It must be currently on screen.
41 | * @param effect The effect to apply to the view.
42 | * @param dynamic Whether the source view has dynamic contents. If the source will never change, pass NO.
43 | *
44 | * @note The sourceView should NOT be an ancestor of the effect view.
45 | */
46 | - (instancetype)initWithSourceView:(UIView *)view effect:(RZXEffect *)effect dynamicContent:(BOOL)dynamic;
47 |
48 | @end
49 |
50 | @interface RZXEffectView (RZUnavailable)
51 |
52 | - (instancetype)initWithFrame:(CGRect)frame __attribute__((unavailable("Use -initWithSourceView: instead.")));
53 |
54 | - (void)setMultisampleLevel:(GLsizei)multisampleLevel __attribute__((unavailable("RZXEffectView does not support multisample antialiasing.")));
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Raze/Products/RazeUIKit.framework/Headers/RZXEffectView.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXEffectView.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 | #import
11 |
12 | @interface RZXEffectView : RZXGLView
13 |
14 | /**
15 | * The effect to apply to the source view.
16 | * @see RZXEffect
17 | */
18 | @property (strong, nonatomic) RZXEffect *effect;
19 |
20 | /**
21 | * The transform with which to render the source view.
22 | */
23 | @property (strong, nonatomic) RZXTransform3D *effectTransform;
24 |
25 | /**
26 | * Whether the contents of the view texture are updated each frame.
27 | * If the source view contents never change, set this property to NO for best performance.
28 | */
29 | @property (assign, nonatomic, getter=isDynamic) IBInspectable BOOL dynamic;
30 |
31 | /**
32 | * Whether the view texture should be updated synchronously. Default NO.
33 | * @see RZXViewTexture
34 | */
35 | @property (assign, nonatomic) BOOL synchronousUpdate;
36 |
37 | /**
38 | * Creates a new RZXEffect view that will apply an RZXEffect to a given view.
39 | *
40 | * @param view The view to apply an effect to. It must be currently on screen.
41 | * @param effect The effect to apply to the view.
42 | * @param dynamic Whether the source view has dynamic contents. If the source will never change, pass NO.
43 | *
44 | * @note The sourceView should NOT be an ancestor of the effect view.
45 | */
46 | - (instancetype)initWithSourceView:(UIView *)view effect:(RZXEffect *)effect dynamicContent:(BOOL)dynamic;
47 |
48 | @end
49 |
50 | @interface RZXEffectView (RZUnavailable)
51 |
52 | - (instancetype)initWithFrame:(CGRect)frame __attribute__((unavailable("Use -initWithSourceView: instead.")));
53 |
54 | - (void)setMultisampleLevel:(GLsizei)multisampleLevel __attribute__((unavailable("RZXEffectView does not support multisample antialiasing.")));
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXPassthroughEffect.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXPassthroughEffect.m
3 | // Raze
4 | //
5 | // Created by Rob Visentin on 6/19/15.
6 | //
7 | //
8 |
9 | #import "RZXPassthroughEffect.h"
10 |
11 | NSString* const kRZXEffectPassthroughVSH2D = RZX_SHADER_SRC(
12 | attribute vec4 a_position;
13 | attribute vec2 a_texCoord0;
14 |
15 | varying vec2 v_texCoord0;
16 |
17 | void main(void)
18 | {
19 | v_texCoord0 = a_texCoord0;
20 | gl_Position = a_position;
21 | });
22 |
23 | NSString* const kRZXEffectPassthroughVSH3D = RZX_SHADER_SRC(
24 | uniform mat4 u_MVPMatrix;
25 |
26 | attribute vec4 a_position;
27 | attribute vec2 a_texCoord0;
28 |
29 | varying vec2 v_texCoord0;
30 |
31 | void main(void)
32 | {
33 | v_texCoord0 = a_texCoord0;
34 | gl_Position = u_MVPMatrix * a_position;
35 | });
36 |
37 | NSString* const kRZXEffectPassthroughFSH = RZX_SHADER_SRC(
38 | uniform lowp sampler2D u_Texture;
39 |
40 | varying highp vec2 v_texCoord0;
41 |
42 | void main()
43 | {
44 | gl_FragColor = texture2D(u_Texture, v_texCoord0);
45 | });
46 |
47 | @implementation RZXPassthroughEffect
48 |
49 | + (instancetype)effect2D
50 | {
51 | RZXPassthroughEffect *effect = [super effectWithVertexShader:kRZXEffectPassthroughVSH2D fragmentShader:kRZXEffectPassthroughFSH];
52 | effect.mvpUniform = @"u_MVPMatrix";
53 |
54 | return effect;
55 | }
56 |
57 | + (instancetype)effect3D
58 | {
59 | RZXPassthroughEffect *effect = [super effectWithVertexShader:kRZXEffectPassthroughVSH3D fragmentShader:kRZXEffectPassthroughFSH];
60 | effect.mvpUniform = @"u_MVPMatrix";
61 |
62 | return effect;
63 | }
64 |
65 | - (BOOL)link
66 | {
67 | [self bindAttribute:@"a_position" location:kRZXVertexAttribPosition];
68 | [self bindAttribute:@"a_texCoord0" location:kRZXVertexAttribTexCoord];
69 |
70 | return [super link];
71 | }
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/Raze/RazeEffects/RZXEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXEffect.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | #define RZX_EFFECT_MAX_DOWNSAMPLE 4
11 |
12 | #define RZX_SHADER_SRC(src) (@#src)
13 |
14 | /**
15 | * Manages a shader. Any new shaders should subclass this. Override link to set up attributes (and call super), and override preprare to draw to assign uniforms (and call super). See RZXADSPhongEffect for an example of how a typical OpenGL shader can be implemented.
16 | */
17 | @interface RZXEffect : RZXGPUObject
18 |
19 | @property (nonatomic, readonly, getter = isLinked) BOOL linked;
20 |
21 | @property (assign, nonatomic) GLKMatrix4 modelViewMatrix;
22 | @property (assign, nonatomic) GLKMatrix4 projectionMatrix;
23 | @property (assign, nonatomic) GLKMatrix3 normalMatrix;
24 |
25 | @property (copy, nonatomic) NSString *mvpUniform;
26 | @property (copy, nonatomic) NSString *mvUniform;
27 | @property (copy, nonatomic) NSString *normalMatrixUniform;
28 |
29 | @property (assign, nonatomic) GLKVector2 resolution;
30 | @property (assign, nonatomic) GLuint downsampleLevel;
31 |
32 | @property (nonatomic, readonly) NSInteger preferredLevelOfDetail;
33 |
34 | + (instancetype)effectWithVertexShader:(NSString *)vsh fragmentShader:(NSString *)fsh;
35 |
36 | - (BOOL)link;
37 |
38 | - (BOOL)prepareToDraw;
39 |
40 | - (void)bindAttribute:(NSString *)attribute location:(GLuint)location;
41 | - (GLint)uniformLoc:(NSString *)uniformName;
42 |
43 | - (void)setFloatUniform:(NSString *)name value:(const GLfloat *)value length:(GLsizei)length count:(GLsizei)count;
44 |
45 | - (void)setIntUniform:(NSString *)name value:(const GLint *)value length:(GLsizei)length count:(GLsizei)count;
46 |
47 | - (void)setMatrix2Uniform:(NSString *)name value:(const GLKMatrix2 *)value transpose:(GLboolean)transpose count:(GLsizei)count;
48 | - (void)setMatrix3Uniform:(NSString *)name value:(const GLKMatrix3 *)value transpose:(GLboolean)transpose count:(GLsizei)count;
49 | - (void)setMatrix4Uniform:(NSString *)name value:(const GLKMatrix4 *)value transpose:(GLboolean)transpose count:(GLsizei)count;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // RazeEffectsDemo
4 | //
5 | // Created by Rob Visentin on 1/15/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @import RazeUIKit;
12 | @import RazeEffects;
13 |
14 | @interface ViewController ()
15 |
16 | @property (weak, nonatomic) IBOutlet UIView *contentView;
17 |
18 | @property (strong, nonatomic) RZXEffectView *effectView;
19 | @property (strong, nonatomic) RZXClothEffect *effect;
20 |
21 | @end
22 |
23 | @implementation ViewController
24 |
25 | - (BOOL)prefersStatusBarHidden
26 | {
27 | return YES;
28 | }
29 |
30 | - (void)viewDidLoad
31 | {
32 | [super viewDidLoad];
33 |
34 | [UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse animations:^{
35 | [self.contentView.subviews[1] setAlpha:0.0f];
36 | } completion:nil];
37 |
38 | [UIView animateWithDuration:3.0 delay:0.0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse animations:^{
39 | [(UIView *)self.contentView.subviews[2] setTransform:CGAffineTransformMakeTranslation(200.0f, 0.0f)];
40 | } completion:nil];
41 | }
42 |
43 | - (void)viewDidLayoutSubviews
44 | {
45 | [super viewDidLayoutSubviews];
46 |
47 | if ( self.effectView == nil ) {
48 | self.effect = [RZXClothEffect effect];
49 |
50 | // uncomment this line for a super shiny cloth
51 | // self.effect.lightOffset = GLKVector3Make(0.0f, 1.1f, -3.0f);
52 |
53 | self.effectView = [[RZXEffectView alloc] initWithSourceView:self.contentView effect:self.effect dynamicContent:YES];
54 | self.effectView.backgroundColor = [UIColor blackColor];
55 | self.effectView.framesPerSecond = 60;
56 |
57 | self.effectView.effectTransform.rotation = GLKQuaternionMake(-0.133518726, 0.259643972, 0.0340433009, 0.955821096);
58 |
59 | [self.view addSubview:self.effectView];
60 | }
61 | }
62 |
63 | - (IBAction)sliderChanged:(UISlider *)slider
64 | {
65 | self.effect.waveAmplitude = 0.05f + 0.2f * slider.value;
66 | }
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/Raze/Products/RazeEffects.framework/Headers/RZXEffect.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZXEffect.h
3 | //
4 | // Created by Rob Visentin on 1/11/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | #define RZX_EFFECT_MAX_DOWNSAMPLE 4
11 |
12 | #define RZX_SHADER_SRC(src) (@#src)
13 |
14 | /**
15 | * Manages a shader. Any new shaders should subclass this. Override link to set up attributes (and call super), and override preprare to draw to assign uniforms (and call super). See RZXADSPhongEffect for an example of how a typical OpenGL shader can be implemented.
16 | */
17 | @interface RZXEffect : RZXGPUObject
18 |
19 | @property (nonatomic, readonly, getter = isLinked) BOOL linked;
20 |
21 | @property (assign, nonatomic) GLKMatrix4 modelViewMatrix;
22 | @property (assign, nonatomic) GLKMatrix4 projectionMatrix;
23 | @property (assign, nonatomic) GLKMatrix3 normalMatrix;
24 |
25 | @property (copy, nonatomic) NSString *mvpUniform;
26 | @property (copy, nonatomic) NSString *mvUniform;
27 | @property (copy, nonatomic) NSString *normalMatrixUniform;
28 |
29 | @property (assign, nonatomic) GLKVector2 resolution;
30 | @property (assign, nonatomic) GLuint downsampleLevel;
31 |
32 | @property (nonatomic, readonly) NSInteger preferredLevelOfDetail;
33 |
34 | + (instancetype)effectWithVertexShader:(NSString *)vsh fragmentShader:(NSString *)fsh;
35 |
36 | - (BOOL)link;
37 |
38 | - (BOOL)prepareToDraw;
39 |
40 | - (void)bindAttribute:(NSString *)attribute location:(GLuint)location;
41 | - (GLint)uniformLoc:(NSString *)uniformName;
42 |
43 | - (void)setFloatUniform:(NSString *)name value:(const GLfloat *)value length:(GLsizei)length count:(GLsizei)count;
44 |
45 | - (void)setIntUniform:(NSString *)name value:(const GLint *)value length:(GLsizei)length count:(GLsizei)count;
46 |
47 | - (void)setMatrix2Uniform:(NSString *)name value:(const GLKMatrix2 *)value transpose:(GLboolean)transpose count:(GLsizei)count;
48 | - (void)setMatrix3Uniform:(NSString *)name value:(const GLKMatrix3 *)value transpose:(GLboolean)transpose count:(GLsizei)count;
49 | - (void)setMatrix4Uniform:(NSString *)name value:(const GLKMatrix4 *)value transpose:(GLboolean)transpose count:(GLsizei)count;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Example/RazeEffectsDemo/RazeEffectsDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // RazeEffectsDemo
4 | //
5 | // Created by Rob Visentin on 1/15/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Sandbox/Raze Scene Sandbox/Raze Scene Sandbox/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // Raze Scene Sandbox
4 | //
5 | // Created by John Stricker on 4/17/15.
6 | // Copyright (c) 2015 Raizlabs. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Raze/RazeUIKit/RZXViewTexture.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZXViewTexture.m
3 | //
4 | // Created by Rob Visentin on 1/9/15.
5 | // Copyright (c) 2015 Raizlabs. All rights reserved.
6 | //
7 |
8 | #import