螺旋动画效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { background: #111; } </style> </head> <body translate="no"> <div id="wrapper"></div> <script> (function () { 'use strict'; let wrapper,canvas,ctx,width,height, Tau = Math.PI * 2,PI180 = Math.PI / 180, systems = []; /* PlanetarySystem */ let PlanetarySystem = function (id = 'pSys') { Object.defineProperty(this, 'id', { value: id, writable: true }); Object.defineProperty(this, 'x', { value: 0, writable: true }); Object.defineProperty(this, 'y', { value: 0, writable: true }); Object.defineProperty(this, 'allBodies', { value: [], writable: true }); Object.defineProperty(this, 'allBodiesLookup', { value: {}, writable: true }); // fast id lookup for children Object.defineProperty(this, 'numBodies', { value: 0.........完整代码请登录后点击上方下载按钮下载查看
网友评论0