Skip to content

Load remote astc #18848

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

Open
wants to merge 1 commit into
base: v3.8.8
Choose a base branch
from
Open

Load remote astc #18848

wants to merge 1 commit into from

Conversation

Changdw
Copy link
Contributor

@Changdw Changdw commented Jul 14, 2025

Re: https://github.com/cocos/3d-tasks/issues/19047

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@Changdw Changdw requested a review from star-e July 14, 2025 06:32
@Changdw
Copy link
Contributor Author

Changdw commented Jul 14, 2025

@cocos-robot run test cases

Copy link

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1005977 bytes 1006007 bytes ⚠️ +30 bytes
2D All (legacy pipeline) 2671067 bytes 2671097 bytes ⚠️ +30 bytes
2D All (new pipeline) 2761184 bytes 2761214 bytes ⚠️ +30 bytes
(2D + 3D) All 10017488 bytes 10017518 bytes ⚠️ +30 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16839109 bytes 16839139 bytes ⚠️ +30 bytes

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -30193,12 +30193,14 @@
          * Loads remote asset with url, such as audio, image, text and so on.
          * Note that `loadRemote` uses the extension name in the url to determine how to load the asset.
          * If you pass in a url without the extension name, you need to specify the `ext` parameter
          * in the `options` to indicate how you want the asset loaded. See the third example below.
+         * `options` can also specify the `format` parameter to indicate the compressed texture format. See the example below.
          *
          * @zh
          * 使用 url 加载远程资源,例如音频,图片,文本等等。需要注意的是 `loadRemote` 是通过 url 中的扩展名判断以何种方式加载该资源,
          * 如果你传入的 url 中没有携带后缀名,你需要额外指定 `options` 中的 `ext` 参数来表明你需要何种方式加载该资源。请参考下面的第三个示例。
+         * `options` 中的 `format` 参数可以指定压缩纹理格式. 请参考下面的第四个示例。
          *
          * @param url @en The url of asset. @zh 资源的 URL 链接。
          * @param options @en Some optional parameters. @zh 一些可选参数。
          * @param options.ext
@@ -30213,8 +30215,9 @@
          * @example
          * assetManager.loadRemote('http://www.cloud.com/test1.jpg', (err, texture) => console.log(err));
          * assetManager.loadRemote('http://www.cloud.com/test2.mp3', (err, audioClip) => console.log(err));
          * assetManager.loadRemote('http://www.cloud.com/test3', { ext: '.png' }, (err, texture) => console.log(err));
+         * assetManager.loadRemote('http://www.cloud.com/test5.astc', { format: Texture2D.PixelFormat.RGBA_ASTC_8x8 }, (err, texture) => console.log(err));
          *
          */
         loadRemote<T extends Asset>(url: string, options: {
             [k: string]: any;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant