Warm tip: This article is reproduced from serverfault.com, please click

其他-在Forge Viewer中使用restoreState时如何删除所有切面

(其他 - How to remove all cut planes when using restoreState in Forge Viewer)

发布于 2020-06-23 16:44:55

我正在使用restoreState函数来设置切割平面,并且效果很好:

NOP_VIEWER.restoreState(JSON.parse('{"cutplanes": [[0,0,0,0]]}'));

但是,如何再次移除飞机?显示所有对象都不起作用,也不起作用

NOP_VIEWER.restoreState(JSON.parse('{"cutplanes": []}'));

或者

NOP_VIEWER.setCutPlanes();

Questioner
FrodeTo
Viewed
11
cyrille 2020-06-24 01:38:54

一种方法是

NOP_VIEWER.restoreState(JSON.parse('{"cutplanes": null}'));