JavaScript SDK版本3.6.328

2025-10-29

球体场景
  • 新增卷帘功能,通过鼠标拖拽即可直观对比图层差异。
// 构造卷帘配置项
let config = new Glodon.Bimface.Earth.Plugins.ViewComparator.SwipeConfig();
config.viewer = viewer;
// 设置两视口内的图层对象
config.layerContents = [["layer_100000001234","layer_map_1"],["layer_map_1"]];
// 上下视口排列
config.direction = "Vertical";

// 构造卷帘对象
let swipe = new Glodon.Bimface.Earth.Plugins.ViewComparator.Swipe(config);
// 设置视口为左右排列方式
swipe.setDirection("Horizontal");
  • 新增锚点功能,可在球体场景内添加锚点效果。
// 构造锚点配置项
let config = new Glodon.Bimface.Earth.Plugins.Animation.AnchorConfig();
config.viewer= viewer;
config.size = 5;
// 设置锚点大小
config.location= {lat: 39.90917336505072, lon: 116.39641133371573, alt: 12};

// 构造锚点对象
let anchor = new Glodon.Bimface.Earth.Plugins.Animation.Anchor(config);
// 设置锚点颜色
anchor.setColor({color:new Glodon.Web.Graphics.Color(150,100,0,0.8),wireframeColor:new Glodon.Web.Graphics.Color(0,250,100,0.9)});
anchor.update();
三维模型
  • 增强了对stp格式的解析能力,支持PMI(Product Manufacturing Information,产品制造信息)数据的解析和展示,当配置转换参数"exportPMI":“true”,则可在预览stp模型时查看到PMI标注信息。