Layer Display BUG

  • I found a problem with the display of the layer,the layer will show after the scene load finish.this is a bug?

    When i open the vtour,i will first see black backgroud color and then see the scene ,the last see the layer.

    1.bgcolor
    2.scene
    3.layer

    But this is not what i want.I want first see the layer,after click will see scene.
    1.bgcolor
    2.layer
    3.click-->layer-->scene

    this is my code

    attachments is my frame-by-frame recording

  • I test set layer type is container,it is ok.

    Code
    <layer name="load_test_container" type="container" height="100%" width="100%" bgcolor="0x000000" bgalpha="1" keep="true" zorder="99" onclick="set(x,-3000)" bgcapture="true"/>

    if layer type is image,it will caused this bug.it's will show adout 10+ ms scene

    below code also caused this bug

    Code
    <layer name="load_test_container" type="container" height="100%" width="100%" bgcolor="0x000000" bgalpha="0" keep="true" zorder="99">
    	<layer name="layer_load_test" url="layertest.jpg" keep="true" visible="true" height="100%" width="100%" safearea="false" onclick="set(x,-3000)"/>
    </layer>
  • Code
    <layer name="load_test_container" type="container" height="100%" width="100%" bgcolor="0x3c6b05" bgalpha="1" keep="true" zorder="99">
    	<layer name="layer_load_test" url="layertest.jpg" keep="true" visible="true" height="100%" width="100%" safearea="false" onclick="set(x,-3000)"/>
    </layer>

    this is my use code,it not perfect.i set container's bgcolor like image's bgcolor.

    i still want get some way to solution this issue.


    *smile* Hi indexofrefraction,i try it,but no effect

    Code
    <layer name="load_test_container_overlay" type="container" height="100%" width="100%" bgcolor="0x000000" bgalpha="1" keep="true" zorder="100"/>
    
    
    <events name="remove_overlay" keep="true" onloadcomplete="set(layer[load_test_container_overlay].alpha,0)"/>
    
    
    <layer name="load_test_container" type="container" height="100%" width="100%" bgcolor="0x000000" bgalpha="0" keep="true" zorder="99">
    	<layer name="layer_load_test" url="layertest.jpg" keep="true" visible="true" height="100%" width="100%" safearea="false" onclick="set(x,-3000)"/>
    </layer>
  • events onloadcomplete does not wait for your image
    https://krpano.com/docu/xml/#events.onxmlcomplete

    you must use your layers onload event

    Code
    <layer name="layer_load_test" url="layertest.jpg" keep="true" visible="true" height="100%" width="100%" safearea="false" onclick="set(x,-3000)"
         onloaded="set(layer[load_test_container_overlay].alpha,0)" />


    https://krpano.com/docu/xml/#layer.onloaded

    if you have multiple images you must use a counter for each image : onloaded="inc(mycounter)"
    and then an onstart action callwhen(mycounter GE 5, set(layer[load_test_container_overlay].alpha,0));

  • use layers onload event also have about 7ms scene

    thank you indexofrefraction,i have to use delayedcall to fix it.

    Code
    <layer name="layer_load_test" url="layertest.jpg" keep="true" visible="true" height="100%" width="100%" safearea="false" onclick="set(x,-3000)" onloaded="delayedcall(0.1,set(layer[load_test_container_overlay].alpha,0));"/>

    now look like perfect

  • LOL...Screen to Gif ,recording screen,about 7ms,more or less

    so delayedcall 100ms is ok,no scene/screen flash cross *tongue*

    but also hope klaus.krpano fix it or give some advice.now just like perfect,it not perfect.

    Edited once, last by arielei (May 12, 2020 at 2:25 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!