heck 2 years ago
parent
commit
b200df0863
  1. 13
      html/index.html

13
html/index.html

@ -50,13 +50,12 @@
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord.xy / iResolution.y;
//period = iTime % 360;
float time = iTime;
float time = iTime * (iTime * 0.1);
vec2 uvm = iMouse.xy / iResolution.y;
float noiseVal = 0.5 + 0.5 * Pseudo3dNoise(vec3(uv *4.0, time/10.));
float noiseVal = 0.5 + 0.5 * Pseudo3dNoise(vec3(uv *6.0, time/10.));
fragColor.rgb = vec3(sin(noiseVal * time + (sin(time) * time / 10.)));
fragColor.rgb = vec3( 0.8+ 0.2*sin(noiseVal * time + (sin(time) * time / 10.)));
}
void main() {
@ -71,10 +70,6 @@
<script type="module">
import * as THREE from 'https://unpkg.com/three/build/three.module.js';
window.requestAnimationFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame;
let camera, scene, renderer;
let uniforms;
let texture;
@ -89,8 +84,6 @@
const loader = new THREE.TextureLoader();
const texture = loader.load('noise.png');
texture.minFilter = THREE.NearestFilter;
texture.magFilter = THREE.NearestFilter;
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;

Loading…
Cancel
Save