canvas文字碎片化动画效果

代码语言:html

所属分类:动画

代码描述:canvas文字碎片化动画效果

代码标签: 动画 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body { margin:0; overflow:hidden; }
canvas { background:#021; }
</style>

</head>

<body bgcolor=#222>
<canvas id=c width=1920 height=1080></canvas >

<script >
// Simple Dwitter Shim
// Created by Frank Force 2020
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

function u(t) {// dwitter code goes here

  // https://www.dwitter.net/d/14566 - Smash
  c.width |= 0;for (i = 29; i--;) with (x) save(fillStyle = '#FFD', beginPath(font = "70em impact")), moveTo(j = 1e3, 540), clip(arc(j, 540, 2e3, q = i / 4.61 + 9, q + .2)), restore(fillText("BFW", 9 + 29 * S(q ** 4 + t), j + 49 * C(q ** 5 + t), 1900));

}

let time = 0;
let frame = 0;
let FPS = 60;
let nextFrameMs = 0;

le.........完整代码请登录后点击上方下载按钮下载查看

网友评论0