File: index.published.html

package info (click to toggle)
chromium 139.0.7258.127-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,122,156 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (182 lines) | stat: -rw-r--r-- 6,031 bytes parent folder | download | duplicates (17)
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='chrome=1'>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <meta name='mobile-web-app-capable' content='yes'>
    <meta name='apple-mobile-web-app-capable' content='yes'>

    <meta name='twitter:card' content='summary'>
    <meta name='twitter:title' content='WebXR Samples'>
    <meta name='twitter:description' content='Sample WebXR pages for testing and reference'>

    <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">

    <link rel='stylesheet' href='css/stylesheet.css'>
    <link rel='stylesheet' href='css/pygment_trac.css'>

    <style>
      article {
        position: relative;
        padding: 0.5em;
        background-color: rgba(255, 255, 255, 0.90);
        margin-bottom: 1em;
        border-radius: 3px;
      }

      article h3 {
        font-size: 1.0em;
        margin-top: 0px;
        margin-bottom: 0px;
      }

      article h3::before {
        display: inline-block;
        content: attr(data-index) ' - ';
        font-weight: bold;
        white-space: nowrap;
        margin-right: 0.2em;
      }

      article h4 {
        position: absolute;
        right: 0.5em;
        top: 0.5em;
        margin-top: 0px;
        margin-bottom: 0px;
      }

      article p {
        margin: 0.5em;
      }

      article .links {
        margin-left: 0.5em;
        margin-right: 0.5em;
      }

      article a {
        display: inline-block;
      }

      article a:not(:first-child)::before {
        display: inline-block;
        content: '•';
        font-weight: bold;
        white-space: nowrap;
        margin-left: 0.5em;
        margin-right: 0.5em;
      }

      .github-link {
        font-size: 0.8em;
      }
    </style>

    <!--[if lt IE 9]>
    <script src='https://html5shiv.googlecode.com/svn/trunk/html5.js'></script>
    <![endif]-->
    <title>WebXR - Samples</title>
  </head>
  <body>

    <div class='container' id='container'>
        <h1><a href='' class='wordmark'><span>WebXR Samples for Chrome</span></a></h1>
      </header>

      <main class='main' id='main'>
        <p>
          <b><em>THESE SAMPLES ARE DEPRECATED - DO NOT USE WITH CHROME 78+</b></em>
          <br/>
           For Chrome 78 and later, please use <a href="https://immersive-web.github.io/webxr-samples">these samples</a>, maintained by the Immersive Web Working Group.
        </p>

        <script>
          let pages = [
            { title: 'Barebones', category: 'Basics',
              path: 'xr-barebones.html',
              description: 'Extremely simple use of WebXR with no library dependencies. Doesn\'t render anything exciting.' },

            { title: 'Magic Window', category: 'Basics',
              path: 'magic-window.html',
              description: 'Demonstrates use of a non-exclusive XRSession to present "Magic Window" content.' },

            { title: 'Teleportation', category: 'Spatial Tracking, Input',
              path: 'teleportation.html',
              description: 'Demonstrates teleporting the viewer by updating the XRSession reference space.' },

            { title: 'Gamepad', category: 'Input',
              path: 'gamepad.html',
              description: 'Demonstrates handling input from Gamepads attached to XRInputSources.' }
          ];

          let mainElement = document.getElementById("main");

          // Append an element for every item in the pages list.
          let tag_count = 0;
          for (var i = 0; i < pages.length; ++i) {
            var page = pages[i];

            if (page.tag) {
              tag_count++;
              mainElement.appendChild(document.createElement(page.tag));
              continue;
            }

            let article = document.createElement('article');

            let title = document.createElement('h3');
            title.setAttribute('data-index', i + 1 - tag_count);

            let titleLink = document.createElement('a');
            titleLink.href = page.path;
            titleLink.innerHTML = page.title;
            title.appendChild(titleLink);
            article.appendChild(title);

            let category = document.createElement('h4');
            category.innerHTML = page.category;
            article.appendChild(category);

            let description = document.createElement('p');
            description.innerHTML = page.description;
            article.appendChild(description);

            let links = document.createElement('div');
            links.classList.add('links');

            let liveLink = document.createElement('a');
            liveLink.href = page.path;
            liveLink.innerHTML = 'Open';
            links.appendChild(liveLink);

            let polyfillLink = document.createElement('a');
            polyfillLink.href = page.path + '?allowPolyfill=1';
            polyfillLink.innerHTML = 'Open with Polyfill';
            links.appendChild(polyfillLink);

            article.appendChild(links);

            mainElement.appendChild(article);
          }
        </script>
      </main>

      <p>Models used in these samples come from <a href="https://poly.google.com">Poly</a>, and many were modeled in <a href="https://vr.google.com/blocks/">Blocks</a>.<br/>
      They are stored and loaded using the <a href="https://www.khronos.org/gltf/">glTF 2.0 format</a>.<br/>
      Attribution for individual models can be found <a href="attribution.html">here</a>.</p>

      <p>To host these samples locally:<br></p>
      <ol>
        <li>Download and unzip <a href="source.zip">source</a></li>
        <li>Download and unzip <a href="../media.zip">media</a> to a subfolder in your local source.</li>
        <li>Run a command in your local source directory, such as "python -m SimpleHTTPServer"</li>
      </ol>

      <footer class='footer'>
      </footer>
    </div>
  </body>
</html>