Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix preloading does not callback when something goes wrong #22

Merged

Conversation

@holycanvas
Copy link
Contributor

holycanvas commented Oct 31, 2019

修复加载图片失败后不回调
cocos-creator/engine#5645

@holycanvas holycanvas requested a review from umbrellaPP Oct 31, 2019
gif : downloadImage,
ico : downloadImage,
tiff : downloadImage,
webp : downloadImage,

This comment has been minimized.

Copy link
@umbrellaPP

umbrellaPP Nov 1, 2019

Collaborator
function downloadWebp (item, callback) {
    if (!cc.sys.capabilities.webp) {
        callback(new Error(cc.debug.getError(4929, item.url)));
        return;
    }
   downloadImage(item, callback);
}

这里请用 downloadWebp handler

This comment has been minimized.

Copy link
@holycanvas

holycanvas Nov 1, 2019

Author Contributor

不用了,我之前的有个pr,把webp的检测放到了texture里面去了,参考:cocos-creator-packages/weapp-adapter#120

@umbrellaPP umbrellaPP merged commit 35cc9e1 into cocos-creator-packages:v2.2.1-release Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.