Skip to content

Commit

Permalink
feat(asset-bundle): add "get ab progress info" logic
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc-git committed Apr 18, 2019
1 parent 9067e17 commit 353c8a1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/asset_bundle/AssetBundleUsageTest.re
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ let goToNextScene = (wabRelativePath, sabRelativePath, needRewriteAPI) => {
OperateSABAssetBundleMainService.isLoaded(sabRelativePath, state) ?
AssembleABSystem.SAB.assemble(
sabRelativePath,
OperateSABAssetBundleMainService.unsafeGetLoadedSAB(sabRelativePath, state),
OperateSABAssetBundleMainService.unsafeGetLoadedSAB(
sabRelativePath,
state,
),
OperateWABAssetBundleMainService.unsafeGetWholeDependencyRelationMap(
wabRelativePath,
state,
Expand Down
24 changes: 24 additions & 0 deletions src/asset_bundle/import/ProgressABSystem.re
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module RAB = {
let getAllDependencyRABCount = (abRelativePath, wabRelativePath, state) =>
FindDependencyDataSystem.findAllDependencyRAbRelativePath(
abRelativePath,
OperateWABAssetBundleMainService.unsafeGetWholeDependencyRelationMap(
wabRelativePath,
state,
),
)
|> Js.Array.length;

let getLoadedDependencyRABCount = (abRelativePath, wabRelativePath, state) =>
FindDependencyDataSystem.findAllDependencyRAbRelativePath(
abRelativePath,
OperateWABAssetBundleMainService.unsafeGetWholeDependencyRelationMap(
wabRelativePath,
state,
),
)
|> Js.Array.filter(rabRelativePath =>
OperateRABAssetBundleMainService.isAssembled(rabRelativePath, state)
)
|> Js.Array.length;
};

0 comments on commit 353c8a1

Please sign in to comment.