Skip to content

Commit

Permalink
Finished Isolating Animations (#27)
Browse files Browse the repository at this point in the history
* Added Animations: Connectivity, Fading Pieces & Watercolors

* Added Animations: Blue Sand, Cells, Eggsy & Snakes. Removed Skittles.

* Added Animations: City Life, Color Path, Fruit Ninja, Golden Barbs, Pink & Purple, Popcorns, Sulley’s Fur

* Fixed issue background color. Removed bad animations: Color Path, iris, Moisty Colors, Pink & Purple, Popcorns & Surface Water. Updated Animations: Sound Spectrum & Fading Pieces

* Added Animation: Cursor

* Added Animations: Aurora Borealis, Crescent Moon, Cuphead, Full Moon, Inception

* Added Animations: Juicy, Nature, Pangea, Polar Peak, Sapphire, Stripes

* Added Animations: Sunset, The Room, Tissue, Warp & Zelda

* Updated Animations: Bits & Doodle

* Removed Animations: Eggsy & Virus

* Added Signing

* Deleted unnecessary file. Updated Travis Configuration. Updated deployment target

* Updated Travis

* Updated Travis
  • Loading branch information
pedrommcarrasco authored Mar 4, 2019
1 parent 3425301 commit d91a943
Show file tree
Hide file tree
Showing 42 changed files with 252 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ env:
script:
- set -o pipefail
- xcodebuild clean -scheme "$SCHEME"
- xcodebuild build -scheme "$SCHEME"
- xcodebuild build -scheme "$SCHEME"
231 changes: 184 additions & 47 deletions Brooklyn.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Brooklyn/Contexts/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ extension ScreenSaverDefaults {

var selectedAnimations: [Animation] {
guard let rawValues = array(forKey: Database.Key.selectedAnimations) as? [String] else { return [.original] }
return rawValues.compactMap(Animation.init)
let animations = rawValues.compactMap(Animation.init)
return animations.isEmpty ? [.original] : animations
}

func set(animations: [Animation]) {
Expand Down
8 changes: 4 additions & 4 deletions Brooklyn/Contexts/Preferences/PreferencesWindowController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<window title="Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="800" height="500"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1050"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="800" height="500"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down Expand Up @@ -112,7 +112,7 @@
</avPlayerView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eY6-hS-6X6">
<rect key="frame" x="718" y="9" width="72" height="32"/>
<buttonCell key="cell" type="push" title="Done" bezelStyle="rounded" imagePosition="leading" alignment="center" borderStyle="border" sound="Pop" inset="2" id="NWC-RO-pmp">
<buttonCell key="cell" type="push" title="Done" bezelStyle="rounded" alignment="center" borderStyle="border" sound="Pop" inset="2" id="NWC-RO-pmp">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Expand Down Expand Up @@ -200,7 +200,7 @@ DQ
<constraints>
<constraint firstAttribute="height" constant="20" id="w6a-cl-Htl"/>
</constraints>
<buttonCell key="cell" type="square" title="Follow the creator on Twitter" bezelStyle="shadowlessSquare" image="twitter" imagePosition="leading" alignment="left" scrollable="YES" lineBreakMode="clipping" imageScaling="proportionallyDown" inset="2" id="Xgd-vn-cgV">
<buttonCell key="cell" type="square" title="Follow the creator on Twitter" bezelStyle="shadowlessSquare" image="twitter" imagePosition="left" alignment="left" scrollable="YES" lineBreakMode="clipping" imageScaling="proportionallyDown" inset="2" id="Xgd-vn-cgV">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
Expand All @@ -214,7 +214,7 @@ DQ
<constraints>
<constraint firstAttribute="height" constant="20" id="6su-ic-SIf"/>
</constraints>
<buttonCell key="cell" type="square" title="Star Brooklyn &amp; watch it on GitHub" bezelStyle="shadowlessSquare" image="github" imagePosition="leading" alignment="left" scrollable="YES" lineBreakMode="clipping" imageScaling="proportionallyDown" inset="2" id="KgX-fg-HvM">
<buttonCell key="cell" type="square" title="Star Brooklyn &amp; watch it on GitHub" bezelStyle="shadowlessSquare" image="github" imagePosition="left" alignment="left" scrollable="YES" lineBreakMode="clipping" imageScaling="proportionallyDown" inset="2" id="KgX-fg-HvM">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
Expand Down
5 changes: 3 additions & 2 deletions Brooklyn/Contexts/Screen Saver/BrooklynView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ final class BrooklynView: ScreenSaverView {
// MARK: Constant
private enum Constant {
static let secondPerFrame = 1.0 / 30.0
static let backgroundColor = NSColor(red: 0.00, green: 0.01, blue: 0.00, alpha:1.0)
}

// MARK: Outlets
Expand Down Expand Up @@ -82,8 +83,8 @@ private extension BrooklynView {
videoLayer.frame = bounds
videoLayer.autoresizingMask = [.layerWidthSizable, .layerHeightSizable]
videoLayer.needsDisplayOnBoundsChange = true
videoLayer.contentsGravity = .resizeAspectFill
videoLayer.backgroundColor = NSColor.black.cgColor
videoLayer.contentsGravity = .resizeAspect
videoLayer.backgroundColor = Constant.backgroundColor.cgColor
}
}

Expand Down
68 changes: 58 additions & 10 deletions Brooklyn/Enumerations/Animation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,66 @@ import Foundation
enum Animation: String, CaseIterable {
case original
case avatarTissue
case auroraBorealis
case ballPit
case bits
case blueSand
case cells
case cityLife
case connectivity
case crescentMoon
case cubicMess
case cuphead
case cursor
case defragmentation
case doodle
case fadingPieces
case fangs
case fruitNinja
case fullMoon
case geometricShapes
case glow
case goldenBarbs
case gummyWorms
case hills
case iris
case inception
case juicy
case layers
case leaf
case lines
case magnify
case moistyColors
case monochrome
case nature
case neon
case noiseStripes
case paintbrush
case pangea
case picasso
case playDoh
case polarPeak
case riverNoir
case runningInGrass
case sapphire
case shards
case shelves
case skittles
case snakes
case soundSpectrum
case splash
case surfaceWater
case stripes
case sulleysFur
case sunset
case theRoom
case tissue
case trapezium
case unstablePipes
case virus
case volumetric
case warp
case watercolors
case waterDrops
case wet
case yolk
case zebra
case zelda
}

// MARK: - Properties
Expand All @@ -57,42 +81,66 @@ extension Animation {
switch self {
case .original: return "Original"
case .avatarTissue: return "Avatar Tissue"
case .auroraBorealis: return "Aurora Borealis"
case .ballPit: return "Ball Pit"
case .bits: return "Bits"
case .blueSand: return "Blue Sand"
case .cells: return "Cells"
case .cityLife: return "City Life"
case .connectivity: return "Connectivity"
case .crescentMoon: return "Crescent Moon"
case .cubicMess: return "Cubic Mess"
case .cuphead: return "Cuphead"
case .cursor: return "Cursor"
case .defragmentation: return "Defragmentation"
case .doodle: return "Doodle"
case .fadingPieces: return "Fading Pieces"
case .fangs: return "Fangs"
case .fruitNinja: return "Fruit Ninja"
case .fullMoon: return "Full Moon"
case .geometricShapes: return "Geometric Shapes"
case .glow: return "Glow"
case .goldenBarbs: return "Golden Barbs"
case .gummyWorms: return "Gummy Worms"
case .hills: return "Hills"
case .iris: return "Iris"
case .inception: return "Inception"
case .juicy: return "Juicy"
case .layers: return "Layers"
case .leaf: return "Leaf"
case .lines: return "Lines"
case .magnify: return "Magnify"
case .moistyColors: return "Moisty Colors"
case .monochrome: return "Monochrome"
case .nature: return "Nature"
case .neon: return "Neon"
case .noiseStripes: return "Noise Stripes"
case .paintbrush: return "Paintbrush"
case .pangea: return "Pangea"
case .picasso: return "Picasso"
case .playDoh: return "Play-Doh"
case .polarPeak: return "Polar Peak"
case .riverNoir: return "River Noir"
case .runningInGrass: return "Running in Grass"
case .sapphire: return "Sapphire"
case .shards: return "Shards"
case .shelves: return "Shelves"
case .skittles: return "Skittles"
case .snakes: return "Snakes"
case .soundSpectrum: return "Sound Spectrum"
case .splash: return "Splash"
case .surfaceWater: return "Surface Water"
case .stripes: return "Stripes"
case .sulleysFur: return "Sulley's Fur"
case .sunset: return "Sunset"
case .theRoom: return "The Room"
case .tissue: return "Tissue"
case .trapezium: return "Trapezium"
case .unstablePipes: return "Unstable Pipes"
case .virus: return "Virus"
case .volumetric: return "Volumetric"
case .warp: return "Warp"
case .watercolors: return "Watercolors"
case .waterDrops: return "Water Drops"
case .wet: return "Wet"
case .yolk: return "Yolk"
case .zebra: return "Zebra"
case .zelda: return "Zelda"
}
}
}
22 changes: 0 additions & 22 deletions Brooklyn/Extensions/AVPlayerLooper+Factory.swift

This file was deleted.

Binary file added Brooklyn/Resources/Animations/auroraBorealis.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/bits.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/blueSand.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/cells.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/cityLife.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/connectivity.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/crescentMoon.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/cuphead.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/cursor.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/doodle.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/fadingPieces.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/fruitNinja.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/fullMoon.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/goldenBarbs.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/inception.mp4
Binary file not shown.
Binary file removed Brooklyn/Resources/Animations/iris.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/juicy.mp4
Binary file not shown.
Binary file removed Brooklyn/Resources/Animations/moistyColors.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/nature.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/pangea.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/polarPeak.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/sapphire.mp4
Binary file not shown.
Binary file removed Brooklyn/Resources/Animations/skittles.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/snakes.mp4
Binary file not shown.
Binary file modified Brooklyn/Resources/Animations/soundSpectrum.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/stripes.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/sulleysFur.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/sunset.mp4
Binary file not shown.
Binary file removed Brooklyn/Resources/Animations/surfaceWater.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/theRoom.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/tissue.mp4
Binary file not shown.
Binary file removed Brooklyn/Resources/Animations/virus.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/warp.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/watercolors.mp4
Binary file not shown.
Binary file added Brooklyn/Resources/Animations/zelda.mp4
Binary file not shown.

0 comments on commit d91a943

Please sign in to comment.