Permalink
Browse files

Merge branch 'scroll-component'

  • Loading branch information...
koenbok committed Apr 2, 2015
2 parents 86b7691 + f19fdab commit 4cb562b0095b1077e292733b2bbe49f9e5a8fcb0
Showing 688 changed files with 18,344 additions and 10,545 deletions.
View
@@ -8,4 +8,11 @@ build
lib
.build
.deploy
*.pyc
*.pyc
npm-debug.log
extras/Studio.framer/app.coffee
extras/Studio.framer/framer/config.json
extras/Studio.framer/imported
extras/Studio.framer/app.js
test/phantomjs/tests.js
test/phantomjs/tests.js.map
View
@@ -1,81 +1,54 @@
bin = ./node_modules/.bin
coffee = $(bin)/coffee
browserify = $(bin)/browserify -t coffeeify -d --extension=".coffee"
watch = $(coffee) scripts/watch.coffee framer,test/tests
pwd = $(CURDIR)
bin = $(pwd)/node_modules/.bin
coffee = "$(bin)/coffee"
githash = `git rev-parse --short HEAD`
gulp = "$(bin)/gulp"
all: build
watch:
$(watch) make $(cmd)
# make watch cmd=perf
bootstrap:
npm install
cd test/phantomjs; "$(bin)/bower" install
build:
make clean
mkdir -p build
# $(coffee) scripts/banner.coffee > build/framer.debug.js
# cat vendor/react.min.js >> build/framer.debug.js
$(browserify) framer/Framer.coffee >> build/framer.debug.js
cat build/framer.debug.js | $(bin)/exorcist build/framer.js.map > build/framer.js
# Build the minimized version
# cd build; ../$(bin)/uglifyjs \
# --source-map-include-sources \
# --in-source-map framer.js.map \
# --source-map framer.min.js.map \
# framer.js > framer.min.js
# $(coffee) scripts/fix-sourcemap.coffee
# Copy the file over to the cactus project
cp build/framer.js extras/CactusFramer/static/
cp build/framer.js.map extras/CactusFramer/static/
buildw:
$(watch) make build
unbootstrap:
rm -Rf node_modules
rm -Rf test/phantomjs/bower
clean:
rm -rf build
build: bootstrap clean
mkdir -p build
$(gulp) build:release
# Testing
test:
make lint
make build
mkdir -p test/lib
$(browserify) test/init.coffee -o test/init.js
$(bin)/mocha-phantomjs test/index.html
testw:
$(watch) make test
debug: bootstrap clean
mkdir -p build
$(gulp) build:debug
safari:
make build
mkdir -p test/lib
$(browserify) test/init.coffee -o test/init.js
# $(bin)/mocha-phantomjs test/index.html
open -g -a Safari test/index.html
safariw:
$(watch) make safari
watch: bootstrap
$(gulp) watch
watcher: bootstrap
$(gulp) watcher
perf:
$(browserify) perf/init.coffee -o perf/init.js
$(bin)/phantomjs perf/runner.js perf/index.html
perfw:
$(watch) make perf
test: bootstrap
$(gulp) test
perf-safari:
$(browserify) perf/init.coffee -o perf/init.js
open -g -a Safari perf/index.html
perf-safariw:
$(watch) make perf-safari
coverage: bootstrap
$(bin)/coffeeCoverage ./framer ./build/instrumented
$(gulp) coverage
cp ./test/coverage-template/* ./build/coverage
open ./build/coverage/jscoverage.html
studio:
open -a "Framer Studio" extras/Studio.framer
# Building and uploading the site
dist:
make build
mkdir -p build/Framer
cp -R templates/Project build/Framer/Project
cp -R extras/templates/Project build/Framer/Project
rm -Rf build/Framer/Project/framer
mkdir -p build/Framer/Project/framer
cp build/framer.js build/Framer/Project/framer/framer.js
@@ -108,11 +81,6 @@ resources%optimize:
resources%upload:
cd extras/resources.framerjs.com; cactus deploy
publish:
# Todo: update version
coffee -o lib/ -c framer/
npm publish
lint:
./node_modules/.bin/coffeelint -f coffeelint.json -r framer
View

This file was deleted.

Oops, something went wrong.
@@ -1,3 +1,24 @@
<!-- <script src="{% static 'react.min.js' %}"></script> -->
<script src="{% static 'framer.js' %}"></script>
<script src="{% static 'app.js' %}"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<script type="text/javascript">
// This automatically sets the right viewport scale on mobile devices
(function() {
var scale = 1 / window.devicePixelRatio
document.write("<meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=" + scale + ", maximum-scale=" + scale + ", user-scalable=no\">")
})()
</script>
</head>
<body>
<script src="{% static 'framer.debug.js' %}"></script>
<script src="{% static 'app.js' %}"></script>
</body>
</html>
@@ -1,6 +1,62 @@
Framer.Device = new Framer.DeviceView()
Framer.Device.setupContext()
Framer.Device.deviceType = "applewatchsport-42-aluminum-sportband-white"
# constraintLayer = new Layer
# width: window.innerWidth - 100
# height: window.innerHeight - 100
# clip: false
# backgroundColor: "rgba(255,0,0,.1)"
new BackgroundLayer backgroundColor:"white"
# constraintLayer.center()
# layer = new Layer
# width: 300
# height: 300
# superLayer:constraintLayer
# layer.center()
# constraintLayer.scale = 0.8
# layer.draggable.enabled = true
# layer.draggable.momentum = true
# layer.draggable.bounce = true
# layer.draggable.constraints = constraintLayer.size
# layer.draggable.overdrag = true
# layer.draggable.overdragScale = 0.1
# # layer.draggable.directionLock = true
# layer.on Events.DragMove, ->
# print layer.draggable.velocity
scroll = new ScrollComponent width:window.innerWidth, height:window.innerHeight
scroll.content.draggable.horizontal = false
scroll.contentInset = {top:100, right:0, bottom:0, left:0}
scroll.content.on Events.Scroll, ->
console.log scroll.velocity
h = 400
for i in [0..30]
layer = new Layer
y: i * h
width: scroll.width
height: h
superLayer: scroll.content
backgroundColor: Utils.randomColor(.5)
# Utils.labelLayer(layer, "Layer #{i}")
# Utils.delay 1, -> scroll.scrollToLayer(layer)
# scroll.content.on Events.DragMove, ->
# print scroll.scrollY
# layer = new Layer
# content = new Layer height:500, superLayer:layer
# layer.scroll = true
# layer.on Events.Scroll, ->
# print layer.scrollY
@@ -23,11 +23,11 @@ highlightLayer = (event, layer) ->
event.stopPropagation()
screenFrame = layer.screenFrame
canvasFrame = layer.canvasFrame
screenLayer = new Layer
screenLayer.animate
properties: screenFrame
properties: canvasFrame
curve: "spring(500,50,0)"
Utils.delay 0.8, ->
@@ -0,0 +1,35 @@
# Default Framer gitignore file
# Mac specific
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Framer specific
.temp.html
framer/*.old.*
framer/backup.coffee
framer/backups
framer/backups/*
framer/.*.hash
framer/framer.debug.js
framer/framer.generated.js
framer/framer.modules.js
framer/images/*

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,10 @@
{
"device" : "iPhone 5S Space Gray",
"sharedPrototype" : 1,
"deviceOrientation" : 0,
"contentScale" : 1,
"deviceType" : "fullscreen",
"updateDelay" : 0.3,
"deviceScale" : -1,
"delay" : 0.3
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 4cb562b

Please sign in to comment.