zdog实现飞行钻圈圈动画效果代码

代码语言:html

所属分类:动画

代码描述:zdog实现飞行钻圈圈动画效果代码

代码标签: zdog 飞行 圈圈 动画

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

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

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

body {
	min-block-size: 100svb;
	display: grid;
	place-items: center;
	font-family: system-ui;
	color: hsl(0 0% 100%);
	background: hsl(228 7% 12%)
		url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="hsl(228 7% 15%)" width="50" height="50">\
      <rect width="25" height="25" />\
      <rect x="25" y="25" width="25" height="25" />\
  </svg>');
}
</style>


  
</head>

<body translate="no">
  <canvas bind:this={element} style="display: block; inline-size: 100%; max-inline-size: 500px;" width="500" height="400" />
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/zdog.dist.js"></script>
      <script  >
const { Anchor, Box, TAU } = Zdog;

(() => {
  const ring = {
    colors: ["hsl(240 14% 84%)", "hsl(240 3% 48%)", "hsl(230 4% 31%)"],
    boxes: [
    { x: 3, y: 0 },
    { x: 4, y: 0 },
    { x: 5, y: 0 },
    { x: 6, y: 0 },
    { x: 1, y: 1 },
    { x: 2, y: 1 },
    { x: 7, y: 1 },
    { x: 8, y: 1 },
    { x: 1, y: 2 },
    { x: 8, y: 2 },
    { x: 0, y: 3 },
    { x: 0, y: 4 },
    { x: 0, y: 5 },
    { x: 0, y: 6 },
    { x: 9, y: 3 },
    { x: 9, y: 4 },
    { x: 9, y: 5 },
    { x: 9, y: 6 },
    { x: 1, y: 7 },
    { x: 8, y: 7 },
    { x: 1, y: 8 },
    { x: 2, y: 8 },
    { x: 7, y: 8 },
    { x: 8, y: 8 },
    { x: 3, y: 9 },
    { x: 4, y: 9 },
    { x: 5, y: 9 },
    { x: 6, y: 9 }] };



  const plane = [
  {
    color: "hsl(230 4% 31%)",
    boxes: [
    { x: 4, y: 0 },
    { x: 1, y: 1 },
    { x: 3, y: 1 },
    { x: 5, y: 1 },
    { x: 0, y: 2 },
    { x: 2, y: 2 },
    { x: 0, y: 3 },
    { x: 8, y: 3 },
    { x: 1, y: 4 },
    { x: 9, y: 4 },
    { x: 0, y: 5 },
    { x: 2, y: 5 },
    { x: 9, y: 5 },
    { x: 1, y: 6 },
    { x: 3, y: 6 },
    { x: 5, y: 6 },
    { x: 4, y: 7 }] },


  {
    color: "hsl(240 3% 48%)",
    boxes: [
    { x: 4, y: 2 },
    { x: 5, y: 2 },
    { x: 6, y: 2 },
    { x: 2, y: 4 },
    { x: 3, y: 4 },
    { x: 4, y: 4 },
    { x: 5, y: 4 },
    { x: 8, y: 4 },
    { x: 3, y: 5 },
    { x: 6, y: 5 },
    { x: 7, y: 5 },
    { x: 8, y: 5 }] },


  {
    color: "hsl(240 14% 84%)",
    boxes: [
    { x: 4, y: 1 },
    { x: 3, y: 2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0