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

tiled-map 的 doCleanupImageCache() 压根不会被执行. #17395

Open
finscn opened this issue Jul 19, 2024 · 0 comments
Open

tiled-map 的 doCleanupImageCache() 压根不会被执行. #17395

finscn opened this issue Jul 19, 2024 · 0 comments
Assignees
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@finscn
Copy link
Contributor

finscn commented Jul 19, 2024

Cocos Creator version

3.8.3

System information

all

Issue description

3.8 的 tiled map是不是从 2.x 里拷贝过来的?
这个 doCleanupImageCache 方法在 3.8里不会被执行. 因为 没有 _image 这个东西.

    doCleanupImageCache (texture): void {
        if (texture._image instanceof HTMLImageElement) {
            texture._image.src = '';
            if (JSB) texture._image.destroy();
        } else if (sys.hasFeature(sys.Feature.IMAGE_BITMAP) && texture._image instanceof ImageBitmap) {
            if (texture._image.close) texture._image.close();
        }
        texture._image = null;
    }

另外 texture 到底是什么类型? 看名字以为是 texture, 但是看代码 其实是 spriteFrame ...
你们的eslint居然允许这种无类型参数, 那代码质量能保证吗.
用ts的意义何在啊.

反正整个tiled组件都乱糟糟的. 性能也不太行. 感觉就是从2.x里复制过来, 简单改一改 勉强能用的状态.
之前在2.x时代承诺的一些改进也没改.

差评!

Relevant error log output

No response

Steps to reproduce

..

Minimal reproduction project

No response

@finscn finscn added Bug Needs Triage Needs to be assigned by the team labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants