mirror of
https://github.com/rm-code/Graphoon.git
synced 2024-11-16 18:24:22 +00:00
parent
cfecc0cbed
commit
c0e38a6fb5
6
game.js
6
game.js
@ -93,9 +93,7 @@ Module.expectedDataFileDownloads++;
|
|||||||
function assert(check, msg) {
|
function assert(check, msg) {
|
||||||
if (!check) throw msg + new Error().stack;
|
if (!check) throw msg + new Error().stack;
|
||||||
}
|
}
|
||||||
Module['FS_createPath']('/', 'release-performance', true, true);
|
Module['FS_createPath']('/', 'Graphoon', true, true);
|
||||||
Module['FS_createPath']('/release-performance', 'Graphoon', true, true);
|
|
||||||
Module['FS_createPath']('/release-performance', 'theme', true, true);
|
|
||||||
|
|
||||||
function DataRequest(start, end, crunched, audio) {
|
function DataRequest(start, end, crunched, audio) {
|
||||||
this.start = start;
|
this.start = start;
|
||||||
@ -175,6 +173,6 @@ Module['FS_createPath']('/release-performance', 'theme', true, true);
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
loadPackage({"files": [{"audio": 0, "start": 0, "crunched": 0, "end": 3510, "filename": "/release-performance/Camera.lua"}, {"audio": 0, "start": 3510, "crunched": 0, "end": 3714, "filename": "/release-performance/CHANGELOG.md"}, {"audio": 0, "start": 3714, "crunched": 0, "end": 7051, "filename": "/release-performance/conf.lua"}, {"audio": 0, "start": 7051, "crunched": 0, "end": 25092, "filename": "/release-performance/file.png"}, {"audio": 0, "start": 25092, "crunched": 0, "end": 25128, "filename": "/release-performance/Graphoon.lua"}, {"audio": 0, "start": 25128, "crunched": 0, "end": 28821, "filename": "/release-performance/index.html"}, {"audio": 0, "start": 28821, "crunched": 0, "end": 29886, "filename": "/release-performance/LICENSE.md"}, {"audio": 0, "start": 29886, "crunched": 0, "end": 6222155, "filename": "/release-performance/love.js"}, {"audio": 0, "start": 6222155, "crunched": 0, "end": 6842688, "filename": "/release-performance/love.js.mem"}, {"audio": 0, "start": 6842688, "crunched": 0, "end": 6850412, "filename": "/release-performance/main.lua"}, {"audio": 0, "start": 6850412, "crunched": 0, "end": 6853518, "filename": "/release-performance/README.md"}, {"audio": 0, "start": 6853518, "crunched": 0, "end": 6853750, "filename": "/release-performance/Graphoon/Edge.lua"}, {"audio": 0, "start": 6853750, "crunched": 0, "end": 6861843, "filename": "/release-performance/Graphoon/Graph.lua"}, {"audio": 0, "start": 6861843, "crunched": 0, "end": 6863369, "filename": "/release-performance/Graphoon/init.lua"}, {"audio": 0, "start": 6863369, "crunched": 0, "end": 6867278, "filename": "/release-performance/Graphoon/Node.lua"}, {"audio": 0, "start": 6867278, "crunched": 0, "end": 6874439, "filename": "/release-performance/theme/bg.png"}, {"audio": 0, "start": 6874439, "crunched": 0, "end": 6875225, "filename": "/release-performance/theme/love.css"}], "remote_package_size": 6875225, "package_uuid": "4072c68b-906f-4db6-8634-a286827f35df"});
|
loadPackage({"files": [{"audio": 0, "start": 0, "crunched": 0, "end": 3510, "filename": "/Camera.lua"}, {"audio": 0, "start": 3510, "crunched": 0, "end": 3714, "filename": "/CHANGELOG.md"}, {"audio": 0, "start": 3714, "crunched": 0, "end": 7051, "filename": "/conf.lua"}, {"audio": 0, "start": 7051, "crunched": 0, "end": 25092, "filename": "/file.png"}, {"audio": 0, "start": 25092, "crunched": 0, "end": 25128, "filename": "/Graphoon.lua"}, {"audio": 0, "start": 25128, "crunched": 0, "end": 26193, "filename": "/LICENSE.md"}, {"audio": 0, "start": 26193, "crunched": 0, "end": 33917, "filename": "/main.lua"}, {"audio": 0, "start": 33917, "crunched": 0, "end": 37023, "filename": "/README.md"}, {"audio": 0, "start": 37023, "crunched": 0, "end": 37255, "filename": "/Graphoon/Edge.lua"}, {"audio": 0, "start": 37255, "crunched": 0, "end": 45348, "filename": "/Graphoon/Graph.lua"}, {"audio": 0, "start": 45348, "crunched": 0, "end": 46874, "filename": "/Graphoon/init.lua"}, {"audio": 0, "start": 46874, "crunched": 0, "end": 50783, "filename": "/Graphoon/Node.lua"}], "remote_package_size": 50783, "package_uuid": "0c1ad511-6a1f-4bff-a08e-9d5e15e5131d"});
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
133
index.html
133
index.html
@ -1,90 +1,109 @@
|
|||||||
|
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en-us">
|
<html lang="en-us">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title>Game Title</title>
|
<title>Graphoon</title>
|
||||||
|
|
||||||
<!-- Load custom style sheet -->
|
<style>
|
||||||
<link rel="stylesheet" type="text/css" href="theme/love.css">
|
body {
|
||||||
</head>
|
font-family: arial;
|
||||||
<body>
|
margin: 0;
|
||||||
|
padding: none;
|
||||||
|
background-color: rgb( 224, 244, 252 );
|
||||||
|
color: rgb( 28, 78, 104 );
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 12px;
|
||||||
|
padding-left: 10px;
|
||||||
|
position:absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
|
||||||
|
#canvas {
|
||||||
|
padding-right: 0;
|
||||||
|
display: none;
|
||||||
|
border: 0px none;
|
||||||
|
background-color: rgb( 224, 244, 252 );
|
||||||
|
color: rgb( 28, 78, 104 );
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
<center>
|
<center>
|
||||||
<div>
|
<div>
|
||||||
<h1>Game Title</h1>
|
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
||||||
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
<canvas id="loadingCanvas" oncontextmenu="event.preventDefault()" width="800" height="600"></canvas>
|
||||||
<canvas id="loadingCanvas" oncontextmenu="event.preventDefault()" width="800" height="600"></canvas>
|
</div>
|
||||||
</div>
|
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
var loadingContext = document.getElementById('loadingCanvas').getContext('2d');
|
window.addEventListener("keydown", function(e) {
|
||||||
function drawLoadingText(text) {
|
// space and arrow keys
|
||||||
|
if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
var loadingContext = document.getElementById('loadingCanvas').getContext('2d');
|
||||||
|
function drawLoadingText(text) {
|
||||||
var canvas = loadingContext.canvas;
|
var canvas = loadingContext.canvas;
|
||||||
|
|
||||||
loadingContext.fillStyle = "rgb(142, 195, 227)";
|
loadingContext.fillStyle = 'white';
|
||||||
loadingContext.fillRect(0, 0, canvas.scrollWidth, canvas.scrollHeight);
|
loadingContext.fillRect(0, 0, canvas.scrollWidth, canvas.scrollHeight);
|
||||||
|
|
||||||
loadingContext.font = '2em arial';
|
loadingContext.font = '2em arial';
|
||||||
loadingContext.textAlign = 'center'
|
loadingContext.textAlign = 'center'
|
||||||
loadingContext.fillStyle = "rgb( 11, 86, 117 )";
|
loadingContext.fillStyle = 'black';
|
||||||
loadingContext.fillText(text, canvas.scrollWidth / 2, canvas.scrollHeight / 2);
|
loadingContext.fillText(text, canvas.scrollWidth / 2, canvas.scrollHeight / 2);
|
||||||
|
}
|
||||||
|
|
||||||
loadingContext.fillText("Powered By Emscripten.", canvas.scrollWidth / 2, canvas.scrollHeight / 4);
|
var Module = {
|
||||||
loadingContext.fillText("Powered By LÖVE.", canvas.scrollWidth / 2, canvas.scrollHeight / 4 * 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener("keydown", function(e) {
|
|
||||||
// space and arrow keys
|
|
||||||
if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
}, false);
|
|
||||||
|
|
||||||
var Module = {
|
|
||||||
arguments: ['./'],
|
arguments: ['./'],
|
||||||
printErr: console.error.bind(console),
|
printErr: console.error.bind(console),
|
||||||
canvas: (function() {
|
canvas: (function() {
|
||||||
var canvas = document.getElementById('canvas');
|
var canvas = document.getElementById('canvas');
|
||||||
|
|
||||||
// As a default initial behavior, pop up an alert when webgl context is lost. To make your
|
// As a default initial behavior, pop up an alert when webgl context is lost. To make your
|
||||||
// application robust, you may want to override this behavior before shipping!
|
// application robust, you may want to override this behavior before shipping!
|
||||||
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
|
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
|
||||||
canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
|
canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
|
||||||
|
|
||||||
return canvas;
|
return canvas;
|
||||||
})(),
|
})(),
|
||||||
setStatus: function(text) {
|
setStatus: function(text) {
|
||||||
if (text) {
|
if (text) {
|
||||||
drawLoadingText(text);
|
drawLoadingText(text);
|
||||||
} else if (Module.didSyncFS && Module.remainingDependencies === 0) {
|
} else {
|
||||||
Module.callMain(Module.arguments);
|
document.getElementById('loadingCanvas').style.display = 'none';
|
||||||
document.getElementById('loadingCanvas').style.display = 'none';
|
document.getElementById('canvas').style.display = 'block';
|
||||||
document.getElementById('canvas').style.display = 'block';
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
didSyncFS: false,
|
|
||||||
totalDependencies: 0,
|
totalDependencies: 0,
|
||||||
remainingDependencies: 0,
|
|
||||||
monitorRunDependencies: function(left) {
|
monitorRunDependencies: function(left) {
|
||||||
this.remainingDependencies = left;
|
this.totalDependencies = Math.max(this.totalDependencies, left);
|
||||||
this.totalDependencies = Math.max(this.totalDependencies, left);
|
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
|
||||||
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Module.setStatus('Downloading...');
|
Module.setStatus('Downloading...');
|
||||||
window.onerror = function(event) {
|
window.onerror = function(event) {
|
||||||
// TODO: do not warn on ok events like simulating an infinite loop or exitStatus
|
// TODO: do not warn on ok events like simulating an infinite loop or exitStatus
|
||||||
Module.setStatus('Exception thrown, see JavaScript console');
|
Module.setStatus('Exception thrown, see JavaScript console');
|
||||||
Module.setStatus = function(text) {
|
Module.setStatus = function(text) {
|
||||||
if (text) Module.printErr('[post-exception status] ' + text);
|
if (text) Module.printErr('[post-exception status] ' + text);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="game.js"></script>
|
<script type="text/javascript" src="game.js"></script>
|
||||||
<script async type="text/javascript" src="love.js"></script>
|
<script async type="text/javascript" src="love.js"></script>
|
||||||
<footer>
|
<footer>
|
||||||
<p>Built with <a href="https://github.com/TannerRogalsky/love.js">love.js</a></p>
|
<p>Built with <a href="https://github.com/TannerRogalsky/love.js">love.js</a> - Fork me on <a href="https://github.com/rm-code/Graphoon">github</a>!</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
BIN
love.js.mem
BIN
love.js.mem
Binary file not shown.
BIN
theme/bg.png
BIN
theme/bg.png
Binary file not shown.
Before Width: | Height: | Size: 7.0 KiB |
@ -1,48 +0,0 @@
|
|||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-family: arial;
|
|
||||||
color: rgb( 11, 86, 117 );
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-image: url(bg.png);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
font-family: arial;
|
|
||||||
margin: 0;
|
|
||||||
padding: none;
|
|
||||||
background-color: rgb( 154, 205, 237 );
|
|
||||||
color: rgb( 28, 78, 104 );
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
font-family: arial;
|
|
||||||
font-size: 12px;
|
|
||||||
padding-left: 10px;
|
|
||||||
position:absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Links */
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
a:link {
|
|
||||||
color: rgb( 233, 73, 154 );
|
|
||||||
}
|
|
||||||
a:visited {
|
|
||||||
color: rgb( 110, 30, 71 );
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: rgb( 252, 207, 230 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
|
|
||||||
#canvas {
|
|
||||||
padding-right: 0;
|
|
||||||
display: none;
|
|
||||||
border: 0px none;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user