consider move “EditorControls” outside “viewport” aim to User can oparete controls
I feel it dont need to make this control customized
why not use “import { OrbitControls } from “three/examples/jsm/controls/OrbitControls”;” instead?
I have checked this issue, and comform I am using the fixed code. Use ViewHelper when my camera up is zAxis (0,0,1)
my code has bad smell:
- do a hack: add this line after “Viewport.js” line.56. " editor.viewHelper = viewHelper;"
- in my script, import OrbitControls
- const controls = new OrbitControls(this.editor.camera, this.viewport.dom);
- assignment
- //@ts-ignore
this.editor.viewHelper.controls = controls;
I hope I made myself clear