Menu

Tree [1029b5] master /
 History

HTTPS access


File Date Author Commit
 LICENSE.txt 2021-01-01 michyo (Michiyo Tagami) michyo (Michiyo Tagami) [1029b5] Release version 0.01
 README.md 2021-01-01 michyo (Michiyo Tagami) michyo (Michiyo Tagami) [1029b5] Release version 0.01
 fsaph.css 2021-01-01 michyo (Michiyo Tagami) michyo (Michiyo Tagami) [1029b5] Release version 0.01
 fsaph.js 2021-01-01 michyo (Michiyo Tagami) michyo (Michiyo Tagami) [1029b5] Release version 0.01

Read Me

FSAPh Version 0.01

Overview

FSAPh is "Full Screen Assistant for Phaser".

FSAPh provides a function to easily handle full screen mode when creating games with the Phaser framework.

With FSAPh you can easily implement full screen mode in your own games.

You will also be able to easily implement the ability to switch between full screen mode and window mode.

How to use

  1. Download source from repository. (https://fsaph.sourceforge.io)
  2. Unpack it and put 'fsaph.js' and 'fsaph.css' in your lib folder.
  3. \<link rel="stylesheet" href="fsaph.css"> and \<script src="fsaph.js">\</script>.

Parameters

fsap_isfullscreen

Flag of fullscreen or not

Functions

fsap_initialize(width, height, config)

Initialize FSAPh
width : Horizontal size of canvas (px)
height: Vertical size of canvas (px)
config: Phaser scene config object

fsap_modechange()

Switch between full screen mode and window mode

fsap_setcallback(func)

Set callback function called when screen mode changed
func: Function to called back

Sample code

var GameScene = new Phaser.Class({
  Extends: Phaser.Scene,
  initialize:
  function GameScene () {
    Phaser.Scene.call(this, { key: 'gameScene', active: true });
  },
  create: function () {
    var fk11 = this.input.keyboard.addKey('F11');
    fk11.on('down', function () {
      fsap_modechange();
    }, this);
  },
});

var config = {
  type: Phaser.AUTO,
  scale: {
    parent: 'gamezone',
  },
  scene: GameScene
};

function onFSchange(flag) {
  if (flag == true) {
  } else {
  }
}

fsap_setcallback(onFSchange);
fsap_initialize(800, 600, config);

Version History

0.01 (2021/01/01):

  • Initial release

License

Copyright (C) 2021 michyo (Michiyo Tagami) [https://michyo.net/]

Released under the MIT license

See the LICENSE.txt for more details.