Jump to content

Screen shadow in iphone


SahJ
 Share

Recommended Posts

Hello I have a problem, when I separate the html script and put it aside in a JS and upload it to facebook to do it as an instant game and visualize it on an iphone, touching the screen darkens creating a shadow effect that obscures the scene , it only happens on iphone on a phone with android works fine.
I use babylon js to create the game, it also happens with the example that exists, it only happens when the index.html is linked to the JS.

Any solution?

index.html

lobby.js

Link to comment
Share on other sites

This seems related to Sound on iOS. but default iOS does not let you play a sound unless it comes from an user initiated event. So you need a real HTML button 

 

See more here: https://stackoverflow.com/questions/32945273/how-to-autoplay-html5-video-and-audio-tags-on-ios

 

To make sure this is the problem can you remove all the code associated with sound and try again?

Link to comment
Share on other sites

 

Solve the problem by adding a css.


[touch-action="none"] {
    -ms-touch-action: none;
    touch-action: none;
    touch-action-delay: none;
}

body /shadow-deep/ [touch-action="none"] {
    -ms-touch-action: none;
    touch-action: none;
    touch-action-delay: none;
}

[touch-action="auto"] {
    -ms-touch-action: auto;
    touch-action: auto;
    touch-action-delay: none;
}

body /shadow-deep/ [touch-action="auto"] {
    -ms-touch-action: auto;
    touch-action: auto;
    touch-action-delay: none;
}

[touch-action="pan-x"] {
    -ms-touch-action: pan-x;
    touch-action: pan-x;
    touch-action-delay: none;
}

body /shadow-deep/ [touch-action="pan-x"] {
    -ms-touch-action: pan-x;
    touch-action: pan-x;
    touch-action-delay: none;
}

[touch-action="pan-y"] {
    -ms-touch-action: pan-y;
    touch-action: pan-y;
    touch-action-delay: none;
}

body /shadow-deep/ [touch-action="pan-y"] {
    -ms-touch-action: pan-y;
    touch-action: pan-y;
    touch-action-delay: none;
}

[touch-action="pan-x pan-y"],
[touch-action="pan-y pan-x"] {
    -ms-touch-action: pan-x pan-y;
    touch-action: pan-x pan-y;
    touch-action-delay: none;
}

body /shadow-deep/ [touch-action="pan-x pan-y"],
body /shadow-deep/ [touch-action="pan-y pan-x"] {
    -ms-touch-action: pan-x pan-y;
    touch-action: pan-x pan-y;
    touch-action-delay: none;
}

 

The problem is that it eliminates the default animations of the babylon buttons, the interface must be created with html and css

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...