three+lil-gui实现webgl可配置液态噪点鼠标交互效果代码
代码语言:html
所属分类:其他
代码描述:three+lil-gui实现webgl可配置液态噪点鼠标交互效果代码
代码标签: three lil-gui webgl 配置 液态 噪点 鼠标 交互
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
html, body {
padding: 0;
margin: 0;
background-color: black;
}
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 4vw;
user-select: none;
}
.container-front {
opacity: .1;
pointer-events: none;
}
#canvas {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}
</style>
</head>
<body >
<div class="container">
Configurable Noise & Mouse Interaction
</div>
<canvas id="canvas"></canvas>
<script type="x-shader/x-fragment" id="fragmentShader">
varying vec2 vUv;
uniform float u_ratio;
uniform float u_time;
uniform float u_width;
uniform float u_coloring;
uniform float u_speed;
uniform vec2 u_point;
// https://gist.github.com/patriciogonzalezvi.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0