【发布时间】:2018-07-23 12:38:06
【问题描述】:
我按照下面的示例并能够在 Forge Viewer 上绘制自定义网格。 https://forge.autodesk.com/blog/handling-custom-meshes-selection-along-model-components-forge-viewer
扩展它,我在handleSingleClick事件中选择的自定义对象中添加了TransformControls工具;
if (selections.length) {
console.log('Custom meshes selected:')
console.log(selections)
const control = new THREE.TransformControls(this.viewer.impl.camera, this.viewer.impl.canvas, 'translate');
control.attach(selections[0].object);
this.viewer.impl.addOverlay('myOverlay', control);
this.viewer.impl.sceneUpdated(true);
return true
}
现在,当我尝试拖动变换工具时,自定义对象没有移动。
我转换自定义对象的方法是否正确?
【问题讨论】:
标签: autodesk-forge autodesk-viewer