Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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

              
                <!-- original from:
http://www.emanueleferonato.com/2015/10/06/give-your-html5-game-menu-a-nice-bounce-effect-with-phaser/

Click in the menu 3 lines.
-->
              
            
!

CSS

              
                body{
  padding:0px;
  margin:0px;
  background: #000000;
}
              
            
!

JS

              
                var game;
var menuGroup;

window.onload = function() {	      
	game = new Phaser.Game(640, 960);
     game.state.add("Boot", boot);
     game.state.add("Preload", preload);
     game.state.add("GameTitle", gameTitle);
	game.state.start("Boot");
}

////////////////////////////////////////////////////////////////////////////////

var boot = function(game){};

boot.prototype = {
     preload: function(){
          game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
		game.scale.setScreenSize = true;
          game.scale.pageAlignHorizontally = true;
		game.scale.pageAlignVertically = true;
          game.stage.backgroundColor = "#000000";
     },
  	create: function(){
		game.state.start("Preload");
	}
}

////////////////////////////////////////////////////////////////////////////////

var preload = function(game){};

preload.prototype = {
	preload: function(){
          game.load.image("gametitle", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhgAAABOCAYAAABizG/TAAAABGdBTUEAALGPC/xhBQAAACBjS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Q/T54HvU04ZObq/4dKqfiRb7TpfiKO5ZO1hM5VEWr5ZF1XNcX9SnXVDedCUf5U609R3pcQbETn1oY6uI8bKmsOgY+D2HAutYiMvXdqyfNWUdeqZl16HP0uxB007F9KgtW9eKh5b9nHqKSspZYWAj8xyjxn0kF9V4YQqSmRGCwuhR0T8sYy3JjU6EcmwhkI3AI/6Dk13A7K/C3i9H13IlYUijg0A7AnX2oDdtNAvE12vG7OTeBJR96uS1LxY7kl4UQXM4ZPIncOEHkowpQ7y4yQWBbXkqDEy3sNB30xwG5L4vk5XU/GJvAxsqoIFUIxxQ9R5Cvy0NzGV0P8z/26t4h8aQltEi0EMg0I03ono35kJf1uNdaHwMtFthAC4B0Q3hl5UvWe2PYl8kwTZWQZBLxQfqE6QrJU7V6rCLTBwWU5dC84T1HfsxhQpgHzTHlcg+f/pOutvZt0CR1XTvPFjX8kT/aoxcqZKt/ua0vkMdUT0/91p3AW0bokz4z6+UThmIyfv9Tuaa0evj2QECeUV7JW5duKTkVo09rapssvekLR8bW2+BjbVyuemHpT+sHTEbT5k45vVfWneh7NEFMRXiQVi0t+eORqYUlccR9taXyyZVv3t0uBu2r3zoMvOp8qvEF4rNnnibywd643oetvMl21+ySNR3AGcXcO33NH9feR91kIHPTrvQ/9wHv0YBflNAlKdk7gwcHowxNeKFYtEiFwABCiAACBAwCBAwCBAwCBAwCBAwgcgBHzT4ABAOR9hYyt7fAmAAAAAElFTkSuQmCC");
	},
  	create: function(){
		game.state.start("GameTitle");
	}
}

////////////////////////////////////////////////////////////////////////////////

var gameTitle = function(game){}

gameTitle.prototype = {
     create: function(){
          var title = game.add.sprite(game.width / 2, 60, "gametitle");
          title.anchor.set(0.5); 
          var grid = game.add.sprite(game.width / 2, 130, "gridedition");
          grid.anchor.set(0.5);
          var playButton = game.add.button(game.width / 2, game.height / 2 + 100, "playbutton", function(){});
          playButton.anchor.set(0.5);
          menuGroup = game.add.group();
          var menuButton = game.add.button(game.width / 2, game.height - 30, "menubutton", toggleMenu);
          menuButton.anchor.set(0.5);
          menuGroup.add(menuButton);
          var resetGame = game.add.button(game.width / 2, game.height + 50, "resetgame", function(){});
          resetGame.anchor.set(0.5);
          menuGroup.add(resetGame);
          var thankYou = game.add.button(game.width / 2, game.height + 130, "thankyou", function(){});
          thankYou.anchor.set(0.5);
          menuGroup.add(thankYou);          
     }
}

function toggleMenu(){
     if(menuGroup.y == 0){
          var menuTween = game.add.tween(menuGroup).to({
               y: -180     
          }, 500, Phaser.Easing.Bounce.Out, true);
     }
     if(menuGroup.y == -180){
          var menuTween = game.add.tween(menuGroup).to({
               y: 0    
          }, 500, Phaser.Easing.Bounce.Out, true);     
     }
}
              
            
!
999px

Console