Skip to content

Commit

Permalink
embed nanoevents due to CJS/ESM issues on create-react-app. #71
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed Aug 23, 2023
1 parent e315e59 commit 4bd1b88
Show file tree
Hide file tree
Showing 18 changed files with 4,829 additions and 9,038 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-and-publish.yml
Expand Up @@ -45,5 +45,5 @@ jobs:
with:
tag_name: ${{ steps.check.outputs.version }}
prerelease: false
files: ./colyseus-js-client.zip
files: ./colyseus-sdk.zip

11 changes: 4 additions & 7 deletions dist/index.html
Expand Up @@ -48,6 +48,10 @@
console.log("LEFT ROOM", arguments);
});

room.onError(function(code, message) {
console.log("on error:", {code, message});
});

// room.onStateChange(function(state) {
// console.log("state change: ", state.toJSON());
// });
Expand All @@ -73,13 +77,6 @@
getClient().joinOrCreate(document.getElementById('room_name').value, { code: "one" }).then((r) => {
room = r
addListeners(room);

room.state.players.onAdd((player) => {
console.log("PLAYER ADDED!");
// player.onChange((changes) => console.log("PLAYER CHANGED:", changes));
});

room.state.players.onChange((player) => console.log("Player changed..."));
});
}

Expand Down
5 changes: 1 addition & 4 deletions dts-generator.json
Expand Up @@ -13,10 +13,7 @@

"libraries": {
"inlinedLibraries": [
"@colyseus/schema",
"@gamestdio/websocket",
"@gamestdio/state-listener",
"nanoevents"
"@colyseus/schema"
]
},

Expand Down

0 comments on commit 4bd1b88

Please sign in to comment.