标签分类
xhzf0f748f80b
7 浏览
0 回答
0 点赞
2021-4-24
小卷毛のオヤジ
9 浏览
0 回答
0 点赞
2021-4-17

模型上传?

Revit模型为啥
51 浏览
3 回答
1 点赞
2021-3-26
爱开发者的砖砖
回答:三维模型二次开发中,移除事件监听这一基础模型功能效果,参考代码JSconst html = document.querySelector("html");document.querySelector(".viewport").style.width = html.clientWidth + 'px';document.querySelector(".viewport").style.height = html.clientHeight - 1 + 'px';const option = {host: "http://bos3d.bimwinner.com", viewport: "viewport"};const viewer3D = new BOS3D.Viewer(option);new BOS3DUI({ viewer3D, BOS3D: window.BOS3D,})// 添加视图// modelKey:模型key// projectKey:项目keyviewer3D.addView("M1598257565598", "he3285593fdc4ea3b91784c5741ff8aa");//添加点击事件viewer3D.viewerImpl.modelManager.addEventListener(BOS3D.EVENTS.ON_CLICK_PICK, (event) = { if (event.intersectInfo == null) return; //获取当前空间坐标 let point = event.intersectInfo.point; console.log("当前空间坐标为:" + point); $(".message").show(); $(".x").html(point.x); $(".y").html(point.y); $(".z").html(point.z); });$(".close").on("click", () = { $(".message").hide();});CSSbody { margin: 0; overflow: hidden; position: fixed;}.messageHeader { height: 40px; width: 320px; background: rgba(34, 34, 34, 1);}.messageHeader .title { color: #ffffff; display: inline-block; line-height: 38px; margin-left: 20px; font-size: 14px;}.messageFoot { height: 242px; width: 320px; background: rgba(43, 43, 43, 1);}.close { color: #ffffff; display: inline-block; line-height: 38px; margin-left: 176px; cursor: pointer; font-size: 22px;}.message { position: absolute; z-index: 2; top: 300px; right: 50px; display: none;}.details { padding-top: 20px; color: #ffffff; overflow-x: scroll; height: 220px; font-size: 12px; padding-left: 20px; padding-right: 20px;}.x, .y, .z { line-height: 25px;}::-webkit-scrollbar { width: 14px; height: 14px;}::-webkit-scrollbar-track,::-webkit-scrollbar-thumb { border-radius: 999px; border: 2px solid transparent;}::-webkit-scrollbar-track { box-shadow: 1px 1px 5px rgba(0, 0, 0, .2) inset;}::-webkit-scrollbar-thumb { min-height: 20px; background-clip: content-box; box-shadow: 0 0 0 5px rgb(247 247 247 / 20%) inset;}HTMLdiv class="message" div class="messageHeader" span class="title"当前坐标信息/span span class="close"times;/span /div div class="messageFoot" div class="details" X轴为:span class="x"/spanbr Z轴为:span class="z"/spanbr Y轴为:span class="y"/spanbr /div /div/divdiv id="viewport" class="viewport"/div
44 浏览
1 回答
0 点赞
2021-3-17

模型显示不了?

模型archicad显示
47 浏览
1 回答
1 点赞
2021-3-17

模型二次开发,如何实现移除事件监听?

模型二次开发移除事件监听
爱开发者的砖砖
回答:三维模型二次开发中,移除事件监听这一基础模型功能效果,调用这个API接口就行了!1. unregisterControlEventListener参考代码JSconst html = document.querySelector("html");document.querySelector(".viewport").style.width = html.clientWidth + 'px';document.querySelector(".viewport").style.height = html.clientHeight - 1 + 'px';/** * 创建viewer3D实例配置 * @param {string} host 主机地址 * @param {string} viewport 视口 */const option = { host: "http://bos3d.bimwinner.com", viewport: "viewport"};// 创建viewer3D实例const viewer3D = new BOS3D.Viewer(option);// 创建工具栏new BOS3DUI({ viewer3D, BOS3D: window.BOS3D,})/** * 添加视图 * @param {string} modelKey 模型Key * @param {string} projectKey 项目key */viewer3D.addView("M1598257565598", "he3285593fdc4ea3b91784c5741ff8aa");function handleZoom(event){ console.log('模型发生缩放')}// 加载控制相关监听函数 缩放模型后触发该函数 viewer3D.registerControlEventListener(BOS3D.EVENTS.ON_CONTROL_ZOOM,handleZoom);$(document).ready(function () { $('#remove').click(function () { // 移除一个事件监听 移除当前模型缩放监听事件 viewer3D.unregisterControlEventListener(BOS3D.EVENTS.ON_CONTROL_ZOOM, handleZoom); })});CSSbody { margin: 0; overflow: hidden; position: fixed;}.but { position: absolute; top: 10px; z-index: 1; left: 10px; display:flex; flex-wrap:wrap; width:600px;}.viewport { width: 100%; height: 100%;}button { border: none; color: white; text-align: center; text-decoration: none; font-size: 12px; margin: 5px 8px; cursor: pointer; line-height:24px; height:24px; background:rgba(40,120,255,1); outline-style: none; border-radius:12px;}HTMLdiv class="but" button id="remove"移除模型缩放监听事件/button/divdiv id="viewport" class="viewport"/div
31 浏览
1 回答
0 点赞
2021-3-17

模型二次开发用什么软件?

二次开发三维可视化
Luna
61 浏览
0 回答
0 点赞
2021-3-17