Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.






                //101 days of creative code Day 1:
let cnt = 100;
function preload() {
  bg = loadImage('');//load image
function setup() {
  cnv = createCanvas(bg.width/5, bg.height/5);//canvas creation
  noStroke();//no lines
function draw() {
 for(let i=0;i<20;i++){//each frameCount will draw 50 circles (change for speed)
   dotIt(); //dot function call
function dotIt(){
 x = random(0,width);//random x in the canvas
 y = random(0,height);//random y in the canvas
 pix = bg.get(bg.width/(width/x), bg.height/(height/y)); //get the color of the pixel location maping the canvas size to the image size
 fill(pix);//set fill to pixel color from image
circle(x,y,int(random(1,3+bg.width/(frameCount))));//draw circles