ed
This commit is contained in:
parent
159fe87e92
commit
f19fdc73e6
31 changed files with 3271 additions and 0 deletions
BIN
resources/[housing]/renzu_motels/data/audio/door.mp4
Normal file
BIN
resources/[housing]/renzu_motels/data/audio/door.mp4
Normal file
Binary file not shown.
BIN
resources/[housing]/renzu_motels/data/audio/door.ogg
Normal file
BIN
resources/[housing]/renzu_motels/data/audio/door.ogg
Normal file
Binary file not shown.
BIN
resources/[housing]/renzu_motels/data/image/hotelmodern3.png
Normal file
BIN
resources/[housing]/renzu_motels/data/image/hotelmodern3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
BIN
resources/[housing]/renzu_motels/data/image/pinkcage.png
Normal file
BIN
resources/[housing]/renzu_motels/data/image/pinkcage.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
59
resources/[housing]/renzu_motels/data/index.html
Normal file
59
resources/[housing]/renzu_motels/data/index.html
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Renzu Motels</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Arial;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
#myVideo {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
color: #f1f1f1;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#myBtn {
|
||||
width: 200px;
|
||||
font-size: 18px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#myBtn:hover {
|
||||
background: #ddd;
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="door"></div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
62
resources/[housing]/renzu_motels/data/motels.json
Normal file
62
resources/[housing]/renzu_motels/data/motels.json
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
[
|
||||
{
|
||||
"pinkcage": [
|
||||
{
|
||||
"fridge": {
|
||||
"x": 305.260009765625,
|
||||
"y": -206.42999267578128,
|
||||
"z": 54.22000122070312
|
||||
},
|
||||
"door": {
|
||||
"x": 307.3800048828125,
|
||||
"y": -213.27000427246097,
|
||||
"z": 54.20999908447265
|
||||
},
|
||||
"stash": {
|
||||
"x": 307.5,
|
||||
"y": -207.49600219726565,
|
||||
"z": 54.54000091552734
|
||||
},
|
||||
"wardrobe": {
|
||||
"x": 302.6799926757813,
|
||||
"y": -207.44000244140625,
|
||||
"z": 54.22000122070312
|
||||
}
|
||||
},
|
||||
{
|
||||
"door": {
|
||||
"x": 311.0899963378906,
|
||||
"y": -203.17999267578128,
|
||||
"z": 54.20999908447265
|
||||
},
|
||||
"stash": {
|
||||
"x": 310.82000732421875,
|
||||
"y": -198.02000427246097,
|
||||
"z": 54.75
|
||||
},
|
||||
"wardrobe": {
|
||||
"x": 306.5899963378906,
|
||||
"y": -197.57000732421875,
|
||||
"z": 54.22000122070312
|
||||
}
|
||||
},
|
||||
{
|
||||
"door": {
|
||||
"x": 315.9100036621094,
|
||||
"y": -194.3999938964844,
|
||||
"z": 54.2400016784668
|
||||
},
|
||||
"stash": {
|
||||
"x": 320.989990234375,
|
||||
"y": -194.38999938964844,
|
||||
"z": 54.75
|
||||
},
|
||||
"wardrobe": {
|
||||
"x": 321.7099914550781,
|
||||
"y": -189.86000061035156,
|
||||
"z": 54.22000122070312
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
32
resources/[housing]/renzu_motels/data/script.js
Normal file
32
resources/[housing]/renzu_motels/data/script.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
function playsound(table) {
|
||||
var file = table['file']
|
||||
var volume = table['volume']
|
||||
var audioPlayer = null;
|
||||
if (audioPlayer != null) {
|
||||
audioPlayer.pause();
|
||||
}
|
||||
if (volume == undefined) {
|
||||
volume = 0.2
|
||||
}
|
||||
audioPlayer = new Audio("./audio/" + file + ".ogg");
|
||||
audioPlayer.volume = volume;
|
||||
audioPlayer.play();
|
||||
}
|
||||
|
||||
window.addEventListener('message', function(event) {
|
||||
var data = event.data;
|
||||
if (event.data.type == 'playsound') {
|
||||
playsound(event.data.content)
|
||||
}
|
||||
if (event.data.type == 'door') {
|
||||
document.getElementById('door').innerHTML = `
|
||||
<video autoplay id="myVideo">
|
||||
<source src="audio/door.mp4" type="video/mp4">
|
||||
</video>
|
||||
`
|
||||
setTimeout(function() {
|
||||
document.getElementById('door').innerHTML = ''
|
||||
}, 7000)
|
||||
}
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue