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.


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.


                <canvas id="canvas"></canvas>


                body {
  background: #000;

#canvas {
  position: fixed;
  top: 0;
  left: 0;  


// Screen size
var vw = window.innerWidth;
var vh = window.innerHeight;

// Create renderer
var renderer = PIXI.autoDetectRenderer(vw, vh, {
  view: document.querySelector("#canvas")

// Load texture
var texture = PIXI.Texture.fromImage("");

// Create stage
var stage = new PIXI.Container();

// Create high-speed particle container
var container = new PIXI.particles.ParticleContainer(5000, {
  scale: true,
  alpha: true,
  position: true


// Loop to create a bunch of sprites
for (var i = 0; i < 5000; i++) {
  // Create sprite from texture and set some initial values
  var sprite = new PIXI.Sprite(texture); 
  sprite.alpha = random(0.5, 1); 
  // Random values to tween to
  var duration = random(3, 5);
  var alpha = random(0.5, 1);
  var scale = random(0.05, 0.15);
  var x = random(vw * 0.25, vw * 2);  
  var start = i * 0.01;
  var tl = new TimelineMax({ repeat: -1 })
    .to(sprite, duration, { x: x, y: vh * 1.25, ease: Power4.easeIn }, start)
    .to(sprite.scale, duration, { x: scale, y: scale }, start);
  // Add sprite to container

// Render stage on every tick
TweenLite.ticker.addEventListener("tick", function() {

function random(min, max) {
  if (max == null) { max = min; min = 0; }
  return Math.random() * (max - min) + min;