Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature bt 039 #47

Merged
merged 2 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cdk/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
predict.fn.add_environment("ENDPOINT_URL", endpoint)
start_game.fn.add_environment("ENDPOINT_URL", endpoint)

StaticWebSite(self, "rakugaki-battle-online")

CfnOutput(
self, "WebSocketURI",
value=prod.url,
Expand Down
3 changes: 2 additions & 1 deletion static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ window.onload = function () {

sock.onmessage = function (event) {
const data = JSON.parse(event.data)
console.log(data["command"])
switch (data["command"]) {
case "enter_room":
add_user(data["name"])
break
case "start_game":
case "game_start":
document.getElementById("room_area").style.display = "none"
document.getElementById("canvas_area").style.display = "block"
break
Expand Down