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
FROM debian:bullseye as base | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
WORKDIR /workspace | |
RUN mkdir -pv "/workspace/bin" | |
ENV PATH="/workspace/bin:${PATH}" | |
FROM base as builder |
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
/** | |
* Splits an array into chunks of a specified size. | |
* @param array The array to be chunked. | |
* @param size The size of each chunk. | |
* @returns An array of chunks. | |
*/ | |
export const typedChunkByIndex = <T>(array: T[], size: number): T[][] => { | |
const chunked: T[][] = [] | |
let index = 0 |
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 { existsSync, lstatSync, readdirSync, rmdirSync, unlinkSync } from 'fs' | |
import path from 'path' | |
/** | |
* Clears a directory by deleting all its files and sub-folders recursively. | |
* @param folderPath - The path of the directory to be cleared. | |
* @throws Error if the folder does not exist. | |
*/ | |
export function clearDir(folderPath: string) { | |
if (existsSync(folderPath)) { |
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
/** | |
* Interface for fetch options. | |
*/ | |
interface FetchOptions { | |
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | |
headers?: Headers | |
body?: any | |
} | |
/** |
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
<script> | |
jQuery( function( $ ) { | |
/*-----------------------------------------------------*/ | |
/*-------------------- ON READY------------------------*/ | |
/*-----------------------------------------------------*/ | |
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
varying vec3 vPositionW; | |
varying vec3 vNormalW; | |
uniform float u_intensity; | |
void main() { | |
vec3 color = vec3(.58, .74, 1.); | |
float fresnelTerm = dot(vPositionW, vNormalW) * (1. - u_intensity/2.); | |
fresnelTerm = clamp(1.0 - fresnelTerm, 0., 1.); | |
gl_FragColor = vec4( color * fresnelTerm, 1.) * u_intensity; |
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
Number.prototype.map = function(in_min, in_max, out_min, out_max) { | |
return ((this - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min | |
} |
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
#region counting functions | |
public void TextCountTo (int target, Text text) { | |
if(countingCoroutine != null) | |
StopCoroutine("CountTo"); | |
countingCoroutine = StartCoroutine(CountTo(target, text)); | |
} | |
IEnumerator CountTo (int target, Text countText) { |
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
#region counting functions | |
public void TextCountTo (int target, Text text) { | |
if(countingCoroutine != null) | |
StopCoroutine("CountTo"); | |
countingCoroutine = StartCoroutine(CountTo(target, text)); | |
} | |
IEnumerator CountTo (int target, Text countText) { |
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
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "doeslab/GrabPassBlur" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_BumpAmt ("Distortion", Range (0,128)) = 10 | |
_MainTex ("Tint Color (RGB)", 2D) = "white" {} | |
_BumpMap ("Normalmap", 2D) = "bump" {} | |
_Size ("Size", Range(0, 20)) = 1 | |
} |
NewerOlder