GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Aframe-nft/examples/dynamic.html at main · webarkit/Aframe-nft

Expand file tree

/

dynamic.html

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
61 lines (57 loc) · 1.97 KB
/

dynamic.html

Copy path

File metadata and controls

61 lines (57 loc) · 1.97 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Aframe-nft dynamic example</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=1"/>
<link rel="stylesheet" href="css/nft-style.css"/>
<style>
#toggle {
position: absolute;
top: 12px;
left: 12px;
z-index: 200;
padding: 8px 12px;
font: 16px sans-serif;
}
</style>
</head>
<body>
<div id="app">
<video autoplay muted playsinline id="video"></video>
</div>
<button id="toggle" type="button">Add kuva</button>
<script type="module" src="../src/index.js"></script>
<div class="example-container">
<a-scene embedded arnft="videoWidth: 640; videoHeight: 480">
<!-- pinball is declared up front. kuva is added and removed at runtime
with the button: it loads while tracking is already running, and
re-adding it reuses the target that is still loaded. -->
<a-nft name="pinball" url="DataNFT/pinball">
<a-box color="#4CC3D9"></a-box>
</a-nft>
<!-- Not <a-camera>: on some phones its look-controls stops a page like this,
which loads its script as a module, from starting. See the README. -->
<a-entity camera position="0 0 0"></a-entity>
</a-scene>
</div>
<script>
const button = document.getElementById('toggle');
let kuva = null;
button.addEventListener('click', () => {
if (kuva) {
kuva.remove();
kuva = null;
button.textContent = 'Add kuva';
return;
}
kuva = document.createElement('a-nft');
kuva.setAttribute('name', 'kuva');
kuva.setAttribute('url', 'DataNFT/kuva');
kuva.innerHTML = '<a-sphere color="#E4572E"></a-sphere>';
document.querySelector('a-scene').appendChild(kuva);
button.textContent = 'Remove kuva';
});
</script>
</body>
</html>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.