- colorincode.me
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
<!--//////////////////////////////////////////////////////////////////////////////////////// | |
/// /// | |
/// Example Using Three.js Library, HTML, CSS & JavaScript /// | |
// 3D Interactive Web Apps & Games 2021-2024 /// | |
/// Contact Shane Brumback https://www.shanebrumback.com /// | |
/// Send a message if you have questions about this code /// | |
/// I am a freelance developer. I develop any and all web. /// | |
/// Apps Websites 3D 2D CMS Systems etc. Contact me anytime :) /// | |
/// /// | |
////////////////////////////////////////////////////////////////////////////////////////////--> |
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
// leaving as-is for now | |
function factorial(n: bigint, x = 1n): bigint { | |
if (n <= 1) return x; | |
return factorial(n - 1n, n * x); | |
} | |
function factorialAux(n: bigint, x = 1n): bigint | Thunk<bigint> { | |
if (n <= 1) return x; | |
return () => factorial(n - 1n, n * x); | |
} |
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
/** | |
* Transforms a function that returns either a direct value or a thunk (a | |
* no-argument function that returns a value) into a function that only returns | |
* a direct value. It does this by repeatedly evaluating the function if it | |
* returns a thunk, until a direct value is obtained. | |
* | |
* @template T The type of the value to be returned by the trampoline function. | |
* @template A The type tuple representing the argument types accepted by the | |
* function `f`. | |
* @param f A function that takes arguments of type `A` and returns either a |
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
const { readFileSync, statSync, existsSync } = require('fs') | |
const mime = require('mime') | |
const CSSAsset = require(`parcel-bundler/${parseInt(process.versions.node, 10) < 8 ? 'lib' : 'src'}/assets/CSSAsset`) | |
const { dirname, join, resolve, extname, normalize, relative } = require('path') | |
const projectRootPath = resolve(__dirname, '../../../') | |
const parcelrcPath = join(projectRootPath, '.parcelrc') | |
const getConfig = () => existsSync(parcelrcPath) ? JSON.parse(readFileSync(parcelrcPath))['css-url-loader'] : {} | |
const EXTS = ['png', 'svg', 'jpg', 'gif', 'jpeg'] |