https://github.com/bupt-hjm/3d-snake
一个基于threejs的3d贪吃蛇游戏
https://github.com/bupt-hjm/3d-snake
threejs websocket
Last synced: over 1 year ago
JSON representation
一个基于threejs的3d贪吃蛇游戏
- Host: GitHub
- URL: https://github.com/bupt-hjm/3d-snake
- Owner: BUPT-HJM
- Created: 2016-07-31T15:23:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-17T15:47:13.000Z (almost 10 years ago)
- Last Synced: 2025-03-17T14:49:02.024Z (over 1 year ago)
- Topics: threejs, websocket
- Language: JavaScript
- Homepage: http://bupt-hjm.github.io/3d-snake
- Size: 227 KB
- Stars: 32
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 3d-snake
## **最终效果**
- demo访问地址: [http://bupt-hjm.github.io/3d-snake](http://bupt-hjm.github.io/3d-snake)
> demo只能访问到无websocket服务器的一部分,按键盘上下左右控制贪吃蛇的移动
## **如何愉快地玩耍**
- 第一步,~~当然是先star啦这是必须的呀:)~~ 先`git clone`把项目下到本地
- 第二步,当然你电脑得`node`,因为我的`node_modules`已经直接放在github上了,就不用你`npm install`了,你就可以直接一步`node websocket.js`开启websocket服务器
- 第三步就是把index.html和index2.html都打开就可以啦,可以通过index2.html的遥控来控制index.html
> 有人可能会问,标题不是写手机控制吗,当然你也可以本地再起个服务器,然后电脑和手机同一个局域网,手机访问index2.html就行了(注意要变动下localhost),或者也可以挂到云主机上,这个我试过了效果还不错,因为这个我做的这个只支持单用户,就不放地址了
## 项目细节
**博客访问地址:**http://bupt-hjm.github.io/2016/08/16/3d-snake-and-websocket/