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
export const ScaledAwait: Override = () => { | |
return { | |
scale: data.scale, | |
onTap: async () => { | |
await animate.spring(data.scale, 0.5).finished | |
await animate.spring(data.scale, 1.5).finished | |
await animate.spring(data.scale, 0.5).finished | |
console.log('finished!') | |
}, | |
} |
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 { Data, animate, Override, Animatable } from "framer"; | |
// Set an array to keep each scaleValues | |
const data = Data({ scaleValues: [] }); | |
export const Scale: Override = props => { | |
// Add to the array the id and the animation value | |
data.scaleValues.push({ id: props.id, scaleValue: Animatable(1) }); | |
return { | |
// Pass the current id to the function |
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 * as React from 'react' | |
import { PropertyControls, ControlType } from 'framer' | |
// Define type of property | |
export interface Props { | |
text: string, | |
color: string, | |
boolean: boolean, | |
numberA: number, | |
numberB: number, |
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 | |
} |
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
// 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
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
{"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
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
function getRandomColor() { | |
var letters = "0123456789ABCDEF"; | |
var color = "#"; | |
for (var i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; | |
} |