Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


Save Automatically?

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.




body {
  margin: 0;
  padding: 0;
  border: none;
  background: black;
canvas {
  display: block;



                var txt;
var lines = [
  '               Episode IV',
  '             A NEW HOPE',
  'It is a period of civil war.',
  'Rebel spaceships, striking',
  'from a hidden base, have won',
  'their first victory against',
  'the evil Galactic Empire.',
  'During the battle, Rebel',
  'spies managed to steal secret',
  "plans to the Empire's",
  'ultimate weapon, the DEATH',
  'STAR, an armored space',
  'station with enough power to',
  'destroy an entire planet.',
  "Pursued by the Empire's",
  'sinister agents, Princess',
  'Leia races home aboard her',
  'starship, custodian of the',
  'stolen plans that can save',
  'her people and restore',
  'freedom to the galaxy.....'

var font;
var txtWidth;

function preload() {
  font = loadFont('');

function setup() {
  createCanvas(windowWidth, windowHeight, WEBGL);
  textSize(width * 0.04);
  textAlign(LEFT, TOP);
  fill(238, 213, 75);

  txt = join(lines, '\n');

  txtWidth = 0;
  for (var i = 0; i < lines.length; i++) {
    txtWidth = max(txtWidth, textWidth(lines[i]));

function windowResized() {
  resizeCanvas(windowWidth, windowHeight);

function draw() {

  text(txt, -txtWidth / 2, height / 2 - millis() / 30);

(function() {
  var script = document.createElement('script');
  script.onload = function() {
    var stats = new Stats(); =
    requestAnimationFrame(function loop() {
  script.src = '//';