-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
512 lines (462 loc) · 26 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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<main class="screen" id="scene">
<div class="hint" id="h1">
<div class="top">Add a Plane</div>
<ol class="steps">
<li>Hit <span class="key shift">Shift</span> + <span class="key">A</span></span></li>
<li>Choose <span class="option"><img class="icon" src="/blender-icons/blender-icons/outliner_ob_mesh.svg"/>Mesh</span> 🡪 <span class="option"><img class="icon" src="/blender-icons/blender-icons/mesh_plane.svg"/>Plane</span></li>
</ol>
</div>
<div class="hint" id="h2">
<div class="top">Double Plane width</div>
<ol class="steps">
<li>In <span class="option"><img class="icon" src="/blender-icons/blender-icons/object_data.svg"/>Object Mode</span>, select the plane</li>
<li>Hit <span class="key">S</span> to scale</li>
<li>Hit <span class="key">X</span> to limit scaling to X axis</li>
<li>Type <span class="key">2</span> to double plane width</li>
<li>Click <span class="mouse mouse-left lmb">LMB</span> to confirm</li>
</ol>
</div>
<div class="hint" id="h7">
<div class="top">Divide plane along middle</div>
<ol class="steps">
<li>Enter <span class="option"><img class="icon" src="/blender-icons/blender-icons/editmode_hlt.svg"/>Edit Mode</span> using <span class="key tab">TAB</span></li>
<li>Enable <span class="option"><img class="icon" src="/blender-icons/blender-icons/face_select.svg"/>Face Select Mode</span> by hitting <span class="key">3</span></li>
<li>Select the Face to divide</li>
<li>Use <span class="key">CTRL</span> + <span class="key">R</span> to start <span class="option">Loop Cut and Slide</span></li>
<li>Place the <span class="option">Loop Cut</span> by hovering and clicking <span class="mouse lmb">LMB</span>.</li>
<li>Optionally hit <span class="key">0</span> to center the new edge.</li>
<li>Click <span class="mouse lmb">LMB</span> to confirm</li>
</ol>
</div>
<div class="hint" id="h3">
<div class="top">Subdivide plane</div>
<ol class="steps">
<li>Enter <span class="option"><img class="icon" src="/blender-icons/blender-icons/editmode_hlt.svg"/>Edit Mode</span> using <span class="key tab">TAB</span></li>
<li>Enable <span class="option"><img class="icon" src="/blender-icons/blender-icons/face_select.svg"/>Face Select Mode</span> by hitting <span class="key">3</span></li>
<li>Hit <span class="key">A</span> to deselect/select all faces</li>
<li>Hit <span class="key">CTRL</span> + <span class="key">E</span> and choose <span class="option">Subdivide</span></li>
</ol>
</div>
<div class="hint" id="h4">
<div class="top">Apply scale transform</div>
<ol class="steps">
<li>Ensure you are in the <span class="option">Layout Tab</span></li>
<li>Ensure <span class="option"><img class="icon" src="/blender-icons/blender-icons/object_data.svg"/>Object Mode</span> is active (toggle using <span class="key tab">TAB</span>)</li>
<li>Hit <span class="key">CTRL</span> + <span class="key">A</span> and choose <span class="option">Scale</span> to apply scale transform.</li>
</ol>
</div>
<div class="hint" id="h5">
<div class="top">Create a stack of planes</div>
<ol class="steps">
<li>Ensure <span class="option"><img class="icon" src="/blender-icons/blender-icons/object_data.svg"/>Object Mode</span> is active (toggle using <span class="key tab">TAB</span>)</li>
<li>Select the base plane in the tree view</li>
<li>In the <span class="option"><img class="icon" src="/blender-icons/blender-icons/properties.svg"/>Properties Panel</span>, open the <span class="option"><img class="icon" src="/blender-icons/blender-icons/modifier.svg"/>Modifiers-Tab</span></li>
<li>Add an <span class="option"><img class="icon" src="/blender-icons/blender-icons/mod_array.svg"/>Array-Modifier</span></li>
<li>Exclusively enable <span class="option">Constant Offset</span> with a <strong>Z Distance</strong> of about <strong>0.05</strong></li>
<li>Increase the <span class="option">Count</span> value to something like <strong class="mono">15</strong></li>
</ol>
</div>
<div class="hint" id="h6">
<div class="top">Enable Render Preview in Shading Editor</div>
<ol class="steps">
<li>Hold <span class="key">Z</span> and choose <span class="option"><img class="icon" src="/blender-icons/blender-icons/shading_rendered.svg"/>Rendered</span>, or click <span class="option"><img class="icon" src="/blender-icons/blender-icons/shading_rendered.svg"/></span> at the top right.</li>
</ol>
</div>
<div class="hint" id="h9">
<div class="top">Slice landscape</div>
<ol class="steps">
<li>Select the <em>Landscape</em> element</li>
<li>In <span class="option"><img class="icon" src="/blender-icons/blender-icons/properties.svg"/>Properties</span> 🡪 <span class="option"><img class="icon" src="/blender-icons/blender-icons/modifier.svg"/>Modifiers</span>, add a <span class="option"><img class="icon" src="/blender-icons/blender-icons/mod_boolean.svg"/>Boolean-Modifier</span></li>
<li>For the <span class="option"><img class="icon" src="/blender-icons/blender-icons/object_data.svg"/>Object</span> value, choose the <em>SlicingRef</em> element</li>
<li>Set the <strong>Solver</strong> option to <em>Fast</em></li>
</ol>
</div>
<div class="hint" id="h10">
<div class="top">Move up the planes</div>
<ol class="steps">
<li>Select the <em>SlicingRef</em> element</li>
<li>Hit <span class="key">N</span> to toggle the sidebar and open <span class="option">Transform</span></li>
<li>Enter something like <strong>0.05</strong> to move up the planes</li>
</ol>
</div>
<div class="hint" id="h11">
<div class="top">Enable Alpha (Eevee) for landscape material</div>
<ol class="steps">
<li>Ensure the <em>Landscape</em> element is selected</li>
<li>In the <span class="option"><img class="icon" src="/blender-icons/blender-icons/properties.svg"/>Properties</span> panel, open <span class="option"><img class="icon" src="/blender-icons/blender-icons/material.svg"/>Material</span></li>
<li>Set <span class="option">Settings</span> 🡪 <span class="option">Blend mode</span> to <em>Alpha Hashed</em></li>
</ol>
</div>
<div class="hint" id="h12">
<div class="top">Add a gradient reference plane</div>
<ol class="steps">
<li>In the <span class="option">Layout</span> tab, hit <span class="key">NUM 7</span> to go to top view</li>
<li>Add a plane and scale it to cover the landscape (<span class="key">S</span>,<span class="key">X</span>)</li>
<li>Place the plane above the landscape on the Z axis (<span class="key">G</span>,<span class="key">Z</span>)</li>
</ol>
</div>
<div class="hint" id="h13">
<div class="top">Get plane object coordinates in material</div>
<ol class="steps">
<li>In the <span class="option">Shading</span> tab, create a new material for the landscape</li>
<li>Select the top plane, name it GradientRef and assign the same material</li>
<li>In the <span class="option"><img class="icon" src="/blender-icons/blender-icons/node_material.svg"/>Shader Editor</span>, create a <span class="option">Texture Coordinate</span> node</li>
<li>Place the plane above the landscape on the Z axis (<span class="key">G</span>,<span class="key">Z</span>)</li>
<li>For the <span class="option"><img class="icon" src="/blender-icons/blender-icons/object_data.svg"/>Object</span> value, choose the <em>GradientRef</em> element</li>
</ol>
</div>
<div class="hint" id="h14">
<div class="top">Add a basic gradient</div>
<ol class="steps">
<li>Plug the <span class="option">Object</span> output of the <span class="option">Texture Coordinate</span> node <br>into the <span class="option">Vector</span> input of a new <span class="option">Gradient Texture</span> node</li>
<li>Plug the <span class="option">Color</span> output into the shader's <span class="option">Emission</span> input</li>
</ol>
</div>
<div class="hint" id="h15">
<div class="top">Color the gradient</div>
<ol class="steps">
<li>Add a <span class="option">Color Ramp</span> node</li>
<li>Plug the <span class="option">Factor</span> output of the Gradient Texture <br>into the <span class="option">Color</span> input of the Color Ramp</li>
<li>Plug the <span class="option">Color</span> output into <span class="option">Emission</span></li>
<li>Adjust the Color Ramp to your liking</li>
</ol>
</div>
<div class="hint" id="h16">
<div class="top">Create a background ramp</div>
<ol class="steps">
<li>In the <span class="option">Layout</span> tab, go to <span class="option"><img class="icon" src="/blender-icons/blender-icons/object_data.svg"/>Object Mode</span></li>
<li>Create a new plane (<span class="key shift"></span>+<span class="key">A</span>, <span class="option"><img class="icon" src="/blender-icons/blender-icons/outliner_ob_mesh.svg"/>Mesh</span> 🡪 <span class="option"><img class="icon" src="/blender-icons/blender-icons/mesh_plane.svg"/>Plane</span>)</li>
<li>Scale the plane to be very large (<span class="key">S</span>)</li>
<li>Enter <span class="option"><img class="icon" src="/blender-icons/blender-icons/editmode_hlt.svg"/>Edit Mode</span> (<span class="key tab">TAB</span>) and <span class="option"><img class="icon" src="/blender-icons/blender-icons/edge_select.svg"/>Edge Select Mode (<span class="key">2</span>)</span></li>
<li>Extrude the back Edge along the Y axis (<span class="key">E</span>, <span class="key">Y</span>, <span class="mouse mouse-left lmb">LMB</span>)</li>
<li>Move the new back edge upwards (<span class="key">G</span>, <span class="key">Z</span>, <span class="mouse mouse-left lmb">LMB</span>)</li>
<li>Select the middle edge and hit <span class="key">CTRL</span> + <span class="key">B</span> to bevel.</li>
<li>Use <span class="option">Mouse Scroll Wheel</span> to increase segments</li>
<li>Click <span class="mouse mouse-left lmb">LMB</span> to confirm</li>
</ol>
</div>
<div class="hint" id="h17">
<div class="top">Lock Camera to view</div>
<ol class="steps">
<li>In the <span class="option">Layout</span> tab, hit <span class="key">NUM 0</span> to look through camera</li>
<li>Toggle the sidebar using <span class="key">N</span></li>
<li>Enable <strong>Lock camera to view</strong></li>
</ol>
</div>
<div class="hint" id="h18">
<div class="top">Hide reference objects in render</div>
<ol class="steps">
<li>In the <span class="option"><img class="icon" src="/blender-icons/blender-icons/outliner.svg"/>Outliner</span>, open the <span class="option"><img class="icon" src="/blender-icons/blender-icons/filter.svg"/>Filter Menu</span></li>
<li>Ensure the <span class="option"><img class="icon" src="/blender-icons/blender-icons/restrict_render_off.svg"/>Disable in renders</span> restriction toggle is <strong>enabled</strong></li>
<li>Set the <span class="option"><img class="icon" src="/blender-icons/blender-icons/restrict_render_off.svg"/> Disable in renders</span> to <img class="icon" src="/blender-icons/blender-icons/restrict_render_on.svg"/> for <em>GradientRef</em> and <em>SlicingRef</em></li>
</ol>
</div>
<div class="vidref" id="h19">
<div>
<div class="title">How to Create Topographic Maps with Blender</div>
<div class="channel">Architechture Topics</div>
</div>
</div>
<div class="info" id="h20">
To reduce noise, go to <span class="option"><img class="icon" src="/blender-icons/blender-icons/properties.svg"/>Properties</span> 🡪 <span class="option"><img class="icon" src="/blender-icons/blender-icons/scene.svg"/>Render Settings</span> <br> and increase the <span class="option">Viewport Samples</span> under <span class="option">Sampling</span>
</div>
<div class="info" id="h21">
To be able to edit the landscape, go into <span class="option"><img class="icon" src="/blender-icons/blender-icons/object_data.svg"/>Object Mode</span>,<br> select the <em>Landscape</em> element, then go into <span class="option"><img class="icon" src="/blender-icons/blender-icons/properties.svg"/>Properties</span> 🡪 <span class="option"><img class="icon" src="/blender-icons/blender-icons/modifier.svg"/>Modifiers</span><br> and disable <span class="option"><img class="icon" src="/blender-icons/blender-icons/restrict_view_off.svg"/>Display modifier in viewport</span> for both modifiers. <br>
Then edit the landscape in <span class="option"><img class="icon" src="/blender-icons/blender-icons/sculptmode_hlt.svg"/>Sculpt Mode</span> (Sculpt Tab).
</div>
<div class="info" id="h22">
Enable <strong>Bloom</strong> in the <span class="option"><img class="icon" src="/blender-icons/blender-icons/scene.svg"/>Render Settings</span> to get a nice glow.
</div>
<div class="info" id="h23">
Add a <span class="option"><img class="icon" src="/blender-icons/blender-icons/mod_solidify.svg"/>Solidify</span> modifier to the <em>Landscape</em> to give the slices some thickness.
</div>
<div class="info" id="h24">
Enable <strong>Ambient Occlusion</strong> in the <span class="option"><img class="icon" src="/blender-icons/blender-icons/scene.svg"/>Render Settings</span><br>to emulate shadows from ambient light (Eevee).
</div>
<div class="info" id="h25">
With a <span class="option">Light</span> selected, go into <span class="option"><img class="icon" src="/blender-icons/blender-icons/properties.svg"/>Properties</span> 🡪 <span class="option"><img class="icon" src="/blender-icons/blender-icons/light.svg"/>Light</span><br>and enable <span class="option">Contact Shadows</span> to get more defined shadows (Eevee).
</div>
</main>
<style>
main {
width:1920px;
height:1080px;
/* background:rgb(98, 98, 98); */
position: relative;
/* border: 1px dashed black; */
}
body {
font-family: 'Clear Sans';
margin:0;
color: white;
}
.mono {
/* font-family: monospace; */
}
.mouse {
font-weight:bold;
}
.mouse::before {
background: rgba(255, 255, 255, 0.8);
border-radius: 3px;
box-sizing: border-box;
}
.mouse-left::before {
background-image:
url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="221" height="251" fill="none" style="-webkit-print-color-adjust:exact" viewBox="529 251 221 251"><defs><clipPath id="a" class="frame-clip-def frame-clip"><rect width="221" height="251" x="529" y="251" rx="0" ry="0" style="fill:%23444;fill-opacity:1"/></clipPath></defs><g clip-path="url(%23a)"><g class="fills"></g><g class="frame-children"><path d="M652 342.704V355h90c-.002-52.679-40.248-95.504-90-96v23.296c8.827 3.124 15.158 11.549 15.158 21.441v17.526c0 9.892-6.331 18.317-15.158 21.441Z" class="fills" style="fill:%23444;fill-opacity:1"/><g class="strokes"><path d="M652 342.704V355h90c-.002-52.679-40.248-95.504-90-96v23.296c8.827 3.124 15.158 11.549 15.158 21.441v17.526c0 9.892-6.331 18.317-15.158 21.441Z" class="stroke-shape" style="fill:none;fill-opacity:none;stroke-width:10;stroke:%23444;stroke-opacity:1"/></g><path d="M610.842 303.737v17.526c0 9.892 6.331 18.317 15.158 21.441V355h-90c0-52.678 40.247-95.504 90-96v23.296c-8.827 3.124-15.158 11.549-15.158 21.441Z" class="fills"/><g class="strokes"><path d="M610.842 303.737v17.526c0 9.892 6.331 18.317 15.158 21.441V355h-90c0-52.678 40.247-95.504 90-96v23.296c-8.827 3.124-15.158 11.549-15.158 21.441Z" class="stroke-shape" style="fill:none;fill-opacity:none;stroke-width:10;stroke:%23444;stroke-opacity:1"/></g><path d="M536 379h207v92a20 20 0 0 1-20 20H556a20 20 0 0 1-20-20v-92z" class="fills" style="fill:none;fill-opacity:1"/><g class="strokes"><path d="M536 379h207v92a20 20 0 0 1-20 20H556a20 20 0 0 1-20-20v-92z" class="stroke-shape" style="fill:none;fill-opacity:none;stroke-width:10;stroke:%23444;stroke-opacity:1"/></g><rect width="17" height="36" x="631" y="294" class="fills" rx="8.5" ry="8.5" style="fill:%23444;fill-opacity:1"/></g></g></svg>');
content:'';
position: relative;
width:32px;
background-repeat: no-repeat;
height:32px;
transform: scaleX(-1);
display: inline-block;
background-size: 24px 24px;
background-position: 50% 50%;
vertical-align: middle;
bottom:2px;
margin-right:4px;
}
.icon {
width: 32px;
height: 32px;
vertical-align: bottom;
background: rgba(0,0,0,0.3);
border-radius: 5px;
bottom:2px;
position: relative;
margin-right: 5px;
}
.hint {
bottom:200px;
left:60px;
position: absolute;
display:inline-block;
border-radius: 25px;
box-shadow: 4px 4px 20px rgba(0,0,0,0.4);
background: rgba(89, 89, 89, 0.9);
font-size:22px;
padding:15px 30px 15px 15px;
}
.vidref {
display: flex;
flex-direction: row;
bottom:200px;
left:60px;
position: absolute;
border-radius: 25px;
box-shadow: 4px 4px 20px rgba(0,0,0,0.2);
background: rgba(0, 0, 0, 0.8);
font-size:22px;
padding: 18px 24px 24px;
white-space: nowrap;
padding-left:140px;
overflow:hidden;
line-height: 1.2em;
}
.vidref .title {
font-weight: bold;
}
.vidref .channel {
font-style: italic;
}
.vidref::before {
display: flex;
content:'';
width:100px;
height:60px;
left:24px;
background-size: contain;
background-repeat: no-repeat;
position: absolute;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="159" height="110"><path d="m154 17.5c-1.82-6.73-7.07-12-13.8-13.8-9.04-3.49-96.6-5.2-122 0.1-6.73 1.82-12 7.07-13.8 13.8-4.08 17.9-4.39 56.6 0.1 74.9 1.82 6.73 7.07 12 13.8 13.8 17.9 4.12 103 4.7 122 0 6.73-1.82 12-7.07 13.8-13.8 4.35-19.5 4.66-55.8-0.1-75z" fill="%23f00"/><path d="m105 55-40.8-23.4v46.8z" fill="%23fff"/></svg>');
}
.info {
display: block;
/* flex-direction: row; */
bottom:200px;
left:60px;
position: absolute;
border-radius: 25px;
box-shadow: 4px 4px 20px rgba(0,0,0,0.2);
background: rgba(0, 0, 0, 0.8);
font-size:22px;
padding: 18px 24px 24px;
white-space: nowrap;
padding-left:80px;
overflow:hidden;
/* line-height: 1.2em; */
}
.info img {
position: relative;
top:2px;
}
.info::before {
display: flex;
content:'';
width:35px;
height:60px;
left:24px;
background-size: contain;
background-repeat: no-repeat;
position: absolute;
background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" fill="%23FFF" clip-rule="evenodd"><path d="M24 17.981h-13l-7 5.02v-5.02h-4v-16.981h24v16.981zm-2-14.981h-20v12.981h4v3.125l4.357-3.125h11.643v-12.981zm-9 6.001v5h-2v-5h2zm-1-1.5c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25-1.25.56-1.25 1.25.56 1.25 1.25 1.25z"/></svg>');
}
.top {
font-weight:700;
padding:10px 20px;
background: rgba(0,0,0,0.3);
display:inline;
border-radius: 25px;
/* box-shadow: 2px 2px 10px rgba(0,0,0,0.3); */
vertical-align:middle;
position: relative;
}
.hint .top::before {
display: inline-block;
content:'';
width:36px;
height:36px;
background-size: contain;
background-repeat: no-repeat;
position: relative;
top:9px;
margin-right:5px;
/* position: absolute; */
background-image: url('data:image/svg+xml;utf8,<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" fill="%23FFF" xmlns="http://www.w3.org/2000/svg"><path d="m21 4c0-.478-.379-1-1-1h-16c-.62 0-1 .519-1 1v16c0 .621.52 1 1 1h16c.478 0 1-.379 1-1zm-16.5.5h15v15h-15zm13.5 10.75c0-.414-.336-.75-.75-.75h-4.5c-.414 0-.75.336-.75.75s.336.75.75.75h4.5c.414 0 .75-.336.75-.75zm-11.772-.537 1.25 1.114c.13.116.293.173.455.173.185 0 .37-.075.504-.222l2.116-2.313c.12-.131.179-.296.179-.459 0-.375-.303-.682-.684-.682-.185 0-.368.074-.504.221l-1.66 1.815-.746-.665c-.131-.116-.293-.173-.455-.173-.379 0-.683.307-.683.682 0 .188.077.374.228.509zm11.772-2.711c0-.414-.336-.75-.75-.75h-4.5c-.414 0-.75.336-.75.75s.336.75.75.75h4.5c.414 0 .75-.336.75-.75zm-11.772-1.613 1.25 1.114c.13.116.293.173.455.173.185 0 .37-.074.504-.221l2.116-2.313c.12-.131.179-.296.179-.46 0-.374-.303-.682-.684-.682-.185 0-.368.074-.504.221l-1.66 1.815-.746-.664c-.131-.116-.293-.173-.455-.173-.379 0-.683.306-.683.682 0 .187.077.374.228.509zm11.772-1.639c0-.414-.336-.75-.75-.75h-4.5c-.414 0-.75.336-.75.75s.336.75.75.75h4.5c.414 0 .75-.336.75-.75z"/></svg>');
}
.key {
font-weight:700;
/* text-transform: uppercase; */
}
.key {
/* display:inline; */
/* border: 2px solid rgba(255,255,255,0.4); */
border-radius:6px;
padding:0px 10px 3px 10px;
background: rgba(255, 255, 255, 0.8);
position: relative;
z-index: 2;
color:rgb(41, 41, 41);
}
.key.shift::before {
background-image:
url('data:image/svg+xml;utf8,<svg width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg" stroke="%23414141" stroke-width="2" stroke-linecap="round" stroke-linejoin="miter" fill="none" color="%23414141"> <title id="shiftIconTitle">Shift</title> <path d="M16,12 L16,17 L8,17 L8,12 L3,12 L12,3 L21,12 L16,12 Z"/> </svg>');
content:'';
position: relative;
width:24px;
height:24px;
display: inline-block;
background-size: 24px 24px;
bottom: -6px;
margin-right:2px;
}
.key.tab::before {
content:'⭾ ';
display: inline;
}
/* .key::after {
border:2px solid rgba(255,255,255,0.7);;
position: absolute;
content:'';
display: inline-block;
top:-1px;
left:-1px;
right:-1px;
bottom:3px;
border-radius: 4px;
z-index: 2;
} */
.option {
font-weight:700;
/* font-style: italic; */
}
.steps {
margin-top:1em;
text-indent: 0;
list-style: none;
padding:0;
}
.steps li::before {
content: counter(inst);
border-radius: 50%;
font-weight:900;
display:inline-block;
position: absolute;
left:-45px;
width:36px;
height:36px;
text-align: center;
/* margin-right:10px; */
background:rgba(0,0,0,0.3);
}
.steps li {
/* background:rgba(0,0,0,0.3); */
line-height:34px;
margin-bottom:10px;
margin-left:50px;
position: relative;
counter-increment: inst;
}
</style>
<script type="module">
import { gsap, Back } from 'gsap';
import CSSRulePlugin from 'gsap/CSSRulePlugin';
document.querySelectorAll('.hint, .vidref, .info').forEach(el => {
if(('#' + el.id) === window.location.hash) {
el.style.visibility = 'visible';
}
else {
el.style.visibility = 'hidden';
}
});
// document.querySelectorAll('.vidref').forEach(el => {
// if('#' + el.id === window.location.hash) {
// el.style.display = 'flex';
// }
// else {
// el.style.display = 'none';
// }
// });
let tl = gsap.timeline();
// tl.pause();
tl.from('.top', {opacity: 0, x: 50, duration: 1, ease: "power2.out"}, 0);
let topBefore = CSSRulePlugin.getRule(".hint .top::before"); //get the rule
tl.fromTo(topBefore, {scale: 2, duration:1, ease:"power2.out"}, {scale:1}, 0);
tl.from('.hint', { opacity: 0, y: 80, duration: 1, ease: Back.easeOut.config(1.7)}, 0);
tl.from(window.location.hash + ' .steps li', {opacity: 0, x:30, duration: 1, stagger: { amount: 0.4}}, 0.25);
tl.to('.hint', {opacity:0, y:50, duration:1, ease: "power2.in"}, 15);
tl.from('.vidref', {opacity:0, width: 0, duration:1, ease:"power2.out"}, 0);
let vidrefBefore = CSSRulePlugin.getRule(".vidref::before"); //get the rule
tl.fromTo(vidrefBefore, {scale: 2, duration:1, ease:Back.easeOut.config(1.7)}, {scale:1}, 0);
tl.to('.vidref', {width:0, duration:1, opacity:0, ease:"power2.in"}, 15);
tl.from('.info', {opacity:0, width: 0, duration:1, ease:"power2.out"}, 0);
let infoBefore = CSSRulePlugin.getRule(".info::before"); //get the rule
tl.fromTo(infoBefore, {scale: 3, duration:1, ease:Back.easeOut.config(1.7)}, {scale:1}, 0)
tl.to('.info', {width:0, duration:1, opacity:0, ease:"power2.in"}, 15);
window.tl = tl;
const config = {
fps: 60,
duration: tl.duration()
}
window.getInfo = function() {
return {
fps: config.fps,
numberOfFrames: config.duration*config.fps
}
}
window.seekToFrame = function(number) {
tl.pause();
tl.progress(number/(config.duration*config.fps));
}
</script>
</body>
</html>