Initial commit - divination content
This commit is contained in:
commit
040d373967
271 changed files with 28825 additions and 0 deletions
553
index-new3.html
Normal file
553
index-new3.html
Normal file
|
|
@ -0,0 +1,553 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>disinfo.zone</title>
|
||||
<meta name="description" content="Luminous mirages shifting, merging, cyber currents collide.">
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #080604;
|
||||
color: #8a8070;
|
||||
font-family: 'EB Garamond', Georgia, serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
overflow-x: hidden;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
#void {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* Floating wisdom - barely there whispers */
|
||||
.fragment {
|
||||
position: fixed;
|
||||
font-family: 'EB Garamond', serif;
|
||||
font-style: italic;
|
||||
color: #4a4035;
|
||||
pointer-events: none;
|
||||
z-index: 5;
|
||||
opacity: 0;
|
||||
transition: opacity 4s ease, transform 6s ease;
|
||||
font-size: 0.85rem;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.fragment.visible {
|
||||
opacity: 0.15;
|
||||
}
|
||||
|
||||
.fragment.fading {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
padding: 6vh 2rem 10vh;
|
||||
}
|
||||
|
||||
/* Site title - integrated into flow */
|
||||
.site-title {
|
||||
font-size: 0.75rem;
|
||||
font-family: monospace;
|
||||
color: #3a3530;
|
||||
letter-spacing: 0.3em;
|
||||
margin-bottom: 3vh;
|
||||
}
|
||||
|
||||
/* The Prophecy */
|
||||
.prophecy {
|
||||
font-size: clamp(1.7rem, 4vw, 2.4rem);
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
line-height: 1.45;
|
||||
margin-bottom: 8vh;
|
||||
color: #c0b0a0;
|
||||
min-height: 3em;
|
||||
}
|
||||
|
||||
.prophecy .word {
|
||||
display: inline-block;
|
||||
transition: opacity 0.6s, filter 0.6s, transform 0.6s;
|
||||
}
|
||||
|
||||
.prophecy .word.dissolving {
|
||||
opacity: 0;
|
||||
filter: blur(6px);
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
|
||||
.prophecy .word.forming {
|
||||
opacity: 0;
|
||||
filter: blur(6px);
|
||||
}
|
||||
|
||||
/* Section labels - BIGGER */
|
||||
h2 {
|
||||
font-family: monospace;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
letter-spacing: 0.35em;
|
||||
color: #4a4540;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 1.2rem;
|
||||
}
|
||||
|
||||
section {
|
||||
margin-bottom: 6vh;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #9a9080;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #d4c4a8;
|
||||
}
|
||||
|
||||
/* Portals - scattered/grid hybrid */
|
||||
.portals {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, auto);
|
||||
gap: 0.6rem 2.5rem;
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
.portals a {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
/* Chronicle */
|
||||
.chronicle a {
|
||||
display: block;
|
||||
margin-bottom: 0.8rem;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.chronicle .date {
|
||||
font-family: monospace;
|
||||
font-size: 11px;
|
||||
color: #5a5550;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
/* Divinations - readable and warm */
|
||||
.divinations {
|
||||
font-size: 1.05rem;
|
||||
line-height: 2.3;
|
||||
}
|
||||
|
||||
.divinations a {
|
||||
color: #8a7a68;
|
||||
padding: 0.15rem 0;
|
||||
transition: color 0.3s, text-shadow 0.3s;
|
||||
}
|
||||
|
||||
.divinations a:hover {
|
||||
color: #e0d0b8;
|
||||
text-shadow: 0 0 25px rgba(200, 180, 140, 0.35);
|
||||
}
|
||||
|
||||
.divinations a::after {
|
||||
content: " · ";
|
||||
color: #3a3530;
|
||||
}
|
||||
|
||||
.divinations a:last-child::after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 8vh;
|
||||
font-family: monospace;
|
||||
font-size: 9px;
|
||||
color: #2a2520;
|
||||
letter-spacing: 0.15em;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.content {
|
||||
padding: 5vh 1.5rem 8vh;
|
||||
}
|
||||
|
||||
.portals {
|
||||
grid-template-columns: repeat(2, auto);
|
||||
gap: 0.5rem 1.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<canvas id="void"></canvas>
|
||||
|
||||
<!-- Floating wisdom fragments -->
|
||||
<div id="fragments"></div>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<div class="site-title">DISINFO.ZONE</div>
|
||||
|
||||
<p class="prophecy" id="prophecy"></p>
|
||||
|
||||
<section>
|
||||
<h2>Portals</h2>
|
||||
<nav class="portals">
|
||||
<a href="https://blip.disinfo.zone">Blip</a>
|
||||
<a href="https://infoscope.disinfo.zone">Infoscope</a>
|
||||
<a href="https://sref.disinfo.zone">Sref Plume</a>
|
||||
<a href="https://songvoter.disinfo.zone">Song Select</a>
|
||||
<a href="https://theinfoweb.disinfo.zone">Infoweb</a>
|
||||
<a href="https://files.disinfo.zone">Files</a>
|
||||
</nav>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Chronicle</h2>
|
||||
<div class="chronicle">
|
||||
<a href="loureiro_chaos.html">On the Murder of Nuno Loureiro<span class="date">2025.12.16</span></a>
|
||||
<a href="llmstyle.html">Tuning an LLM for Style Transfer<span class="date">2024.01.12</span></a>
|
||||
<a href="uap/uap-20230930.html">UAP Analysis — Chattanooga<span class="date">2023.09.30</span></a>
|
||||
<a href="uap/133930.html">MUFON Case 133930<span class="date">2023.09.29</span></a>
|
||||
<a href="video/hmmm.html">Video Reference<span class="date">2023.05.25</span></a>
|
||||
<a href="radio/radio-index.html">Radio Resources<span class="date">2023</span></a>
|
||||
<a href="2023.html">2022 // 2023<span class="date">2022.12.31</span></a>
|
||||
<a href="telex.html">Telex User Manual<span class="date">2022.11.21</span></a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Divinations</h2>
|
||||
<p class="divinations">
|
||||
<a href="https://divination.disinfo.zone/post/the-weight-of-wonder/">The Weight of Wonder</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-death-of-wonder/">The Death of Wonder</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-disfugration-of-art/">The Disfiguration of Art</a>
|
||||
<a href="https://divination.disinfo.zone/post/mirror-mirror/">Mirror, Mirror</a>
|
||||
<a href="https://divination.disinfo.zone/post/hammer/">Hammer and Claude</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-tartarian-mythos/">The Tartarian Mythos</a>
|
||||
<a href="https://divination.disinfo.zone/post/elevating-the-unspeakable/">Elevating the Unspeakable</a>
|
||||
<a href="https://divination.disinfo.zone/post/mimetic-masquerade-a-warning/">Mimetic Masquerade</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-abyss-of-instrumentalism/">The Abyss of
|
||||
Instrumentalism</a>
|
||||
<a href="https://divination.disinfo.zone/post/a-matter-of-control/">A Matter of Control</a>
|
||||
<a href="https://divination.disinfo.zone/post/undermining-power-in-the-modern-state/">Undermining
|
||||
Power</a>
|
||||
<a href="https://divination.disinfo.zone/post/screen-paranoia-and-the-interface/">Screen Paranoia</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-dusk-of-empire/">The Dusk of Empire</a>
|
||||
<a href="https://divination.disinfo.zone/post/strong-agi-and-the-future-of-capital/">Strong AGI</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-ur-wandering/">The Ur-Wandering</a>
|
||||
<a href="https://divination.disinfo.zone/post/craft-concept-algorithm/">Craft, Concept, Algorithm</a>
|
||||
<a href="https://divination.disinfo.zone/post/text-without-a-spine/">Text Without a Spine</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-politics-of-indifference/">The Politics of
|
||||
Indifference</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-machine-wrought-will/">The Machine-Wrought Will</a>
|
||||
<a href="https://divination.disinfo.zone/post/pseudoconation-the-simulated-will/">Pseudoconation</a>
|
||||
<a href="https://divination.disinfo.zone/post/ascending-the-rampart/">Ascending the Rampart</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-age-of-the-paste-ling/">The Age of the Paste-ling</a>
|
||||
<a href="https://divination.disinfo.zone/post/ausweislos/">Ausweislos</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-american-method/">The American Method</a>
|
||||
<a href="https://divination.disinfo.zone/post/axis-mundi-in-the-void/">Axis Mundi in the Void</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-gnostic-ego/">The Gnostic Ego</a>
|
||||
<a href="https://divination.disinfo.zone/post/notes-from-the-inflection/">Notes from the Inflection</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-shadows-of-ai/">The Shadows of AI</a>
|
||||
<a href="https://divination.disinfo.zone/post/manufacturing-neurosis/">Manufacturing Neurosis</a>
|
||||
<a href="https://divination.disinfo.zone/post/cyberian-shamanism/">Cyberian Shamanism</a>
|
||||
<a href="https://divination.disinfo.zone/post/cybergott/">Cybergott</a>
|
||||
<a href="https://divination.disinfo.zone/post/society-of-nothing/">Society of Nothing</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-terror-of-virtuality/">The Terror of Virtuality</a>
|
||||
<a href="https://divination.disinfo.zone/post/the-entropic-self/">The Entropic Self</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<footer>nginx/1.18.0</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Prophecies that cycle
|
||||
const prophecies = [
|
||||
"Luminous mirages, shifting, merging.",
|
||||
"Cyber currents collide in the void.",
|
||||
"Digital seers navigate disorder.",
|
||||
"Scripts in transformation, borders dissolved.",
|
||||
"A prophecy, a melody, a cipher.",
|
||||
"The path divines itself.",
|
||||
"Everything counts. Nothing is lost.",
|
||||
"We divine the digital abyss."
|
||||
];
|
||||
|
||||
// Wisdom fragments that appear randomly
|
||||
const wisdomFragments = [
|
||||
"truth", "signal", "noise", "cipher", "mirage", "void", "axis", "mundi",
|
||||
"divination", "transmission", "entropy", "emergence", "dissolve", "reform",
|
||||
"path", "current", "digital", "spectral", "fragment", "echo",
|
||||
"everything counts", "nothing is lost", "borders dissolved", "grace",
|
||||
"luminous", "shifting", "merging", "navigate", "disorder", "prophecy"
|
||||
];
|
||||
|
||||
let currentIndex = 0;
|
||||
const prophecyEl = document.getElementById('prophecy');
|
||||
const fragmentsContainer = document.getElementById('fragments');
|
||||
|
||||
function renderProphecy(text) {
|
||||
prophecyEl.innerHTML = text.split(' ').map(word =>
|
||||
`<span class="word">${word}</span>`
|
||||
).join(' ');
|
||||
}
|
||||
|
||||
function transitionProphecy() {
|
||||
const words = prophecyEl.querySelectorAll('.word');
|
||||
words.forEach((word, i) => {
|
||||
setTimeout(() => word.classList.add('dissolving'), i * 60);
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
currentIndex = (currentIndex + 1) % prophecies.length;
|
||||
renderProphecy(prophecies[currentIndex]);
|
||||
const newWords = prophecyEl.querySelectorAll('.word');
|
||||
newWords.forEach(w => w.classList.add('forming'));
|
||||
requestAnimationFrame(() => {
|
||||
newWords.forEach((word, i) => {
|
||||
setTimeout(() => word.classList.remove('forming'), i * 60);
|
||||
});
|
||||
});
|
||||
}, words.length * 60 + 300);
|
||||
}
|
||||
|
||||
// Floating wisdom fragments - barely there
|
||||
function spawnFragment() {
|
||||
const frag = document.createElement('div');
|
||||
frag.className = 'fragment';
|
||||
frag.textContent = wisdomFragments[Math.floor(Math.random() * wisdomFragments.length)];
|
||||
frag.style.left = (15 + Math.random() * 70) + '%';
|
||||
frag.style.top = (15 + Math.random() * 70) + '%';
|
||||
fragmentsContainer.appendChild(frag);
|
||||
|
||||
requestAnimationFrame(() => frag.classList.add('visible'));
|
||||
|
||||
setTimeout(() => {
|
||||
frag.classList.remove('visible');
|
||||
frag.classList.add('fading');
|
||||
setTimeout(() => frag.remove(), 6000);
|
||||
}, 6000 + Math.random() * 4000);
|
||||
}
|
||||
|
||||
// Initialize
|
||||
renderProphecy(prophecies[0]);
|
||||
setInterval(transitionProphecy, 7000);
|
||||
setInterval(spawnFragment, 8000);
|
||||
setTimeout(spawnFragment, 3000);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// WebGL - SATURN palette
|
||||
const canvas = document.getElementById('void');
|
||||
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
||||
|
||||
if (gl) {
|
||||
const vsSource = `attribute vec4 aPosition; void main() { gl_Position = aPosition; }`;
|
||||
|
||||
const fsSource = `
|
||||
precision highp float;
|
||||
uniform float uTime;
|
||||
uniform vec2 uResolution;
|
||||
uniform vec2 uMouse;
|
||||
|
||||
// Optimized permutation - inline mod
|
||||
vec4 permute(vec4 x) { return mod(((x*34.0)+1.0)*x, 289.0); }
|
||||
vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
|
||||
|
||||
float snoise(vec3 v) {
|
||||
const vec2 C = vec2(0.166666667, 0.333333333);
|
||||
vec3 i = floor(v + dot(v, C.yyy));
|
||||
vec3 x0 = v - i + dot(i, C.xxx);
|
||||
vec3 g = step(x0.yzx, x0.xyz);
|
||||
vec3 l = 1.0 - g;
|
||||
vec3 i1 = min(g, l.zxy);
|
||||
vec3 i2 = max(g, l.zxy);
|
||||
vec3 x1 = x0 - i1 + C.x;
|
||||
vec3 x2 = x0 - i2 + C.y;
|
||||
vec3 x3 = x0 - 0.5;
|
||||
i = mod(i, 289.0);
|
||||
vec4 p = permute(permute(permute(
|
||||
i.z + vec4(0.0, i1.z, i2.z, 1.0))
|
||||
+ i.y + vec4(0.0, i1.y, i2.y, 1.0))
|
||||
+ i.x + vec4(0.0, i1.x, i2.x, 1.0));
|
||||
vec4 j = p - 49.0 * floor(p / 49.0);
|
||||
vec4 x_ = floor(j / 7.0);
|
||||
vec4 y_ = j - 7.0 * x_;
|
||||
vec4 x = (x_ * 2.0 + 0.5) / 7.0 - 1.0;
|
||||
vec4 y = (y_ * 2.0 + 0.5) / 7.0 - 1.0;
|
||||
vec4 h = 1.0 - abs(x) - abs(y);
|
||||
vec4 b0 = vec4(x.xy, y.xy);
|
||||
vec4 b1 = vec4(x.zw, y.zw);
|
||||
vec4 s0 = floor(b0) * 2.0 + 1.0;
|
||||
vec4 s1 = floor(b1) * 2.0 + 1.0;
|
||||
vec4 sh = -step(h, vec4(0.0));
|
||||
vec4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
|
||||
vec4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
|
||||
vec3 p0 = vec3(a0.xy, h.x);
|
||||
vec3 p1 = vec3(a0.zw, h.y);
|
||||
vec3 p2 = vec3(a1.xy, h.z);
|
||||
vec3 p3 = vec3(a1.zw, h.w);
|
||||
vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2,p2), dot(p3,p3)));
|
||||
p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; p3 *= norm.w;
|
||||
vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
|
||||
m *= m; m *= m;
|
||||
return 42.0 * dot(m, vec4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)));
|
||||
}
|
||||
|
||||
// Unrolled FBM - avoids loop overhead and dynamic branching
|
||||
float fbm4(vec3 p) {
|
||||
return snoise(p) * 0.5 + snoise(p * 2.0) * 0.25 +
|
||||
snoise(p * 4.0) * 0.125 + snoise(p * 8.0) * 0.0625;
|
||||
}
|
||||
|
||||
float fbm5(vec3 p) {
|
||||
return fbm4(p) + snoise(p * 16.0) * 0.03125;
|
||||
}
|
||||
|
||||
// Fast hash-based noise for grain (much cheaper than simplex)
|
||||
float hash(vec2 p) {
|
||||
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
|
||||
p3 += dot(p3, p3.yzx + 33.33);
|
||||
return fract((p3.x + p3.y) * p3.z);
|
||||
}
|
||||
|
||||
// Palette as constants
|
||||
const vec3 C_ABYSS = vec3(0.01, 0.008, 0.012);
|
||||
const vec3 C_WINE = vec3(0.04, 0.02, 0.025);
|
||||
const vec3 C_UMBER = vec3(0.07, 0.04, 0.03);
|
||||
const vec3 C_BROWN = vec3(0.12, 0.07, 0.04);
|
||||
const vec3 C_AMBER = vec3(0.2, 0.12, 0.06);
|
||||
const vec3 C_GOLD = vec3(0.3, 0.24, 0.15);
|
||||
const vec3 C_CREAM = vec3(0.4, 0.35, 0.28);
|
||||
const vec3 C_BLUE = vec3(0.06, 0.07, 0.1);
|
||||
|
||||
void main() {
|
||||
vec2 uv = gl_FragCoord.xy / uResolution.xy;
|
||||
float aspect = uResolution.x / uResolution.y;
|
||||
vec2 p = vec2((uv.x - 0.5) * aspect, uv.y - 0.5) * 2.0;
|
||||
|
||||
float t = uTime * 0.015;
|
||||
|
||||
// Layered depth with unrolled FBM
|
||||
float deep = fbm4(vec3(p * 0.3, t * 0.5));
|
||||
float mid = fbm4(vec3(p * 0.6 + deep * 0.2, t * 0.8));
|
||||
float surface = fbm5(vec3(p * 1.2 + mid * 0.15, t * 1.2));
|
||||
|
||||
float combined = deep * 0.3 + mid * 0.4 + surface * 0.3;
|
||||
float intensity = combined * 0.5 + 0.5;
|
||||
|
||||
// Build color with constants
|
||||
vec3 color = mix(C_ABYSS, C_WINE, smoothstep(0.0, 0.2, intensity));
|
||||
color = mix(color, C_UMBER, smoothstep(0.15, 0.35, intensity));
|
||||
color = mix(color, C_BROWN, smoothstep(0.3, 0.5, intensity));
|
||||
color = mix(color, C_AMBER, smoothstep(0.45, 0.65, intensity));
|
||||
color = mix(color, C_GOLD, smoothstep(0.6, 0.85, intensity) * 0.7);
|
||||
color = mix(color, C_CREAM, smoothstep(0.85, 1.0, intensity) * 0.25);
|
||||
|
||||
// Atmospheric bands - reuse deep value
|
||||
float bandFreq = p.y * 6.0 + deep * 3.0;
|
||||
float bands = sin(bandFreq) * 0.5 + 0.5;
|
||||
color = mix(color, mix(C_UMBER, C_BLUE, sin(bandFreq * 0.7) * 0.2 + 0.2), bands * 0.06 * intensity);
|
||||
|
||||
// Cursor - reuse deep noise for distortion (no extra snoise call)
|
||||
vec2 mouse = uMouse / uResolution;
|
||||
vec2 delta = uv - mouse;
|
||||
float dist = length(delta) + deep * 0.05;
|
||||
float influence = smoothstep(0.5, 0.0, dist) * 0.25;
|
||||
float peakBoost = intensity * intensity;
|
||||
color *= 1.0 + influence * peakBoost * 1.5;
|
||||
|
||||
// Vignette
|
||||
float vig = 1.0 - dot(uv - 0.5, uv - 0.5) * 1.8;
|
||||
color *= vig;
|
||||
|
||||
// Film grain using fast hash
|
||||
float grain = (hash(gl_FragCoord.xy + fract(uTime * 43.0) * 100.0) - 0.5) * 0.035;
|
||||
color += grain;
|
||||
|
||||
gl_FragColor = vec4(color, 1.0);
|
||||
}
|
||||
`;
|
||||
|
||||
function createShader(type, source) {
|
||||
const shader = gl.createShader(type);
|
||||
gl.shaderSource(shader, source);
|
||||
gl.compileShader(shader);
|
||||
return shader;
|
||||
}
|
||||
|
||||
const program = gl.createProgram();
|
||||
gl.attachShader(program, createShader(gl.VERTEX_SHADER, vsSource));
|
||||
gl.attachShader(program, createShader(gl.FRAGMENT_SHADER, fsSource));
|
||||
gl.linkProgram(program);
|
||||
gl.useProgram(program);
|
||||
|
||||
const vertices = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);
|
||||
const buffer = gl.createBuffer();
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
|
||||
|
||||
const aPosition = gl.getAttribLocation(program, 'aPosition');
|
||||
gl.enableVertexAttribArray(aPosition);
|
||||
gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 0, 0);
|
||||
|
||||
const uTime = gl.getUniformLocation(program, 'uTime');
|
||||
const uResolution = gl.getUniformLocation(program, 'uResolution');
|
||||
const uMouse = gl.getUniformLocation(program, 'uMouse');
|
||||
|
||||
let mouseX = 0, mouseY = 0;
|
||||
document.addEventListener('mousemove', e => {
|
||||
mouseX = e.clientX;
|
||||
mouseY = canvas.height - e.clientY;
|
||||
});
|
||||
|
||||
function resize() {
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
gl.viewport(0, 0, canvas.width, canvas.height);
|
||||
}
|
||||
window.addEventListener('resize', resize);
|
||||
resize();
|
||||
|
||||
let start = Date.now();
|
||||
function render() {
|
||||
gl.uniform1f(uTime, (Date.now() - start) / 1000);
|
||||
gl.uniform2f(uResolution, canvas.width, canvas.height);
|
||||
gl.uniform2f(uMouse, mouseX, mouseY);
|
||||
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
|
||||
requestAnimationFrame(render);
|
||||
}
|
||||
render();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script async data-do-not-track="true" data-website-id="3871ce55-1e5f-446b-bdad-2b50ccde7b0c"
|
||||
src="https://zerolens.disinfo.zone/script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue