0

A Pen by Paul Slaymaker

 10 months ago
source link: https://codepen.io/aymak/pen/jOYVXmE
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A Pen by Paul Slaymaker

0 unsaved changes
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
"use strict"; // Paul Slaymaker, [email protected]
const body=document.getElementsByTagName("body").item(0);
body.style.background="#000";
const TP=2*Math.PI;
const CSIZE=160;
const ctx=(()=>{
  let d=document.createElement("div");
  d.style.margin="0 auto";
  d.style.position="relative";
  body.append(d);
  let c=document.createElement("canvas");
  c.width=c.height=2*CSIZE;
  c.style.position="absolute";
  c.style.top=c.style.left="0px";
  d.append(c);
  return c.getContext("2d");
})();
ctx.translate(CSIZE,CSIZE);
onresize=()=>{ 

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK