* DONE action add in it element store

** DONE finish

TODO one action implement has one action protocol, not share!
  TODO move action name to protocol
  TODO move actionData to ui-control
    TODO rename actionData to uiData



TODO assemble-space

  # TODO need update bind element state to rect
  TODO remove "bind element state to rect"

  # TODO element inspector: show created element states, can't edit
  TODO remove element inspector
  TODO handle createState


TODO need refactor meta3d-action-click-button





TODO run test


commit



TODO update all actions
TODO remove meta3d-action-button-click-protocol


commit


////TODO refactor: rename handler, createState to handlerFunc, createStateFunc


////commit




** DONE update frontend, assemble-space for "one action implement has one action protocol, not share"

TODO dependent graph

TODO judge action(Market?)



* TODO use view control implement(low level) for scene view and game view


one canvas-one view-one gl


one engine state(meta3dState?)(encapsulate)



contain scene view and game view




# ** TODO add meshrenderer component


# has isRender


# ** TODO update PrepareRenderDataJob



** DONE render scene view and game view


share gl, engine state



encapsulate viewport logic



config:
viewRect


  |> DeviceManagerEngineService.setViewport(viewRect)
  |> DeviceManagerEngineService.setScissorTest(true)
  |> DeviceManagerEngineService.setScissor(viewRect)





scene view has default scene gameObjects



TODO add game view

TODO add run, stop action

TODO update use

TODO finish TODO

TODO commit


* DONE pass run test

TODO update add cube



TODO run test: default

  # game view not show

  # scene view active error
  # no arcball event

    # split pipeline three, camera, transform


TODO commit


TODO run test: add cube

  # game view not add
  #   fix meta3dState?

TODO commit


TODO run test: run, stop

    # loop gameview when stop


TODO commit


TODO finish TODOs



TODO need publish:
# meta3d-scenegraph-converter-three-sceneview, gameview
# meta3d-engine-basic-sceneview, gameview
# meta3d-engine-scene-sceneview, gameview
# pipeline-camera
# meta3d-editor-webgl1-three-run-engine-gameview+protocol
# meta3d-editor-webgl1-three-run-engine-sceneview+protocol
# add-cube
# run,stop
# use-editor



TODO commit


# * TODO fix: meta3dState

# TODO use-editor/empty: main loop should get/set meta3dState?
# TODO run action: loop should get/set meta3dState?



# * TODO refactor: extract pipeline-editor-view-utils


* DONE update import/export scene, publish, dispose

TODO handle game view instead of scene view

TODO import scene:


TODO run test without publish


TODO fix: scene,game view: color not the same after add cube


# TODO fix: scene,game view: color not the same after import
TODO fix: scene view: position not the same after import
  TODO fix: scene view: position not the same after add cube


TODO run test with publish
  TODO update engine whole package(import, then update)



TODO need publish:
# action-import-scene
# game-view1
# scene-view1
# add-cube


** DONE how to handle publish and run? （发布时需要判断是否在run）
////责任链 or event queue or query element store?


- query element store





* TODO handle event

TODO default scene's camera add arcball

# run action:
# bind arcball event

# stop action:
# unbind arcball event



# game view1 add update arcball job

# import

# whole-gameview service handle event

# commit


# TODO need publish:
# meta3d-pipeline-editor-event-sceneview
# meta3d-pipeline-editor-webgl1-game-view1

** DONE pass run test: before run, run, stop


# TODO fix:
# scene, game view has the same arcball
# scene view not bind event




** DONE pass run test: export, import

TODO fix:
////game view miss arcball


** TODO pass run test: publish

TODO use game view

////TODO bind event when active has arcball


# TODO load scene


TODO need publish:
# meta3d-pipeline-editor-event-sceneview
# meta3d-pipeline-editor-webgl1-game-view1, scene
# run, stop
# publish
# import
# engine-whole
# engine-scene, gameview
# meta3d-editor-webgl1-three-engine-whole-gameview
# meta3d-editor-engine-webgl1-three-render-gameview



# TODO split pipeline to gameview
#   update extension's dependent

TODO extract load scene from import scene

TODO update meta3d-engine-webgl1-three-render to gameview



* DONE fix: import package->diselect pipeline dispose: component diselect too!



* DONE fix: Select Contributes: why selected multiple?

has same display names(pipeline-xxx)






* DONE feat: pass "publish" run test

TODO rebuild whole package



# ** TODO refactor duplicate  ArcballCameraControllerEventForXxxViewUtils


# ** TODO handle scene view, game view event


# refer to wonder-editor code


# add event target



# dependent on scene view event, game view event(has independent state)?




# * TODO run test: add scene view, game view based to show a cube + arcball camera






# * TODO add two buttons, to add a cube gameObject and add a arcball camera controller gameObject



# * TODO add run button to run game view



# * TODO refactor: extract 3D View custom control(low level)







# * TODO scene view: add grid

# * TODO scene view: camera, direction light show image



* TODO add redo/undo

** TODO engine add redo/undo

three engine when restore to state:
- reset renderer
- init?

cpu resources->E,C:
deep copy
restore

# TODO component

# TODO gameObject

# TODO update engine-core
  ////bdd test

# commit





pipeline:
add deepCopy, restore function(can be empty if all are immutable)

change them to immutable



commit


** TODO editor add redo/undo
not add redo/undo action/ui control!


data:
action's store
extension's state

change them to immutable


action, extension add deepCopy, restore function(can be empty if all are immutable)



** DONE extension add deepCopy, restore


# ** TODO feat(default): meta3d: add restore, deepCopy
TODO invoke meta3dState's extensions' onDeepCopy, onRestore




** DONE action,pipeline add deepCopy, restore

# TODO update UIManager

# TODO fix engine-core

# TODO update PipelineManager

# TODO add bdd test



** DONE History

History:
# engineCoreStateStack
meta3dStateStack(only this?)

invoke meta3dState's extensions, actions' deepCopy, restore func!


engine core extension's deepCopy, restore should handle E,C data!




** DONE fix: when stop, should restore to the state before run



** DONE scene graph(+game view)


gpu resources->three:
dispose all to create new ones

////new perspectiveCamera, scene






** DONE change extension,action,pipeline's data to immutable

run->loopHandles



** DONE run test

fix:
# add cube after run
not refresh
# restore disappear
dispose
  d->r->a->s
    add error in gameview
  ////fix: judge is disposed





////TODO shouldn't recreate programs!

////TODO shouldn't recreate vbos!


TODO need publsh:
engine-core,gameview
meta3d-action-stop
pipeline-dispose, gameview
scenegraph, gameview




* DONE refactor: utils not dependent protocols for scene view(e.g. engine-core-protocol, engine-whole-protocol)

use generic


////* TODO refactor: remove loadScene



////* TODO refactor: rename pipelineContribute->xxxFunc to xxx



* DONE refactor: rename for scene view(e.g. meta3d-engine-core-sceneview)


TODO fix bsconfig.json


TODO update pipeline name


* TODO publsh

pass ci

release

update production