vfx鼠标跟随模拟太阳照射穿透文字阴影动画交互效果代码

代码语言:html

所属分类:动画

代码描述:vfx鼠标跟随模拟太阳照射穿透文字阴影动画交互效果代码

代码标签: vfx 鼠标 跟随 模拟 太阳 照射 穿透 文字 阴影 动画 交互

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    html, body { height: 100%; margin: 0; }
body {
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
}
h1 {
  color: white;
  font-size: 20vw;
  font-weight: 900;
}
</style>

</head>
<body>

<h1>Bfw.</h1>
<!-- partial -->
  <script type="module">

import { VFX } from "//repo.bfw.wiki/bfwrepo/js/module/vfx-core.mjs";

const shader = `
precision highp float;
uniform vec2 resolution;
uniform vec2 offset;
uniform vec2 mouse;
uniform float time;
uniform sampler2D src;

#define PI 3.141593
#define SAMPLES 64.

float hash(vec2 p) .........完整代码请登录后点击上方下载按钮下载查看

网友评论0