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 { Renderer, Camera, Transform, Orbit } from 'ogl' | |
import { Events } from '../events' | |
import { qs, bindAll } from '../util' | |
import store from '../store' | |
export default new (class { | |
constructor() { |
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
I am attesting that this GitHub handle marioecg is linked to the Tezos account tz1PePWi2eLdbr57Hqjr4soyNvNJFN9s5MHk for tzprofiles | |
sig:edsigtoyYVrbBx4pw7okYzosNm8ANJoDhZJaYh758Nj56AVkU9wxndifPZTrcxYqWZ4RD6Q8PSVMJFZmdt7LqeoFrb29ysdFSE9 |
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
#define PI 3.1415926538 | |
uniform float time; | |
varying vec2 vUv; | |
float map(float value, float inMin, float inMax, float outMin, float outMax) { | |
return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin); | |
} | |
// https://iquilezles.org/www/articles/distgradfunctions2d/distgradfunctions2d.htm |
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 THREE from 'three'; | |
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'; | |
import { Events } from '../events'; | |
import store from '../store'; | |
export default new class { | |
constructor() { | |
this.renderer = new THREE.WebGLRenderer({ | |
antialias: true, |
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 { Renderer, Camera, Transform, Orbit } from 'ogl'; | |
import store from '../store'; | |
import { Events } from '../events'; | |
import * as dat from 'dat.gui'; | |
export default new class { | |
constructor() { | |
this.renderer = new Renderer({ |
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
mat2 rotation2d(float angle) { | |
float s = sin(angle); | |
float c = cos(angle); | |
return mat2( | |
c, -s, | |
s, c | |
); | |
} |
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
#define PI 3.1415926538 | |
#define TWO_PI 6.28318530718 | |
vec2 scaleFromCenter = (uv - 0.5) + 0.5; | |
mat2 scale(vec2 scale){ | |
return mat2(scale.x, 0.0, | |
0.0, scale.y); | |
} |
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
vec2 backgroundCoverUv(vec2 screenSize, vec2 imageSize, vec2 uv) { | |
float screenRatio = screenSize.x / screenSize.y; | |
float imageRatio = imageSize.x / imageSize.y; | |
vec2 newSize = screenRatio < imageRatio | |
? vec2(imageSize.x * screenSize.y / imageSize.y, screenSize.y) | |
: vec2(screenSize.x, imageSize.y * screenSize.x / imageSize.x); | |
vec2 newOffset = (screenRatio < imageRatio | |
? vec2((newSize.x - screenSize.x) / 2.0, 0.0) |
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 int AMOUNT = 25; | |
void main () { | |
float TIME = uTime * 1.0; | |
vec2 uv = scale * (gl_FragCoord.xy - .5 * uResolution.xy) / uResolution.y; | |
// uv *= rotate(uv, angle1); | |
uv.x *= 0.85; | |
uv.y += 10.; |
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
vec3 palette(in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d) { | |
return a + b * cos(6.28318 * (c * t + d)); | |
} |
NewerOlder