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.

How to reference a Verge 3d varible in a Javascript Code Puzzle

Home Forums General Questions How to reference a Verge 3d varible in a Javascript Code Puzzle

Viewing 3 posts - 31 through 33 (of 33 total)
  • Author
    Posts
  • #83127
    bigmike814
    Customer

    yeah, its the freaking forum that is breaking the code.

    let elem = document.getElementById(gamescreen);
    
    function fullscreen() {
    if (elem.requestFullscreen) {
    elem.requestFullscreen();
    window.PetraBasicSpeed = 0.007;
    console.log('PetraBasicSpeed set (standard):', window.PetraBasicSpeed);
    } else if (elem.webkitRequestFullscreen) { // Safari
    elem.webkitRequestFullscreen();
    window.PetraBasicSpeed = 0.12;
    console.log("PetraBasicSpeed set (webkit):", window.PetraBasicSpeed);
    } else if (elem.msRequestFullscreen) { // IE11
    elem.msRequestFullscreen();
    window.PetraBasicSpeed = 0.25;
    console.log("PetraBasicSpeed set (ms):", window.PetraBasicSpeed);
    }
    }

    ' is not the same as this ‘

    which is why it was breaking

    #83129
    c4cc
    Customer

    My code, sadly no change

    #83157
    bigmike814
    Customer

    Are you checking the console for the logs? the code you have isn’t going to call the function that changes the speed. you have to call the function as well. but you should see the logs that react to the changing. Does that make sense?

    Once you get the logs reacting how you want them, then let’s take a look at triggering the function that uses the variable to set the speed.

Viewing 3 posts - 31 through 33 (of 33 total)
  • You must be logged in to reply to this topic.