Przeglądaj źródła

Editor: ServiceWorker clean up.

Mr.doob 5 lat temu
rodzic
commit
473315fb42
1 zmienionych plików z 7 dodań i 3 usunięć
  1. 7 3
      editor/sw.js

+ 7 - 3
editor/sw.js

@@ -1,13 +1,12 @@
 // r108
 
-const staticAssets = [
+const assets = [
 	'./',
 
 	'../files/favicon.ico',
 
 	'../build/three.js',
 
-	'../examples/js/controls/EditorControls.js',
 	'../examples/js/controls/TransformControls.js',
 
 	'../examples/js/libs/chevrotain.min.js',
@@ -42,6 +41,9 @@ const staticAssets = [
 	'../examples/js/renderers/SoftwareRenderer.js',
 	'../examples/js/renderers/SVGRenderer.js',
 
+	'./manifest.json',
+	'./images/icon.png',
+
 	'./js/libs/codemirror/codemirror.css',
 	'./js/libs/codemirror/theme/monokai.css',
 
@@ -92,6 +94,7 @@ const staticAssets = [
 	'./css/dark.css',
 	'./css/light.css',
 
+	'./js/EditorControls.js',
 	'./js/Storage.js',
 
 	'./js/Editor.js',
@@ -122,6 +125,7 @@ const staticAssets = [
 	'./js/Sidebar.Geometry.BoxGeometry.js',
 	'./js/Sidebar.Geometry.CircleGeometry.js',
 	'./js/Sidebar.Geometry.CylinderGeometry.js',
+	'./js/Sidebar.Geometry.DodecahedronGeometry.js',
 	'./js/Sidebar.Geometry.ExtrudeGeometry.js',
 	'./js/Sidebar.Geometry.IcosahedronGeometry.js',
 	'./js/Sidebar.Geometry.OctahedronGeometry.js',
@@ -183,7 +187,7 @@ self.addEventListener( 'install', async function () {
 
 	const cache = await caches.open( 'threejs-editor' );
 
-	staticAssets.forEach( function ( asset ) {
+	assets.forEach( function ( asset ) {
 
 		cache.add( asset ).catch( function () {