Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?
@tukiyo3

phaserのサンプルを動かす時つまづいた点

More than 5 years have passed since last update.

参考

手順

  • Debian8にて作業
nodejsの環境をインストール
sudo apt-get install -y npm node
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
sudo npm install -g grunt-cli
サンプル
git clone https://github.com/photonstorm/phaser-examples.git
cd phaser-examples/
node_modules/フォルダにパッケージが入る。
npm install
port8001でLISTEN
grunt connect

つまづいた点

examples/_site/examples.json
  "basics": [
    {
-     "file": "01+-+load+an+image.js",
+     "file": "01+load+an+image.js",
      "title": "01 - load an image",
      "jsbin": "http://jsbin.com/zagob/1/edit?js,output"
    },
    {
-     "file": "02+-+click+on+an+image.js",
+     "file": "02+click+on+an+image.js",
      "title": "02 - click on an image",
      "jsbin": "http://jsbin.com/zagob/6/edit?js,output"
    },
    {
-     "file": "03+-+move+an+image.js",
+     "file": "03+move+an+image.js",
      "title": "03 - move an image",
      "jsbin": "http://jsbin.com/zagob/7/edit?js,output"
    },
    {
-     "file": "04+-+image+follow+input.js",
+     "file": "04+image+follow+input.js",
      "title": "04 - image follow input",
      "jsbin": "http://jsbin.com/zagob/9/edit?js,output"
    },
    {
-     "file": "05+-+load+an+animation.js",
+     "file": "05+load+an+animation.js",
      "title": "05 - load an animation",
      "jsbin": "http://jsbin.com/zagob/10/edit?js,output"
    },
    {
-     "file": "06+-+render+text.js",
+     "file": "06+render+text.js",
      "title": "06 - render text",
      "jsbin": "http://jsbin.com/zagob/11/edit?js,output"
    },
    {
-     "file": "07+-+tween+an+image.js",
+     "file": "07+tween+an+image.js",
      "title": "07 - tween an image"
    }
  ],

nodejs入門

example.js
var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello World\n');
}).listen(8124);

console.log('Server running at http://127.0.0.1:8124/');
実行
node example.js
1
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
tukiyo3

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
1
Help us understand the problem. What is going on with this article?