This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch num | |
when 20 then "yes" | |
when 30 then "no" | |
when 40 then "maybe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Languages: name (local), name_en, name_fr, name_es, name_de | |
@name: '[name_en]'; | |
// Fonts // | |
@sans: 'Arial Unicode MS Regular'; | |
@sans_italic: 'Arial Unicode MS Regular'; | |
@sans_bold: 'Arial Unicode MS Bold'; | |
// Common Colors // | |
@land: #fff; | |
@water: #ccc; | |
@admin: #000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# index.html: <div id="selection" hidden></div> | |
# style.css: #selection { border: 1px dotted #000; position: absolute; } | |
selection = document.getElementById('selection') | |
x1 = 0; y1 = 0 | |
x2 = 0; y2 = 0 | |
reCalc = -> | |
x3 = Math.min x1, x2 | |
x4 = Math.max x1, x2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
index.html | |
<div id="div" hidden></div> | |
style.css | |
#div { | |
border: 1px dotted #000; | |
position: absolute; | |
} | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# basic setup of layers | |
test = new Layer width: Screen.width, height: Screen.height | |
circle = new Layer | |
circle.center() | |
forceValue = new Layer width: Screen.width | |
forceValue.html = "0" | |
forceValue.style = | |
textAlign: "center" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/RayPS/Framer-Module-ShakeEvent | |
throttleInterval = exports.throttleInterval ?= 1 | |
handler = Utils.throttle throttleInterval, -> | |
exports.onShake() | |
# http://stackoverflow.com/questions/711536 | |
if typeof window.DeviceMotionEvent != 'undefined' | |
# Position variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this line to .framer index.html: | |
# <script src="http://snapsvg.io/assets/js/snap.svg-min.js"></script> | |
background = new BackgroundLayer | |
diameter = Screen.width | |
radius = Screen.width / 2 | |
svglayer = new Layer | |
width: diameter, height: diameter | |
y: Screen.height / 2 - radius |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pos = [] | |
touchDown = false | |
card.on Events.TouchStart, (e) -> | |
touchDown = true | |
pos.x = Events.touchEvent(e).clientX | |
pos.y = Events.touchEvent(e).clientY | |
card.on Events.TouchEnd, (e) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1, 2, 3].forEach -> print "yo!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
marginLeft = 50 | |
marginTop = 40 | |
redLine = new Layer | |
x: 1000 + marginLeft, width: 1, height: 1500 | |
backgroundColor: "red", opacity: .2 | |
for i in [0..75] by 3 |