-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
386 lines (366 loc) · 14.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>mpos-precept</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="styles.css" />
<link href="mpos.js" />
<script type="importmap">
{
"imports": {
"three": "//cdn.jsdelivr.net/npm/[email protected]/build/three.module.js",
"three/addons/": "//cdn.jsdelivr.net/npm/[email protected]/examples/jsm/"
}
}
</script>
</head>
<body class="mp-unstyle">
<div id="errorMessage"></div>
<main>
<h2 class="mp-native">
<span>main</span>
<label class="cycle">
<input name="cycles" type="checkbox" checked onChange="document.body.classList.toggle('mp-unstyle')" />
cycle
</label>
</h2>
<p class="cycle stage" id="overflow">
differ tween: passive, overflow<br />
<span id="fragment" contenteditable style="color: red">
<style>
#fragment {
/* some properties don't cascade */
background-color: rgba(255, 0, 0, 0.75);
text-shadow: 0.05em 0.125em 0.025em #fff;
box-shadow: inset 0em 0.2em 0.05em 0em #000;
}
.score {
background-color: rgba(0, 255, 0, 0.25);
}
</style>
<span class="score">#fragment</span>
</span>
<br />
Update queue attribute from cache of split-priority.<br />
</p>
<details id="tools" class="mp-allow" open>
<summary>Static Content</summary>
<div class="stage" id="underflow"></div>
<aside id="native" class="tilt scroll">
<h2>aside<span>#native</span></h2>
<form onSubmit="return false;">
<fieldset class="sub">
<legend>form</legend>
<input name="listen" class="w50" type="text" placeholder="listen" />
<input class="w25" type="button" value="✔" />
<input class="w25" type="reset" value="✖" />
<input class="w100" type="range" />
</fieldset>
</form>
<div>
<h2>tag cloud</h2>
<span style="position: relative; z-index: 9">click</span>
<span style="position: relative; z-index: 0">mousemove</span>
<span style="position: relative; z-index: -6">mousedown</span>
<span style="position: relative; z-index: 6">mouseup</span>
<span style="position: relative; z-index: -3">mouseout</span>
<span style="position: relative; z-index: 3">mouseover</span>
</div>
</aside>
<section id="text">
<h2>section<span>#text</span></h2>
\n TEXT NODE \n
<ul class="tilt">
<h3>deep list</h3>
<li>
A. AAAAAAAA
<ol>
<li>
1. 11111111
<ul>
<li>a. aaaaaaaa</li>
<li>b. bbbbbbbb</li>
<li>c. cccccccc</li>
</ul>
</li>
<li>2. 22222222</li>
<li>3. 33333333</li>
</ol>
</li>
<li>B. BBBBBBBB</li>
<li>C. CCCCCCCC</li>
</ul>
<div id="thread" class="resize">
<div>
<div>
<div>1</div>
<div>2</div>
</div>
<div>
3
<a href="//discourse.threejs.org" target="_blank">4</a>
</div>
</div>
<div>
<div>
<div>
<div><a href="#">A</a></div>
<div>B</div>
</div>
<div><span></span><span></span></div>
</div>
<div>
<div>7</div>
<div>8</div>
</div>
</div>
</div>
</section>
<section id="loader">
<h2>section<span>#loader</span></h2>
<p class="mp-loader">Class <span class="sup">mp-loader</span> TXT2IMG?</p>
<object
alt="SVG"
class="mp-loader w33 hinge"
data="//upload.wikimedia.org/wikipedia/commons/d/dd/Wheelchair_stairs.svg?t=10"
rel="dns-prefetch"
></object>
<img alt="" class="mp-loader w33 hinge" src="./image.webp?t=10" crossorigin="anonymous" />
<img alt="" class="mp-loader w33 hinge" src="./image.gif?t=10" />
<video class="mp-loader w33 hinge" crossorigin="anonymous" loop autoplay muted>
<source src="//interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" type="video/webm" />
<source src="//interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4" type="video/mp4" />
<track kind="captions" />
</video>
<div class="w33" id="Object3D"></div>
</section>
<section id="media" class="sub">
<h2>section<span>#media</span></h2>
<article>
<img alt="" class="w33 hinge" src="./image.webp?t=10" />
<img alt="" class="w33 hinge" src="./image.gif?t=10" />
</article>
<details id="types" class="mp-allow tilt" open>
<summary>details<span>#types</span></summary>
<table class="w100 mp-allow">
<tr>
<th>Property</th>
<th>Value</th>
</tr>
<tr>
<td>charmap</td>
<td>⨂🐧</td>
</tr>
<tr>
<td>comment</td>
<td>
<!--comment-->
<![CDATA[ escape ]]>
<?php echo('hello world') ?>
<?xml version="1.0" encoding="UTF-8"?>
<xml>XML</xml>
<!--//__THREE__
const uri = '//raw.githubusercontent.com/mrdoob/three.js/dev/examples/models/json/suzanne_buffergeometry.json'
const loader = new THREE.BufferGeometryLoader();
loader.load( uri, function ( data ){
const filename = uri.split('/').pop()
const resource = mpos.var.grade.group.getObjectByName(filename)
if( !resource ){
const material = new THREE.MeshBasicMaterial( { color: 0x00c0c0, wireframe: true } );
const object = new THREE.Mesh( data, material );
object.name = filename
const scale = 50;
object.scale.multiplyScalar( scale );
object.position.set( -scale, scale, 0 );
mpos.var.grade.group.add( object );
}
});
-->
<script>
noscript
</script>
</td>
</tr>
<tr>
<td>object</td>
<td>
<object
alt="SVG"
data="//upload.wikimedia.org/wikipedia/commons/1/19/Tetrix_projection_fill_plane.svg"
rel="dns-prefetch"
></object>
</td>
</tr>
<tr>
<td>iframe</td>
<td>
<div class="yt mp-native">
<iframe src="//youtube.com/embed/joOIBteSo1w?vq=tiny" allow="encrypted-media;" title="YouTube"></iframe>
</div>
</td>
</tr>
<tr>
<td>model-viewer</td>
<td>
<script type="module" src="//ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
<model-viewer
ar
camera-controls
touch-action="pan-y"
src="//modelviewer.dev/shared-assets/models/Astronaut.glb"
alt="A 3D model of an astronaut"
>
<button slot="ar-button" style="border: none; position: absolute; top: 16px; right: 16px">👋 Activate AR</button>
</model-viewer>
</td>
</tr>
<tr>
<td>z-index</td>
<td>
<span style="position: relative; z-index: auto">auto</span>
<span style="position: relative; z-index: 3">3</span>
<span style="position: relative; z-index: -6">-6</span>
<span style="position: relative; z-index: 99">99</span>
</td>
</tr>
</table>
</details>
</section>
<details id="live" class="mp-allow" open>
<summary>details<span>#live</span></summary>
<article>
<h2>Article 01: Carousel</h2>
<p>Media slides with content-aware policy.</p>
<figure class="slides">
<div class="track">
<img style="background-color: rgba(128, 0, 0, 0.5)" alt="" srcset="data:, 1920w" sizes="(min-width: 1920px)" src="data:," />
<figcaption>srcset</figcaption>
</div>
<div class="track">
<picture style="background-color: rgba(128, 32, 32, 0.5)">
<source srcset="data:," media="(orientation: portrait)" />
<img alt="" src="data:," />
<figcaption>picture</figcaption>
</picture>
</div>
<div class="track">
<img style="background-color: rgba(128, 64, 64, 0.5)" alt="" src="data:," />
<figcaption>source</figcaption>
</div>
<div class="track">
<video style="background-color: rgba(128, 128, 128, 0.5)" muted crossorigin="anonymous" preload="metadata">
<source src="data:," type="video/mp4" />
<track label="English" kind="captions" srclang="en" src="./sintel-en.vtt" default />
<p>No video</p>
</video>
<figcaption>video</figcaption>
</div>
</figure>
<ul>
Proposal...
<li>config: default, custom</li>
<li>source: h264, MVC/SBS</li>
<li>user-agent: advertisement</li>
</ul>
</article>
<article>
<h2>Article 02: Predictive</h2>
<p>Defined slot to sample for systems.</p>
<img alt="" class="w100" src="data:," style="height: 8em; background-color: rgb(0, 128, 0)" />
<ul>
Proposal...
<li>script: cast data routine</li>
<li>unify i/o: session layers</li>
<li>handoff: XR, auto, foreign</li>
</ul>
</article>
<article>
<h2>Article 03: Indeterminate</h2>
<p>Mutation and polymorphism and garbage.</p>
<img alt="" class="w50" src="data:," style="height: 8em; background-color: rgb(0, 0, 128)" />
<ul>
Proposal...
<li>alert: !!can or !!is in a coalmine</li>
<li>ingest: contain or isolate</li>
<li>seal: environment pipeline</li>
</ul>
</article>
</details>
</details>
</main>
<script>
//
// Await
const mp = setInterval(() => {
if (typeof window.mpos !== 'undefined' && document.readyState == 'complete' && !document.hidden) {
clearInterval(mp)
//
// Add test of visual hierarchy
mpos.fnVar('chain', '#overflow', { count: 4, symbol: '-' })
mpos.fnVar('chain', '#underflow', { count: 4, symbol: '+' })
// Get depth of element (even before init and add)
let m = mpos.fnVar('march', '#thread', {})
// Add test of live depth thresholds
mpos.fnVar('chain', '#thread', { count: m.slot, symbol: m.slot })
// Object Preload
const Object3D = document.createElement('object')
Object3D.alt = 'Object3D'
Object3D.classList.add('mp-loader')
Object3D.data = '//raw.githubusercontent.com/mrdoob/three.js/master/examples/models/json/lightmap/lightmap.json'
Object3D.style = 'display:block; width: 2em; height: 2em;'
//
// Initialize in standalone mode
mpos.init().then((res) => {
console.log('mpos:', res)
//
// Get depth: m.root + m.slot = opts.depth
let m = mpos.fnVar('march', '#live', {})
// Add chain to depth
const chain = mpos.fnVar('chain', '#live', { count: m.root, symbol: '' })
// Add Object3D to chain: .last from parent, in case zero-length
chain.parentElement.querySelector('.last').append(Object3D)
//
// Add DOM selector
mpos.mod.add().then((res) => {
console.log('mod add:', res)
//
// Dynamic object update
const idxJSON = Object3D.getAttribute('data-idx')
const rect = mpos.fnVar('find', idxJSON, {})
// Loader status...?
console.log('Loaded...?:', rect.obj)
// Meanwhile flip-y (scale(-1, 0) flickers visibly)
rect.el.style.transform = 'rotateZ(180deg)'
rect.el.classList.add('blink')
//
// Dynamic content addition
const element = document.createElement('article')
element.innerHTML = `<h2>__USE_AFTER_THREE__</h2><div>dynamic<div>content<div>tree</div></div></div>`
document.querySelector('#live').prepend(element)
mpos.mod.add(element, { grade: mpos.var.grade }).then((res) => {
console.log('mod add grade:', res)
})
})
// init has event listeners...?
})
}
}, 250)
//
// User events (native or synthetic)
document.body.addEventListener(
'click',
(e) => {
const target = e.target
target.classList.toggle('active')
if (target.nodeName == 'VIDEO') {
if (target.paused) target.play()
else target.pause()
}
},
false
)
</script>
<script src="opencv.js" async></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/libgif.min.js" async></script>
</body>
</html>