From 809e230e2a6a2e586df8788946fe98be81459361 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 17 十二月 2021 16:10:23 +0800
Subject: [PATCH] #

---
 static/js/app.js               |   11 +++++------
 static/img/skybox/ny.jpg       |    0 
 static/img/skybox/nx.jpg       |    0 
 static/img/skybox/nz.jpg       |    0 
 static/js/object/StoreShelf.js |    4 ++--
 static/img/skybox/pz.jpg       |    0 
 static/img/skybox/py.jpg       |    0 
 static/js/object/StoreCrn.js   |   25 +++++++++++++++++++++++++
 static/img/skybox/px.jpg       |    0 
 9 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/static/img/skybox/nx.jpg b/static/img/skybox/nx.jpg
new file mode 100644
index 0000000..a8e8010
--- /dev/null
+++ b/static/img/skybox/nx.jpg
Binary files differ
diff --git a/static/img/skybox/ny.jpg b/static/img/skybox/ny.jpg
new file mode 100644
index 0000000..3f81962
--- /dev/null
+++ b/static/img/skybox/ny.jpg
Binary files differ
diff --git a/static/img/skybox/nz.jpg b/static/img/skybox/nz.jpg
new file mode 100644
index 0000000..abb1e66
--- /dev/null
+++ b/static/img/skybox/nz.jpg
Binary files differ
diff --git a/static/img/skybox/px.jpg b/static/img/skybox/px.jpg
new file mode 100644
index 0000000..0f624cd
--- /dev/null
+++ b/static/img/skybox/px.jpg
Binary files differ
diff --git a/static/img/skybox/py.jpg b/static/img/skybox/py.jpg
new file mode 100644
index 0000000..0a26217
--- /dev/null
+++ b/static/img/skybox/py.jpg
Binary files differ
diff --git a/static/img/skybox/pz.jpg b/static/img/skybox/pz.jpg
new file mode 100644
index 0000000..0ef5d7e
--- /dev/null
+++ b/static/img/skybox/pz.jpg
Binary files differ
diff --git a/static/js/app.js b/static/js/app.js
index 6e67ec9..af80b15 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -16,7 +16,6 @@
 		this.firstTime = 1;
 		this.stats = null;
 		this.goodTypes=[];//瀛樺偍鎵�鏈夌殑搴撲綅绫诲瀷
-		this.wrkTasks = [];// 浠诲姟鍒楄〃
 		this.crnTasks = [];// 鍫嗗灈鏈哄垪琛�
 		this.time = 0;//鏍囪鍫嗗灈鏈鸿繍琛岀殑鏃堕棿
 		this.progress = 0;
@@ -132,13 +131,13 @@
 		}
 		this.initBackground = function () {
 			const cubeTextureLoader = new THREE.CubeTextureLoader();
-			cubeTextureLoader.setPath( '../static/img/background/' );
+			cubeTextureLoader.setPath( '../static/img/skybox/' );
 			this.scene.background = cubeTextureLoader.load([
-				"posx.jpg", "negx.jpg",
-				"posy.jpg", "negy.jpg",
-				"posz.jpg", "negz.jpg"
+				"px.jpg", "nx.jpg",
+				"py.jpg", "ny.jpg",
+				"pz.jpg", "nz.jpg"
 			]);
-			this.scene.background = new THREE.Color( 0xf0f0f0 );
+			// this.scene.background = new THREE.Color( 0xf0f0f0 );
 		}
 		this.initReSize = function(object){
 			window.addEventListener('resize', function () {
diff --git a/static/js/object/StoreCrn.js b/static/js/object/StoreCrn.js
index f7751a3..17c4c22 100644
--- a/static/js/object/StoreCrn.js
+++ b/static/js/object/StoreCrn.js
@@ -1,5 +1,6 @@
 import {MTLLoader} from "../lib/MTLLoader.js";
 import {OBJLoader} from "../lib/OBJLoader.js";
+import {Color} from "../three.module.js";
 
 const xOffset = -1735;
 const yOffset = -289;
@@ -69,6 +70,14 @@
                 .setMaterials( materials )
                 .setPath( '../static/model/obj/' )
                 .load( '鍫嗗灈鏈烘湰浣�.obj', function ( obj ) {
+                    obj.traverse (function (child) {
+                        if (child instanceof THREE.Mesh) {
+                            child.material = new THREE.MeshLambertMaterial({
+                                color: 0xCD6839
+                            });
+                        }
+                    });
+
                     obj.scale.set(0.03, 0.03, 0.03);
                     obj.rotateY(- Math.PI / 2);
                     obj.name = option.crnNo + "-body";
@@ -86,6 +95,14 @@
                 .setMaterials( materials )
                 .setPath( '../static/model/obj/' )
                 .load( '杞借揣鍙�.obj', function ( obj ) {
+                    obj.traverse (function (child) {
+                        if (child instanceof THREE.Mesh) {
+                            child.material = new THREE.MeshLambertMaterial({
+                                color: 0xD2691E
+                            });
+                        }
+                    });
+
                     obj.scale.set(0.03, 0.03, 0.03);
                     obj.rotateY(- Math.PI / 2);
                     obj.name = option.crnNo + "-load";
@@ -103,6 +120,14 @@
                 .setMaterials( materials )
                 .setPath( '../static/model/obj/' )
                 .load( '璐у弶.obj', function ( obj ) {
+                    obj.traverse (function (child) {
+                        if (child instanceof THREE.Mesh) {
+                            child.material = new THREE.MeshLambertMaterial({
+                                color: 0x363636
+                            });
+                        }
+                    });
+
                     obj.scale.set(0.03, 0.03, 0.03);
                     obj.rotateY(- Math.PI / 2);
                     obj.name = option.crnNo + "-fork";
diff --git a/static/js/object/StoreShelf.js b/static/js/object/StoreShelf.js
index 63262ba..fcf42b0 100644
--- a/static/js/object/StoreShelf.js
+++ b/static/js/object/StoreShelf.js
@@ -18,8 +18,8 @@
     let shelfMat = new THREE.MeshLambertMaterial({
         color: 0x175EC0,
         transparent: true,
-        opacity: .6
-    });//瀹氫箟鏀灦鍜屾墭鐩樼殑鏉愯川
+        opacity: 0.6
+    });
     //瀹氫箟涓�涓粍鍚堜綋
     let group = new THREE.Group();
 

--
Gitblit v1.9.1