在运行Phaser示例时遇到的问题

请提供一个需要被翻译成中文的英文句子,我将为您提供翻译。

    • HTML5ゲームエンジンPhaserのサンプルゲームを動かす – Qiita

 

    node.js – Cannot install NodeJs: /usr/bin/env: node: No such file or directory – Stack Overflow

步骤

    Debian8にて作業
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/
npm install
grunt connect

我遇到的问题

http://localhost:8001/examples/basics/01%20-%20load%20an%20image.js が404エラー

seven basic examples are with link broken · Issue #83 · photonstorm/phaser-examples

  "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"
    }
  ],

学习Node.js基础

    いまアツいJavaScript!ゼロから始めるNode.js入門〜5分で環境構築編〜
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

http://127.0.0.1:8124/ にアクセスするとHello Worldが表示されることを確認。

广告
将在 10 秒后关闭
bannerAds