-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.p.html
169 lines (146 loc) · 3.6 KB
/
index.p.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!-- template: neutral -->
<body>
<main class="ForestLayer World">
<div class="WorldName">
<br>
<h1 class="WorldName-text">
<h1>
<br>
dumpling.love
<br>
</h1>
</h1>
</div>
<div class="WorldHack" id="toggle-dev">
<img
src="./forest/images/wordhack.png"
alt="a person holding two computer punch cards like in the good old computer times"
>
</div>
<a-dumpling layer="play" title="the park" w="50" h="50">
<div class="WorldForest">
<img
class="WorldForest-link"
src="/images/dumpling-gameplay.gif"
alt="a sped up animation of someone doing an asmr let's play of the videog ame dumpling.love"
>
<button class="WorldForest-link">
wanna go on a walk with me?
</button>
</div>
</a-dumpling>
<a-dumpling title="welcome" >
<div class="Dialog-text">
hello web user
</div>
</a-dumpling>
<a-dumpling
id="devcom"
w=80 h=50
temperament="phlegmatic"
permanent
hidden
>
<p-artial
src="./forest/items/devcom/devcom.html"
/>
</a-dumpling>
</main>
<s-cript target="assistant">
--- click
what was that?! i don't understand this place. {it's me|this is the web}
i can't see you, friend. {Cancel}
==> click
</s-cript>
</body>
<style>
body {
margin: 0;
}
/* -- World -- */
.World {
position: relative;
width: 3000px;
height: 3000px;
background:
url(/sky/sky-lofi/annharbor.png),
url(/sky/sky-lofi/brasilia.png),
url(/sky/sky-lofi/california.png),
url(/sky/sky-lofi/canberra.png),
url(/sky/sky-lofi/chicago.png),
url(/sky/sky-lofi/greenwitch.png)
;
background-blend-mode: darken;
/* background-position-x: -5%, 10%, 90%, 20%, 35%, 30%, 5%; */
background-color: #decda4;
}
/* -- World/Name -- */
.WorldName {
position: absolute;
width: 600px;
height: 357px;
top: 0;
left: 0;
background: url(/sky/cloud.png);
background: #d3d282;
background-size: auto;
background-size: cover;
border: 10px double;
mix-blend-mode: lighten;
}
.WorldName-text {
margin: 44px;
margin-top: 14px;
font-size: 76px;
text-shadow: -1px -1px 0 #00f3ff, 1px -1px 0 #ff0303, -1px 1px 0 #afff00, 1px 1px 0 #fc00a5;
}
/* -- World/Forest -- */
.WorldForest {
height: 100%;
}
.WorldForest img {
width: 100%;
object-fit: contain;
object-position: top left;
cursor: zoom-in;
}
.WorldForest button {
cursor: pointer;
margin-top: 10px;
transform: translateX(69px);
}
.WorldHack {
font-size: 20px;
cursor: pointer;
color: #D3D2A4;
position: absolute;
bottom: 0px;
width: 420px;
}
.WorldHack img {
display: block;
}
</style>
<script type="module">
import { Inventory } from "./forest/inventory.js"
// -- deps --
const mInventory = Inventory.get()
// -- elements --
const $dev = document.getElementById("toggle-dev")
const $forestLinks = document.getElementsByClassName("WorldForest-link")
// -- init --
mInventory.load()
for (const $link of $forestLinks) {
$link.addEventListener("click", OnForestClicked)
}
// how do you add this stuff to the inventory proper??
$dev.addEventListener("click", OnDevToggleClicked)
// -- events --
// TODO: a tag that looks like a button (so they can can link w/o hoops)
function OnForestClicked() {
navigate("welcome.html")
}
function OnDevToggleClicked() {
Frames.show("devcom")
}
</script>