Added some missing html5 boilerplate and service worker.

This commit is contained in:
Michael Mainguy 2023-08-17 13:37:55 -05:00
parent c383b57cb4
commit 3b0ab4cfa1
18 changed files with 109 additions and 7 deletions

View File

@ -36,6 +36,13 @@
</style>
<link as="script" href="/newRelic.js" rel="preload">
<script src="/newRelic.js"></script>
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="An immersive vr diagramming experience based on a-frame and webxr" name="description">
<link href="/assets/favicon-16x16.png" rel=icon sizes="16x16" type="image/png">
<link href="/assets/favicon-32x32.png" rel=icon sizes="32x32" type="image/png">
<link href="/assets/favicon-96x96.png" rel=icon sizes="96x96" type="image/png">
<link href="/manifest.webmanifest" rel="manifest"/>
</head>
<body>
<div class="loader" id="loader">Loading...</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 5.5 MiB

View File

@ -0,0 +1,49 @@
{
"name": "Deep Diagram",
"display": "standalone",
"start_url": "https://deepdiagram.com",
"scope": "https://deepdiagram.com",
"short_name": "Deep Diagram",
"theme_color": "#000000",
"background_color": "#000000",
"description": "Immersive diagraming tool to dig into deeper meaning behind your ideas",
"icons": [
{
"src": "/assets/android-icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/assets/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"categories": [
"utilities",
"business",
"education",
"productivity"
],
"screenshots": [
{
"src": "/assets/com.oculus.browser-20230121-110512.jpg",
"sizes": "1024x1024",
"type": "image/jpeg",
"label": "Example 1"
},
{
"src": "/assets/com.oculus.browser-20230121-110746.jpg",
"sizes": "1024x1024",
"type": "image/jpeg",
"label": "Example 2"
},
{
"src": "/assets/com.oculus.browser-20230121-111323.jpg",
"sizes": "1024x1024",
"type": "image/jpeg",
"label": "Complex Architecture Diagram"
}
]
}

46
public/sw.js Normal file
View File

@ -0,0 +1,46 @@
const VERSION = '0';
const CACHE = "pwabuilder-offline";
const PRECACHE_ASSETS = [
'/grass1.jpeg',
'/loading-loading-forever.gif',
'/outdoor_field2.jpeg'
]
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.4.1/workbox-sw.js');
self.addEventListener("message", (event) => {
if (event.data && event.data.type === "SKIP_WAITING") {
self.skipWaiting();
}
});
workbox.routing.registerRoute(
new RegExp('/.*\\.png'),
new workbox.strategies.StaleWhileRevalidate({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.jpeg'),
new workbox.strategies.StaleWhileRevalidate({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.jpg'),
new workbox.strategies.StaleWhileRevalidate({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.glb'),
new workbox.strategies.StaleWhileRevalidate({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/login'),
new workbox.strategies.NetworkFirst()
)

View File

@ -29,7 +29,7 @@ export class CustomEnvironment {
this._groundMeshObservable.notifyObservers(ground);
});
const photo = new PhotoDome('sky',
'./outdoor_field2.jpeg', {},
'/assets/textures/outdoor_field2.jpeg', {},
scene);
}
@ -41,7 +41,7 @@ export class CustomEnvironment {
private createGround() {
const scene = this.scene;
const groundMaterial = new PBRMetallicRoughnessMaterial("groundMaterial", scene);
const gText = new Texture("./grass1.jpeg", scene);
const gText = new Texture("/assets/textures/grass1.jpeg", scene);
gText.uScale = 40;
gText.vScale = 40;
groundMaterial.baseTexture = gText;

View File

@ -5,25 +5,25 @@ export class DiaSounds {
constructor(scene: Scene) {
this.scene = scene;
this._enter = new Sound("enter", "./sounds.mp3", this.scene, null, {
this._enter = new Sound("enter", "/assets/sounds/sounds.mp3", this.scene, null, {
autoplay: false,
loop: false,
offset: 0,
length: 1.0
});
this._exit = new Sound("exit", "./sounds.mp3", this.scene, null, {
this._exit = new Sound("exit", "/assets/sounds/sounds.mp3", this.scene, null, {
autoplay: false,
loop: false,
offset: 1,
length: 1.0
});
this._high = new Sound("high", "./sounds.mp3", this.scene, null, {
this._high = new Sound("high", "/assets/sounds/sounds.mp3", this.scene, null, {
autoplay: false,
loop: false,
offset: 2,
length: 1.0
});
this._low = new Sound("low", "./sounds.mp3", this.scene, null, {
this._low = new Sound("low", "/assets/sounds/sounds.mp3", this.scene, null, {
autoplay: false,
loop: false,
offset: 3,
@ -40,7 +40,7 @@ export class DiaSounds {
}
public get tick() {
return new Sound("tick", './tick.mp3', this.scene);
return new Sound("tick", '/assets/sounds/tick.mp3', this.scene);
}
private readonly _enter: Sound;