Skip to content

Instantly share code, notes, and snippets.

View krijnrijshouwer's full-sized avatar

Krijn Rijshouwer krijnrijshouwer

View GitHub Profile
@krijnrijshouwer
krijnrijshouwer / action.js
Last active January 3, 2024 22:05
Custom Action - Create Notion Database Item
import { Client } from "@notionhq/client"
export function main({ config, args }) {
// validate if config is provided
if (config["API Token"] === "") {
return {
response: "This action requires an API token."
}
}
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 17:27
How to - Animate
layer.animate
x: 200
y: 200
options:
time: 1
curve: "ease"
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 15:53
How to - Share
Framer.Info =
title: "Pinch and Zoom"
author: "Benjamin den Boer"
twitter: "benjaminnathan"
description: "A little grid of photos, you can scroll,
click and pinch to zoom."
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 15:26
How to - new Midi
midi = new MIDIComponent
control: 16
min: 1
max: 2
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 15:26
How to - Midi
# Initialize MIDI component
midi = new MIDIComponent
# Listen to value changes
midi.onValueChange (value, info) ->
print value, info
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 14:20
How to - Sketch Import
# Import file "cloud"
sketch = Framer.Importer.load("imported/cloud@1x")
# Set width and height, scale 2x
sketch.icon.width *= 2
sketch.icon.height *= 2
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 14:06
How to - VR Interact
vr.orientationLayer = false
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 14:05
How to - Shift environment
# instant change
vr.heading = 180
# animated change
vr.animate
properties:
heading: 90
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 14:05
How to - Line of sight
# direct access through property
heading = vr.heading
# continues updates
vr.on Events.OrientationDidChange, (data) ->
heading = data.heading
elevation = data.elevation
tilt = data.tilt
@krijnrijshouwer
krijnrijshouwer / example.coffee
Created January 6, 2017 14:04
How to - Log Heading
layer = new VRLayer
heading: -30
print layer.heading
# returns 330