diff --git a/index.html b/index.html index 2cda377..819aa4d 100644 --- a/index.html +++ b/index.html @@ -36,6 +36,13 @@ + + + + + + +
Loading...
diff --git a/public/assets/android-icon-192x192.png b/public/assets/android-icon-192x192.png new file mode 100644 index 0000000..10675b4 Binary files /dev/null and b/public/assets/android-icon-192x192.png differ diff --git a/public/assets/com.oculus.browser-20230121-110512.jpg b/public/assets/com.oculus.browser-20230121-110512.jpg new file mode 100644 index 0000000..5def3b8 Binary files /dev/null and b/public/assets/com.oculus.browser-20230121-110512.jpg differ diff --git a/public/assets/com.oculus.browser-20230121-110746.jpg b/public/assets/com.oculus.browser-20230121-110746.jpg new file mode 100644 index 0000000..c100c64 Binary files /dev/null and b/public/assets/com.oculus.browser-20230121-110746.jpg differ diff --git a/public/assets/com.oculus.browser-20230121-111323.jpg b/public/assets/com.oculus.browser-20230121-111323.jpg new file mode 100644 index 0000000..f1d6f36 Binary files /dev/null and b/public/assets/com.oculus.browser-20230121-111323.jpg differ diff --git a/public/assets/favicon-16x16.png b/public/assets/favicon-16x16.png new file mode 100644 index 0000000..67b42c7 Binary files /dev/null and b/public/assets/favicon-16x16.png differ diff --git a/public/assets/favicon-32x32.png b/public/assets/favicon-32x32.png new file mode 100644 index 0000000..829e0c4 Binary files /dev/null and b/public/assets/favicon-32x32.png differ diff --git a/public/assets/favicon-96x96.png b/public/assets/favicon-96x96.png new file mode 100644 index 0000000..0f83304 Binary files /dev/null and b/public/assets/favicon-96x96.png differ diff --git a/public/assets/icon-512x512.png b/public/assets/icon-512x512.png new file mode 100644 index 0000000..9fb992b Binary files /dev/null and b/public/assets/icon-512x512.png differ diff --git a/public/assets/sounds/birds.mp3 b/public/assets/sounds/birds.mp3 new file mode 100644 index 0000000..6e3a595 Binary files /dev/null and b/public/assets/sounds/birds.mp3 differ diff --git a/public/sounds.mp3 b/public/assets/sounds/sounds.mp3 similarity index 100% rename from public/sounds.mp3 rename to public/assets/sounds/sounds.mp3 diff --git a/public/tick.mp3 b/public/assets/sounds/tick.mp3 similarity index 100% rename from public/tick.mp3 rename to public/assets/sounds/tick.mp3 diff --git a/public/grass1.jpeg b/public/assets/textures/grass1.jpeg similarity index 100% rename from public/grass1.jpeg rename to public/assets/textures/grass1.jpeg diff --git a/public/outdoor_field2.jpeg b/public/assets/textures/outdoor_field2.jpeg similarity index 100% rename from public/outdoor_field2.jpeg rename to public/assets/textures/outdoor_field2.jpeg diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest new file mode 100644 index 0000000..f2e5d2b --- /dev/null +++ b/public/manifest.webmanifest @@ -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" + } + ] +} \ No newline at end of file diff --git a/public/sw.js b/public/sw.js new file mode 100644 index 0000000..5ec3ffe --- /dev/null +++ b/public/sw.js @@ -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() +) \ No newline at end of file diff --git a/src/util/customEnvironment.ts b/src/util/customEnvironment.ts index 1ac9792..97429a8 100644 --- a/src/util/customEnvironment.ts +++ b/src/util/customEnvironment.ts @@ -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; diff --git a/src/util/diaSounds.ts b/src/util/diaSounds.ts index 9f58b44..a4381c0 100644 --- a/src/util/diaSounds.ts +++ b/src/util/diaSounds.ts @@ -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;