|
@@ -556,43 +556,43 @@ export function uwbMain(domId, modelWidth, modelHeight, finalMode, callback) {
|
|
let bFirst = true;
|
|
let bFirst = true;
|
|
let bool = false;
|
|
let bool = false;
|
|
let bool1 = false;
|
|
let bool1 = false;
|
|
- intersects.forEach(m => {
|
|
|
|
- if (m.object.geometry.type != "PlaneBufferGeometry") {
|
|
|
|
- if (m.object.userData && m.object.userData.benchFlag == true) {
|
|
|
|
- if (!bool) {
|
|
|
|
- bool = true;
|
|
|
|
- //m.object.material = window.shader1;
|
|
|
|
- ////m.object.scale.set(10, 10, 10)
|
|
|
|
- //m.object.scale.set(5, 5, 5)
|
|
|
|
- //outlineObj(m.object)
|
|
|
|
- // let player = document.getElementById(domId)
|
|
|
|
- // player.style.display = "none"
|
|
|
|
-
|
|
|
|
- if (box) {
|
|
|
|
- sdkInstance.sceneRenderer.scene.remove(box);
|
|
|
|
- }
|
|
|
|
- window.handleBenchClick(m.object.userData.benchId, m.object.userData.bShowRemoteButton)
|
|
|
|
-
|
|
|
|
- box = new THREE.BoxHelper(m.object, '#ff0000'); //object 模型
|
|
|
|
- sdkInstance.sceneRenderer.scene.add(box);
|
|
|
|
-
|
|
|
|
- //let ambientLight = new THREE.AmbientLight(0xffffff); //设置环境光
|
|
|
|
- //sdkInstance.sceneRenderer.scene.add(ambientLight); //将环境光添加到场景中
|
|
|
|
- //let pointLight = new THREE.PointLight(0xffffff, 1, 0);
|
|
|
|
- //pointLight.position.set(200, 200, 200); //设置点光源位置
|
|
|
|
- //sdkInstance.sceneRenderer.scene.add(pointLight); //将点光源添加至场景
|
|
|
|
- }
|
|
|
|
- //outlineObj(m.object)
|
|
|
|
-
|
|
|
|
- //m.object.material = FXAAShader
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- } else if (m.object.geometry.type == "PlaneBufferGeometry") {
|
|
|
|
- if (m.object.userData && m.object.userData.benchFlag == true) {
|
|
|
|
- window.handleListClick(m.object.userData.benchId)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // intersects.forEach(m => {
|
|
|
|
+ // if (m.object.geometry.type != "PlaneBufferGeometry") {
|
|
|
|
+ // if (m.object.userData && m.object.userData.benchFlag == true) {
|
|
|
|
+ // if (!bool) {
|
|
|
|
+ // bool = true;
|
|
|
|
+ // //m.object.material = window.shader1;
|
|
|
|
+ // ////m.object.scale.set(10, 10, 10)
|
|
|
|
+ // //m.object.scale.set(5, 5, 5)
|
|
|
|
+ // //outlineObj(m.object)
|
|
|
|
+ // // let player = document.getElementById(domId)
|
|
|
|
+ // // player.style.display = "none"
|
|
|
|
+
|
|
|
|
+ // if (box) {
|
|
|
|
+ // sdkInstance.sceneRenderer.scene.remove(box);
|
|
|
|
+ // }
|
|
|
|
+ // window.handleBenchClick(m.object.userData.benchId, m.object.userData.bShowRemoteButton)
|
|
|
|
+
|
|
|
|
+ // box = new THREE.BoxHelper(m.object, '#ff0000'); //object 模型
|
|
|
|
+ // sdkInstance.sceneRenderer.scene.add(box);
|
|
|
|
+
|
|
|
|
+ // //let ambientLight = new THREE.AmbientLight(0xffffff); //设置环境光
|
|
|
|
+ // //sdkInstance.sceneRenderer.scene.add(ambientLight); //将环境光添加到场景中
|
|
|
|
+ // //let pointLight = new THREE.PointLight(0xffffff, 1, 0);
|
|
|
|
+ // //pointLight.position.set(200, 200, 200); //设置点光源位置
|
|
|
|
+ // //sdkInstance.sceneRenderer.scene.add(pointLight); //将点光源添加至场景
|
|
|
|
+ // }
|
|
|
|
+ // //outlineObj(m.object)
|
|
|
|
+
|
|
|
|
+ // //m.object.material = FXAAShader
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // } else if (m.object.geometry.type == "PlaneBufferGeometry") {
|
|
|
|
+ // if (m.object.userData && m.object.userData.benchFlag == true) {
|
|
|
|
+ // window.handleListClick(m.object.userData.benchId)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
bool = false;
|
|
bool = false;
|
|
bool1 = false;
|
|
bool1 = false;
|
|
}
|
|
}
|