The issue has been emailed:
- Time sent: 03/Nov/16 9:22 AM
- To: aymanmoghnieh@gmail.com
- with subject: *(
HELP-7645) [Fiware-lab-help] Restricting mouse-based interaction with the canvas in XML3D *
Hi,
if you are using XML3D 5.0+ then it sounds like you're using the 'examine' mode of the standard camera controller (camera.js). If so you can change the rotation center by changing the element that is being 'examined' by the camera, or by providing your own rotation center.
First, you should replace the default camera instance with your own:
var activeView = document.querySelector( document.querySelector("xml3d").view );
var camera = new XML3D.StandardCamera(activeView,
{ mode: "examine" }
);
Then you can change its rotation center either by examining another XML3D element:
camera.examine( targetElement );
or by setting its rotation center manually:
camera.setExaminePoint( new XML3D.Vec3(0, 0, 0) )
You can check the source code of camera.js for more options:
https://github.com/xml3d/xml3d.js/blob/master/tools/camera.js
Right now there is no way to limit the rotation to a certain axis, you would need to change the mouse handling in camera.js to do something like that.
Hope that helps!
Christian
Dear User,
I've just forwarded your request to the XML3D support team.
They'll contact you soon.
Best regards
Marco