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" |
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
// | |
// WebView.swift | |
// Copyright © 2020 Piotr Kawa | |
// The MIT License | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
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
func loadData() { | |
guard let url = URL(string: "https://jsonplaceholder.typicode.com/todos") else { | |
print("Invalid URL") | |
return | |
} | |
let request = URLRequest(url: url) | |
URLSession.shared.dataTask(with: request) { data, response, error in | |
if let data = data { | |
if let response = try? JSONDecoder().decode([TaskEntry].self, from: data) { |
NewerOlder