content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-10196481-11"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
<base href="/">
<link rel="stylesheet" href="/resources/style/style.css">
<title>WorkAdventure</title>
+ <style>
+@media only screen and (max-width: 990px) {
+#game-overlay{
+display:none;
+}
+#hack{
+left: 25vw !important;
+}
+
+}
+
+
+body{
+background:black;
+font-family:mono;
+font-weight:bold;
+}
+
+#game-overlay{
+position: absolute;
+padding-left: 50vw;
+top: 0;
+width:100%;
+height:100%;
+}
+
+#hack{
+position:fixed;
+width: 50vw;
+color: white;
+background: #333;
+height: 100vh;
+font-family: 'monospace';
+ font-weight: bold;
+ font-size:30px;
+}
+
+#theiframe{
+border:0;
+width:100%;
+height:100%;
+}
+
+#webRtc{
+width:50vw!important;
+}
+.btn-cam-action{
+ pointer-events:all;
+}
+video{
+border: 3px solid #fff;
+}
+#div-myCamVideo video{
+/*border: 3px solid #459fff!important;
+width: unset!important;*/
+border:none
+}
+#div-myCamVideo{
+top: calc(100% - 210px) !important;
+}
+
+#captureclick{
+width:100vw;
+height:100vh;
+display:block;
+position:absolute;
+}
+
+ </style>
</head>
<body id="body" style="margin: 0">
- <div id="webRtc" class="webrtc">
+ <div id="game" class="game">
+ <div id="game-overlay">
+ <div id="webRtc" class="webrtc" style="pointer-events:none">
<div id="activeCam" class="activeCam">
<div id="div-myCamVideo" class="video-container">
<video id="myCamVideo" autoplay muted></video>
</div>-->
</div>
</div>
+ </div>
+ <div id="hack"><iframe allow="camera; microphone" id="theiframe" src="https://play.testansible.fsf.org/resources/welcomepage/index.html"></iframe></div>
+ </div>
<audio id="audio-webrtc-in">
<source src="/resources/objects/webrtc-in.mp3" type="audio/mp3">
</audio>
.webrtc{
display: none;
position: absolute;
- right: 0px;
height: 100%;
- width: 300px;
}
.webrtc.active{
display: block;
background: #d93025;
border-radius: 48px;
left: 5px;
- bottom: 5px;
padding: 10px;
z-index: 2;
}
height: 100%;
}
-.webrtc:hover .activeCam .video-container{
+.webrtc .activeCam .video-container{
right: 10px;
}
.activeCam .video-container#div-myCamVideo{
background: #666;
box-shadow: 2px 2px 24px #444;
border-radius: 48px;
- transform: translateY(12vw);
+ /* transform: translateY(12vw);*/
transition-timing-function: ease-in-out;
bottom: 20px;
}
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<title>Welcome</title>
+<style>
+body{
+color:white;
+background:#111;
+margin:3em;
+font-family:mono
+}
+
+#mobile{
+display:none
+}
+
+@media only screen and (max-width: 495px) {
+ #mobile {
+ display: unset;
+ }
+ #nonmobile{
+ display:none
+ }
+}
+</style>
+
+</head>
+
+<body>
+<h1 style="font-size:26px">Welcome to the LibrePlanet Hallway!</h1>
+<p id="mobile">At the moment, this site does not work on mobile browsers :-(</p>
+<div id="nonmobile">
+ <p>Use the arrow keys to move around. Click on the game if the keys are not moving your character.</p>
+ <p>Bump into people to start a videoconference! Visiting some rooms would show you websites and other surprises.</p>
+</div>
+
+ <a rel="jslicense" href="https://play.testansible.fsf.org/jssources/jslicenses.html">JavaScript license information</a>
+</body>
+</html>
import {gameManager} from "./Phaser/Game/GameManager";
import {SelectCharacterScene} from "./Phaser/Login/SelectCharacterScene";
+
+const fps : Phaser.Types.Core.FPSConfig = {
+ /**
+ * The minimum acceptable rendering rate, in frames per second.
+ */
+ min: 5,
+ /**
+ * The optimum rendering rate, in frames per second.
+ */
+ target: 20,
+ /**
+ * Use setTimeout instead of requestAnimationFrame to run the game loop.
+ */
+ forceSetTimeOut: true,
+ /**
+ * Calculate the average frame delta from this many consecutive frame intervals.
+ */
+ deltaHistory: 120,
+ /**
+ * The amount of frames the time step counts before we trust the delta values again.
+ */
+ panicMax: 20,
+ /**
+ * Apply delta smoothing during the game update to help avoid spikes?
+ */
+ smoothStep: false
+}
+
const config: GameConfig = {
+ type: Phaser.CANVAS,
title: "Office game",
- width: window.innerWidth / RESOLUTION,
+ width: window.innerWidth / RESOLUTION / 2,
height: window.innerHeight / RESOLUTION,
- parent: "game",
+ parent: "game-overlay",
scene: [LoginScene, SelectCharacterScene, ReconnectingScene],
zoom: RESOLUTION,
+ fps: fps,
+ //dom: {
+ // createContainer: true
+ //},
+ render: {
+ pixelArt: false,
+ roundPixels: true,
+ antialias: false
+ },
physics: {
default: "arcade",
arcade: {
let game = new Phaser.Game(config);
window.addEventListener('resize', function (event) {
- game.scale.resize(window.innerWidth / RESOLUTION, window.innerHeight / RESOLUTION);
+ game.scale.resize(window.innerWidth / RESOLUTION /2, window.innerHeight / RESOLUTION);
});