donmccurdy / three-gltf-viewer

Drag-and-drop preview for glTF 2.0 models in WebGL using three.js.
https://gltf-viewer.donmccurdy.com/
MIT License
2.11k stars 536 forks source link

Why set up two cameras #337

Closed hcxmj closed 1 year ago

hcxmj commented 1 year ago

Hello author, why does the camera need to set two, a defaultCamera and an axesCamera. How to limit the two-finger touch dragging on the H5 to not exceed the screen boundary and the focus of the controller is always at the center of the object?

donmccurdy commented 1 year ago

Hi @hcxmj – The "axesCamera" is used to render the axes widget shown in the bottom left corner, when grid display is enabled:

Screenshot 2023-05-20 at 12 31 19 PM

How to limit the two-finger touch dragging on the H5 to not exceed the screen boundary and the focus of the controller is always at the center of the object?

These questions might be better directed to one of the three.js support channels:

hcxmj commented 1 year ago

Hi @hcxmj – The "axesCamera" is used to render the axes widget shown in the bottom left corner, when grid display is enabled:

Screenshot 2023-05-20 at 12 31 19 PM

How to limit the two-finger touch dragging on the H5 to not exceed the screen boundary and the focus of the controller is always at the center of the object?

These questions might be better directed to one of the three.js support channels:

ok, thank you @donmccurdy ,Another problem I have is that when dragging with two fingers on the mobile terminal H5, panning will occur. How to limit the panning to not exceed the limit of the screen? In addition, the focus of rotation after panning always seems to be a fixed point, and I want to rotate The focus is the center of the real-time position of the object. If it is realized, I am very much looking forward to getting your help and support, thank you

donmccurdy commented 1 year ago

@hcxmj sorry, I can't help you with your three.js questions in this bug tracker. Please use one of the links above, and ask your questions there. Thanks! :)

hcxmj commented 1 year ago

@hcxmj sorry, I can't help you with your three.js questions in this bug tracker. Please use one of the links above, and ask your questions there. Thanks! :)

@hcxmj sorry, I can't help you with your three.js questions in this bug tracker. Please use one of the links above, and ask your questions there. Thanks! :)

Ok, thank you very much, I looked at the source code of threejs and found that this is the case, so I realized it by changing the source code