【问题标题】:ViewCube rotation of 90 degreesViewCube 旋转 90 度
【发布时间】:2018-03-21 23:17:58
【问题描述】:

我想知道是否有可能使用诸如 ViewCube 箭头动作之类的 JS 动作进行 90 度旋转:

我知道我可以使用

viewer.setViewCube("left")

但是为了达到我的目的,我必须在左边做一次,然后再在顶部做第二次。但是在这两个步骤之间,我需要等待第一次操作的动画结束。对我来说最好的方法是旋转 90 度,但我没有找到任何 API 调用

【问题讨论】:

    标签: autodesk-forge autodesk-viewer


    【解决方案1】:

    你可以将人脸组合传递给那个方法,见源码中的cmets:

     /**
     * Set the face of ViewCube and apply camera transformation according to it.
     * @param {string} face - The face name of ViewCube. The name can contain multiple face names,
     * the format should be `"[front/back], [top/bottom], [left/right]"`.
     */
     Viewer3D.prototype.setViewCube = function(face)
    

    【讨论】:

    • 是的,我知道,但是使用 'left/top' ('top left', 'top, left') 参数调用此方法的结果与使用 'left' 调用两次不同,并且'最佳'。我想旋转对象(建筑物)以仅看到左旋转(90 度)的顶部,而不是顶部和左侧。这样箭头是最好的,但我找不到它的方法
    • 如果你想要更多的灵活性,你应该直接通过viewer.navigation方法修改相机参数,更多细节请看这篇文章:forge.autodesk.com/blog/…
    猜你喜欢
    • 1970-01-01
    • 2021-05-24
    • 2011-03-22
    • 1970-01-01
    • 1970-01-01
    • 2015-03-22
    • 2022-01-13
    • 2020-04-14
    • 2011-09-24
    相关资源
    最近更新 更多