Merge branch 'master' into test/v1.10.1

This commit is contained in:
Mitchell McCaffrey 2021-10-21 13:30:23 +11:00
commit c6597dda31
5 changed files with 14 additions and 14 deletions

View File

@ -1,5 +1,5 @@
REACT_APP_BROKER_URL=https://connect.owlbear.rodeo
REACT_APP_ICE_SERVERS_URL=https://connect.owlbear.rodeo/iceservers
REACT_APP_BROKER_URL=https://prod.owlbear.rodeo
REACT_APP_ICE_SERVERS_URL=https://prod.owlbear.rodeo/iceservers
REACT_APP_STRIPE_API_KEY=pk_live_MJjzi5djj524Y7h3fL5PNh4e00a852XD51
REACT_APP_STRIPE_URL=https://payment.owlbear.rodeo
REACT_APP_VERSION=$npm_package_version

View File

@ -1,6 +1,6 @@
{
"name": "owlbear-rodeo",
"version": "1.10.0.1",
"version": "1.10.0.2",
"private": true,
"dependencies": {
"@babylonjs/core": "^4.2.0",
@ -18,7 +18,7 @@
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^13.0.2",
"ajv": "^8.6.2",
"ammo.js": "kripken/ammo.js",
"ammo.js": "kripken/ammo.js#85c0614cd5338aa0843814fe7bbd2df48164ece7",
"case": "^1.6.3",
"color": "^3.2.1",
"comlink": "^4.3.1",

View File

@ -60,6 +60,9 @@ function DiceInteraction({
const engine = new Engine(canvas, true, {
preserveDrawingBuffer: true,
stencil: true,
// Prevent XR from loading as Safari 15 crashes with this enabled
// TODO: Remove when https://github.com/BabylonJS/Babylon.js/pull/11121/files released
xrCompatible: false
});
const scene = new Scene(engine);
scene.clearColor = new Color4(0, 0, 0, 0);

View File

@ -33,10 +33,7 @@ class Session extends EventEmitter {
/**
* The socket io connection
*/
socket = io(process.env.REACT_APP_BROKER_URL!, {
withCredentials: true,
parser: msgParser,
});
socket?: Socket;
/**
* A mapping of socket ids to session peers
@ -46,7 +43,7 @@ class Session extends EventEmitter {
peers: Record<string, SessionPeer>;
get id() {
return this.socket.id;
return this.socket?.id || "";
}
_iceServers: RTCIceServer[] = [];
@ -184,7 +181,7 @@ class Session extends EventEmitter {
this._gameId = gameId;
this._password = password;
this.socket.emit(
this.socket?.emit(
"join_game",
gameId,
password,
@ -217,7 +214,7 @@ class Session extends EventEmitter {
};
const handleSignal = (signal: SignalData) => {
this.socket.emit("signal", JSON.stringify({ to: peer.id, signal }));
this.socket?.emit("signal", JSON.stringify({ to: peer.id, signal }));
};
const handleConnect = () => {
@ -366,7 +363,7 @@ class Session extends EventEmitter {
}
_handleForceUpdate() {
this.socket.disconnect();
this.socket?.disconnect();
this.emit("status", "needs_update");
}
}

View File

@ -3723,9 +3723,9 @@ alphanum-sort@^1.0.0:
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
ammo.js@kripken/ammo.js:
ammo.js@kripken/ammo.js#85c0614cd5338aa0843814fe7bbd2df48164ece7:
version "0.0.2"
resolved "https://codeload.github.com/kripken/ammo.js/tar.gz/c40aee525f2e3d4d2917938bf4e0b21d27f40d3c"
resolved "https://codeload.github.com/kripken/ammo.js/tar.gz/85c0614cd5338aa0843814fe7bbd2df48164ece7"
ansi-colors@^3.0.0:
version "3.2.4"