Loading textures failed in Ios Safari and Chrome

Texture works in web browsers but not on Iphone.



Looks like you are loading external textures. What are the messages shown in the Safari console? How large are the textures (dimensions)? Is this problem only on iOS? (ie does this happen on desktop or Android?)

Yes I’m loading external textures and work on desktop.

var UserImageHandler = pc.createScript('userImageHandler');

// initialize code called once per entity
UserImageHandler.prototype.initialize = function() {

UserImageHandler.prototype.onUserDataChanged = function(userData) {
           return function(err,asset){

UserImageHandler.prototype.onImageLoad = function(err,asset) {
    if(asset && asset.resource)

but not on “Safari” or “Chrome” on Ios.

Could you answer the other questions? It will help to try to narrow down the cause.

I have a hunch the textures are too large if it’s working on desktop. It’s difficult to say without seeing the error in dev console on Safari.

Yes!. What was the question? Altough I think I answered. I don’t know how to open Safari console on iPhone. I know that is possible if iPhone is connected on Mac can see logs in Xcode. Texture is not too large I think

If you have access to a Mac, you can use Safari on the Mac to get the developer console. https://blog.idrsolutions.com/2015/02/remote-debugging-ios-safari-on-os-x-windows-and-linux/

I would like to know the exact dimensions of the textures trying to be loaded.

Does this happen on Android if you have access to one? If it does, can you use Chrome Dev tools to get the error messages? https://developers.google.com/web/tools/chrome-devtools/remote-debugging/

I attahched the image “default-user-…”.png it is 230x230. We prefer we use Apple devices, so Droid is not of importance. But I’ll try on Droid now.

Part of me is wondering if the issue that the images are not power of 2 dimensions but I’m not aware of it being a problem in the past?

As much as I know it will use texture anyway which is power of 2, and the rest will be waste of space if orginal source is not p2.

The other thing that might have happened is that you have ran out of VRAM as I noticed you have quite a few large textures in the project.

A sanity check is to try loading some of the external images in a separate project that has no other textures in it.

Good Idea I’ll make small scene with texture load.