Skip to content

Commit

Permalink
Add docs directory for built examples (for github pages)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickw1 committed Oct 27, 2024
1 parent 58de92d commit 7e4a056
Show file tree
Hide file tree
Showing 7 changed files with 3,891 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/01-helloworld/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>three.js</title>
<script type="module" crossorigin src="/assets/01-helloworld-B_XJysGc.js"></script>
<link rel="modulepreload" crossorigin href="/assets/locar.es-K2XRG_mr.js">
</head>
<body>
</body>
</html>
10 changes: 10 additions & 0 deletions docs/02-gps-and-sensors/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>three.js</title>
<script type="module" crossorigin src="/assets/02-gps-and-sensors-Bz5hD0d7.js"></script>
<link rel="modulepreload" crossorigin href="/assets/locar.es-K2XRG_mr.js">
</head>
<body>
</body>
</html>
1 change: 1 addition & 0 deletions docs/assets/01-helloworld-B_XJysGc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/assets/02-gps-and-sensors-Bz5hD0d7.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3,841 changes: 3,841 additions & 0 deletions docs/assets/locar.es-K2XRG_mr.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Examples</title>
</head>
<body>
<ol>
<li><a href='01-helloworld/index.html'>Hello World</a>: Display a red cube just to the north of a fake GPS location. Can be tested on a desktop or laptop.</li>
<li><a href='02-gps-and-sensors/index.html'>GPS and Sensors</a>: Requires a mobile device wih GPS and sensors. Demonstrates use of the GPS and the device sensors to show real AR. Gets your initial location and displays four coloured boxes to the north (red), south (yellow), west (blue) and east (green) of your initial location. Can be used as a test to check whether your device sensors are accurate; if the red box does not appear to the North, your device sensors may be mis-calibrated.</li>
</ol>
</body>
</html>
16 changes: 16 additions & 0 deletions examples/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from 'vite';
import { resolve } from 'path';

const entries = { main: 'index.html' };
['01-helloworld', '02-gps-and-sensors'].forEach ( example => {
entries[example] = resolve(__dirname, `${example}/index.html`);
});

export default defineConfig({
build: {
outDir: '../docs',
rollupOptions: {
input: entries
}
}
});

0 comments on commit 7e4a056

Please sign in to comment.