three+gsap实现鼠标滚动火苗变大动画效果代码

代码语言:html

所属分类:动画

代码描述:three+gsap实现鼠标滚动火苗变大动画效果代码,鼠标向下滚动浏览器试试。

代码标签: three gsap 滚动 火苗 变大 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
  
<style>
html, body {
    padding: 0;
    margin: 0;
    background-color: black;
}

.scroll-space {
    height: 250vh;
}

.container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4vw;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
}
</style>




</head>

<body >
  <div class="scroll-space"></div>
<div class="container">
    Fire Scroll
    <canvas id="canvas"></canvas>
</div>


<script type="x-shader/x-fragment" id="fragmentShader">

    varying vec2 vUv;
    uniform float u_ratio;
    uniform float u_time;
    uniform float u_speed;
    uniform float u_shape_offset;
    uniform float u_power;
    uniform float u_addition;

    // Simplex noise taken from
    // .........完整代码请登录后点击上方下载按钮下载查看

网友评论0