mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 10:46:06 +10:00
updated graph rendering to be more efficient. added smooth scrolling, added color type, mmb drag for cutting
This commit is contained in:
55
public/player.html
Normal file
55
public/player.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>PICO-8 Player</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
#canvas {
|
||||
image-rendering: pixelated;
|
||||
image-rendering: crisp-edges;
|
||||
background: #000;
|
||||
}
|
||||
#p8_container {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="p8_container">
|
||||
<canvas id="canvas"></canvas>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// Cart will be injected here
|
||||
window.PICO8_CART_DATA = null;
|
||||
</script>
|
||||
<script src="pico8_player.js"></script>
|
||||
<script>
|
||||
Module = {
|
||||
arguments: ['-run'],
|
||||
canvas: document.getElementById('canvas'),
|
||||
preRun: [],
|
||||
postRun: []
|
||||
};
|
||||
|
||||
// Wait for cart data to be set
|
||||
if (window.PICO8_CART_DATA) {
|
||||
// Create virtual file system entry
|
||||
Module.preRun.push(function() {
|
||||
FS.createDataFile('/', 'cart.p8', window.PICO8_CART_DATA, true, true, true);
|
||||
});
|
||||
Module.arguments.push('/cart.p8');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user