//id列表
|
let _logicBodyGlowIds = new Set();
|
|
|
//设置物体整体发光效果
|
//"body"为整体发光,"outline"为轮廓线发光
|
function setLogicBodyGlowEffect(obj) {
|
removeLogicBodyGlowEffect();
|
if (obj == null || obj.length < 1) {
|
return;
|
}
|
_modeler.setGlowEffectById(obj, { type: "body", color: new Glodon.Web.Graphics.Color(139, 0, 0, 1), intensity: 0.3, spread: 3 });
|
_viewer.render();
|
_logicBodyGlowIds = new Set(obj);
|
}
|
|
//移除物体整体发光效果
|
function removeLogicBodyGlowEffect() {
|
if (_logicBodyGlowIds.size > 0) {
|
var myArray = Array.from(_logicBodyGlowIds);
|
_modeler.removeGlowEffectById(myArray);
|
_viewer.render();
|
_logicBodyGlowIds.clear();
|
}
|
}
|