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 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.






                let width = 480;
let height = 240;
let sprites = {};
let xpos = 16;

// create app
let app = new PIXI.Application({
  width: width,
  height: height,
  antialias: true,
  backgroundColor: 0xeeeeee

// add canvas to HTML document

// use the pre-created instance offered by pixi
const loader = PIXI.Loader.shared;

// check loader' signals
loader.onProgress.add((loader, resource) => {
  // called once for each file
  console.log("progress: " + loader.progress + "%");
loader.onError.add((message, loader, resource) => {
  // called once for each file, if error
  console.log("Error: " + + " " + message);
loader.onLoad.add((loader, resource) => {
  // called once per loaded file
  console.log( + " loaded");
loader.onComplete.add((loader, resources) => {
  // called once all queued resources has been loaded
  // triggered before load method callback
  console.log("loading complete!");

// add resources to load and process
  // another format
      name: "coffee",
      url: "",
      crossOrigin: "anonymus"
  .add("coffee", "")
  .add("muffin", "")
  .add("ice-cream", "")
  .add("lollipop", "")
  .load((loader, resources) => {
    // this callback function is optional
    // it is called once all resources have loaded.
    // similar to onComplete, but triggered after
    console.log("all assets loaded OK");
  .use((resource, next) => {
    // middleware to process each resource
    sprites[] = new PIXI.Sprite(resource.texture);
    sprites[].y = 16;
    sprites[].x = xpos;

    xpos += 72;
    next(); // <- mandatory