Shadertoy.com test
How do I make an shadertoy.com test?
Original from shadertoy.com. What is a shadertoy.com test? How do you make a shadertoy.com test? This script and codes were developed by Khangeldy on 09 November 2022, Wednesday.
Shadertoy.com test - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>shadertoy.com test</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script id="vertex-shader" type="no-js"> void main() { gl_Position = vec4( position, 1.0 ); }
</script>
<script id="fragment-shader" type="no-js"> uniform float iGlobalTime; uniform vec2 iResolution; void main()
{ vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / iResolution.xy; float x = p.x; float y = p.y; float mov0 = x+y+cos(sin(iGlobalTime)*2.0)*100.+sin(x/100.)*1000.; float mov1 = y / 0.9 + iGlobalTime; float mov2 = x / 0.2; float c1 = abs(sin(mov1+iGlobalTime)/2.+mov2/2.-mov1-mov2+iGlobalTime); float c2 = abs(sin(c1+sin(mov0/1000.+iGlobalTime)+sin(y/40.+iGlobalTime)+sin((x+y)/100.)*3.)); float c3 = abs(sin(c2+cos(mov1+mov2+c2)+cos(mov2)+sin(x/1000.))); gl_FragColor = vec4(c1,c2,c3,1);
}
</script> <script src='http://cdnjs.cloudflare.com/ajax/libs/three.js/r70/three.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Shadertoy.com test - Script Codes CSS Codes
body { margin: 0; overflow: hidden; height: 100%;
}
Shadertoy.com test - Script Codes JS Codes
var scene, camera, renderer;
scene = new THREE.Scene();
var fov = 75, aspect = window.innerWidth / window.innerHeight;
camera = new THREE.PerspectiveCamera(fov, aspect, 0.1, 1000);
camera.position.z = 100;
camera.lookAt(scene.position);
renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0xc4c4c4);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var clock = new THREE.Clock();
var tuniform = { iGlobalTime: { type: 'f', value: 0.1 }, iResolution: { type: 'v2', value: new THREE.Vector2() }
};
tuniform.iResolution.value.x = window.innerWidth;
tuniform.iResolution.value.y = window.innerHeight;
var material = new THREE.ShaderMaterial({ uniforms: tuniform, vertexShader: document.getElementById('vertex-shader').textContent, fragmentShader: document.getElementById('fragment-shader').textContent
});
var mesh = new THREE.Mesh( new THREE.PlaneGeometry(40, 40, 40), material
);
scene.add(mesh);
function render(time) { tuniform.iGlobalTime.value += clock.getDelta(); requestAnimationFrame(render); renderer.render(scene, camera);
}
render();
Developer | Khangeldy |
Username | Khangeldy |
Uploaded | November 09, 2022 |
Rating | 3 |
Size | 2,371 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Svg | 10,044 Kb |
Game in canvas | 2,977 Kb |
Google map | 1,849 Kb |
Water shader implement in three.js | 4,300 Kb |
Ryu Hadouken | 1,981 Kb |
Css grid test | 1,683 Kb |
Detect Facebook app in mobile devices | 1,819 Kb |
Shadertoy in three.js | 4,402 Kb |
For my blog | 8,983 Kb |
Freecodecamp 1 | 0 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Jason Kinney | Jason-kinney | 1,980 Kb |
Simple Flat Menu | Jeplaa | 2,467 Kb |
About Mazano | Kiti | 2,585 Kb |
Twitch Live Channels | Inkblotty | 4,956 Kb |
Colorful Sliders | Chanrith | 1,246 Kb |
A Bouncy Menu Toggle | Billyysea | 4,563 Kb |
My three.js practice | Esambino | 3,203 Kb |
TinFoil Boats | Chandralil | 4,577 Kb |
Mesmerizing octopus | Jllodra | 3,549 Kb |
Vanilla JS - A toggleClass function | Woodwork | 2,532 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!