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.

Annotations CSS style not changed in 2.8

Home Forums Bug Reports and Feature Requests Annotations CSS style not changed in 2.8

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

    Hi

    Just upgraded the v3d.js file into a project (using the update project feature from Verge3d 2.8) and it does something that makes changes in “.v3d.annotation” style impossible. A few labels are maintained but most changed to transparent ones by no apparent reason. The code for them is the same and works fine in V3D 2.7.1. If we try to force change in any annotation style, it’s not assumed.
    Cheers

    #8054

    Hi,

    The exact name of the style is “.v3d-annotation”. BTW, we documented this here. May be this why you cannot change it.

    Also, in 2.8 we made annotations fade out when obscured by geometry. This feature cannot be disabled with Puzzles but can be turned off via API.

    Chief 3D Verger | LinkedIn | Twitter

    #8082
    rhenriques
    Customer

    I already had annotations changed this way, using “.v3d-annotation” styles change. I suspect that probably the problem, in this case is really the new fade out features. They shouldn’t be faded in the precise layout that I have but, somehow, they can intersect a little bit the geometry and, for this reason, get faded. It’s a nice feature but, in my model, I need to turn it out. How do I do this via API?
    Cheers

    #8083

    Put the following snippet inside the runCode function in your app js file:

        app.scene.traverse(function(obj) {
            if (obj.isAnnotation)
                obj.fadeObscured = false;    
        });

    Chief 3D Verger | LinkedIn | Twitter

    #8089
    rhenriques
    Customer

    I’m going to try it. Which is the file?
    There’s the visual logic js, the v3d.js and some into the js folder and one with “name of the project js”. Tried them all and no luck. Most labels still are faded. I must be missing something.
    Cheers

    #8090

    Open your_app_name.js file and search for runCode. Then copy and paste the snippet above just below “add your code here” comment.

    Chief 3D Verger | LinkedIn | Twitter

    #8108
    rhenriques
    Customer

    Great Yuri. Going to try later.
    This is a very welcome feature for models of objects or very extruded natural geoforms! It’s not so interesting for landscape models. The ideal was to be able to change this using a puzzle or an option in a puzzle in an annotation by annotation basis. I suppose that it’s difficult to achieve.
    Cheers

    #8111
    rhenriques
    Customer

    I’m not achieving the disable of the annotations fading.
    Here’s the code change that I did.

    http://www.dct.uminho.pt/ScreenShot2018-10-10at18.48.png

    No luck. It’s possible that the code has some syntax issue?
    Cheers

    #8112
    rhenriques
    Customer

    I was testing this new fading feature and I feel that it’s not right. By rotating the model I’ve noticed that it fades annotations even if they are in the front of the model. This is not desirable. Annotations should only fade if they get behind the model, by rotation for instance. In the present form they are fading when they are within the model but in front of it. See the next video with this undesirable effect. In both cases the annotation should always be visible because it’s in the front of the object.

    Cheers

    #8122

    I’m not achieving the disable of the annotations fading.

    I think the code I suggested won’t work if annotations are added on some condition later, when an app is already initialized and the runCode function is already triggered.

    By rotating the model I’ve noticed that it fades annotations even if they are in the front of the model.

    Obscurity is detected based on objects’ bounding volumes so this feature works best for local distinct objects but not for continued landscapes.

    I like your idea about making a setting for turning this feature on and off when needed. I think we will make a minor bug fix release with this setting included.

    Thanks for the feedback!

    Chief 3D Verger | LinkedIn | Twitter

    #8134
    rhenriques
    Customer

    Hi Yuri

    Thank you so much for the reply!

    I think the code I suggested won’t work if annotations are added on some condition later, when an app is already initialized and the runCode function is already triggered.

    Is there any way, for now, to avoid this behavior without make a version regression? I’ve replaced the v3d.js file in an online version to maintain the previous behavior meanwhile. But it’s not the most interesting solution. In one of the apps that I have, this new feature behaves perfectly. I guess that it can be fine tuned to be able to be used with more flat landscape objects such as the one I’ve shown.

    I like your idea about making a setting for turning this feature on and off when needed. I think we will make a minor bug fix release with this setting included.

    That would be awesome! Most users are not “hard coding” guys, such as myself. So it’s always a good idea to make these options available using simple solutions. Probably there are other features that could also have such options. Maybe this could be made via a general “Settings” dialogue.
    For now I would like to solve this problem because it’s hard to fine-tune annotations while they are faded :)
    Cheers

    #8147

    Maybe this could be made via a general “Settings” dialogue.

    Check it out https://www.soft8soft.com/topic/hotfix-2-8-1/

    Chief 3D Verger | LinkedIn | Twitter

    #8148
    rhenriques
    Customer

    Hi Yuri

    That was quick!!
    The solution is perfect this way! I’ve already tested in two apps. In one, without HTML interface, works perfectly. However, in my other project with landscape objects, where I have an HTML interface and the app is into an iframe, the fading disable does not work. I don’t know how I can solve this issue. It’s something linked with changes in the v3D.js file not being updated. I change the fading option but it does not have any consequence. I’ve even erased and recreated again the init conditions puzzle.
    Cheers

    #8149

    May be this is browser cache? iframe-based apps are especially subject to the caching issue.

    Chief 3D Verger | LinkedIn | Twitter

    #8150
    rhenriques
    Customer

    Already emptied the browser cache. No Luck. Modifications must be made in the v3d.js file. If I backup this one and put the 2.7.1 version one it works great. However, of course, cannot use puzzles because the engine is not the same. When I put the new v3d.js file again in place, despite making fading inactive in the init puzzle, fading remains. Already tested in Safari and Chrome after empty the cache.

    PS: Just confirmed that only visual_logic.js and visual_logic.xml are modified by the init puzzle. I guess that the v3d.js, at least, must be patched to better support this feature.

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