p5实现一个空间折叠艺术动画效果

代码语言:html

所属分类:动画

代码描述:p5实现一个空间折叠艺术动画效果

代码标签: 空间 折叠 艺术 动画 效果

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

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


</head>
<body translate="no">

<script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/p5.js"></script>
<script>
'use strict';
/* Another result of playing with curves to create an artistically interesting animation 
 * -------------------------------------------------------------------------------------
 * @author:    Caleb Nii Tetteh Tsuru Addy
 * @date:      15th July, 2020 
 * @email:     calebniitettehaddy@gmail.com 
 * @twitter:   @cnttaddy
 * @github :   https://github.com/niitettehtsuru/SpaceFlap
 * @codepen:   https://codepen.io/niitettehtsuru/pen/vYLVLBd
 * @license:   GNU General Public License v3.0 
 */
//The curve 
class Curve
{
    constructor(data)
    {          
        this.screenHeight = data.screenHeight;  
        this.screenWidth = data.screenWidth;      
        this.param  = 0;//the parameter in the parametric equation 
        this.xCoord = data.xCoord;//set x coordinate of the center of the curve  
        this.yCoord = data.yCoord;//set y coordinate of the center of the curve      
        this.color =  data.color; 
        //so the angle will incr.........完整代码请登录后点击上方下载按钮下载查看

网友评论0