[Frontend] 測試熱圖在房間

This commit is contained in:
wanli 2022-12-27 22:10:42 +08:00
parent 34f6022b10
commit 71c2240e68
2 changed files with 24 additions and 8 deletions

View File

@ -186,8 +186,22 @@
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDXzEyMjEubndk'); //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDXzEyMjEubndk');
//測試熱圖 //測試熱圖
launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDXzEyMjFfMjIzMC5ud2Q'); //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDXzEyMjFfMjIzMC5ud2Q');
//三菱 最新urn 資料庫
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDXzEyMjFfMjIzMC5ud2Q');
//測試單獨 7樓熱圖 DEMO
launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwQVJDJUUzJTgwJTkxN0ZfREVNT18yMDIyXzEyXzI2Lm53Yw');
//測試 方案2 7樓熱圖
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6LW1vZGVsX3Rlc3QxMTIxLyVFMyU4MCU5MEFSQyVFMyU4MCU5MTdGXzIwMjJfMTJfMjYubndj');
//測試 方案3 熱圖
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUU2JTk2JUI5JUU2JUExJTg4M18yMDIyXzEyXzI2Lm53ZA');
//測試 方案4
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUU2JTk2JUI5JUU2JUExJTg4NF8yMDIyXzEyXzI2Lm53ZA');
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwQVJDJUUzJTgwJTkxXzIwMjJfMTJfMTMubndk');//new ARC //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwQVJDJUUzJTgwJTkxXzIwMjJfMTJfMTMubndk');//new ARC
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwTUVQJUUzJTgwJTkxXzIwMjJfMTJfMTMubndj');//new MEP //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwTUVQJUUzJTgwJTkxXzIwMjJfMTJfMTMubndj');//new MEP

View File

@ -20,9 +20,9 @@ function launchViewer(urn) {
var documentId = 'urn:' + urn; var documentId = 'urn:' + urn;
//加入熱點 //加入熱點
viewer.addEventListener(av.GEOMETRY_LOADED_EVENT, addHotPoint, { //viewer.addEventListener(av.GEOMETRY_LOADED_EVENT, addHotPoint, {
once: true, // once: true,
}); //});
Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure); Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
@ -266,8 +266,9 @@ function onDocumentLoadSuccess(doc) {
if (item.displayName == "【tag_id】") { // Tag_name tag_id 【tag_id】 if (item.displayName == "【tag_id】") { // Tag_name tag_id 【tag_id】
if (item.displayValue != "") { if (item.displayValue != "") {
//if ((item.displayValue).indexOf('TPE_B1_EE_E4') > -1) { //if ((item.displayValue).indexOf('TPE_B1_EE_E4') > -1) {
//console.log("Tag_name dbid: " + e.dbId); console.log("--------------------------------------------------");
//console.log("value: " + item.displayValue); console.log("Tag_name dbid: " + e.dbId);
console.log("value: " + item.displayValue);
//} //}
//var v = getFragmentWorldMatrixByNodeId(e.dbId, viewer); //var v = getFragmentWorldMatrixByNodeId(e.dbId, viewer);
//console.log("v: " + v); //console.log("v: " + v);
@ -290,7 +291,8 @@ function onDocumentLoadSuccess(doc) {
}, true); }, true);
var position = bounds.center(); var position = bounds.center();
//if ((item.displayValue).indexOf('TPE_B1_EE_E4') > -1) { //if ((item.displayValue).indexOf('TPE_B1_EE_E4') > -1) {
//console.log("position: (" + (position.x).toFixed(2) + ", " + (position.y).toFixed(2) + ", " + (position.z).toFixed(2) + ")"); console.log("position: (" + (position.x).toFixed(2) + ", " + (position.y).toFixed(2) + ", " + (position.z).toFixed(2) + ")");
console.log("--------------------------------------------------");
//} //}
} }
//getFragmentWorldMatrixByNodeId(e.dbId, viewer); //getFragmentWorldMatrixByNodeId(e.dbId, viewer);
@ -1068,7 +1070,7 @@ async function loadHeatmaps(model) {
// }, // },
// true // true
//); //);
roofDbIds.push(5113); roofDbIds.push(834);//5113 834 838 8106 8177
const { const {
SurfaceShadingData, SurfaceShadingData,