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.


                <p>Mouse events to go anti-clockwise<br>Touch events to go clockwise</p>


                body {
  background-color: #000;
p {z-index:100;position:absolute;width:150px;font-size:.9em;}


                // Autodetect and create the renderer
var renderer = PIXI.autoDetectRenderer(160, 144);

// Set the background color of the renderer to a baby-blue'ish color
renderer.backgroundColor = 0x3498db;

// Append the renderer to the body of the page

// Create the main stage for your display objects
var stage = new PIXI.Graphics();

// Add our image as a sprite
var goose = new PIXI.Sprite.fromImage('');

// Set the anchor in the center of our sprite 
goose.anchor.x = 0.5;
goose.anchor.y = 0.5;
goose.interactive = true;
// Position our goose in the center of the renderer
goose.position.x = renderer.width / 2;
goose.position.y = renderer.height / 2;

goose.mousedown=()=>{goose.rotation -= .4}
goose.on('touchstart',()=>{goose.rotation += .4},goose)

// Add the goose to the stage

// Start animating

function animate() {

    // Rotate our goose clockwise
    //goose.rotation += 0.1;
    // Rotate our goose counter-clockwise
    // goose.rotation -= 0.1;
    // Render our container