* TODO three.js引擎

PBRMaterial+direction light+diffuse, metalroughness,... map


能够渲染较复杂的GLTF场景

** DONE change basic material to standard material


# TODO add BasicSourceTexture in contributes/
TODO add BasicSourceTexture in extensions/
  no bdd test

        image: TexImageSource | OffscreenCanvas,
        # mapping: Mapping,
        wrapS: Wrapping,
        wrapT: Wrapping,
        magFilter: MagnificationTextureFilter,
        minFilter: MinificationTextureFilter,
        format: PixelFormat,
        type: TextureDataType,
        # anisotropy: number,
        # encoding: TextureEncoding,
        isNeedUpdates
        flipY

  dispose:judge material



# TODO update engine core for texture contribute



TODO update PBRMaterial to add get/set basic textures
  bdd test

TODO update PBRMaterial to dispose map

TODO update PBRMaterial to clone for maps
  bdd test


TODO update meta3d-engine-scene-utils
PBRMaterial: set data, dispose, ////clone


let textureService =				 api.getExtensionService<textureService>(meta3dState, "meta3d-texture-basicsource")

let textureState = api.getExtensionState<textureState>(meta3dState, "meta3d-texture-basicsource")

textureService.addMaterial(textureState, )



TODO add Texture


# TODO add MeshPBRMaterial
TODO add MeshStandardMaterial
  TODO add MeshStandardMaterial
  TODO support diffuse, metalroughness, normal
  TODO support metalroughness, ...

TODO dispose:
dispose map


TODO clear:
clear map

** DONE add direction light

TODO support direction light

  convert
  import
  dispose


# ** TODO update load scene extension

# TODO handle pbr material, direction light



# ** TODO refactor: refactor scenegraph converter utils



** TODO run test: load and render a glb with maps:Lantern.glb

# TODO engine demo->default scene: load a glb with maps

# TODO build engine demo app

# TODO change default scene to loadScene(glb)




TODO default scene add direction light

TODO pass run test: default scene(light)

  //TODO why api not the same file?

  # TODO move dataName from protocol to implement?

  //TODO update all component protocol(except pbrmaterial pro):
  tsc

  TODO fix: no light
    # TODO why scenegraph utils not update?

TODO scene view 800*800


//TODO rename sceneview-utils



TODO add load glb button(directly add to scene)
  TODO extract load glb extension from load scene
  # TODO add import glb extension


TODO pass run test: Flower


TODO pass run test: Nefertiti
# TODO fix: indices convert err
# TODO fix: get/set tangents

TODO fix: no map






//TODO restore arcball, cube for default scene


TODO feat: arcball: add mouse wheel
# TODO feat: arcball: update drag global





# TODO rename loadScene to importGLB



TODO pass gameview run test:
  TODO need select:
  meta3d-pipeline-webgl1-three-gameview

  TODO load glb should refresh gameview
  TODO wheel for gameview
    TOOD fix event
      init event once(in sceneview)
      bindEventForSceneView
      yaw, ... only once
      decide target in prepare bind when point move event
        judge target when update
      fix unbind



TODO need publish:
# # scenegraph s, g
# # whole s, g
# # scene s,g
# # # run engine s,g
# meta3d-pipeline-editor-webgl1-scene-view1, game view1
# # meta3d-pipeline-editor-event-s,g
# load glb
# whole s,g
# event(remove s,g)



* DONE asset

GLB


TODO add "add last loaded glb to scene" button


TODO add asset extension

# TODO load glb action should operate:
  # store loaded glbs ref(file is stored in outside data)

  # not use asset tree, use list/array instead which only has one level

  # TODO if exist the same name file, rename loaded one

TODO pass run test

TODO pass run test:debug


* DONE pass run test

** TODO component: fix dispose

TODO pass gameobject bdd test
TODO pass engine-core bdd test

** TODO run action: not copy, restore, end loop when backward instead

** TODO load glb action: event sourcing
# TODO handle outside
TODO handle backward func

# TODO pass run test:add cube

TODO pass run test:load->add glb

TODO pass run test:redo/undo when run+load->add glb
  //TODO publish all
  //fix: not dispose
  TODO: not dispose when add cube after stop



TODO fix: THREE.WebGLTextures: Unsupported texture color space: undefined



TODO publish
# meta3d-action-load-glb
# scenegraph s,g
# meta3d-action-add-cube
# meta3d-action-add-glb-to-scene
# dispose s,g
# add


# TODO restore gameview

# TODO pass run test:import/export event


* DONE remove isActuallyDisposeXxx


* DONE event sourcing: remove outside immutable data?



# * TODO change import/export to 导入/导出包(remain export scene)
* TODO change import/export to import/export Event

# ** TODO extract glb from allEvents



# ** TODO import event: handle outside immutable data




** DONE pass run test: debug

# TODO fix: no loop?





** DONE import/export Event support reset

TODO use import-scene?


TODO publish
# import event action
# meta3d-editor-webgl1-three-run-engine-sceneview
# meta3d-asset, protocol
# add glb action
# load glb action
# # event source, protocol
# # import scene
# # import,export single event(add)
# # export single event
# # export scene
# scenegraph, s,g
# meta3d-export-scene
# # meta3d-pipeline-editor-webgl1-scene-view1, g
# # # scene, whole, smg
# # # # add glb
# # # # meta3d-action-export-single-event
# # # meta3d-action-import-single-event
# # meta3d-action-import-single-event




scene glb+asset arraybuffer


import scene glb
import asset arraybuffer


# TODO add export reset button
TODO export 2 cube
  TODO fix: why so many children?
  TODO fix: why no after import?
  TODO why direction change?
  TODO no show
  direction: null, null, null
  no intensity

  # TODO gameview: no arcball
  TODO not refresh


TODO export 1 cube + 1 glb

  TODO export: warning
  TODO export->import->add error

TODO fix: add glb: create new ,not clone


TODO perf: glb: not share geometry,material


TODO perf: glb: not share texture




*** TODO export event: generate scene glb, asset arraybuffer

*** TODO import event: load scene glb, asset arraybuffer


* DONE pass run test: publish with glb

TODO publish
# load scene
# scenegraph s,g
# publish action




TODO update engine package

TODO pass run test



# * TODO fix: auto upgrade: should keep canvas size

* DONE load more glb
  TODO pass publish




TODO publish
# scenegraph s,g
# meta3d-component-geometry
# publish
# meta3d-editor-webgl1-three-run-engine-gameview, s,g


TODO update 
# engine package
#   meta3d-component-geometry
#   scenegraph g



* TODO publish


** DONE pass ci

** DONE prepare for video
prepare video
