| | |
| | | this.initStats(); |
| | | this.initLight(); |
| | | this.initFloor(); |
| | | // this.initModel(); |
| | | this.initModel(); |
| | | } |
| | | this.animate = function () { |
| | | requestAnimationFrame(this.animate.bind(this)); |
| | |
| | | // 纵横æ¯aspect:å
¨å±ï¼ä½¿ç¨çæ¯æµè§å¨ç宽度/é«åº¦ |
| | | //è¿å¹³é¢nearï¼0.1 |
| | | //è¿å¹³é¢è§è§far:10000 |
| | | this.camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 10000); |
| | | this.camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 50000); |
| | | /* |
| | | è®¾ç½®ç¸æºä½ç½®ï¼æ³¨æthreejsä¸çåæ ç³»éç¨çæ¯å³æåæ ç³» |
| | | */ |
| | |
| | | "posy.jpg", "negy.jpg", |
| | | "posz.jpg", "negz.jpg" |
| | | ]); |
| | | // this.scene.background = new THREE.Color( 0xf0f0f0 ); |
| | | this.scene.background = new THREE.Color( 0xf0f0f0 ); |
| | | } |
| | | this.removeObject = function (nameorid) { |
| | | for (let i = 0; i < this.objects.length; i++) { |
| | |
| | | new OBJLoader( manager ) |
| | | .setMaterials( materials ) |
| | | .setPath( '../static/model/obj/' ) |
| | | .load( 'AGV.obj', function ( object ) { |
| | | object.position.y = 0; |
| | | .load( 'è´§å.obj', function ( object ) { |
| | | object.position.z = -500; |
| | | object.position.x = -1560; |
| | | object.scale.set(0.025, 0.025, 0.025); |
| | | object.rotateY(- Math.PI / 2) |
| | | that.addObject( object ); |
| | | }, null, null ); |
| | | }); |
| | | new MTLLoader(manager) |
| | | .setPath( '../static/model/obj/' ) |
| | | .load( '载货å°.mtl', function ( materials ) { |
| | | materials.preload(); |
| | | new OBJLoader( manager ) |
| | | .setMaterials( materials ) |
| | | .setPath( '../static/model/obj/' ) |
| | | .load( '载货å°.obj', function ( object ) { |
| | | object.position.z = -500; |
| | | object.position.x = -1560; |
| | | object.scale.set(0.025, 0.025, 0.025); |
| | | object.rotateY(- Math.PI / 2) |
| | | that.addObject( object ); |
| | | }, null, null ); |
| | | }); |
| | | new MTLLoader(manager) |
| | | .setPath( '../static/model/obj/' ) |
| | | .load( 'å åæºæ¬ä½.mtl', function ( materials ) { |
| | | materials.preload(); |
| | | new OBJLoader( manager ) |
| | | .setMaterials( materials ) |
| | | .setPath( '../static/model/obj/' ) |
| | | .load( 'å åæºæ¬ä½.obj', function ( object ) { |
| | | object.position.z = -500; |
| | | object.position.x = -1560; |
| | | object.scale.set(0.025, 0.025, 0.025); |
| | | object.rotateY(- Math.PI / 2) |
| | | that.addObject( object ); |
| | | }, null, null ); |
| | | }); |
| | |
| | | let optionStore = optionArea.Stores[j]; |
| | | optionStore.Position = CommonFunction.transPosition(optionStore.Position, optionArea.Position); |
| | | let store = new Store(optionStore); |
| | | object.addObject(store); |
| | | // object.addObject(store); |
| | | //æ¾ç¤ºæ¯è¡ä¿¡æ¯ |
| | | for (let k = 0; k < optionStore.Groups.length; k++) { |
| | | let optionGroup = optionStore.Groups[k]; |