Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Explore WebRTC via SimplePeer and Bip39
  • Loading branch information
Ryuno-Ki committed Apr 15, 2020
1 parent fc86498 commit 52300467893df800f71e03c7f20999357250c3ff
Showing 6 changed files with 1,570 additions and 3 deletions.
@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
@@ -25,12 +26,18 @@
height: 572px;
}
</style>
<!--
<base href="/gamedevjs-2020/"></base>
-->
</head>
<body>
<div id="messages"></div>
<div id="game">
<canvas id="content" width="706" height="572">
</canvas>
</div>
<script src="./dist/bip39.browser.js"></script>
<script src="./dist/simple-peer/simplepeer.min.js"></script>
<script src="./dist/game.js"></script>
</body>
</html>
@@ -9,6 +9,7 @@ const {

const loadAssets = require('./assets')
const persistChanges = require('./persistance')
const invitePeers = require('./rtc')
const renderGround = require('./scenes/game.scene')
const renderBall = require('./sprites/ball')
const renderBasket = require('./sprites/basket')
@@ -20,6 +21,9 @@ const { moveBall, moveOpponent, movePlayer } = require('./update')

window.onload = async () => {
'use strict'
const messages = document.getElementById('messages')
invitePeers(messages)

const { canvas, context } = init()

maybeRescale(canvas, context)

0 comments on commit 5230046

Please sign in to comment.