Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
OhBonsai committed Mar 23, 2024
1 parent 02fa5c4 commit 1a145d9
Show file tree
Hide file tree
Showing 19 changed files with 8,768 additions and 8,345 deletions.
14 changes: 7 additions & 7 deletions assets/index-ojZBiEGu.js → assets/index-CZSM_eku.js

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/art/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> -> ❤ : ) </title>


<script type="module" crossorigin src="/art/assets/index-ojZBiEGu.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/art/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> -> ❤ : ) </title>


<script type="module" crossorigin src="/art/assets/index-CZSM_eku.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
Expand Down
Binary file added screenshots/20240310_instanced_animation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/20240322_2d_sdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,961 changes: 3,961 additions & 0 deletions sketch/0_r3f_boilerplate/assets/index-BdqDJZ2c.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions sketch/0_r3f_boilerplate/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> -> ❤ : ) </title>




<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> -> ❤ : ) </title>




<script type="module" crossorigin src="/art/sketch/0_r3f_boilerplate/assets/index-DfQziQ7_.js"></script>
</head>
<body style="margin: 0">
<div id="root" style="width: 100vw; height: 100vh"></div>
</body>
</html>
</head>
<body style="margin: 0">
<div id="root" style="width: 100vw; height: 100vh"></div>
</body>
</html>
Expand Down
33 changes: 0 additions & 33 deletions sketch/0_webl_boilerplate/assets/index-CnRJmT5I.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,39 +1,45 @@
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function e(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=e(s);fetch(s.href,l)}})();var R=`precision mediump float;
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function e(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=e(s);fetch(s.href,l)}})();var R=`#version 300 es
uniform float uTime;
uniform vec2 uResolution;
precision mediump float;
uniform float uTime;\r
uniform vec2 uResolution;\r
uniform vec3 uColor;
vec2 guv() {
out vec4 fragColor;\r
vec2 guv() {\r
float aspectRatio = uResolution.x / uResolution.y;
vec2 uv = gl_FragCoord.xy / uResolution;
if (aspectRatio >= 1.0) {
uv.x = (gl_FragCoord.x - (uResolution.x - uResolution.y) / 2.0) / uResolution.y;
} else {
uv.y = (gl_FragCoord.y - (uResolution.y - uResolution.x) / 2.0) / uResolution.x;
}
uv = (uv - 0.5) * 2.0;
return uv;
}
vec2 uv = gl_FragCoord.xy / uResolution;\r
if (aspectRatio >= 1.0) {\r
uv.x = (gl_FragCoord.x - (uResolution.x - uResolution.y) / 2.0) / uResolution.y;\r
} else {\r
uv.y = (gl_FragCoord.y - (uResolution.y - uResolution.x) / 2.0) / uResolution.x;\r
}\r
uv = (uv - 0.5) * 2.0;\r
return uv;\r
}\r
void main()
{
void main()\r
{\r
vec2 uv = guv();
float radius = 0.5;
float distance = length(uv);
float radius = 0.5;\r
float distance = length(uv);\r
float alpha = smoothstep(radius - 0.01, radius + 0.01, distance);
vec3 finalColor = uColor * (alpha > 0. ? 0.0 : 1.0);
gl_FragColor = vec4(finalColor, 1.0);
}`,I=`attribute vec3 position;
fragColor = vec4(finalColor, 1.0);\r
}`,I=`#version 300 es
in vec3 position;\r
void main()
{
gl_Position = vec4(position, 1.0);
}`;const H=(n,t)=>{let e=n.createBuffer(),i=t instanceof Uint16Array||t instanceof Uint32Array?n.ELEMENT_ARRAY_BUFFER:n.ARRAY_BUFFER;return n.bindBuffer(i,e),n.bufferData(i,t,n.STATIC_DRAW),e},M=(n,t,e)=>{let i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),n.getShaderParameter(i,n.COMPILE_STATUS)||console.error("An error occurred compiling the shader: "+n.getShaderInfoLog(i)),i},T=(n,t)=>{let e=n.createProgram();for(let i of t)n.attachShader(e,i);return n.linkProgram(e),e},z=()=>{let n=document.getElementById("webgl");return n.width=window.innerWidth,n.height=window.innerHeight,n},P=n=>{let t=window.devicePixelRatio,e=n.getContext("webgl");return e||window.alert("WebGL not supported"),window.addEventListener("resize",()=>{n.width=Math.floor(window.innerWidth*t),n.height=Math.floor(window.innerHeight*t),e.viewport(0,0,n.width,n.height)}),e.clearColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.cullFace(e.BACK),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e};/**
void main()\r
{\r
gl_Position = vec4(position, 1.0);\r
}`;const H=(n,t)=>{let e=n.createBuffer(),i=t instanceof Uint16Array||t instanceof Uint32Array?n.ELEMENT_ARRAY_BUFFER:n.ARRAY_BUFFER;return n.bindBuffer(i,e),n.bufferData(i,t,n.STATIC_DRAW),e},M=(n,t,e)=>{let i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),n.getShaderParameter(i,n.COMPILE_STATUS)||console.error("An error occurred compiling the shader: "+n.getShaderInfoLog(i)),i},T=(n,t)=>{let e=n.createProgram();for(let i of t)n.attachShader(e,i);return n.linkProgram(e),e},z=()=>{let n=document.getElementById("webgl");return n.width=window.innerWidth,n.height=window.innerHeight,n},P=n=>{let t=window.devicePixelRatio,e=n.getContext("webgl2");return e||window.alert("WebGL2 not supported"),window.addEventListener("resize",()=>{n.width=Math.floor(window.innerWidth*t),n.height=Math.floor(window.innerHeight*t),e.viewport(0,0,n.width,n.height)}),e.clearColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.cullFace(e.BACK),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e};/**
* lil-gui
* https://lil-gui.georgealways.com
* @version 0.19.2
Expand Down
30 changes: 15 additions & 15 deletions sketch/0_webl_boilerplate/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> -> ❤ : ) </title>
<script type="module" crossorigin src="/art/sketch/0_webl_boilerplate/assets/index-CJb1CCC5.js"></script>
</head>
<body style="margin: 0">
<div id="root" style="width: 100vw; height: 100vh; background-color: black">
<canvas id="webgl" style="width: 100%; height: 100%; display: block"></canvas>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> -> ❤ : ) </title>
<script type="module" crossorigin src="/art/sketch/0_webl_boilerplate/assets/index-EwfHaKLZ.js"></script>
</head>
<body style="margin: 0">
<div id="root" style="width: 100vw; height: 100vh; background-color: black">
<canvas id="webgl" style="width: 100%; height: 100%; display: block"></canvas>
</div>
</body>
</html>
Expand Down
Loading

0 comments on commit 1a145d9

Please sign in to comment.