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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


<div id="game"></div>


  background-color: black;


                // choose the type of loader by setting this.model:
// 1 = preloader no-text, 2 = rotating preloader no-text, 3 = preloader with text, 4 = rotating preloader with text
// to show actual loading progress, replace this.loaderPerc with the actual percentage between 0 and 100.

window.WebFontConfig = {
  active: function() {
    game.Init.prototype.fontLoaded = true;
  google: {
    families: ['Ubuntu Condensed']

var game = new Phaser.Game(480, 400, Phaser.AUTO, 'game', {
  preload: function(){
    this.scale.pageAlignHorizontally = true;'webfont', '//');
  create: function(){
    this.model = 4; 
    this.loaderPerc = 0; // declaration to simulate the progress in
    this.copyStr = '0 %'; // define the start-copy
    this.copyStyle = { font: '20px Ubuntu Condensed', fill: '#FFFFFF' };
    if (this.model >= 3) {
      this.text =,, this.copyStr , this.copyStyle);
      this.text.anchor.setTo(0.5, 0.45); // align the copy to the center of the circle
    this.myCircle =,;
    this.myCircle.lineStyle(8, 0xFFCC00);
    this.myCircle.arc(0, 0, 50,,, true);

  update: function(){
    if (this.loaderPerc < 100) {
      this.loaderPerc += 0.4; // to simulate progress
      if (this.model >= 3) this.text.setText( + " %"); // update the percentage
      if (this.model%2 == 0) {
        this.myCircle.rotation += 0.1; // rotate the circle
        this.myCircle.arc(0, 0, 50,, - (this.loaderPerc * 3.6)), true); // grow the circle counter-clockwise so that the speed at the front is not influenced by the progress
      } else {
        this.myCircle.arc(0, 0, 50,, + (this.loaderPerc * 3.6)) % 360), false); // grow the circle clockwise