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.

Cursor hand

Home Forums General Questions Cursor hand

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #2986
    NewFake
    Customer

    Hi,

    is there, please, a way to show the hand cursor on rolling over objects?

    NewFake :)

    #2996

    Hi,

    Sure you can do it with ExternalInterface. Inside your_app.js find the prepareExternalInterface function and register a function with document.body.style.cursor = mode; inside it:

    
    function prepareExternalInterface(app) {
        app.ExternalInterface.cursorSet = function(mode) {
             document.body.style.cursor = mode;
        }
    }
    

    Your puzzles can look as shown on the attached image. ;-)

    Here is the exhaustive list of all cursor types
    https://www.w3schools.com/jsref/prop_style_cursor.asp

    Attachments:
    You must be logged in to view attached files.

    Chief 3D Verger | LinkedIn | Twitter

    #3002
    NewFake
    Customer

    Hello!

    I don’t see neither a “prepareExternalInterface” function in my_app.js file, nor a “when hovered” puzzle in the puzzles list.
    Kindly please elaborate. What should I do to get that function showing up?

    However I guess that this puzzle probably shows up when the function is added? As by default I don’t see it in the puzzles’ list.

    NewFake :)

    #3014

    ah, I forgot that we implemented this for version 2.2 which is still to be released for Blender. My bad… If you’d like, I can send you a link to the dev preview so that you can try these features beforehand. Or just wait a few days until the next stable release.

    Chief 3D Verger | LinkedIn | Twitter

    #3024
    NewFake
    Customer

    Hi Yuri!

    Yes I’ll wait, thank you. :good:

    NewFake :)

    #3199
    NewFake
    Customer

    Hi Yuri!

    I installed Verge 2.2 for Blender.
    I did exactly what you mentioned: the function inside the function the way it’s showed in the comments of my_app.js file, the “hovered” puzzle setup, saved, but my cursor doesn’t change to pointer; I also tried other kinds of cursors…
    I run FireFox latest version, I keep on cleaning my cache with ctrl f5… Any idea please?

    NewFake :)

    #3202
    NewFake
    Customer

    I also tried in Edge, with the server on, no cursor change; same on launching the html file of the app.

    NewFake :)

    #3207

    Hi,
    it works for me on FF. I attached a sample project for you to check it out

    Chief 3D Verger | LinkedIn | Twitter

    #3228
    NewFake
    Customer

    Hi Yuri!

    Thank you! Yes I get the cursor “hand” in your app, sniff… :cry:
    If it’s not due to the JS nor the puzzle would it be in my Blender file?
    Do you please see any special setting to be implemented in it in order to having that cursor function working fine? :wacko:

    Checked and found! It’s coming from the visual_logic.js file.
    I pasted yours into my app’s one; I just changed the object name in it and it works fine, I get the hand cursor!
    Now of course comes the question: why?
    Why on my system that file, the only one I changed manually, isn’t written the right way? :heart: :-(

    Here attached the visual_logic.js file exported from my system for you to scrutinize it.

    NewFake :)

    #3232
    NewFake
    Customer

    Here the exported problematic visual_logic.js JS file.

    A difference I see in that visual_logic.js file is on line 26
    Yours: var mode;
    Mine: var x, cursorSet, mode;

    My install also writes something wrong around line 197: “ALL_OBJECTS”; (it’s the name of all my 3D objects), alone on that line…

    The question of course is why those differences, and others that I most probably didn’t see because if I change only those two lines it still doesn’t work, I must paste the whole file of yours to having my cursor displayed, and change my objects’ names of course.
    Every time I save my puzzle it of course rewrites the JS file with errors.

    NewFake :)

    #3242

    Thank you for looking into this and attaching your project. We’ll try to figure it out ASAP.

    Chief 3D Verger | LinkedIn | Twitter

    #3247
    NewFake
    Customer

    Hi Yuri,

    Thank you, please check again the attached JS file above as version 2 contains the JS error on line 197, as version 1 didn’t contain it.

    My project is much too heavy for me to attach it here, objects and equirectangular file. I’m going to reproduce it on a lighter app and either upload it here if not too heavy or send it to you by email.

    NewFake :)

    #3251

    Replied by email. :)

    [EDIT] Your valued feedback inspired us to implement a validator for function names called from ExternalInterface. Now a missing function name will be highlighted red. Attaching here the updated puzzles runtime for preview purposes.

    Chief 3D Verger | LinkedIn | Twitter

    #3268
    NewFake
    Customer

    Hi Yuri!
    I put the above file, puzzles.min_-4.js, inside the “puzzles” folder after having renamed it to puzzles.min.js of course, and no, it doesn’t work; it doesn’t generate a correct visual_logic.js file, no hand cursor…
    The visual_logic.js file which works fine is the one you sent me in your my_awesome_app2.zip that you uploaded above.

    NewFake :)

    #3279

    Thank you for all the feedback, we’ll try to reproduce this issue from our side. Hopefully we’ll offer a fix soon. As you pointed it out, the puzzles build I attached in this thread breaks some other puzzles so I’m deleting it for now. :scratch:

    Chief 3D Verger | LinkedIn | Twitter

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