-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
77 lines (61 loc) · 3.49 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html>
<title>WASMpsx</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body,h1 {font-family: "Montserrat", sans-serif}
</style>
<body>
<!-- Sidebar -->
<!-- Header -->
<div class="w3-opacity">
<div class="w3-clear"></div>
<header class="w3-center w3-margin-bottom">
<h1><b>WASMpsx</b></h1>
<p><b>A PlayStation emulator for your own uses.</b></p>
<div> </div>
<h1> Demo </h1>
</header>
</div>
<wasmpsx-player></wasmpsx-player>
<button onclick="document.getElementById('e').click()" style="position: relative; left: 45%; background-color:#eee; border-color: #eee">Choose a ROM</button>
<input id="e" style="display: none;" type="file" onchange="document.querySelector('wasmpsx-player').readFile(this.files[0]);" />
<!-- Header -->
<div class="w3-opacity">
<div class="w3-clear"></div>
<header class="w3-center w3-margin-bottom">
<div> </div>
<h1> About </h1>
</header>
</div>
<div class="preview"><div class="preview__inner-1"><div class="preview__inner-2" style="padding: 10px 25px 302px;"><div class="cl-preview-section"><h1 id="wasmpsx">WASMpsx</h1>
</div><div class="cl-preview-section"><p>A fork of TJWei’s PlayStation emulator to use for your own purposes.<br>
</div><div class="cl-preview-section"><h1 id="adding-to-website">Adding to website</h1>
</div><div class="cl-preview-section"><p>To add this to your website, click <a href="http://download-wasmpsx.glitch.me/">here</a> so you can download the WASMpsx source code as a ZIP file.</p>
</div><div class="cl-preview-section"><p>Then, add them to your website and create a <code><script></code> tag like this:</p>
</div><div class="cl-preview-section"><pre><code><script src="path/to/wasmpsx.min.js"></script>
</code></pre>
</div><div class="cl-preview-section"><p>After those steps, you are ready to use WASMpsx!</p>
</div><div class="cl-preview-section"><h1 id="usage">Usage</h1>
</div><div class="cl-preview-section"><p>To use WASMpsx, use this example script:</p>
</div><div class="cl-preview-section"><pre><code>document.getElementById('my-wasmpsx-element').loadUrl('/path/to/granturismo.bin');
</code></pre>
</div><div class="cl-preview-section"><h4 id="note-does-not-come-with-example-rom-files.">Note: does not come with example ROM files.</h4>
</div><div class="cl-preview-section"><p>And to load files, not URLs, use this script:</p>
</div><div class="cl-preview-section"><pre><code>document.getElementById('my-wasmpsx-element').readFile(file here, useful for file input);
</code></pre>
</div><div class="cl-preview-section"><p>To add a display, add a <code>wasmpsx-player</code> element.</p>
</div><div class="cl-preview-section"><p>Example element:</p>
</div><div class="cl-preview-section"><pre><code><wasmpsx-player id="my-wasmpsx-element"></wasmpsx-player>
</code></pre>
</div></div> <div class="gutter" style="left: 0px;"><!----> <!----></div></div> <!----></div>
<script src="wasmpsx.min.js"></script>
<script>
setTimeout(function(){
document.querySelector('wasmpsx-player').shadowRoot.querySelector('canvas').style="border: 0px none; background-color: black; top: 0px; top: 0; position: relative; display: block; margin: auto;";
}, 100);
</script>