Hi @JC12! I've been working with @valentin on the Reality Editor for awhile now, and I put together an example three.js interface, based upon the sea3d example from the three.js website:
You can download the interface here: https://github.com/openhybrid/HybridObject/tree/master/examples/threejsTurtle
The index.html file is well documented, but here are a few key things to make three.js work with the Reality Editor:
Instead letting the interface transform like usual, you need to pass the Hybrid Object's transformation matrix directly into the three.js renderer. You can do this by making the interface fullscreen and subscribing to the transformation matrix.
hybridObj = new HybridObject();
You need to set
matrixAutoUpdate = false; on your three.js object so that you can manually set its transformation to the matrix received from the Hybrid Object, rather than it relying on its position, rotation, and scale properties.
The three.js camera's
projectionMatrix should be set to the Hybrid Object's projection matrix, and the three.js object's
matrix should be set to the modelview matrix
Let me know how it goes! I'd love to see what you're able to create.