Sfoglia il codice sorgente

修复子模块路径引用问题

rindy 6 anni fa
parent
commit
a4b94e6166
5 ha cambiato i file con 30 aggiunte e 17 eliminazioni
  1. 5 5
      index.html
  2. 22 9
      package-lock.json
  3. 1 1
      src/System/ResourceSystem.ts
  4. 1 1
      src/System/ScenesSystem.ts
  5. 1 1
      webpack.config.js

+ 5 - 5
index.html

@@ -7,11 +7,11 @@
     <meta name="apple-mobile-web-app-capable" content="yes">
     <meta name="browsermode" content="application">
     <meta name="full-screen" content="yes">
-    <script src="libs/TweenMax.min.js"></script>
-    <script src="libs/threejs/three.min.js"></script>
-    <script src="libs/threejs/OrbitControls.js"></script>
-    <script src="libs/threejs/stats.min.js"></script>
-    <script src="libs/threejs/draco/DRACOLoader.js"></script>
+    <script src="static/libs/TweenMax.min.js"></script>
+    <script src="static/libs/threejs/three.min.js"></script>
+    <script src="static/libs/threejs/OrbitControls.js"></script>
+    <script src="static/libs/threejs/stats.min.js"></script>
+    <script src="static/libs/threejs/draco/DRACOLoader.js"></script>
     <style>
         html,
         body,

+ 22 - 9
package-lock.json

@@ -1181,8 +1181,7 @@
     "core-js": {
       "version": "2.6.3",
       "resolved": "http://registry.npm.taobao.org/core-js/download/core-js-2.6.3.tgz",
-      "integrity": "sha1-S3CTi9/9r2STHmbi2xWPCJIonEk=",
-      "dev": true
+      "integrity": "sha1-S3CTi9/9r2STHmbi2xWPCJIonEk="
     },
     "core-util-is": {
       "version": "1.0.2",
@@ -2154,12 +2153,14 @@
         "balanced-match": {
           "version": "1.0.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -2174,17 +2175,20 @@
         "code-point-at": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "concat-map": {
           "version": "0.0.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "console-control-strings": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -2301,7 +2305,8 @@
         "inherits": {
           "version": "2.0.3",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "ini": {
           "version": "1.3.5",
@@ -2313,6 +2318,7 @@
           "version": "1.0.0",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -2327,6 +2333,7 @@
           "version": "3.0.4",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
@@ -2334,12 +2341,14 @@
         "minimist": {
           "version": "0.0.8",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "minipass": {
           "version": "2.3.5",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.2",
             "yallist": "^3.0.0"
@@ -2358,6 +2367,7 @@
           "version": "0.5.1",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -2438,7 +2448,8 @@
         "number-is-nan": {
           "version": "1.0.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -2450,6 +2461,7 @@
           "version": "1.4.0",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -2571,6 +2583,7 @@
           "version": "1.0.2",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",

+ 1 - 1
src/System/ResourceSystem.ts

@@ -43,7 +43,7 @@ class ResourceSystem extends SystemBase {
         p.style.width = '0'
         d.appendChild(p)
 
-        this.worker = new Worker('workers/loaders.js')
+        this.worker = new Worker('static/workers/loaders.js')
         this.worker.onmessage = e => {
             switch (e.data.cmd) {
                 case 'progress':

+ 1 - 1
src/System/ScenesSystem.ts

@@ -44,7 +44,7 @@ class ScenesSystem extends SystemBase {
         window['orb'] = new THREE.OrbitControls(this.camera, this.renderer.domElement);
 
         this.scene.background = new THREE.CubeTextureLoader()
-            .setPath('skybox/')
+            .setPath('static/skybox/')
             .load([
                 'px.jpg',
                 'nx.jpg',

+ 1 - 1
webpack.config.js

@@ -46,7 +46,7 @@ module.exports = {
         new CopyWebpackPlugin([
         {
             from: path.resolve(__dirname, 'static'),
-            to: path.resolve(__dirname, 'dist'),
+            to: path.resolve(__dirname, 'dist','static'),
             ignore: ['.*']
         }])
     ]