This file contains 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
vec2 twirl( vec2 uv, vec2 center, float strength, vec2 offset ) | |
{ | |
vec2 delta = uv - center; | |
float angle = strength * length(delta); | |
float x = cos(angle) * delta.x - sin(angle) * delta.y; | |
float y = sin(angle) * delta.x + cos(angle) * delta.y; | |
return vec2(x + center.x + offset.x, y + center.y + offset.y); | |
} |
This file contains 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
# Might be needed from a fresh install | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install gcc | |
# Might be needed, per: https://docs.nvidia.com/cuda/wsl-user-guide/index.html#cuda-support-for-wsl-2 | |
sudo apt-key del 7fa2af80 |
This file contains 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
// Created by Anderson Mancini 2023 | |
// React Three Fiber AutoFocus Component to be used | |
// as an extension for default Depth Of Field from react-three/postprocessing | |
// HOW TO USE? | |
// import AutoFocusDOF from './AutoFocusDOF' | |
// | |
// And add this component inside the EffectsComposer... | |
//... | |
// <EffectComposer> |
This file contains 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
# -------------------------------------------------------------------- | |
# An implementation of Kruskal's algorithm for generating mazes. | |
# Fairly expensive, memory-wise, as it requires memory proportional | |
# to the size of the entire maze, and it's not the fastest of the | |
# algorithms (what with all the set and edge management is has to | |
# do). Also, the mazes it generates tend to have a lot of very short | |
# dead-ends, giving the maze a kind of "spiky" look. | |
# -------------------------------------------------------------------- | |
# NOTE: the display routine used in this script requires a terminal | |
# that supports ANSI escape sequences. Windows users, sorry. :( |
This file contains 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" | |
// @ts-ignore | |
import { ControlType, addPropertyControls, RenderTarget, withCSS } from "framer" | |
import { useState, useCallback, useEffect, useRef, useMemo } from "react" | |
import { | |
fontStack, | |
fontControls, | |
fontSizeOptions, | |
useOnEnter, | |
useFontControls, |
This file contains 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 { useEffect, useState } from "react" | |
import { motion, Variants } from "framer-motion" | |
import { addPropertyControls, ControlType } from "framer" | |
import React from "react" | |
// Welcome to Code in Framer | |
// Get Started: https://www.framer.com/docs/guides/ | |
export function useMediaQuery(query) { | |
const [matches, setMatches] = useState(false) |
This file contains 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
#!/bin/sh | |
echo "========== Cleanup start ==========" | |
rm -Rf ios/Pods | |
rm -Rf ios/.symlink | |
rm -Rf ios/Flutter/Flutter.framework | |
rm -Rf ios/Flutter/Flutter.podspec | |
rm -rf ios/Podfile.lock | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* -y | |
rm -rf pubspec.lock | |
flutter clean |
This file contains 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
// Based on: https://swiftcoder.wordpress.com/2008/11/25/constructing-a-billboard-matrix/ | |
public static Matrix CreateBillboard(Vector3 position, Matrix view) | |
{ | |
var result = Matrix.Identity; | |
result.Translation = position; | |
result.M11 = view.M11; | |
result.M12 = view.M21; | |
result.M13 = view.M31; | |
result.M21 = view.M12; |
This file contains 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 battleHowls = [ | |
"PAM!", | |
"BAM!", | |
"BANG!", | |
"BIFF!", | |
"BLOOP!", | |
"BONK!", | |
"CLASH!", | |
"CRASH!", | |
"KAPOW!", |
This file contains 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 { | |
Frame, | |
addPropertyControls, | |
ControlType, | |
useMotionValue, | |
useAnimation, | |
animate, | |
Color, | |
} from "framer" |
NewerOlder