![image](https://img2023.cnblogs.com/blog/419321/202305/419321-20230523065406881-575383805.png)


- 可视化地给出扩展、贡献之间的依赖关系
- 选择依赖的扩展、贡献
- 依赖检查

这要求将一个扩展/贡献 协议 dependent可视化，并提供可选列表，进行依赖检查



# * TODO auto generate dependent in package.json when webpack
# add a gulp task? or directly use webpack plugin?



# TODO add gulp task when publish




# TODO update all extensions, contributes


# TODO update template


* DONE pipeline protocol add allPipelineData

TODO registerPipeline add dependent pipeline protocols for jobOrders

    TODO add dependent pipeline protocols to     package.json->"dependencies"




* DONE 可视化地给出扩展、贡献之间的依赖关系；选择依赖的扩展、贡献

- 可视化地给出扩展、贡献之间的依赖关系
by package.json->"dependencies"?
- 选择依赖的扩展、贡献
- 依赖检查

这要求将一个扩展/贡献/Package 协议 dependent可视化，并提供可选列表，进行依赖检查





** DONE add to ap assemble



*** DONE render basic graph



# ** TODO mark entry extension in graph
*** DONE after start entry extension, then show graph
    start entry extension is the root graph node




# title: protocol + version



update graph when selected packages/extensions/contributes change


TODO fix: same to empty

TODO fix: same to exist


update version

3 cases

change id to protocol name

try catch

# id + version

TODO switch graph


commit



*** DONE handle duplicate extension,contribute
check error: give all duplicate ones info



*** DONE fix store bug


*** DONE style line, node for find/unfind ones


extension: blue
contribute: green

package extension: baby blue
package contribute: baby green

no: red



*** DONE adjust size

whole size

auto adjust size


# ***  TODO restore: check version in ManagerUtils->_checkDependentMap
# ***  TODO not ManagerUtils->_checkDependentMap, use DependencyGraph data check result
***  DONE Element assemble use DependencyGraph data check result

***  DONE publish app use DependencyGraph data check result



** DONE fix: start/unstart extension should effect all


** DONE refactor: remove Visual

**  DONE refactor: move CanvasController to ElementAssemble

** DONE add to package assemble


** DONE fix: start/unstart extension should effect all?


** DONE pass bdd test

update coverage


* TODO editor implement publish

# 用户可以实现自己的后端逻辑;
# Meta3D提供Web3、Clound后端的Extension供用户选择

download zip



# engine arraybuffer?

# load?

#     # mark engine package?
#     add engine package for publish action?
#         specify entry extension?
#         generate engine pacakge
#     add load scene glb from import scene?
#         not dispose scene

html:
loading ui
use-package2



editor->engine
no worker
webgl2?


publish->engine
no worker/worker
webgl1/webgl2/webgpu



editor vs publish

same:
scene

different:
render mode:webgl/webgpu

init/update/render pipeline


shouldn't use the same engine package


multiple engine packages for publish



** design

add mark package as 保存在发布包中:
    check: one package protocol should only has one marked pacakge at most



generate app now has app file + packages(marked as 保存在发布包中)

load app now store packages(marked as 保存在发布包中) in meta3dState

api add:
getPackage(meta3dState, package protocol name): nullable<ArrayBuffer>


publish action:
generate zip file: engine pacakge, scene glb, html, res, ...




load engine package->get entry extension

->loadScene(add loadScene) 
use new import scene for engine(not dispose scene) extension + scenegraph converter extension

** DONE update meta3d

TODO generate app now has app file + packages(marked as 保存在发布包中)

TODO load app now store packages(marked as 保存在发布包中) in meta3dState

TODO api add:
getPackage(meta3dState, package protocol name): nullable<ArrayBuffer>


** DONE update assemble space

TODO add mark package as 保存在发布包中:
    # check: one package protocol should only has one marked pacakge at most


TODO update publish app(generate app)
TODO update run element(generate app)

# TODO update enter app(load app)

TODO pass bdd test


** DONE prepare engine package(three)

TODO entry extension add loadScene:
use new import scene for engine(not dispose scene) extension + scenegraph converter extension



** DONE add publish action(for button click)

TODO generate zip file: engine pacakge, scene glb, html, res, ...


TODO html js:
- handle loading info;
- meta3d js
- use metad js to load engine package->get entry extension
->loadScene(add loadScene) 

TODO check: entryExtensionProtocolName should be "meta3d-engine-whole-sceneview-protocol"


** DONE refactor

TODO merge engine-whole


# TODO split import scene to load scene, import scene(use engine whole service to load scene)


** DONE fix import app

** DONE dependency graph: fix: duplicate for packages stored in app

** DONE fix select package


** DONE pass run test


build engine package

add publish button, pass run test


# * TODO perf: reduce Engine.arraybuffer size

# scenegraph not import from three

# engine-scene: 2.4M
# engine-render:1.4



# * TODO perf: optimize get all of package

# test: get all of engine whole package


* DONE perf: PackageInspector: add show Debug button. only read debug when show Debug



* DONE dependency graph: fix: recursive dependency

* DONE dependency graph: fix: duplicate for action


# * TODO dependency graph: todo fix ui control node
* DONE dependency graph: todo fix action node

# TODO if has entry extension or ui control, show dependency graph
#     ui controls are entry root nodes


# TODO if has entry extension or ui control, show dependency graph
TODO actions are also entry root nodes


TODO element assemble: restore isPass check


* DONE update dependency graph(ap, package)

TODO extension,contribute package.json add "packageDependencies":{"protocol name": versionRange} for api.getPackage

TODO extensionPackageData, contributePackageData add 
  dependentPackageProtocolNameMap: Meta3dCommonlibType.ImmutableHashMapType.t<
    packageProtocolName,
    packageProtocolVersion,
  >


TODO graph: handle dependentPackageProtocolNameMap(not recuive)
    nonempty node is yellow
    empty node is yellow-red



* DONE fix: not stored: slow


* DONE pass bdd test



* DONE publish

TODO pass ci

TODO publish and release

TODO update production env