#
luxiaotao1123
2021-12-13 1df29b623eb9d49091303db4c611fc4568db70b1
static/js/app.js
@@ -29,6 +29,7 @@
         this.initLight();
         this.initFloor();
         this.initModel();
         this.queryTask();
         this.initStoreObjects(this);
      }
      this.animate = function () {
@@ -56,7 +57,7 @@
         // this.camera.position.z = 600;
         // //相机的朝向
         // this.camera.lookAt(0, 0, 0);
         this.camera.position.set( - 550, 2070, 4550 );
         this.camera.position.set( - 350, 1070, 1550 );
         this.camera.lookAt( this.scene.position );
         //将相机放到场景中
         this.scene.add(this.camera);
@@ -185,6 +186,7 @@
            initStore();
            if (Store3DData !== null) {
               for(var group of Store3DData.data.store.groups) {
                  let crn = new StoreCrn(group.crn, object);
                  for (var line of group.lines) {
                     let shelf = new StoreShelf(line);
                     object.addObject(shelf);
@@ -254,8 +256,14 @@
               //
               //    }
               // }
               this.firstTime = 0;
               // this.firstTime = 0;
            }
         }
      }
      this.queryTask = function () {
         if (this.firstTime === 1) {
            queryTaskCurrent();
            console.log(TaskData);
         }
      }
      this.getExistedGoodType=function(state){
@@ -301,11 +309,11 @@
                  .setMaterials( materials )
                  .setPath( '../static/model/obj/' )
                  .load( '货叉.obj', function ( object ) {
                     // object.position.z = -500;
                     // object.position.x = -2060;
                     object.position.z = 0;
                     object.position.x = 0;
                     object.position.y = 0;
                     object.position.z = -500;
                     object.position.x = -2060;
                     // object.position.z = 0;
                     // object.position.x = 0;
                     // object.position.y = 0;
                     object.scale.set(0.025, 0.025, 0.025);
                     object.rotateY(- Math.PI / 2)
                     that.addObject( object );