I have converted a 2D DWG model to a JSON file. After that I have uploaded it in threejs editor. I am able to see some of part of model by scrolling in/out and I am unable to see the complete model. Could you please tell how do i fix this issue?
I have scaled the image and getting the almost correct 2D image. But there are slight mistakes, some model objects are sticking out of the image hence making it a 3D model. Could you please tell me how do I fix this? I also want to view this image as 2D image only no 3D. Could you please how do I do this? Please check the following images: -
I would report this issue to the developers of the JSON exporter. As a quick fix, you could iterate over the vertices of your model and ensure that all of them lie in a XY plane. So all vertices would have the same z-coordinate. Keep in mind that this is something you have to do in code and not with the editor.
You could render the scene with an orthographic camera into a render target which could then be used as a texture. Rendering with an orthographic camera might also solve the with the exposed objects (since no perspective is used anymore).
Since you are loading JSON it might make sense to adjust this code section:
result represent the loaded JSON. You can make adjustments like result.scale.multiplyScalar( 0.001 ) in the onLoad() callback (before the commands are created).