#
luxiaotao1123
2021-11-26 d46eabb8810488271c3641825a21601631429f99
#
1个文件已修改
1个文件已添加
12064 ■■■■■ 已修改文件
static/js/app.js 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/model/obj/货叉.obj 12019 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/app.js
@@ -28,7 +28,7 @@
            this.initStats();
            this.initLight();
            this.initFloor();
            // this.initModel();
            this.initModel();
        }
        this.animate = function () {
            requestAnimationFrame(this.animate.bind(this));
@@ -46,7 +46,7 @@
            // çºµæ¨ªæ¯”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中的坐标系采用的是右手坐标系
             */
@@ -131,7 +131,7 @@
                "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++) {
@@ -195,8 +195,41 @@
                    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 );
            });
@@ -214,7 +247,7 @@
                            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];
static/model/obj/»õ²æ.obj
New file
Diff too large