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.


Auto Save

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.


                <footer><div id=version></div></footer>


                html, body {
  height: 100%;

body {
  margin: 0;
  padding: 0;
  background: #111;
  color: #eee;
  font: caption;

#version {
  position: absolute;
  left: 5px;
  top: 605px;


                var GetValue = Phaser.Utils.Objects.GetValue;

function PageTypingText(scene, x, y, text, config) {
  var text = scene.add.rexBBCodeText(x, y, text, config); = scene.plugins.get('rextextpageplugin').add(text, GetValue(config, 'page', undefined));
  text.typing = scene.plugins.get('rextexttypingplugin').add(text, GetValue(config, 'type', undefined));
  text.start = function(text, speed) { ;
    if (speed !== undefined) {
  text.typeNextPage = function(speed){
    if (! {
        var txt =;
    } else {
  text.typing.on('complete', text.typeNextPage, text);
  return text;

function create() {
  var content = `[b][i][size=24][color=red]Phaser[/color] is a [color=yellow]fast[/color], [color=pink]free[/color], and [color=green]fun[/color] open source HTML5 game framework[/size][/b][/i] [size=18]that offers WebGL and Canvas rendering across desktop and mobile web browsers. Games can be compiled to iOS, Android and native apps by using 3rd party tools. You can use JavaScript or TypeScript for development.

[color=red]Phaser[/color] is available in two versions: [color=yellow]Phaser 3[/color] and [color=blue]Phaser CE[/color] - The Community Edition. [color=blue]Phaser CE[/color] is a community-lead continuation of the [color=blue]Phaser 2[/color] codebase and is hosted on a separate repo. [color=yellow]Phaser 3[/color] is the next generation of [color=red]Phaser[/color].
Along with the fantastic open source community, [color=red]Phaser[/color] is actively developed and maintained by Photon Storm. As a result of rapid support, and a developer friendly API, [color=red]Phaser[/color] is currently one of the most starred game frameworks on GitHub.
Thousands of developers from indie and multi-national digital agencies, and universities worldwide use [color=red]Phaser[/color]. You can take a look at their incredible games.
Visit: The [color=red]Phaser[/color] website and follow on Twitter (#phaserjs)
Learn: API Docs, Support Forum and StackOverflow
Code: 700+ Examples (source available in this repo)
Read: Weekly [color=red]Phaser[/color] World Newsletter
Chat: Slack and Discord
Extend: With [color=red]Phaser[/color] Plugins
Be awesome: Support the future of [color=red]Phaser[/color]

Grab the source and join the fun!`;
  var text = PageTypingText(this, 100, 100, '', {
    fontSize: '24px',
    wrap: {
      mode: 'word',
      width: 600
   maxLines: 7
  text.once('complete', function () {
  }).start(content, 50);

function preload() {
  var url;
  url = '';
  this.load.plugin('rexbbcodetextplugin', url, true);
  url = '';
  this.load.plugin('rextextpageplugin', url, true);
  url = '';
  this.load.plugin('rextexttypingplugin', url, true);

var config = {
  type: Phaser.AUTO,
  width: 800,
  height: 600,
  scene: {
    preload: preload,
    create: create

var game = new Phaser.Game(config);