OrbitControls
I'm trying to implement an equivalent of OrbitControls, but so far I don't see a way to do it that is well integrated with React. Any thoughts given to this yet? Do you see this as part of react-three-renderer or per-application custom code in components?
Kudos for the hard work on this lib! This looks very promising!
I recommend looking at the source for webgl camera example, and the trackball modified trackball controls code for something very similar :)
The second part: I see this as a plugin/module opportunity, or per application custom code
Thanks for the answer. I didn't notice that the camera example had trackball controls.
is there any way how to use orbit-three-controls together with react-three-renderer?
I was able to get OrbitControls working in react-three-renderer with almost no modifications. See this diff to OrbitControls.js: https://github.com/austinsims/tablesim-r3r/commit/499e73d8facca798ea5938783095e4c3e1be2fb3#diff-f03a52bf6b428186393292c8c2c41d98
And this corresponding diff to a stripped down Simple.js (from react-three-renderer-example repository): https://github.com/austinsims/tablesim-r3r/commit/499e73d8facca798ea5938783095e4c3e1be2fb3#diff-1f7b0552e72334a51917a6ba613bbc2b
should work without modifying orbitControls.js, if using orbit-three-controls. Thought I can't really get it to work. Getting some strange warnings about 'unknown prop' after adding ref to React3 tag. Everything is rendered, but no orbitcontrols.
I don't want to modify orbitcontrols library itself. But those unknown prop warnings indicate that something else might be wrong though.
ok, I went simpler, and it works. See this gist for super simple implementation.