├── ProtoParticle.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── Aymenworks.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── Aymenworks.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── ProtoParticle.xcscheme │ └── xcschememanagement.plist ├── ProtoParticle ├── Animable.swift ├── AnimationType │ ├── DragonAnimation.swift │ ├── FacebookAnimation.swift │ ├── SnowAnimation.swift │ └── VolcanoAnimation.swift ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── angry.imageset │ │ ├── Contents.json │ │ └── angry.png │ ├── circle.imageset │ │ ├── Contents.json │ │ └── circle.png │ ├── dragon.imageset │ │ ├── Contents.json │ │ └── dragon.pdf │ ├── facebookVideo.imageset │ │ ├── Contents.json │ │ └── IMG_7549.PNG │ ├── fire-pdf.imageset │ │ ├── Contents.json │ │ └── fire-pdf.pdf │ ├── fire.imageset │ │ ├── Contents.json │ │ └── fire.png │ ├── haha.imageset │ │ ├── Contents.json │ │ └── haha.png │ ├── like.imageset │ │ ├── Contents.json │ │ └── like.png │ ├── love.imageset │ │ ├── Contents.json │ │ └── love.png │ ├── mountain.imageset │ │ ├── Contents.json │ │ └── mountain.pdf │ ├── notebook.imageset │ │ ├── Contents.json │ │ └── notebook.pdf │ ├── sad.imageset │ │ ├── Contents.json │ │ └── sad.png │ ├── snowing.imageset │ │ ├── Contents.json │ │ └── snowing.png │ ├── thumb-up-fill.imageset │ │ ├── Contents.json │ │ └── thumb-up-fill.pdf │ ├── thumb-up.imageset │ │ ├── Contents.json │ │ └── thumb-up.pdf │ ├── volcano.imageset │ │ ├── Contents.json │ │ └── volcano.pdf │ ├── wow.imageset │ │ ├── Contents.json │ │ └── wow.png │ └── ya.imageset │ │ ├── Contents.json │ │ └── ya.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── BurnViewController.swift ├── DragonViewController.swift ├── FacebookLiveViewController.swift ├── Info.plist └── SnowViewController.swift ├── README.md └── README ├── Demo.gif ├── FacebookLive.png └── Fire.png /ProtoParticle.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8E3384371E769B1800A903F3 /* Animable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E3384361E769B1800A903F3 /* Animable.swift */; }; 11 | 8E3384391E769BC200A903F3 /* FacebookLiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E3384381E769BC200A903F3 /* FacebookLiveViewController.swift */; }; 12 | 8E33843B1E76C39B00A903F3 /* BurnViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E33843A1E76C39B00A903F3 /* BurnViewController.swift */; }; 13 | 8E530A2B1E77F002007987BD /* FacebookAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E530A2A1E77F002007987BD /* FacebookAnimation.swift */; }; 14 | 8E530A2D1E77F093007987BD /* VolcanoAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E530A2C1E77F093007987BD /* VolcanoAnimation.swift */; }; 15 | 8E530A2F1E77F09D007987BD /* SnowAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E530A2E1E77F09D007987BD /* SnowAnimation.swift */; }; 16 | 8E530A311E77F6EE007987BD /* DragonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E530A301E77F6EE007987BD /* DragonViewController.swift */; }; 17 | 8E530A331E77F879007987BD /* DragonAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E530A321E77F879007987BD /* DragonAnimation.swift */; }; 18 | 8EE7B7721E706E6100A79657 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EE7B7711E706E6100A79657 /* AppDelegate.swift */; }; 19 | 8EE7B7741E706E6100A79657 /* SnowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EE7B7731E706E6100A79657 /* SnowViewController.swift */; }; 20 | 8EE7B7771E706E6100A79657 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EE7B7751E706E6100A79657 /* Main.storyboard */; }; 21 | 8EE7B7791E706E6100A79657 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8EE7B7781E706E6100A79657 /* Assets.xcassets */; }; 22 | 8EE7B77C1E706E6100A79657 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EE7B77A1E706E6100A79657 /* LaunchScreen.storyboard */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 8E3384361E769B1800A903F3 /* Animable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Animable.swift; sourceTree = ""; }; 27 | 8E3384381E769BC200A903F3 /* FacebookLiveViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacebookLiveViewController.swift; sourceTree = ""; }; 28 | 8E33843A1E76C39B00A903F3 /* BurnViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BurnViewController.swift; sourceTree = ""; }; 29 | 8E530A2A1E77F002007987BD /* FacebookAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FacebookAnimation.swift; path = AnimationType/FacebookAnimation.swift; sourceTree = ""; }; 30 | 8E530A2C1E77F093007987BD /* VolcanoAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VolcanoAnimation.swift; path = AnimationType/VolcanoAnimation.swift; sourceTree = ""; }; 31 | 8E530A2E1E77F09D007987BD /* SnowAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SnowAnimation.swift; path = AnimationType/SnowAnimation.swift; sourceTree = ""; }; 32 | 8E530A301E77F6EE007987BD /* DragonViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DragonViewController.swift; sourceTree = ""; }; 33 | 8E530A321E77F879007987BD /* DragonAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DragonAnimation.swift; path = AnimationType/DragonAnimation.swift; sourceTree = ""; }; 34 | 8EE7B76E1E706E6100A79657 /* ProtoParticle.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProtoParticle.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 8EE7B7711E706E6100A79657 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 36 | 8EE7B7731E706E6100A79657 /* SnowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnowViewController.swift; sourceTree = ""; }; 37 | 8EE7B7761E706E6100A79657 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 8EE7B7781E706E6100A79657 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 39 | 8EE7B77B1E706E6100A79657 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 40 | 8EE7B77D1E706E6100A79657 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 8EE7B76B1E706E6100A79657 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | 8E530A291E77EFDE007987BD /* AnimationType */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | 8E3384361E769B1800A903F3 /* Animable.swift */, 58 | 8E530A2A1E77F002007987BD /* FacebookAnimation.swift */, 59 | 8E530A2C1E77F093007987BD /* VolcanoAnimation.swift */, 60 | 8E530A2E1E77F09D007987BD /* SnowAnimation.swift */, 61 | 8E530A321E77F879007987BD /* DragonAnimation.swift */, 62 | ); 63 | name = AnimationType; 64 | sourceTree = ""; 65 | }; 66 | 8EE7B7651E706E6100A79657 = { 67 | isa = PBXGroup; 68 | children = ( 69 | 8EE7B7701E706E6100A79657 /* ProtoParticle */, 70 | 8EE7B76F1E706E6100A79657 /* Products */, 71 | ); 72 | sourceTree = ""; 73 | }; 74 | 8EE7B76F1E706E6100A79657 /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 8EE7B76E1E706E6100A79657 /* ProtoParticle.app */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | 8EE7B7701E706E6100A79657 /* ProtoParticle */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 8EE7B7711E706E6100A79657 /* AppDelegate.swift */, 86 | 8EE7B7731E706E6100A79657 /* SnowViewController.swift */, 87 | 8E3384381E769BC200A903F3 /* FacebookLiveViewController.swift */, 88 | 8E33843A1E76C39B00A903F3 /* BurnViewController.swift */, 89 | 8E530A301E77F6EE007987BD /* DragonViewController.swift */, 90 | 8E530A291E77EFDE007987BD /* AnimationType */, 91 | 8EE7B7751E706E6100A79657 /* Main.storyboard */, 92 | 8EE7B7781E706E6100A79657 /* Assets.xcassets */, 93 | 8EE7B77A1E706E6100A79657 /* LaunchScreen.storyboard */, 94 | 8EE7B77D1E706E6100A79657 /* Info.plist */, 95 | ); 96 | path = ProtoParticle; 97 | sourceTree = ""; 98 | }; 99 | /* End PBXGroup section */ 100 | 101 | /* Begin PBXNativeTarget section */ 102 | 8EE7B76D1E706E6100A79657 /* ProtoParticle */ = { 103 | isa = PBXNativeTarget; 104 | buildConfigurationList = 8EE7B7801E706E6100A79657 /* Build configuration list for PBXNativeTarget "ProtoParticle" */; 105 | buildPhases = ( 106 | 8EE7B76A1E706E6100A79657 /* Sources */, 107 | 8EE7B76B1E706E6100A79657 /* Frameworks */, 108 | 8EE7B76C1E706E6100A79657 /* Resources */, 109 | ); 110 | buildRules = ( 111 | ); 112 | dependencies = ( 113 | ); 114 | name = ProtoParticle; 115 | productName = ProtoParticle; 116 | productReference = 8EE7B76E1E706E6100A79657 /* ProtoParticle.app */; 117 | productType = "com.apple.product-type.application"; 118 | }; 119 | /* End PBXNativeTarget section */ 120 | 121 | /* Begin PBXProject section */ 122 | 8EE7B7661E706E6100A79657 /* Project object */ = { 123 | isa = PBXProject; 124 | attributes = { 125 | LastSwiftUpdateCheck = 0820; 126 | LastUpgradeCheck = 0820; 127 | ORGANIZATIONNAME = Aymen; 128 | TargetAttributes = { 129 | 8EE7B76D1E706E6100A79657 = { 130 | CreatedOnToolsVersion = 8.2; 131 | DevelopmentTeam = DPE97W6WK3; 132 | ProvisioningStyle = Automatic; 133 | }; 134 | }; 135 | }; 136 | buildConfigurationList = 8EE7B7691E706E6100A79657 /* Build configuration list for PBXProject "ProtoParticle" */; 137 | compatibilityVersion = "Xcode 3.2"; 138 | developmentRegion = English; 139 | hasScannedForEncodings = 0; 140 | knownRegions = ( 141 | en, 142 | Base, 143 | ); 144 | mainGroup = 8EE7B7651E706E6100A79657; 145 | productRefGroup = 8EE7B76F1E706E6100A79657 /* Products */; 146 | projectDirPath = ""; 147 | projectRoot = ""; 148 | targets = ( 149 | 8EE7B76D1E706E6100A79657 /* ProtoParticle */, 150 | ); 151 | }; 152 | /* End PBXProject section */ 153 | 154 | /* Begin PBXResourcesBuildPhase section */ 155 | 8EE7B76C1E706E6100A79657 /* Resources */ = { 156 | isa = PBXResourcesBuildPhase; 157 | buildActionMask = 2147483647; 158 | files = ( 159 | 8EE7B77C1E706E6100A79657 /* LaunchScreen.storyboard in Resources */, 160 | 8EE7B7791E706E6100A79657 /* Assets.xcassets in Resources */, 161 | 8EE7B7771E706E6100A79657 /* Main.storyboard in Resources */, 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | /* End PBXResourcesBuildPhase section */ 166 | 167 | /* Begin PBXSourcesBuildPhase section */ 168 | 8EE7B76A1E706E6100A79657 /* Sources */ = { 169 | isa = PBXSourcesBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | 8E3384391E769BC200A903F3 /* FacebookLiveViewController.swift in Sources */, 173 | 8E530A2D1E77F093007987BD /* VolcanoAnimation.swift in Sources */, 174 | 8E33843B1E76C39B00A903F3 /* BurnViewController.swift in Sources */, 175 | 8EE7B7741E706E6100A79657 /* SnowViewController.swift in Sources */, 176 | 8EE7B7721E706E6100A79657 /* AppDelegate.swift in Sources */, 177 | 8E530A2F1E77F09D007987BD /* SnowAnimation.swift in Sources */, 178 | 8E530A2B1E77F002007987BD /* FacebookAnimation.swift in Sources */, 179 | 8E530A331E77F879007987BD /* DragonAnimation.swift in Sources */, 180 | 8E3384371E769B1800A903F3 /* Animable.swift in Sources */, 181 | 8E530A311E77F6EE007987BD /* DragonViewController.swift in Sources */, 182 | ); 183 | runOnlyForDeploymentPostprocessing = 0; 184 | }; 185 | /* End PBXSourcesBuildPhase section */ 186 | 187 | /* Begin PBXVariantGroup section */ 188 | 8EE7B7751E706E6100A79657 /* Main.storyboard */ = { 189 | isa = PBXVariantGroup; 190 | children = ( 191 | 8EE7B7761E706E6100A79657 /* Base */, 192 | ); 193 | name = Main.storyboard; 194 | sourceTree = ""; 195 | }; 196 | 8EE7B77A1E706E6100A79657 /* LaunchScreen.storyboard */ = { 197 | isa = PBXVariantGroup; 198 | children = ( 199 | 8EE7B77B1E706E6100A79657 /* Base */, 200 | ); 201 | name = LaunchScreen.storyboard; 202 | sourceTree = ""; 203 | }; 204 | /* End PBXVariantGroup section */ 205 | 206 | /* Begin XCBuildConfiguration section */ 207 | 8EE7B77E1E706E6100A79657 /* Debug */ = { 208 | isa = XCBuildConfiguration; 209 | buildSettings = { 210 | ALWAYS_SEARCH_USER_PATHS = NO; 211 | CLANG_ANALYZER_NONNULL = YES; 212 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 213 | CLANG_CXX_LIBRARY = "libc++"; 214 | CLANG_ENABLE_MODULES = YES; 215 | CLANG_ENABLE_OBJC_ARC = YES; 216 | CLANG_WARN_BOOL_CONVERSION = YES; 217 | CLANG_WARN_CONSTANT_CONVERSION = YES; 218 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 219 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 220 | CLANG_WARN_EMPTY_BODY = YES; 221 | CLANG_WARN_ENUM_CONVERSION = YES; 222 | CLANG_WARN_INFINITE_RECURSION = YES; 223 | CLANG_WARN_INT_CONVERSION = YES; 224 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 225 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 226 | CLANG_WARN_UNREACHABLE_CODE = YES; 227 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 228 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 229 | COPY_PHASE_STRIP = NO; 230 | DEBUG_INFORMATION_FORMAT = dwarf; 231 | ENABLE_STRICT_OBJC_MSGSEND = YES; 232 | ENABLE_TESTABILITY = YES; 233 | GCC_C_LANGUAGE_STANDARD = gnu99; 234 | GCC_DYNAMIC_NO_PIC = NO; 235 | GCC_NO_COMMON_BLOCKS = YES; 236 | GCC_OPTIMIZATION_LEVEL = 0; 237 | GCC_PREPROCESSOR_DEFINITIONS = ( 238 | "DEBUG=1", 239 | "$(inherited)", 240 | ); 241 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 242 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 243 | GCC_WARN_UNDECLARED_SELECTOR = YES; 244 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 245 | GCC_WARN_UNUSED_FUNCTION = YES; 246 | GCC_WARN_UNUSED_VARIABLE = YES; 247 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 248 | MTL_ENABLE_DEBUG_INFO = YES; 249 | ONLY_ACTIVE_ARCH = YES; 250 | SDKROOT = iphoneos; 251 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 252 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 253 | }; 254 | name = Debug; 255 | }; 256 | 8EE7B77F1E706E6100A79657 /* Release */ = { 257 | isa = XCBuildConfiguration; 258 | buildSettings = { 259 | ALWAYS_SEARCH_USER_PATHS = NO; 260 | CLANG_ANALYZER_NONNULL = YES; 261 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 262 | CLANG_CXX_LIBRARY = "libc++"; 263 | CLANG_ENABLE_MODULES = YES; 264 | CLANG_ENABLE_OBJC_ARC = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_CONSTANT_CONVERSION = YES; 267 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 268 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 269 | CLANG_WARN_EMPTY_BODY = YES; 270 | CLANG_WARN_ENUM_CONVERSION = YES; 271 | CLANG_WARN_INFINITE_RECURSION = YES; 272 | CLANG_WARN_INT_CONVERSION = YES; 273 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 274 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 275 | CLANG_WARN_UNREACHABLE_CODE = YES; 276 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 277 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 278 | COPY_PHASE_STRIP = NO; 279 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 280 | ENABLE_NS_ASSERTIONS = NO; 281 | ENABLE_STRICT_OBJC_MSGSEND = YES; 282 | GCC_C_LANGUAGE_STANDARD = gnu99; 283 | GCC_NO_COMMON_BLOCKS = YES; 284 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 285 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 286 | GCC_WARN_UNDECLARED_SELECTOR = YES; 287 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 288 | GCC_WARN_UNUSED_FUNCTION = YES; 289 | GCC_WARN_UNUSED_VARIABLE = YES; 290 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 291 | MTL_ENABLE_DEBUG_INFO = NO; 292 | SDKROOT = iphoneos; 293 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 294 | VALIDATE_PRODUCT = YES; 295 | }; 296 | name = Release; 297 | }; 298 | 8EE7B7811E706E6100A79657 /* Debug */ = { 299 | isa = XCBuildConfiguration; 300 | buildSettings = { 301 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 302 | DEVELOPMENT_TEAM = DPE97W6WK3; 303 | INFOPLIST_FILE = ProtoParticle/Info.plist; 304 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 305 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 306 | PRODUCT_BUNDLE_IDENTIFIER = com.worldline.ProtoParticle; 307 | PRODUCT_NAME = "$(TARGET_NAME)"; 308 | SWIFT_VERSION = 3.0; 309 | }; 310 | name = Debug; 311 | }; 312 | 8EE7B7821E706E6100A79657 /* Release */ = { 313 | isa = XCBuildConfiguration; 314 | buildSettings = { 315 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 316 | DEVELOPMENT_TEAM = DPE97W6WK3; 317 | INFOPLIST_FILE = ProtoParticle/Info.plist; 318 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 320 | PRODUCT_BUNDLE_IDENTIFIER = com.worldline.ProtoParticle; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | SWIFT_VERSION = 3.0; 323 | }; 324 | name = Release; 325 | }; 326 | /* End XCBuildConfiguration section */ 327 | 328 | /* Begin XCConfigurationList section */ 329 | 8EE7B7691E706E6100A79657 /* Build configuration list for PBXProject "ProtoParticle" */ = { 330 | isa = XCConfigurationList; 331 | buildConfigurations = ( 332 | 8EE7B77E1E706E6100A79657 /* Debug */, 333 | 8EE7B77F1E706E6100A79657 /* Release */, 334 | ); 335 | defaultConfigurationIsVisible = 0; 336 | defaultConfigurationName = Release; 337 | }; 338 | 8EE7B7801E706E6100A79657 /* Build configuration list for PBXNativeTarget "ProtoParticle" */ = { 339 | isa = XCConfigurationList; 340 | buildConfigurations = ( 341 | 8EE7B7811E706E6100A79657 /* Debug */, 342 | 8EE7B7821E706E6100A79657 /* Release */, 343 | ); 344 | defaultConfigurationIsVisible = 0; 345 | defaultConfigurationName = Release; 346 | }; 347 | /* End XCConfigurationList section */ 348 | }; 349 | rootObject = 8EE7B7661E706E6100A79657 /* Project object */; 350 | } 351 | -------------------------------------------------------------------------------- /ProtoParticle.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ProtoParticle.xcodeproj/project.xcworkspace/xcuserdata/Aymenworks.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle.xcodeproj/project.xcworkspace/xcuserdata/Aymenworks.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ProtoParticle.xcodeproj/xcuserdata/Aymenworks.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /ProtoParticle.xcodeproj/xcuserdata/Aymenworks.xcuserdatad/xcschemes/ProtoParticle.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ProtoParticle.xcodeproj/xcuserdata/Aymenworks.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ProtoParticle.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8EE7B76D1E706E6100A79657 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ProtoParticle/Animable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animable.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 13/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol Animable { 12 | var icons: [UIImage] { get } 13 | var orientation: Double { get } 14 | var position: CGPoint { get } 15 | var shape: String { get } 16 | var size: CGSize { get } 17 | var renderMode: String { get } 18 | 19 | /// The color tint to apply to the contents 20 | var colors: [UIColor] { get } 21 | 22 | /// The number of emitted particles per second 23 | var birthRate: Float { get } 24 | 25 | /// It seems to be the speed at a given moment. So the bigger the value, the quicker the animation will be 26 | var velocity: CGFloat { get } 27 | 28 | } 29 | 30 | extension Animable { 31 | var shape: String { 32 | return kCAEmitterLayerLine 33 | } 34 | 35 | var colors: [UIColor] { 36 | return [] 37 | } 38 | 39 | var position: CGPoint { 40 | return .zero 41 | } 42 | 43 | var renderMode: String { 44 | return kCAEmitterLayerUnordered 45 | } 46 | } 47 | 48 | 49 | extension Animable { 50 | 51 | func emitter() -> CAEmitterLayer { 52 | 53 | let emitter = CAEmitterLayer() 54 | 55 | emitter.emitterShape = self.shape 56 | emitter.emitterPosition = self.position 57 | emitter.emitterSize = self.size 58 | emitter.renderMode = self.renderMode 59 | emitter.emitterCells = self.icons.map { emitterCell(withImage: $0) } 60 | 61 | if self.colors.isEmpty { 62 | emitter.emitterCells = self.icons.map { emitterCell(withImage: $0) } 63 | 64 | } else { 65 | emitter.emitterCells = self.colors.enumerated().map { emitterCell(withImage: self.icons.first!, usingColor: $0.element) } 66 | } 67 | 68 | return emitter 69 | } 70 | 71 | func emitterCell(withImage image: UIImage, usingColor color: UIColor? = nil) -> CAEmitterCell { 72 | 73 | let emitterCell = CAEmitterCell() 74 | 75 | emitterCell.birthRate = self.birthRate 76 | emitterCell.lifetime = 7 77 | emitterCell.velocity = self.velocity // the bigger the value is, the quicker the fruit move 78 | emitterCell.emissionLongitude = CGFloat(self.orientation) 79 | emitterCell.emissionRange = CGFloat(M_1_PI) // 🤡😐 80 | emitterCell.contents = image.cgImage 81 | emitterCell.scaleSpeed = -0.1 // The bigger the value is, the quicker the fruit size grow 82 | 83 | if let color = color { 84 | emitterCell.color = color.cgColor 85 | } 86 | 87 | return emitterCell 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /ProtoParticle/AnimationType/DragonAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragonAnimation.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 14/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct DragonAnimation: Animable { 12 | 13 | static let circleIcons = [#imageLiteral(resourceName: "snowing")] 14 | 15 | var icons: [UIImage] { 16 | return DragonAnimation.circleIcons 17 | } 18 | 19 | var orientation: Double { 20 | return M_PI_2 21 | } 22 | 23 | var colors: [UIColor] { 24 | return [#colorLiteral(red: 0.9988493323, green: 0.705653131, blue: 0.196046561, alpha: 1), #colorLiteral(red: 1, green: 0.5899432302, blue: 0.214745611, alpha: 1), #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)] 25 | } 26 | 27 | var size: CGSize { 28 | return CGSize(width: 1, height: 1) 29 | } 30 | 31 | var birthRate: Float { 32 | return 200 33 | } 34 | 35 | var velocity: CGFloat { 36 | return 90 37 | } 38 | 39 | var renderMode: String { 40 | return kCAEmitterLayerAdditive 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ProtoParticle/AnimationType/FacebookAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FacebookAnimation.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 14/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct FacebookAnimation: Animable { 12 | 13 | static let emotionsIcons = [#imageLiteral(resourceName: "ya"), #imageLiteral(resourceName: "wow"), #imageLiteral(resourceName: "sad"),#imageLiteral(resourceName: "love"), #imageLiteral(resourceName: "like"), #imageLiteral(resourceName: "haha"), #imageLiteral(resourceName: "angry")] 14 | 15 | var icons: [UIImage] { 16 | return FacebookAnimation.emotionsIcons 17 | } 18 | 19 | var orientation: Double { 20 | return -M_PI_2 21 | } 22 | 23 | var position: CGPoint { 24 | return CGPoint(x: UIScreen.main.bounds.maxX, y: UIScreen.main.bounds.maxY-200) 25 | } 26 | 27 | var size: CGSize { 28 | return CGSize(width: 400, height: 1) 29 | } 30 | 31 | var birthRate: Float { 32 | return 0.7 33 | } 34 | 35 | var velocity: CGFloat { 36 | return 120 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /ProtoParticle/AnimationType/SnowAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnowAnimation.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 14/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct SnowAnimation: Animable { 12 | 13 | static let snowIcons = [#imageLiteral(resourceName: "snowing")] 14 | 15 | var icons: [UIImage] { 16 | return SnowAnimation.snowIcons 17 | } 18 | 19 | var orientation: Double { 20 | return M_PI 21 | } 22 | 23 | var position: CGPoint { 24 | return CGPoint(x: UIScreen.main.bounds.width/2.0, y: 0) 25 | } 26 | 27 | var size: CGSize { 28 | return CGSize(width: UIScreen.main.bounds.size.width, height: 1) 29 | } 30 | 31 | var birthRate: Float { 32 | return 5 33 | } 34 | 35 | var velocity: CGFloat { 36 | return 120 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /ProtoParticle/AnimationType/VolcanoAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VolcanoAnimation.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 14/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct VolcanoAnimation: Animable { 12 | 13 | static let circleIcons = [#imageLiteral(resourceName: "circle")] 14 | 15 | var icons: [UIImage] { 16 | return VolcanoAnimation.circleIcons 17 | } 18 | 19 | var orientation: Double { 20 | return 1.0/M_PI 21 | } 22 | 23 | var colors: [UIColor] { 24 | return [#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1), #colorLiteral(red: 0.5725490451, green: 0, blue: 0.2313725501, alpha: 1), #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)] 25 | } 26 | 27 | var size: CGSize { 28 | return CGSize(width: 0, height: 1) 29 | } 30 | 31 | var birthRate: Float { 32 | return 1.5 33 | } 34 | 35 | var velocity: CGFloat { 36 | return 100 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /ProtoParticle/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 08/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | return true 18 | } 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/angry.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "angry.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/angry.imageset/angry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/angry.imageset/angry.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/circle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "circle.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/circle.imageset/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/circle.imageset/circle.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/dragon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "dragon.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/dragon.imageset/dragon.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/dragon.imageset/dragon.pdf -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/facebookVideo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "IMG_7549.PNG", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/facebookVideo.imageset/IMG_7549.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/facebookVideo.imageset/IMG_7549.PNG -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/fire-pdf.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "fire-pdf.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/fire-pdf.imageset/fire-pdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/fire-pdf.imageset/fire-pdf.pdf -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/fire.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "fire.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/fire.imageset/fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/fire.imageset/fire.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/haha.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "haha.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/haha.imageset/haha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/haha.imageset/haha.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/like.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "like.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/like.imageset/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/like.imageset/like.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/love.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "love.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/love.imageset/love.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/love.imageset/love.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/mountain.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mountain.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/mountain.imageset/mountain.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/mountain.imageset/mountain.pdf -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/notebook.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "notebook.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/notebook.imageset/notebook.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/notebook.imageset/notebook.pdf -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/sad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "sad.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/sad.imageset/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/sad.imageset/sad.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/snowing.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "snowing.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/snowing.imageset/snowing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/snowing.imageset/snowing.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/thumb-up-fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "thumb-up-fill.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/thumb-up-fill.imageset/thumb-up-fill.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/thumb-up-fill.imageset/thumb-up-fill.pdf -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/thumb-up.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "thumb-up.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/thumb-up.imageset/thumb-up.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/thumb-up.imageset/thumb-up.pdf -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/volcano.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "volcano.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/volcano.imageset/volcano.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/volcano.imageset/volcano.pdf -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/wow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "wow.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/wow.imageset/wow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/wow.imageset/wow.png -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/ya.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ya.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /ProtoParticle/Assets.xcassets/ya.imageset/ya.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/ProtoParticle/Assets.xcassets/ya.imageset/ya.png -------------------------------------------------------------------------------- /ProtoParticle/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ProtoParticle/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /ProtoParticle/BurnViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BurnViewController.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 13/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BurnViewController: UIViewController { 12 | 13 | // MARK: - Properties - 14 | 15 | @IBOutlet weak var volcanoImageView: UIImageView! 16 | 17 | // MARK: - Lifecycle - 18 | 19 | override func viewWillAppear(_ animated: Bool) { 20 | super.viewWillAppear(animated) 21 | 22 | let animationType = VolcanoAnimation() 23 | let emitterLayer = animationType.emitter() 24 | emitterLayer.emitterPosition = CGPoint(x: UIScreen.main.bounds.width/2.0, y: volcanoImageView.frame.minY) 25 | view.layer.addSublayer(emitterLayer) 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /ProtoParticle/DragonViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragonViewController.swift 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 14/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DragonViewController: UIViewController { 12 | 13 | // MARK: - Properties - 14 | 15 | @IBOutlet weak var dragonImageView: UIImageView! 16 | 17 | // MARK: - Lifecycle - 18 | 19 | override func viewWillAppear(_ animated: Bool) { 20 | super.viewWillAppear(animated) 21 | 22 | view.backgroundColor = .black 23 | let animationType = DragonAnimation() 24 | let emitterLayer = animationType.emitter() 25 | 26 | emitterLayer.emitterPosition = CGPoint(x: dragonImageView.frame.maxX + 15.0, y: dragonImageView.frame.minY + dragonImageView.bounds.height/2.0) 27 | view.layer.addSublayer(emitterLayer) 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /ProtoParticle/FacebookLiveViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FacebookLiveViewController 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 08/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FacebookLiveViewController: UIViewController { 12 | 13 | // MARK: - Lifecycle - 14 | 15 | override func viewWillAppear(_ animated: Bool) { 16 | super.viewWillAppear(animated) 17 | 18 | let animationType = FacebookAnimation() 19 | let emitterLayer = animationType.emitter() 20 | 21 | view.layer.addSublayer(emitterLayer) 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ProtoParticle/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ProtoParticle/SnowViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnowViewController 3 | // ProtoParticle 4 | // 5 | // Created by Rebouh Aymen on 08/03/2017. 6 | // Copyright © 2017 Aymen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SnowViewController: UIViewController { 12 | 13 | // MARK: - Lifecycle - 14 | 15 | override func viewWillAppear(_ animated: Bool) { 16 | super.viewWillAppear(animated) 17 | 18 | let animationType = SnowAnimation() 19 | let emitterLayer = animationType.emitter() 20 | 21 | view.layer.addSublayer(emitterLayer) 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Animate your iOS app with Particle Systems 2 | 3 |

4 | 5 |

6 | 7 | ## Introduction 8 | 9 | Apple introduced with iOS 5 an entire family of specialized layers, subclasses of the CALayer class: CAGradientLayer, CAShapeLayer, CAEmitterLayer. 10 | 11 | Each of those classes has been designed for a very specific task. Particles can be used to create real-time animations for effects like fire, rain, snow, etc. 12 | 13 | 14 | Wait… Particle what? 15 | 16 | Well, It’s not that unknown. You’ve probably seen it already in many iOS apps. 17 | 18 | __The Keynote mac__ application has also a fire animation. 19 | 20 | 21 | 22 | Facebook use it for its __Facebook Live__ feature 23 | 24 | 25 | 26 | 27 | Particle animations are made up of two components: CAEmitterLayer, and CAEmitterCell. 28 | 29 | I like to think that it’s like a bread. You have the bread, which the the CAEmitterLayer and the breadcrumb, the CAEmitterCells. 30 | 31 | CAEmitterLayer acts as a container for a collection of CAEmitterCell. CAEmitterCell determines how it looks and moves, how fast to create, how long the particles should live. 32 | 33 | 34 | I think this is a really cool Core Animation tool you can use in your projects. 35 | 36 | 37 | ## Copyright & License 38 | 39 | Released under the MIT License. 40 | 41 | Copyright © [Aymen Rebouh](https://twitter.com/aymenworks) 🤡. 42 | -------------------------------------------------------------------------------- /README/Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/README/Demo.gif -------------------------------------------------------------------------------- /README/FacebookLive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/README/FacebookLive.png -------------------------------------------------------------------------------- /README/Fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymenworks/particle-animations/55be1d4bbb4e7c4bd5ef0594d230831c296c0d08/README/Fire.png --------------------------------------------------------------------------------