添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

loader Class

Module: cc

deprecated: cc.loader is deprecated, please backup your project and upgrade to cc.assetManager

cc.loader is deprecated, please backup your project and upgrade to AssetManager

Index

Properties
  • onProgress Unknown cc.loader.onProgress is deprecated, please transfer onProgress to API as a parameter
  • assetLoader Object cc.loader.assetLoader was removed, assetLoader and md5Pipe were merged into transformPipeline
  • md5Pipe Object cc.loader.md5Pipe is deprecated, assetLoader and md5Pipe were merged into transformPipeline
  • downloader Object cc.loader.downloader is deprecated, please use downloader instead
  • loader Object cc.loader.loader is deprecated, please use parser instead
  • Methods
  • load cc.loader.load is deprecated, please use loadAny instead
  • getXMLHttpRequest cc.loader.getXMLHttpRequest is deprecated, please use XMLHttpRequest directly
  • getItem cc.loader.getItem is deprecated, please use cc.assetManager.asset.get instead
  • loadRes cc.loader.loadRes is deprecated, please use load instead
  • loadResArray cc.loader.loadResArray is deprecated, please use load instead
  • loadResDir cc.loader.loadResDir is deprecated, please use loadDir instead
  • getRes cc.loader.getRes is deprecated, please use get instead
  • getDependsRecursively cc.loader.getDependsRecursively is deprecated, please use use DependUtil/getDepsRecursively:method instead
  • addDownloadHandlers cc.loader.addDownloadHandlers is deprecated, please use cc.assetManager.downloader.register instead
  • addLoadHandlers cc.loader.addLoadHandlers is deprecated, please use cc.assetManager.parser.register instead
  • release cc.loader.release is deprecated, please use releaseAsset instead
  • releaseAsset cc.loader.releaseAsset is deprecated, please use releaseAsset instead
  • releaseRes cc.loader.releaseRes is deprecated, please use AssetManager/releaseRes:method instead
  • releaseResDir cc.loader.releaseResDir was removed, please use AssetManager/releaseRes:method instead
  • releaseAll cc.loader.releaseAll is deprecated, please use releaseAll instead
  • removeItem cc.loader.removeItem is deprecated, please use cc.assetManager.assets.remove instead
  • setAutoRelease cc.loader.setAutoRelease is deprecated, if you want to prevent some asset from auto releasing, please use addRef instead
  • setAutoReleaseRecursively cc.loader.setAutoReleaseRecursively is deprecated, if you want to prevent some asset from auto releasing, please use addRef instead
  • isAutoRelease cc.loader.isAutoRelease is deprecated
  • Details

    Properties

    onProgress

    cc.loader.onProgress is deprecated, please transfer onProgress to API as a parameter

  • resources String | String[] | Object Url list in an array
  • progressCallback Function Callback invoked when progression change
    • completedCount Number The number of the items that are already completed
    • totalCount Number The total number of the items
    • item Object The latest item which flow out the pipeline
    • completeCallback Function Callback invoked when all resources loaded
    • getXMLHttpRequest

      cc.loader.getXMLHttpRequest is deprecated, please use XMLHttpRequest directly

      description
      Parameters
    • url String Url of the target resource.
                      The url is relative to the "resources" folder, extensions must be omitted.
      
    • type Function Only asset of type will be loaded if this argument is supplied.
    • progressCallback Function Callback invoked when progression change.
      • completedCount Number The number of the items that are already completed.
      • totalCount Number The total number of the items.
      • item Object The latest item which flow out the pipeline.
      • completeCallback Function Callback invoked when the resource loaded.
        • error Error The error info or null if loaded successfully.
        • resource Object The loaded resource if it can be found otherwise returns null.
        • loadResArray

          cc.loader.loadResArray is deprecated, please use load instead

          description
          Parameters
        • urls String[] Array of URLs of the target resource.
                             The url is relative to the "resources" folder, extensions must be omitted.
          
        • type Function Only asset of type will be loaded if this argument is supplied.
        • progressCallback Function Callback invoked when progression change.
          • completedCount Number The number of the items that are already completed.
          • totalCount Number The total number of the items.
          • item Object The latest item which flow out the pipeline.
          • completeCallback Function A callback which is called when all assets have been loaded, or an error occurs.
            • error Error If one of the asset failed, the complete callback is immediately called
                                            with the error. If all assets are loaded successfully, error will be null.
              
            • assets Asset[] | Array An array of all loaded assets.
                                                        If nothing to load, assets will be an empty array.
              
              Parameters
            • url String Url of the target folder.
                              The url is relative to the "resources" folder, extensions must be omitted.
              
            • type Function Only asset of type will be loaded if this argument is supplied.
            • progressCallback Function Callback invoked when progression change.
              • completedCount Number The number of the items that are already completed.
              • totalCount Number The total number of the items.
              • item Object The latest item which flow out the pipeline.
              • completeCallback Function A callback which is called when all assets have been loaded, or an error occurs.
                • error Error If one of the asset failed, the complete callback is immediately called
                                                with the error. If all assets are loaded successfully, error will be null.
                  
                • assets Asset[] | Array An array of all loaded assets.
                                                    If nothing to load, assets will be an empty array.
                  
                • urls String[] An array that lists all the URLs of loaded assets.
                • getRes

                  cc.loader.getRes is deprecated, please use get instead

                  description
                • url String
                • type Function Only asset of type will be returned if this argument is supplied.
                • getDependsRecursively

                  cc.loader.getDependsRecursively is deprecated, please use use DependUtil/getDepsRecursively:method instead

                  description
                • owner Asset | String The owner asset or the resource url or the asset's uuid
                • addDownloadHandlers

                  cc.loader.addDownloadHandlers is deprecated, please use cc.assetManager.downloader.register instead

                  description
                • url String
                • type Function Only asset of type will be released if this argument is supplied.
                • releaseResDir

                  cc.loader.releaseResDir was removed, please use AssetManager/releaseRes:method instead

                  description
                • assetOrUrlOrUuid Asset | String asset object or the raw asset's url or uuid
                • autoRelease Boolean indicates whether should release automatically
                • setAutoReleaseRecursively

                  cc.loader.setAutoReleaseRecursively is deprecated, if you want to prevent some asset from auto releasing, please use addRef instead

                  description
                • assetOrUrlOrUuid Asset | String asset object or the raw asset's url or uuid
                • autoRelease Boolean indicates whether should release automatically
                • isAutoRelease

                  cc.loader.isAutoRelease is deprecated

                  description
  •