@@ -4,12 +4,12 @@ import { checkBuildCommonOptionsByKey, checkBundleCompressionSetting } from '../
44import { NATIVE_PLATFORM , PLATFORMS } from '../share/platforms-options' ;
55import { validator , validatorManager } from '../share/validator-manager' ;
66import { checkConfigDefault , defaultMerge , defaultsDeep , getOptionsDefault , resolveToRaw } from '../share/utils' ;
7- import { Platform , IDisplayOptions , IBuildTaskOption , IConsoleType , TextureCompressRenderConfig } from '../@types' ;
7+ import { Platform , IDisplayOptions , IBuildTaskOption , IConsoleType , TextureCompressRenderConfig , TextureCompressFullRenderConfig } from '../@types' ;
88import { IInternalBuildPluginConfig , IPlatformBuildPluginConfig , PlatformBundleConfig , BundleQueryConfig , IBuildStageItem , BuildCheckResult , BuildTemplateConfig , IConfigGroupsInfo , IPlatformConfig , ITextureCompressConfig , IBuildHooksInfo , IBuildCommandOption , MakeRequired , IBuilderConfigItem , IPlatformRegisterInfo , IPluginRegisterInfo , IPackageRegisterInfo , IBuilderRegisterInfo } from '../@types/protected' ;
99import Utils from '../../base/utils' ;
1010import i18n from '../../base/i18n' ;
1111import lodash from 'lodash' ;
12- import { configGroups } from '../share/texture-compress' ;
12+ import { configGroups , textureFormatConfigs , formatsInfo , defaultSupport } from '../share/texture-compress' ;
1313import { BundlePlatformTypes } from '../share/bundle-utils' ;
1414import { newConsole } from '../../base/console' ;
1515import builderConfig from '../share/builder-config' ;
@@ -620,31 +620,37 @@ export class PluginManager extends EventEmitter {
620620 /**
621621 * 查询所有平台的纹理压缩配置,按纹理压缩平台类型分组
622622 */
623- public queryTextureCompressConfig ( ) : Record < string , TextureCompressRenderConfig > {
624- const result : Record < string , TextureCompressRenderConfig > = { } ;
623+ public queryTextureCompressConfig ( ) : TextureCompressFullRenderConfig {
624+ const platformRenderConfigs : Record < string , TextureCompressRenderConfig > = { } ;
625625
626626 for ( const [ platform , config ] of Object . entries ( this . platformConfig ) ) {
627627 if ( ! config . texture ) {
628628 continue ;
629629 }
630630 const platformType = config . texture . platformType ;
631- if ( ! result [ platformType ] ) {
631+ if ( ! platformRenderConfigs [ platformType ] ) {
632632 const groupInfo = configGroups [ platformType ] ;
633- result [ platformType ] = {
633+ platformRenderConfigs [ platformType ] = {
634634 displayName : groupInfo ? groupInfo . displayName : platformType ,
635635 platformConfigs : { } ,
636636 } ;
637637 }
638638
639639 const platformName = config . name || platform ;
640- result [ platformType ] . platformConfigs [ platform ] = {
640+ platformRenderConfigs [ platformType ] . platformConfigs [ platform ] = {
641641 platformName : i18n . transI18nName ( platformName ) ,
642642 platformType : config . texture . platformType ,
643643 support : config . texture . support ,
644644 } ;
645645 }
646646
647- return result ;
647+ return {
648+ configGroups,
649+ textureFormatConfigs,
650+ formatsInfo,
651+ defaultSupport,
652+ platformRenderConfigs,
653+ } ;
648654 }
649655
650656 /**
0 commit comments