Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nyan-matt committed Jun 18, 2018
0 parents commit 70cc738
Show file tree
Hide file tree
Showing 66 changed files with 11,219 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 1,39 @@
# Framer Git Ignore

# General OSX

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Framer Specific
.*.html
.app.js
framer/*.old*
framer/.*.hash
framer/backup.coffee
framer/backups/*
framer/manifest.txt
framer/preview.png
framer/social-*x*.png
Expand Down
130 changes: 130 additions & 0 deletions app.coffee
Original file line number Diff line number Diff line change
@@ -0,0 1,130 @@
# initial setup
flowComp = new FlowComponent
flowComp.header = hdr
flowComp.footer = tabBar
flowComp.backgroundColor = '#FFF'
flowComp.showNext(home)
flowComp.scroll.directionLock = true

# scanner setup
scanner = new VideoLayer
video: "images/movie.MOV"
backgroundColor: "black"
size: Screen.size
scanner.parent = videoContainer
scanner.sendToBack()

# simulate barcode recognition
Events.wrap(scanner.player).on "ended", ->
scannerTarget_1.stroke = "green"
scanner.opacity = 0.8
Utils.delay 1, ->
flowComp.showOverlayTop(scannerResults)

# click handler transition for tab bar
Scale = () ->
transition =
layerA:
show:
x: 0
y: 0
hide:
x: 0
y: 668
options:
time:.2
curve: Spring(damping: .5)
layerB:
show:
x: 0
y: 0
options:
time:.2
curve: Spring(damping: .8)
hide:
x: 0
y: 668

# states
hdr.states =
hide:
y: -68
animationOptions:
time: .3
curve: Bezier.easeInOut
tabBar.states =
hide:
y: 668
animationOptions:
time: .3
curve: Bezier.easeInOut

# click handlers
profile_btn.onClick ->
flowComp.transition(profile, Scale)

home_btn.onClick ->
flowComp.transition(home, Scale)
flowComp.scroll.directionLock = true

deals_btn.onClick ->
flowComp.transition(deals, Scale)

cart_btn.onClick ->
flowComp.transition(cart, Scale)

scan_btn.onClick ->
scanner.player.play()
flowComp.showOverlayBottom(videoContainer)

Icon.onClick ->
flowComp.showOverlayLeft(menuOverlay)

menuOverlay.onClick ->
flowComp.showPrevious()

cancel_btn.onClick ->
flowComp.showPrevious()
scanner.player.load()

scannerResults.onClick ->
flowComp.transition(home, Scale)

# header / footer peek-a-boo
flowComp.onScroll ->
if flowComp.scroll.direction is "down"
tabBar.animate "hide"
hdr.animate "hide"
if flowComp.scroll.direction is "up"
tabBar.animate "default"
hdr.animate "default"

# home carousel
carousel = new PageComponent
width: 375
height: 216
parent: home
directionLock: true
scrollVertical: false
x: 0
y: 0
z:100

slide1 = new Layer
parent: carousel.content
image: "images/slide1.png"
size: carousel.size

slide2 = new Layer
parent: carousel.content
image: "images/slide2.png"
size: carousel.size

slide3 = new Layer
parent: carousel.content
image: "images/slide3.png"
size: carousel.size

carousel.addPage(slide2, "right")
carousel.addPage(slide3, "right")

Binary file added framer/.bookmark
Binary file not shown.
12 changes: 12 additions & 0 deletions framer/coffee-script.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions framer/config.json
Original file line number Diff line number Diff line change
@@ -0,0 1,22 @@
{
"orientation" : 0,
"updateDelay" : 0.29999999999999999,
"designModeSelected" : 0,
"cachedDeviceHeight" : 667,
"contentScale" : 1,
"fullScreen" : false,
"cachedDeviceWidth" : 375,
"deviceType" : "apple-iphone-8-silver",
"sharedPrototype" : true,
"propertyPanelToggleStates" : {
"Filters" : false
},
"projectId" : "391F82EC-FF5A-4D4D-B704-7E81C73940E9",
"deviceOrientation" : 0,
"selectedHand" : "",
"showBezel" : false,
"foldedCodeRanges" : [
"{587, 276}"
],
"deviceScale" : "fit"
}
Loading

0 comments on commit 70cc738

Please sign in to comment.