Added sample project files.
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
|||||||
|
# System and IDE files
|
||||||
|
Thumbs.db
|
||||||
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
*.suo
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# Vendors
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Build
|
||||||
|
build/
|
||||||
|
/npm-debug.log
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
@@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script src="build/project.bundle.js" charset="utf-8"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "phaser3-project-template",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "A Phaser 3 Project Template",
|
||||||
|
"main": "src/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "webpack"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/photonstorm/phaser3-project-template.git"
|
||||||
|
},
|
||||||
|
"author": "Richard Davey <rdavey@gmail.com> (http://www.photonstorm.com)",
|
||||||
|
"license": "MIT",
|
||||||
|
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/photonstorm/phaser3-project-template/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/photonstorm/phaser3-project-template#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"phaser": "^3.0.0-alpha.2",
|
||||||
|
"webpack": "^3.4.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import 'phaser';
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
type: Phaser.AUTO,
|
||||||
|
parent: 'phaser-example',
|
||||||
|
width: 800,
|
||||||
|
height: 600,
|
||||||
|
scene: {
|
||||||
|
preload: preload,
|
||||||
|
create: create
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var game = new Phaser.Game(config);
|
||||||
|
|
||||||
|
function preload ()
|
||||||
|
{
|
||||||
|
this.load.image('logo', 'assets/logo.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
function create ()
|
||||||
|
{
|
||||||
|
var logo = this.add.image(400, 150, 'logo');
|
||||||
|
|
||||||
|
this.tweens.add({
|
||||||
|
targets: logo,
|
||||||
|
y: 450,
|
||||||
|
duration: 2000,
|
||||||
|
ease: 'Power2',
|
||||||
|
yoyo: true,
|
||||||
|
loop: -1
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const webpack = require('webpack');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
entry: './src/index.js',
|
||||||
|
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, 'build'),
|
||||||
|
filename: 'project.bundle.js'
|
||||||
|
},
|
||||||
|
|
||||||
|
plugins: [
|
||||||
|
]
|
||||||
|
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user