撰寫 Viewer 擴展(Extension)
class Extension { viewer: Viewer3D; options: Object?; id: string; /** * @param viewer The viewer to be extended. * @param options An optional dictionary of options for this extension. */ constructor( viewer: Viewer3D, options: Object ); /** * Override the load method to add functionality to the viewer. * Use the Viewer"s APIs to add/modify/replace/delete UI, register event listeners, etc. * @return True if the load was successful. */ load: boolean; /** * Override the unload method to perform some cleanup of operations that were done in load. * @return True if the unload was successful. */ unload: boolean; /** * Gets the extension state as a plain object. Intended to be called when viewer state is requested. * @param viewerState Object to inject extension values. * @virtual */ getState( viewerState: Object ): void; /** * Restores the extension state from a given object. * @param viewerState Viewer state. * @param immediate Whether the new view is applied with (true) or without transition (false). * @return True if restore operation was successful. */ restoreState( viewerState: Object, immediate: boolean ): void; /** * Returns an object that persists throughout an extension"s unload->load * operation sequence. Cache object is kept at ViewingApplication level. * Cache object lives only in RAM, there is no localStorage persistence. * @return The cache object for a given extension. */ getCache: Object; }


※你是否也在學習ES6 Promise時遇到過這個問題?
※openresty使用筆記(一)
TAG:達人科技 |
※FacexWorm通過Facebook Messenger和Chrome擴展傳播
※Google Chrome的Windows Timeline擴展重新上架
※擴展Zuul實現ignored-patterns的byPass功能
※微軟愛開源:VS Code擴展Web Template Studio
※賽門鐵克發Edge擴展「Norton Safe Web」
※社交VR遊戲《Wands》擴展對Mirage Solo和Oculus Go的支持
※微軟發布Windows Defender擴展 為Chrome用戶提供上網安全
※Eur Arch Otorhinolaryngol:單邊耳蝸移植標準擴展研究
※Zayo收購溫哥華的Optic Zoo Networks擴展網路足跡
※邁克菲WebAdvisor擴展登陸Win10 Edge瀏覽器
※如何擴展 Create React App 的 Webpack 配置
※使用Burpsuite擴展Hackvertor繞過WAF並解密XOR
※Burp Extractor擴展工具介紹
※windows下php7.0安裝redis擴展包
※EFCore擴展Update方法(實現 Update User SET Id = Id + 1)
※Kotlin 擴展
※谷歌開源 TF-Ranking:專用於排序學習的可擴展 TensorFlow 庫
※Github項目推薦 Pytorch TVM 擴展
※Win10 Edge新爆料:Chrome擴展和PWA應用
※Microsoft Store賣場禮物贈送功能擴展至PC及全部Xbox One遊戲