Open
Conversation
…pressed texture format
Contributor
Author
|
@cocos-robot run test cases |
Code Size Check Report
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;
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re: https://github.com/cocos/3d-tasks/issues/19047
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: