View and Data API Tips: Hide elements in viewer completely
With View and Data API, you can hide some elements in viewer by calling “viewer.hide(dbIds)”, when the elements are hided, it actually make it transparent with a shallow mark to it, or make it ghosted. It is a nice feature as user probably need to know the existence of these elements even they are hided. But you may want to hide elements completely instead of ghosting some times. Here are a code snippet you can use if you want to hide some elements totally.
Autodesk.Viewing.Viewer3D.prototype.turnOff = function(dbIds){ var node ; if (Array.isArray(dbIds)) { for (var i = 0; i < dbIds.length; i++) { var id = dbIds[i]; node = viewer.model.getData(). instanceTree.dbIdToNode[id]; //hide the node completedlyviewer.impl.visibilityManager.setNodeOff(node, true); } } else { node = viewer.model.getData(). instanceTree.dbIdToNode[dbIds]; //hide the node completedly viewer.impl.visibilityManager.setNodeOff(node, true); } }; Autodesk.Viewing.Viewer3D.prototype.turnOn = function(dbIds) { var node ; if (Array.isArray(dbIds)) { for (var i = 0; i < dbIds.length; i++) { var id = dbIds[i]; node = viewer.model.getData(). instanceTree.dbIdToNode[id]; //show the node viewer.impl.visibilityManager.setNodeOff(node, false); } } else { node = viewer.model.getData(). instanceTree.dbIdToNode[dbIds]; //show the node viewer.impl.visibilityManager.setNodeOff(node, false); } };
The usage is very simple, just call “viewer.turnOff(arrayOfDbIds)” or “viewer.turnOf(arrayOfDbIds)”. Hope it helps.
相關推薦
View and Data API Tips: Hide elements in viewer completely
With View and Data API, you can hide some elements in viewer by calling “viewer.hide(dbIds)”, when the elements are hided, it actually make it transparen
View and Data API Tips: Constrain Viewer Within a div Container
When working with View and Data API, you probably want to contain viewer into a <div> tag, the position and size of <div> can be defined with
View and Data API Tips : Conversion between DbId and node
In View and Data client side API, The assets in the Autodesk Viewer have an object tree, a tree structure that represents the model hierarchy. Each eleme
Using View and Data API with Meteor
I have been studying Meteor these days, and find that Meteor is really a mind-blowing framework, I can talk about this latter. I was inspired by this que
使用AxisHelper幫助理解View and Data API中的座標系統
大家使用View and Data API做三維模型開發,必然首先要理解View and Data API的座標系統,即XYZ三個軸向分別是怎麼定義的。Three.js裡面提供了一個AxisHelper,但如果你直接運用的話,你會發現在viewer中並不顯示,並且控制檯中會有這樣的錯誤資訊:"Only THR
Autodesk View and Data API二次開發學習指南
什麼是View and Data API? 使用View and Data API,你可以輕鬆的在網頁上顯示大型三維模型或者二維圖紙而不需要安裝任何外掛。通過View and Data API,你可以對模型進行視點控制、選擇控制、屬性資訊查詢等等,而且還可以把這樣無外掛的模型瀏覽器和您自己的其他資訊系統整合
在View and Data API中更改指定元素的顏色
大家在使用View and Data API開發過程中,經常會用到的就是改變某些元素的顏色已區別顯示。比如根據某些屬性做不同顏色的專題顯示,或者用不同顏色表示施工進度,或者只是簡單的以顏色變化來提醒使用者以示區別。作為開發者,一定會喜歡看的這樣的API://load the extension viewe
建立View and Data – 3D模型
View and Data – 3D模型 (轉自:blog.csdn.net/zzzh2088/article/details/64921162) 1、建立展示3D模型的容器,引入必要的css和js檔案 <!DOCTYPE html> <head&
[D3] SVG Graphics Containers and Text Elements in D3 v4
ont name canvas scores guess format selectall char style SVG is a great output format for data visualizations because of its scalability,
DPAPI Secrets. Security analysis and data recovery in DPAPI
轉載自:https://www.passcape.com/index.php?section=docsys&cmd=details&id=28 DPAPI Secrets Introduction Part 1. DPAPI architecture and
How Big Data and AI Are Driving Business Innovation in 2018
At the intersection of analytics and smart technology, companies are starting to see the long-awaited benefits of AI. After years of hope and promise, 2018
Top 10 roles in AI and data science
When you think of the perfect data science team, are you imagining 10 copies of the same professor of computer science and statistics, hands delicately sta
5 simple tips and tricks for writing unit tests in #golang
5 simple tips and tricks for writing unit tests in #golangTest-driven development is a great way to keep the quality of your code high, while protecting yo
[HTML5] Add an SVG Image to a Webpage and Get a Reference to the Internal Elements in JavaScript
show acc ntb content open direct () ren for We want to show an SVG avatar of the patio11bot, so we‘ll do that in three ways: Using a
[Leetcode] Heap, Divide and conquer--215. Kth Largest Element in an Array
bsp sting arc push lec archive left divide discuss Find the kth largest element in an unsorted array. Note that it is the kth largest ele
Flash program memory and data EEPROM
corrupted check stat blog 編程 其中 per pri param 1、簡介 STM8S內部的FLASH程序存儲器和數據EEPROM是由一組通用寄存器來控制的;所以我們可以通過這些通用寄存器來編程或擦除存儲器的內容、設置寫保護、或者配置特定的低功
07 數據過濾 - and、or、not、in
end sql 執行 exist 優先 最大 邏輯 rom products 組合where子句 可以使用邏輯操作符(AND、OR)組合where子句 select prod_id, prod_price, prod_name from products where
Couchbase II( View And Index)
內建函數 返回 數據集 not document descend bucket 結構 base Views view的作用是從沒有結構和半結構的數據對象中抽取過濾需要的信息,並生成相關的index信息,通常生成json數據。 view通過叠代bucket所有文檔而提取
[Angular] Fetch non-JSON data by specifying HttpClient responseType in Angular
ica service ext esp 4.3 ttpClient cto sin post By default the new Angular Http client (introduced in v4.3.1) uses JSON as the data format
vscode的vetur插件提示 [vue-language-server] Elements in iteration expect to have 'v-bind:key' directives錯誤的解決辦法
info bsp 設置 vs code 出現 expec 技術 問題 Language 1.使用VS Code 出現如下問題,如圖 Vue 2.2.0+的版本裏,當在組件中使用v-for時,key是必須的。 2.更改vetur配置 vscode