Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-7645

FIWARE.Request.Tech.WebUI.XML3D.Restricting mouse-based interaction with the canvas in XML3D

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Hello, I am using the XML3D to visualize high resolution models of products
      for potential customers to check out before ordering. In its current state,
      when the user tries to rotate the model, the rotation center depends on
      where the user clicks on the canvas. Is there a way to fix the rotation
      center for this type of interaction? or is there a way to restrict this
      interaction so the user can only rotate in a specific direction?

      Thank you for your help!

      Since January 1st, old domains won't be supported and messages sent to any domain different to @lists.fiware.org will be lost.
      Please, send your messages using the new domain (Fiware-lab-help@lists.fiware.org) instead of the old one.
      _______________________________________________
      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fiware.org
      https://lists.fiware.org/listinfo/fiware-lab-help
      [Created via e-mail received from: Ayman Moghnieh <aymanmoghnieh@gmail.com>]

        Activity

        Hide
        marcocipriani Marco Cipriani added a comment -

        Dear User,
        I've just forwarded your request to the XML3D support team.
        They'll contact you soon.

        Best regards
        Marco

        Show
        marcocipriani Marco Cipriani added a comment - Dear User, I've just forwarded your request to the XML3D support team. They'll contact you soon. Best regards Marco
        Hide
        cschlinkmann Christian Schlinkmann added a comment -

        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

        Show
        cschlinkmann Christian Schlinkmann added a comment - 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
        Hide
        fw.ext.user FW External User added a comment -

        Comment by aymanmoghnieh@gmail.com :

        Thanks Christian, this way helpful.

        By managing the Examination Point, we were able to reduce the problem.
        We will look into expanding the mouse events handlers in camera.js too.

        Best regards

        Ayman Moghnieh Consultant in ideation and development of urban
        technologies
        m: (+34) 6260 75537 a: Barcelona, Spain
        s: www.yoway.cat
        <http://aymanmogh/> <https://www.linkedin.com/in/ayman-moghnieh-10ba0b4b>

        On Thu, Nov 3, 2016 at 9:23 AM, Help-Desk <jira-help-desk@jira.fiware.org>
        wrote:

        >
        >

        Show
        fw.ext.user FW External User added a comment - Comment by aymanmoghnieh@gmail.com : Thanks Christian, this way helpful. By managing the Examination Point, we were able to reduce the problem. We will look into expanding the mouse events handlers in camera.js too. Best regards Ayman Moghnieh Consultant in ideation and development of urban technologies m: (+34) 6260 75537 a: Barcelona, Spain s: www.yoway.cat < http://aymanmogh/ > < https://www.linkedin.com/in/ayman-moghnieh-10ba0b4b > On Thu, Nov 3, 2016 at 9:23 AM, Help-Desk <jira-help-desk@jira.fiware.org> wrote: > >

          People

          • Assignee:
            cschlinkmann Christian Schlinkmann
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: