We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

FPS camera does not work with ifame

Home Forums Bug Reports and Feature Requests FPS camera does not work with ifame

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #13819
    zjbcool
    Customer

    when I use iframe embedding a FPS camera scene,I can not use wasd contrl the movement of camera. Is it a bug? :unsure:

    #13820
    elk
    Customer

    Hi zjbcool.

    I use this little snippet for now;

    app.ExternalInterface.reFocus = function(){
            var target = parent.document.querySelector("iframe[src='your_app.html").focus();
        }

    Just call this from your puzzles when you need to refocus your iframe. Like after you press a html-buttons and maybe right after your app is initialized.

    (Actualy; You probably don’t need the variable, so you can probably remove “var target = “)

    Been a little while since I implemented this, so if the Verge3D team has a better way to do it now I would also like to know.

    #13824
    zjbcool
    Customer

    @elk Thanks for your advice, I will try.

    #13825
    elk
    Customer

    No problem :good: Let me know how it works out, and maybe the Verge3D team can fill inn if there is a better/more recommended way of doing it.

    #13829
    zjbcool
    Customer

    Hi elk.
    It’s working now.Perfect! :yahoo:

    #13831
    elk
    Customer

    Great. :good: Glad it worked for you. I only tested on my regular desktop browsers so far, so let us know if you find any issues, but i think it should be fairly robust. I got the basic code from some other post on her, so might be good to do a search here to if you get any issues.

    #33040
    Massimo Spica
    Customer

    Ehy guys, I implemented the snippet on a pressed interface button but focus of keyboard doesn’t work. Just the mouse.

    dunno how to do, can you help me somehow?

    #33050

    Hi,

    can you show your code? may be you could share the link to your app as well?

    Chief 3D Verger | LinkedIn | Twitter

    #33055
    Massimo Spica
    Customer

    hi!
    here the link. It’s as simple as possible, i made this just to understand this bug.

    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:eefbc26a42/applications/my_awesome_app/index.html

    i put here the whole application and a screenshot, hope you can help me :D

    Attachments:
    You must be logged in to view attached files.
    #33058
    Massimo Spica
    Customer

    https://we.tl/t-npiS3gRhFW

    this is the whole application

    #33061

    Hi,

    I think you should put there my_awesome_app.html rather than your_app.html. :)

    Chief 3D Verger | LinkedIn | Twitter

    #33062
    Massimo Spica
    Customer

    i did it, check the puzzle, doesn’t work anyway

    i put the name of my app.html, in that case my_awesome_app.html, assuming the your_app.html of the snippet was generic. correct?

    #33064

    that’s strange, because the scenario in the linked app still refers to your_app.html :unsure:

    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:eefbc26a42/applications/my_awesome_app/visual_logic.js

    Chief 3D Verger | LinkedIn | Twitter

    #33069
    Massimo Spica
    Customer

    maybe i changed it later for mistake. Now in visual_logic.js is my_awesome_app, but still not working.

    https://we.tl/t-xO8Em8ktcw

    #33075

    I see. This is because such the configuration just registers the function but does not execute it. It worked for me after I placed the only exec script puzzle in the main Puzzles tab with the following line in it:

    parent.document.querySelector("iframe[src='my_awesome_app.html']").focus();

    Chief 3D Verger | LinkedIn | Twitter

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.