Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor move out sdk and game room logic.
  • Loading branch information
jolestar committed Apr 15, 2019
1 parent 38561ed commit ca884b7
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 41,884 deletions.
1 change: 1 addition & 0 deletions index.html
Expand Up @@ -12,6 +12,7 @@
</head>
<body>
<div id="app">
<canvas id="as2d" width="600" height="600"/>
</div>

<script src="src/index.ts" type="text/javascript"></script>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -5,7 +5,8 @@
"asbuild:gui_untouched": "asc node_modules/as2d/assembly/glue.ts assembly/gui.ts -b build/gui_untouched.wasm -t build/gui_untouched.wat --sourceMap --validate --debug --use Math=JSMath",
"asbuild:gui_optimized": "asc node_modules/as2d/assembly/glue.ts assembly/gui.ts -b build/gui_optimized.wasm -t build/gui_optimized.wat --sourceMap --validate --optimize --use Math=JSMath",
"asbuild": "npm run asbuild:engine_untouched && npm run asbuild:engine_optimized && npm run asbuild:gui_untouched && npm run asbuild:gui_optimized",
"build": "npm run asbuild",
"build": "npm run asbuild && npx parcel build -d build index.html",
"release": "npm run build && cp build/* docs/",
"dev": "npx parcel serve -d build index.html"
},
"dependencies": {
Expand Down
171 changes: 0 additions & 171 deletions sdk/client.ts

This file was deleted.

24 changes: 22 additions & 2 deletions server.py
@@ -1,11 +1,31 @@
#! /usr/bin/env python

import SimpleHTTPServer
import SocketServer
import posixpath
import argparse
import urllib
import os

PORT = 5000
PORT = 1234

class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
pass

def translate_path(self, path):
path = posixpath.normpath(urllib.unquote(path))
words = path.split('/')
words = filter(None, words)
path = self.base_path
for word in words:
drive, word = os.path.splitdrive(word)
head, word = os.path.split(word)
if word in (os.curdir, os.pardir):
continue
path = os.path.join(path, word)
return path


Handler.base_path = "docs"
Handler.extensions_map['.wasm'] = 'application/wasm'

httpd = SocketServer.TCPServer(("", PORT), Handler)
Expand Down
98 changes: 0 additions & 98 deletions src/components/Gamelobby.ts

This file was deleted.

0 comments on commit ca884b7

Please sign in to comment.