p5实现一个旋转风扇canvas动画效果代码

代码语言:html

所属分类:动画

代码描述:p5实现一个旋转风扇canvas动画效果代码

代码标签: 旋转 风扇 canvas 动画 效果

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

<html lang="en">
<head>

    <meta charset="UTF-8">





    <style>
        body {
            margin: 0;
            overflow: hidden;
        }
    </style>



</head>

<body>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.js"></script>

    <script>
        let canvas;
        function setup () {
            canvas = createCanvas(windowWidth, windowHeight);
            colorMode(HSL);
        }
        function windowResized () {
            resizeCanvas(windowWidth, windowHeight);
        }
        function draw () {
            translate(width/2, height/2);
            rotate(millis() * 0.0001);

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

网友评论0