簡體   English   中英

無法在 Autodesk Forge Viewer 中更改 object 顏色

[英]Couldn't change the object color in Autodesk Forge Viewer

我嘗試使用以下鏈接在 Autodesk Forge Viewer 中更改 object 顏色。

https://adndevblog.typepad.com/cloud_and_mobile/2015/12/change-color-of-elements-with-view-and-data-api.html

但是,我在嘗試加載擴展“Autodesk.ADN.Viewing.Extension.Color”時遇到了以下問題。

“未捕獲(承諾)擴展失敗。加載():Autodesk.ADN.Viewing.Extension.Color at ExtensionManager.js:390”

那是一篇舊文章。 現在擴展加載()function需要在成功加載時返回true - 如下所示: https://forge.autodesk.com/en/docs/viewer/v7/developers_guide/viewer_basics/extensions/

所以只需在代碼中的這個地方返回true

    _self.unload = function() {
        console.log('Autodesk.ADN.Viewing.Extension.Color unloaded');
        return true;
    };

    return true; // <<-- add this here
};

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM