From ce9da384d05f0b6b50aeeb5c3a00e53694695976 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期六, 25 十二月 2021 16:23:52 +0800 Subject: [PATCH] # --- static/js/app.js | 5 static/js/data/Asrs.js | 1318 +++++++++++++++++++++++++++++ static/js/data/ConveyData.js | 1238 ++++++++++++++++++++++++++- static/js/object/Cube.js | 1 views/index.html | 6 static/js/object/StoreConvey.js | 32 static/js/object/StoreShelf.js | 6 static/js/data/BuildingData.js | 8 8 files changed, 2,524 insertions(+), 90 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 4c26fdd..7b05551 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -30,7 +30,7 @@ this.direction = new THREE.Vector3(); this.raycaster = null; this.prevTime = performance.now();//涓婁竴娆ender鐨勬椂闂� - this.backgroundType = false; + this.backgroundType = true; this.start = function () { this.initMain(); @@ -201,7 +201,7 @@ } this.initPointLockControl = function(object){ this.controls = new PointerLockControls( this.camera, document.body ); - this.raycaster = new THREE.Raycaster( new THREE.Vector3(), new THREE.Vector3( 0, - 1, 0 ), 0, 10 ); + this.raycaster = new THREE.Raycaster( new THREE.Vector3(), new THREE.Vector3( 0, - 1, 0 ), 0, 50 ); const onKeyDown = function ( event ) { switch ( event.code ) { @@ -379,7 +379,6 @@ this.crnTasks.push(new CrnTask(crnData, this)); } else { if(!crnTask.run) { - // console.log(2) crnTask.modify(crnData); } } diff --git a/static/js/data/Asrs.js b/static/js/data/Asrs.js index 93ffe5b..758a28b 100644 --- a/static/js/data/Asrs.js +++ b/static/js/data/Asrs.js @@ -21,16 +21,1314 @@ var Store3DData; function initStore() { - $.ajax({ - // url: 'http://47.97.1.152:58080/jkwcs/three/init/store/v1', - url: 'http://localhost:9090/jkwcs/three/init/store/v1', - type: "POST", - data: {}, - // async: false, - success: function (res) { - Store3DData = res; - } - }) + // $.ajax({ + // // url: 'http://47.97.1.152:58080/jkwcs/three/init/store/v1', + // url: 'http://localhost:9090/jkwcs/three/init/store/v1', + // type: "POST", + // data: {}, + // // async: false, + // success: function (res) { + // Store3DData = res; + // } + // }) + Store3DData = { + "msg": "鎿嶄綔鎴愬姛", + "code": 200, + "data": { + "store": { + "totalBinNum": 48576, + "totalRowNum": 48, + "totalBayNum": 92, + "totalLevNum": 11, + "groups": [ + { + "crnNo": 1, + "binNum": 4048, + "rowNum": 4, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 1, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 101, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 101, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 101, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 1, + "name": null, + "position": { + "x": 17, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 2, + "name": null, + "position": { + "x": 57, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 3, + "name": null, + "position": { + "x": 147, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 4, + "name": null, + "position": { + "x": 187, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 2, + "binNum": 4048, + "rowNum": 8, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 2, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 331, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 331, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 331, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 5, + "name": null, + "position": { + "x": 247, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 6, + "name": null, + "position": { + "x": 287, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 7, + "name": null, + "position": { + "x": 377, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 8, + "name": null, + "position": { + "x": 417, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 3, + "binNum": 4048, + "rowNum": 12, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 3, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 561, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 561, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 561, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 9, + "name": null, + "position": { + "x": 477, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 10, + "name": null, + "position": { + "x": 517, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 11, + "name": null, + "position": { + "x": 607, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 12, + "name": null, + "position": { + "x": 647, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 4, + "binNum": 4048, + "rowNum": 16, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 4, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 791, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 791, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 791, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 13, + "name": null, + "position": { + "x": 707, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 14, + "name": null, + "position": { + "x": 747, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 15, + "name": null, + "position": { + "x": 837, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 16, + "name": null, + "position": { + "x": 877, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 5, + "binNum": 4048, + "rowNum": 20, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 5, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 1021, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 1021, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 1021, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 17, + "name": null, + "position": { + "x": 937, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 18, + "name": null, + "position": { + "x": 977, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 19, + "name": null, + "position": { + "x": 1067, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 20, + "name": null, + "position": { + "x": 1107, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 6, + "binNum": 4048, + "rowNum": 24, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 6, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 1251, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 1251, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 1251, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 21, + "name": null, + "position": { + "x": 1167, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 22, + "name": null, + "position": { + "x": 1207, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 23, + "name": null, + "position": { + "x": 1297, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 24, + "name": null, + "position": { + "x": 1337, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 7, + "binNum": 4048, + "rowNum": 28, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 7, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 1481, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 1481, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 1481, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 25, + "name": null, + "position": { + "x": 1397, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 26, + "name": null, + "position": { + "x": 1437, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 27, + "name": null, + "position": { + "x": 1527, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 28, + "name": null, + "position": { + "x": 1567, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 8, + "binNum": 4048, + "rowNum": 32, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 8, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 1711, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 1711, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 1711, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 29, + "name": null, + "position": { + "x": 1627, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 30, + "name": null, + "position": { + "x": 1667, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 31, + "name": null, + "position": { + "x": 1757, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 32, + "name": null, + "position": { + "x": 1797, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 9, + "binNum": 4048, + "rowNum": 36, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 9, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 1941, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 1941, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 1941, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 33, + "name": null, + "position": { + "x": 1857, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 34, + "name": null, + "position": { + "x": 1897, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 35, + "name": null, + "position": { + "x": 1987, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 36, + "name": null, + "position": { + "x": 2027, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 10, + "binNum": 4048, + "rowNum": 40, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 10, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 2171, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 2171, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 2171, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 37, + "name": null, + "position": { + "x": 2087, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 38, + "name": null, + "position": { + "x": 2127, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 39, + "name": null, + "position": { + "x": 2217, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 40, + "name": null, + "position": { + "x": 2257, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 11, + "binNum": 4048, + "rowNum": 44, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 11, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 2401, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 2401, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 2401, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 41, + "name": null, + "position": { + "x": 2317, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 42, + "name": null, + "position": { + "x": 2357, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 43, + "name": null, + "position": { + "x": 2447, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 44, + "name": null, + "position": { + "x": 2487, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + }, + { + "crnNo": 12, + "binNum": 4048, + "rowNum": 48, + "bayNum": 2, + "levNum": 11, + "length": null, + "width": null, + "height": null, + "crn": { + "crnNo": 12, + "crnBody": { + "length": null, + "width": null, + "height": 570, + "position": { + "x": 2631, + "y": 0, + "z": 0 + } + }, + "crnLoad": { + "position": { + "x": 2631, + "y": 0, + "z": 0 + } + }, + "crnFork": { + "position": { + "x": 2631, + "y": 0, + "z": 0 + } + } + }, + "lines": [ + { + "rowNo": 45, + "name": null, + "position": { + "x": 2547, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 46, + "name": null, + "position": { + "x": 2587, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 47, + "name": null, + "position": { + "x": 2677, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + }, + { + "rowNo": 48, + "name": null, + "position": { + "x": 2717, + "y": 0, + "z": 0 + }, + "binLength": 35, + "binWidth": 50, + "binHeight": 50, + "binXNum": null, + "binYNum": 11, + "binZNum": 2, + "bottomHeight": 20, + "bins": null + } + ] + } + ] + } + } + } } diff --git a/static/js/data/BuildingData.js b/static/js/data/BuildingData.js index 8fe596a..4cd7a0c 100644 --- a/static/js/data/BuildingData.js +++ b/static/js/data/BuildingData.js @@ -3,13 +3,13 @@ { objectName: 'floor', objectType: 'cube', - length: 2750, - width: 800, + length: 4000, + width: 6000, height: 1, position: { - x: 1375, + x: 1400, y: 0, - z: 400 + z: -2000 }, style:{ color: 0x5F7480, diff --git a/static/js/data/ConveyData.js b/static/js/data/ConveyData.js index 6c089ef..d0415fa 100644 --- a/static/js/data/ConveyData.js +++ b/static/js/data/ConveyData.js @@ -1,92 +1,1216 @@ let conveyObjects = { objects: [ + // 閾炬潯杈撻�佹満 1F 绗�1鍒� -------------------------------------------------------------------------------------------- { no: '1', objectType: 'chain', position: { - x: 110, - y: 0, - z: 220 + x: 48 + 57, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 146, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 287, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 376, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 517, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 606, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 747, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 836, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 977, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1066, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1207, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1296, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1437, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1526, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1667, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1756, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1897, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1986, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2127, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2216, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2357, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2446, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2587, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2676, + z: 138 + 68 + } + }, + // 閾炬潯杈撻�佹満 1F 绗�2鍒� -------------------------------------------------------------------------------------------- + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 57, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 146, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 287, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 376, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 517, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 606, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 747, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 836, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 977, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1066, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1207, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1296, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1437, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1526, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1667, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1756, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1897, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1986, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2127, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2216, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2357, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2446, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2587, + z: 138 + 188 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2676, + z: 138 + 188 + } + }, + // 閾炬潯杈撻�佹満 1F 绗�3鍒� -------------------------------------------------------------------------------------------- + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 146, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 287, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 517, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 836, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 977, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1296, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1526, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1756, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1897, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2127, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2216, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2357, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2446, + z: 138 + 308 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2587, + z: 138 + 308 + } + }, + // 閾炬潯杈撻�佹満 2F 绗�1鍒� -------------------------------------------------------------------------------------------- + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 146, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 287, + y: 310, + z: 138 + 68 + } + }, + + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 606, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 747, + y: 310, + z: 138 + 68 + } + }, + + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1066, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1207, + y: 310, + z: 138 + 68 + } + }, + + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1526, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1667, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1897, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 1986, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2127, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2216, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2357, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2446, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2587, + y: 310, + z: 138 + 68 + } + }, + { + no: '1', + objectType: 'chain', + position: { + x: 48 + 2676, + y: 310, + z: 138 + 68 + } + }, + // 婊氱瓛杈撻�佹満 1F 绗�1鍒� -------------------------------------------------------------------------------------------- + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 100, + z: 27 + 221 }, - rotateY: 0, traverse: { scale: { - x: 1, - y: 1, - z: 1 + x: 0.8 } } }, { - no: '2', - objectType: 'chain', - position: { - x: 0, - y: 0, - z: 0 - }, - rotateY: Math.PI/2, - traverse: { - scale: { - x: 2, - y: 2, - z: 2 - }, - color: 0x5F7480, - } - }, - { - no: '3', + no: '1', objectType: 'roller', position: { - x: 210, - y: 10, - z: 120 + x: -2 + 213, + z: 27 + 221 }, - rotateY: Math.PI/2, traverse: { scale: { - x: 2, - y: 2, - z: 2 - }, - color: 0x000000, + x: 1.5 + } } }, { - no: '4', - objectType: 'transport', + no: '1', + objectType: 'roller', position: { - x: 210, - y: 10, - z: 120 + x: -2 + 330, + z: 27 + 221 }, - rotateY: Math.PI/2, traverse: { scale: { - x: 2, - y: 2, - z: 2 - }, - color: 0x000000, + x: 0.8 + } } }, { - no: '5', - objectType: 'transport', + no: '1', + objectType: 'roller', position: { - x: 310, - y: 10, - z: 220 + x: -2 + 442, + z: 27 + 221 }, - rotateY: Math.PI/2, traverse: { scale: { - x: 1, - y: 1, - z: 1 - }, - color: 0xFFFFFF, + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 560, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 673, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 790, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 902, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1020, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1133, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1250, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1362, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1480, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1593, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1710, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1822, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1940, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2053, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2170, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2282, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2400, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2513, + z: 27 + 221 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2630, + z: 27 + 221 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + // 婊氱瓛杈撻�佹満 1F 绗�2鍒� -------------------------------------------------------------------------------------------- + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 212, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 349, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 450, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 598, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.95 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 744, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.95 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 903, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1058, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.95 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1204, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.95 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1357, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1458, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1587, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1688, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1822, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 1958, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2059, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.35 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2170, + z: 27 + 265 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2282, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.5 + } + } + }, + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2400, + z: 27 + 265 + }, + traverse: { + scale: { + x: 0.8 + } + } + }, + + + { + no: '1', + objectType: 'roller', + position: { + x: -2 + 2512, + z: 27 + 265 + }, + traverse: { + scale: { + x: 1.5 + } } }, ] diff --git a/static/js/object/Cube.js b/static/js/object/Cube.js index 8586ee6..d248ba1 100644 --- a/static/js/object/Cube.js +++ b/static/js/object/Cube.js @@ -35,5 +35,6 @@ cube.position.x = this.positionX; cube.position.y = this.positionY; cube.position.z = this.positionZ; + cube.receiveShadow = true; return cube; } diff --git a/static/js/object/StoreConvey.js b/static/js/object/StoreConvey.js index 2eed2d4..dd1b3f0 100644 --- a/static/js/object/StoreConvey.js +++ b/static/js/object/StoreConvey.js @@ -37,9 +37,9 @@ new THREE.ObjectLoader().load( "../static/model/json/閾炬潯杈撻�佹満.json", function (obj) { obj.traverse (function (child) { if (child instanceof THREE.Mesh) { - child.scale.set(1, 1, 1.8); + child.scale.set(1, 1, 1.6); child.material = new THREE.MeshLambertMaterial({ - color: 0xAAAAAA + color: 0x8B8378 }); if (child.name === "Box034" || child.name === "Box035") { child.material = new THREE.MeshLambertMaterial({ @@ -55,9 +55,9 @@ new THREE.ObjectLoader().load( "../static/model/json/杈婄瓛杈撻�佹満.json", function (obj) { obj.traverse (function (child) { if (child instanceof THREE.Mesh) { - child.scale.set(1, 1, 1.8); + child.scale.set(0.5, 1, 1); child.material = new THREE.MeshLambertMaterial({ - color: 0xAAAAAA + color: 0x8B8378 }); } }); @@ -68,9 +68,9 @@ new THREE.ObjectLoader().load( "../static/model/json/椤跺崌绉绘牻.json", function (obj) { obj.traverse (function (child) { if (child instanceof THREE.Mesh) { - child.scale.set(1, 1, 1.8); + child.scale.set(1, 1, 1); child.material = new THREE.MeshLambertMaterial({ - color: 0xAAAAAA + color: 0x8B8378 }); } }); @@ -81,16 +81,26 @@ } function customize(clone, info) { - clone.position.x = 0 + info.position.x; - clone.position.y = 0 + info.position.y; - clone.position.z = 0 + info.position.z; - clone.rotateY(info.rotateY); + let positionX = info.position.x || 0; + let positionY = info.position.y || 0; + let positionZ = info.position.z || 0; + let rotateY = info.rotateY || 0; + + clone.position.x = 0 + positionX; + clone.position.y = 0 + positionY; + clone.position.z = 0 + positionZ; + clone.rotateY(rotateY); if (info.traverse !== undefined) { let traverse = info.traverse; clone.traverse (function (child) { if (child instanceof THREE.Mesh) { // 鎷変几 - child.scale.set(traverse.scale.x, traverse.scale.y, traverse.scale.z); + if (traverse.scale !== undefined) { + let scaleX = traverse.scale.x || 1; + let scaleY = traverse.scale.y || 1; + let scaleZ = traverse.scale.z || 1; + child.scale.set(scaleX, scaleY, scaleZ); + } // 棰滆壊 if (traverse.color !== undefined) { child.material = new THREE.MeshLambertMaterial({ diff --git a/static/js/object/StoreShelf.js b/static/js/object/StoreShelf.js index c583ea0..dcf448e 100644 --- a/static/js/object/StoreShelf.js +++ b/static/js/object/StoreShelf.js @@ -17,7 +17,7 @@ // 鏉愯川 let shelfMat = new THREE.MeshPhysicalMaterial({ color: 0x175EC0, - transparent: true, + transparent: false, opacity: 0.7 }); //瀹氫箟涓�涓粍鍚堜綋 @@ -92,7 +92,9 @@ } let mergedGeometry = BufferGeometryUtils.mergeBufferGeometries(geometries); - return new THREE.Mesh(mergedGeometry, shelfMat); + var mesh = new THREE.Mesh(mergedGeometry, shelfMat); + mesh.castShadow = true; + return mesh; } export {StoreShelf} diff --git a/views/index.html b/views/index.html index 609727b..13c64d5 100644 --- a/views/index.html +++ b/views/index.html @@ -140,8 +140,8 @@ }, 1); $(document).on('click','.btn-word', function () { - fullScreen() - $("#mask").fadeOut(3000, function () { // 3000 + // fullScreen() + $("#mask").fadeOut(1, function () { // 3000 $("#menu").addClass("show"); setTimeout(function () { $("#ship-type-ul").css("transform", "translateY(-40px)"); @@ -152,7 +152,7 @@ setTimeout(function () { removeClass(document.getElementById("title-box"), "show"); }, 10000); - }, 1000); // 1000 + }, 1); // 1000 }); $("#title-box, #logo").addClass("show"); $("#ship-info-btn").removeClass("show"); -- Gitblit v1.9.1