Skip to content

Instantly share code, notes, and snippets.

View isaacw's full-sized avatar

Isaac Weinhausen isaacw

View GitHub Profile
@isaacw
isaacw / Layer.makeTriangle.coffee
Last active September 26, 2016 21:09 — forked from RayPS/Framer-Make-CSS-Triangle.coffee
Turn layer into a CSS-bassed triangle
# Layer::makeTriangle
# CSS Based triangles
# Directions: "top", "right", "bottom", "left"
# Credit: Black Ray https://gist.github.com/RayPS/9460d020b59fe7a201da65207bb369a0
Layer::makeTriangle = (direction)->
@.borderColor = "transparent"
@.borderWidth = @.width / 2
@.style["border-#{direction}-color"] = @.backgroundColor.toHexString()
@.backgroundColor = "transparent"
@isaacw
isaacw / triangle.coffee
Created December 26, 2016 23:13 — forked from jordandobson/triangle.coffee
Creating a triangle via Framer Layer
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info
Framer.Info =
title: "Triangle Layer Rebound"
author: "Jordan Dobson"
twitter: "jordandobson"
description: "jordandobson@gmail.com\n\nThis rebound of jrdn.io/haJ2 \nby Black Ray adds direction checking, allows you to set direction as an option when creating a layer and sets the bounding box of the layer to it's intrinsic size."