唐润平:下拉框优化,编辑视角调整

This commit is contained in:
trp
2023-12-14 23:08:38 +08:00
parent fb9dfb37a2
commit 1884ad3db6
13 changed files with 170 additions and 19732 deletions

View File

@@ -8,9 +8,7 @@ import {
} from "./handleOrbitControlsChange";
import { saveState, resetState } from "./viewBack";
import addFunction from "./addEvent";
import addDev from "./addDev";
import removeDev from "./removeDev";
import { addEquipment, removeEquipment } from "./editEquipment";
export default class Demo {
// 摄像机看向位置
origin = null;
@@ -24,13 +22,11 @@ export default class Demo {
this._handleRClick = handleRClick;
this._handleDBLClick = handleDBLClick;
this._checkAnimation = checkAnimation;
this._saveSate = saveState;
this._saveState = saveState;
this._resetState = resetState;
this.addEquipment = addEquipment;
this.removeEquipment = removeEquipment;
// 增加设备模型
this.addDev = addDev;
// 删除设备模型
this.removeDev = removeDev;
// 外部可添加函数
this.addFunction = addFunction;
this.THREE = three;
@@ -58,7 +54,7 @@ export default class Demo {
this.renderer.setSize(window.innerWidth, window.innerHeight);
this.renderer.domElement.style.position = "absolute";
this.mountedElement.appendChild(this.renderer.domElement);
console.log(this.renderer.domElement);
// 创建渲染帧
this.render = () => {
this.__renderScope();
@@ -358,14 +354,13 @@ export default class Demo {
}
/**
* @param {Meshes} meshes gltf加载过后的模型数组
* @param {Map} meshes gltf加载过后的模型数组
*/
initDevicesModel(meshes) {
this.deviceList = [];
meshes.forEach((mesh) => {
this.deviceList.push(mesh);
});
console.log(this.deviceList);
initDevicesModel(equMap) {
//
this.equMap = equMap;
console.log(equMap);
}
/**