# 神奇的js **Repository Path**: jsTST/fuckjs ## Basic Information - **Project Name**: 神奇的js - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-06-26 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #神奇的js ``` canvas = document.body.appendChild(document.createElement('canvas')); context = canvas.getContext('2d'); time = 60; w = canvas.width = innerWidth; h = canvas.height = innerHeight; cos = Math.cos; sin = Math.sin; tan = Math.tan; PI = Math.PI; setInterval(function() { canvas.width = canvas.width; time += 0.0001; i = 5775; while (i--) { r = (w + h) / 2 * (sin((time + i) * (.05 + (tan(time / 1) / PI * .2))) / PI); context.fillRect(cos(i) * r + w / 2, tan(i) * r + h / 2, 1.5, 1.5); } }, 16); ```