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
import { useState, useEffect } from "react" | |
// Debounce function | |
function debounce(func, wait, immediate) { | |
var timeout | |
return function () { | |
var context = this, | |
args = arguments | |
var later = function () { | |
timeout = null |
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
const NativeUI = require('NativeUI'); | |
const Textures = require('Textures'); | |
const Patches = require('Patches'); | |
Promise.all([ | |
Textures.findFirst('icon_1'), | |
Textures.findFirst('icon_2'), | |
Textures.findFirst('icon_3'), | |
]).then(onReady); |
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
var api = 'https://api.giphy.com/v1/gifs/search?'; | |
var apiKey = '&api_key=dc6zaTOxFJmzC'; | |
var query = '&q=rainbow'; | |
function setup() { | |
noCanvas(); | |
var url = api + apiKey + query; | |
loadJSON(url, gotData); | |
} |
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
function getRandomColor() { | |
var letters = "0123456789ABCDEF"; | |
var color = "#"; | |
for (var i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; | |
} |
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
void setup() { | |
size(800,800); | |
} | |
void draw() { | |
int tilesX = 10; | |
int tilesY = 1; | |
int tileW = int(width/tilesX); |
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
{"v":"5.5.10","fr":30,"ip":0,"op":360,"w":1920,"h":1920,"nm":"main","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"ARAXA Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[960,960,0],"ix":2},"a":{"a":0,"k":[670.5,55.5,0],"ix":1},"s":{"a":0,"k":[142,142,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[43.568,-54.5],[24.961,-54.5],[4.838,-14.406],[23.756,-14.406]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-6.486,9.251],[-25.094,9.251],[-47.443,54.5],[-28.524,54.5]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-43.179,-54.5],[-20.829,-54.5],[47.443,54.5],[24.9 |
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
import { Override, motionValue, useTransform } from "framer" | |
const contentOffsetY = motionValue(0) | |
// Apply this override to your scroll component | |
export function TrackScroll(): Override { | |
return { contentOffsetY: contentOffsetY } | |
} | |
// Apply this override to your parallax layer |
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
// New | |
const [clear, setClear] = useCycle(false, true) | |
useEffect(() => { | |
//props to watch for changes | |
const watchlist = ["clear"] | |
if (watchlist.some(prop => props[prop] !== clear)) { | |
console.log("clear is", clear, "props.clear is", props.clear) | |
} |
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
const styles = { | |
container: { | |
position: 'relative', | |
height: '100%', | |
display: 'flex', | |
flexDirection: 'column', | |
alignItems: 'center', | |
justifyContent: 'center', | |
textAlign: 'center', | |
color: '#8855FF', |
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
const dotIt = number => { | |
const res = [ ...Array(number) ].map((_, i) => { | |
return i * number | |
}) | |
return res | |
} |