mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
42 lines
No EOL
779 B
PHP
42 lines
No EOL
779 B
PHP
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>phaser.js - a new beginning</title>
|
|
<?php
|
|
require('js.php');
|
|
?>
|
|
</head>
|
|
<body>
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function () {
|
|
|
|
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, render: render });
|
|
|
|
function preload() {
|
|
|
|
game.load.image('atari1', 'assets/sprites/atari130xe.png');
|
|
|
|
}
|
|
|
|
function create() {
|
|
|
|
var tempSprite = game.add.sprite(0, 0, 'atari1');
|
|
tempSprite.visible = false;
|
|
|
|
var renderTexture = game.add.renderTexture('fuji', 320, 200);
|
|
renderTexture.render(tempSprite);
|
|
|
|
var texturedSprite = game.add.sprite(400, 300, renderTexture);
|
|
|
|
}
|
|
|
|
function render() {
|
|
}
|
|
|
|
})();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|