mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
34 lines
613 B
PHP
34 lines
613 B
PHP
|
<?php
|
||
|
$title = "Text Stroke";
|
||
|
require('../head.php');
|
||
|
?>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
(function () {
|
||
|
|
||
|
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { create: create, update: update });
|
||
|
|
||
|
var s;
|
||
|
|
||
|
function create() {
|
||
|
|
||
|
var text = "--- phaser ---\nwith a sprinkle of\npixi dust";
|
||
|
var style = { font: "bold 40pt Arial", fill: "#ffffff", align: "center", stroke: "#258acc", strokeThickness: 8 };
|
||
|
|
||
|
s = game.add.text(game.world.centerX, game.world.centerY, text, style);
|
||
|
s.anchor.setTo(0.5, 0.5);
|
||
|
|
||
|
}
|
||
|
|
||
|
function update() {
|
||
|
s.angle += 1;
|
||
|
}
|
||
|
|
||
|
})();
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<?php
|
||
|
require('../foot.php');
|
||
|
?>
|