-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransformice-swf.html
More file actions
56 lines (53 loc) · 1.58 KB
/
transformice-swf.html
File metadata and controls
56 lines (53 loc) · 1.58 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transformice - Ruffle</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #6A7495;
}
#game-container {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<div id="game-container"></div>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<script>
// Настраиваем Ruffle
window.RufflePlayer = window.RufflePlayer || {};
window.RufflePlayer.config = {
allowScriptAccess: "always",
autoplay: "on",
backgroundColor: "#6A7495",
unmuteOverlay: "hidden",
contextMenu: true,
logging: "warn"
};
window.addEventListener("load", () => {
const ruffle = window.RufflePlayer.newest();
const player = ruffle.createPlayer();
const container = document.getElementById("game-container");
container.appendChild(player);
const config = {
url: "Transformice.swf",
backgroundColor: "#000000",
allowScriptAccess: true,
unmuteOverlay: "hidden",
logLevel: "warn",
};
player.load(config);
});
</script>
</body>
</html>