Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add priority property for Renderer #803

Merged
merged 9 commits into from
May 24, 2022

Conversation

singlecoder
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

@singlecoder singlecoder added the enhancement New feature or request label May 16, 2022
@singlecoder singlecoder added this to the 0.8 milestone May 16, 2022
@singlecoder singlecoder self-assigned this May 16, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2022

Codecov Report

Merging #803 (49757c4) into dev/0.8 (1fd8e0a) will increase coverage by 0.01%.
The diff coverage is 30.76%.

❗ Current head 49757c4 differs from pull request most recent head 30cb45b. Consider uploading reports for the commit 30cb45b to get more accurate results

@@             Coverage Diff             @@
##           dev/0.8     #803      +/-   ##
===========================================
+ Coverage    10.31%   10.33%   +0.01%     
===========================================
  Files          242      242              
  Lines        11427    11432       +5     
  Branches      1708     1707       -1     
===========================================
+ Hits          1179     1181       +2     
- Misses       10045    10049       +4     
+ Partials       203      202       -1     
Impacted Files Coverage Δ
packages/core/src/Camera.ts 8.28% <ø> (ø)
...ges/core/src/RenderPipeline/BasicRenderPipeline.ts 13.00% <0.00%> (-0.11%) ⬇️
packages/core/src/RenderPipeline/RenderQueue.ts 2.14% <0.00%> (ø)
packages/core/src/Transform.ts 11.76% <0.00%> (ø)
packages/core/src/fog/Fog.ts 11.11% <ø> (ø)
packages/core/src/index.ts 100.00% <ø> (ø)
...ackages/core/src/material/enums/RenderQueueType.ts 100.00% <ø> (ø)
packages/core/src/mesh/MeshRenderer.ts 1.66% <ø> (ø)
packages/core/src/physics/DynamicCollider.ts 4.68% <ø> (ø)
packages/core/src/physics/StaticCollider.ts 20.00% <ø> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42e5a73...30cb45b. Read the comment docs.

Copy link
Member

@GuoLei1990 GuoLei1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@GuoLei1990 GuoLei1990 merged commit 6f0e38c into galacean:dev/0.8 May 24, 2022
@GuoLei1990 GuoLei1990 linked an issue May 24, 2022 that may be closed by this pull request
gz65555 added a commit that referenced this pull request Jun 29, 2022
* fix: use string replace asset type to extend easily

* fix: onEndRender trigger error

* fix: remove ms blob deprecated

* build: update typescript version

* feat: update background mesh

* refactor: add gc ignore

* build: physics use oasis-engine dependency

* bump version

* bump version

* feat: add register and reflection object

* feat: add prefab parser

* fix: resourceManager has't destory all cache

* fix: cache promise is not clear

* bump version

* feat: export prefabloader

* fix: dynamic explansion

* feat: add mipmap generate warn

* feat: add mipmap true

* feat: add pixel buffer

* feat: update engine version

* feat: add type watch

* feat: init all project

* build: remove init oasis

* refactor: use modelmesh encode buffer

* Test: Use Floss and Chai to Replace Jest (#778)

test: Use Floss and Chai to Replace Jest

* refactor: remove console

* refactor: add math serialize

* refactor: add model mesh serialize

* refactor: add scene loader

* refactor: delete schema parser

* refactor: add scene loader

* refactor: add index

* refactor: remove toolkit features (#780)

* v0.7.0-beta.4 (#795)

* refactor: fix types error

* Fix:local translate (#706)

* fix(transform):local translate

* Add component denpendent decorator (#796)

* feat: add `dependentComponents` decorator

* ci: remove ci on node 12 (#801)

* Update README.md

* Fix Test Version Error (#802)

* ci: remove ci on node 12

* test: fix version

* feat: add `priority` for renderer to order(#803)

* feat(renderer): add `priority` for renderer to order

* refactor: remove useless import

* Fix SkyBox render mirror problem (#816)

* refactor: fix skybox mirror problem

* fix:   change `region` and `pivot` origin to left-bottom (#809)

* fix:   change `region` and `pivot` origin to left-bottom

* Merge latest main (#820)

* v0.7.0-beta.4

* Update README.md

* Update README.md

* Update README.md

* Add component denpendent decorator (#796) (#807)

* feat: add `dependentComponents` decorator

* fix(Renderer): destroy crash when material is null (#808)

* Improve BlendShape when use attribute mode (#804)

* feat: improve BlendShape when use attribute mode

* v0.7.0-beta.5

* refactor: fix skybox mirror problem

* fix: fixed the bug of animator revert when blendWeight length exceeds 4 (#817)

* fix: fixed the bug of animator revert when blendWeight length exceeds 4

* v0.7.0-beta.6

* refactor: fix shader

* fix(text): fix horizontal and vertical alignment error (#772)

* fix(text): fix horizontal alignment error

Co-authored-by: luzhuang <[email protected]>
Co-authored-by: singlecoder <[email protected]>

* feat: export animation type

* refactor: bump version

* refactor: rename (#827)

* v0.7.0-beta.7

* feat: physics character controller (#818)

* feat: add `CharacterController` for physX backend

* optimization camera code (#830)

refactor: optimization camera code

* Refactor `cloneTo` to `copyFrom` for math library and rename `setValue` to `set` (#844)

* feat: refactor `cloneTo` to `copyFrom` for math library
* feat: rename `setValue` to `set` for math library

* feat: add to Obejct

* feat: remove swc core

* refactor: change toJSON to toObject

* refactor: merge dev/0.8

* refactor: remove console

Co-authored-by: gz65555 <[email protected]>
Co-authored-by: ChenMo <[email protected]>
Co-authored-by: AZhan <[email protected]>
Co-authored-by: singlecoder <[email protected]>
Co-authored-by: luzhuang <[email protected]>
Co-authored-by: zhuxudong <[email protected]>
Co-authored-by: yangfengzzz <[email protected]>
@GuoLei1990 GuoLei1990 changed the title feat: opt render order for renderer Add priorty property for Renderer Jun 29, 2022
@GuoLei1990 GuoLei1990 changed the title Add priorty property for Renderer Add priority property for Renderer Jun 29, 2022
GuoLei1990 added a commit to GuoLei1990/galacean-engine that referenced this pull request Jul 11, 2022
* dev/0.8: (28 commits)
  v0.8.0-alpha.3
  v0.8.0-alpha.2
  Use char cache mode for TextRenderer (galacean#837)
  Add basic physics joint component include `FixedJoint`, `SpringJoint`, `HingeJoint`  (galacean#853)
  `InputManager` support pointer button and wheel (galacean#831)
  fix: TextureCube is left-hand,so x need inverse (galacean#855)
  Add SpriteRenderer drawMode property(support simple and sliced)  (galacean#828)
  v0.8.0-alpha.1
  v0.8.0-alpha.0
  Feat(core): add more clear flag item for Camera.clearFlags (galacean#843)
  Fix transform`translate` and `rotate` space bug (galacean#847)
  Refactor `cloneTo` to `copyFrom` for math library and rename `setValue` to `set` (galacean#844)
  optimization camera code (galacean#830)
  feat: physics character controller (galacean#818)
  v0.7.0-beta.7
  refactor: rename (galacean#827)
  Merge latest main (galacean#820)
  fix:   change `region` and `pivot` origin to left-bottom (galacean#809)
  Fix SkyBox render mirror problem (galacean#816)
  feat: add `priority` for renderer to order(galacean#803)
  ...

# Conflicts:
#	lerna.json
#	packages/core/package.json
#	packages/core/src/2d/dynamic-atlas/DynamicTextAtlas.ts
#	packages/core/src/2d/sprite/Sprite.ts
#	packages/core/src/2d/sprite/SpriteMask.ts
#	packages/core/src/2d/sprite/SpriteRenderer.ts
#	packages/core/src/2d/text/TextRenderer.ts
#	packages/core/src/Renderer.ts
#	packages/core/src/Transform.ts
#	packages/core/src/physics/index.ts
#	packages/design/package.json
#	packages/design/src/physics/IPhysics.ts
#	packages/draco/package.json
#	packages/loader/package.json
#	packages/loader/src/SpriteAtlasLoader.ts
#	packages/math/package.json
#	packages/math/src/CollisionUtil.ts
#	packages/math/src/Vector2.ts
#	packages/math/src/Vector3.ts
#	packages/math/src/Vector4.ts
#	packages/oasis-engine/package.json
#	packages/physics-lite/package.json
#	packages/physics-lite/src/LitePhysics.ts
#	packages/physics-physx/package.json
#	packages/physics-physx/src/PhysXPhysics.ts
#	packages/resource-process/package.json
#	packages/resource-process/tsconfig.json
#	packages/rhi-webgl/package.json
#	tests/package.json
gz65555 added a commit that referenced this pull request Jul 11, 2022
* Test: Use Floss and Chai to Replace Jest (#778)

test: Use Floss and Chai to Replace Jest

* refactor: remove toolkit features (#780)

* v0.7.0-beta.4 (#795)

* Fix:local translate (#706)

* fix(transform):local translate

* Add component denpendent decorator (#796)

* feat: add `dependentComponents` decorator

* ci: remove ci on node 12 (#801)

* Update README.md

* Fix Test Version Error (#802)

* ci: remove ci on node 12

* test: fix version

* feat: add `priority` for renderer to order(#803)

* feat(renderer): add `priority` for renderer to order

* Fix SkyBox render mirror problem (#816)

* refactor: fix skybox mirror problem

* fix:   change `region` and `pivot` origin to left-bottom (#809)

* fix:   change `region` and `pivot` origin to left-bottom

* Merge latest main (#820)

* v0.7.0-beta.4

* Update README.md

* Update README.md

* Update README.md

* Add component denpendent decorator (#796) (#807)

* feat: add `dependentComponents` decorator

* fix(Renderer): destroy crash when material is null (#808)

* Improve BlendShape when use attribute mode (#804)

* feat: improve BlendShape when use attribute mode

* v0.7.0-beta.5

* refactor: fix skybox mirror problem

* fix: fixed the bug of animator revert when blendWeight length exceeds 4 (#817)

* fix: fixed the bug of animator revert when blendWeight length exceeds 4

* v0.7.0-beta.6

* refactor: fix shader

* fix(text): fix horizontal and vertical alignment error (#772)

* fix(text): fix horizontal alignment error

Co-authored-by: luzhuang <[email protected]>
Co-authored-by: singlecoder <[email protected]>

* refactor: rename (#827)

* v0.7.0-beta.7

* feat: physics character controller (#818)

* feat: add `CharacterController` for physX backend

* optimization camera code (#830)

refactor: optimization camera code

* Refactor `cloneTo` to `copyFrom` for math library and rename `setValue` to `set` (#844)

* feat: refactor `cloneTo` to `copyFrom` for math library
* feat: rename `setValue` to `set` for math library

* Fix transform`translate` and `rotate` space bug (#847)

* fix: transform`translate` and `rotate` space bug
* refactor: opt comments

* Feat(core): add more clear flag item for Camera.clearFlags (#843)

* feat(core): add more clear flag item for Camera.clearFlags

* v0.8.0-alpha.0

* v0.8.0-alpha.1

* Add SpriteRenderer drawMode property(support simple and sliced)  (#828)

* feat: add sprite draw mode(support simple and sliced)

* fix: TextureCube is left-hand,so x need inverse (#855)

* `InputManager` support pointer button and wheel (#831)

* feat: `InputManager` support pointer button and wheel

* Add basic physics joint component include `FixedJoint`, `SpringJoint`, `HingeJoint`  (#853)

* feat: basic physics joint

* Use char cache mode for TextRenderer (#837)

* feat(text): use char cache mode for TextRenderer

* v0.8.0-alpha.2

* v0.8.0-alpha.3

* fix: resolve conflict

* fix: resolve conflict

Co-authored-by: Hu Song <[email protected]>
Co-authored-by: AZhan <[email protected]>
Co-authored-by: singlecoder <[email protected]>
Co-authored-by: luzhuang <[email protected]>
Co-authored-by: zhuxudong <[email protected]>
Co-authored-by: yangfengzzz <[email protected]>
gz65555 added a commit that referenced this pull request Jul 11, 2022
* fix: use string replace asset type to extend easily

* fix: onEndRender trigger error

* fix: remove ms blob deprecated

* build: update typescript version

* feat: update background mesh

* refactor: add gc ignore

* build: physics use oasis-engine dependency

* bump version

* bump version

* feat: add register and reflection object

* feat: add prefab parser

* fix: resourceManager has't destory all cache

* fix: cache promise is not clear

* bump version

* feat: export prefabloader

* fix: dynamic explansion

* feat: add mipmap generate warn

* feat: add mipmap true

* feat: add pixel buffer

* feat: update engine version

* feat: add type watch

* feat: init all project

* build: remove init oasis

* refactor: use modelmesh encode buffer

* Test: Use Floss and Chai to Replace Jest (#778)

test: Use Floss and Chai to Replace Jest

* refactor: remove console

* refactor: add math serialize

* refactor: add model mesh serialize

* refactor: add scene loader

* refactor: delete schema parser

* refactor: add scene loader

* refactor: add index

* refactor: remove toolkit features (#780)

* v0.7.0-beta.4 (#795)

* refactor: fix types error

* Fix:local translate (#706)

* fix(transform):local translate

* Add component denpendent decorator (#796)

* feat: add `dependentComponents` decorator

* ci: remove ci on node 12 (#801)

* Update README.md

* Fix Test Version Error (#802)

* ci: remove ci on node 12

* test: fix version

* feat: add `priority` for renderer to order(#803)

* feat(renderer): add `priority` for renderer to order

* refactor: remove useless import

* Fix SkyBox render mirror problem (#816)

* refactor: fix skybox mirror problem

* fix:   change `region` and `pivot` origin to left-bottom (#809)

* fix:   change `region` and `pivot` origin to left-bottom

* Merge latest main (#820)

* v0.7.0-beta.4

* Update README.md

* Update README.md

* Update README.md

* Add component denpendent decorator (#796) (#807)

* feat: add `dependentComponents` decorator

* fix(Renderer): destroy crash when material is null (#808)

* Improve BlendShape when use attribute mode (#804)

* feat: improve BlendShape when use attribute mode

* v0.7.0-beta.5

* refactor: fix skybox mirror problem

* fix: fixed the bug of animator revert when blendWeight length exceeds 4 (#817)

* fix: fixed the bug of animator revert when blendWeight length exceeds 4

* v0.7.0-beta.6

* refactor: fix shader

* fix(text): fix horizontal and vertical alignment error (#772)

* fix(text): fix horizontal alignment error

Co-authored-by: luzhuang <[email protected]>
Co-authored-by: singlecoder <[email protected]>

* feat: export animation type

* refactor: bump version

* refactor: rename (#827)

* v0.7.0-beta.7

* feat: physics character controller (#818)

* feat: add `CharacterController` for physX backend

* optimization camera code (#830)

refactor: optimization camera code

* Refactor `cloneTo` to `copyFrom` for math library and rename `setValue` to `set` (#844)

* feat: refactor `cloneTo` to `copyFrom` for math library
* feat: rename `setValue` to `set` for math library

* feat: add to Obejct

* feat: remove swc core

* refactor: change toJSON to toObject

* Fix transform`translate` and `rotate` space bug (#847)

* fix: transform`translate` and `rotate` space bug
* refactor: opt comments

* refactor: merge dev/0.8

* refactor: remove console

* Feat(core): add more clear flag item for Camera.clearFlags (#843)

* feat(core): add more clear flag item for Camera.clearFlags

* v0.8.0-alpha.0

* v0.8.0-alpha.1

* feat: update resource process

* Add SpriteRenderer drawMode property(support simple and sliced)  (#828)

* feat: add sprite draw mode(support simple and sliced)

* fix: TextureCube is left-hand,so x need inverse (#855)

* `InputManager` support pointer button and wheel (#831)

* feat: `InputManager` support pointer button and wheel

* Add basic physics joint component include `FixedJoint`, `SpringJoint`, `HingeJoint`  (#853)

* feat: basic physics joint

* Use char cache mode for TextRenderer (#837)

* feat(text): use char cache mode for TextRenderer

* v0.8.0-alpha.2

* v0.8.0-alpha.3

* feat: add script parser

Co-authored-by: gz65555 <[email protected]>
Co-authored-by: ChenMo <[email protected]>
Co-authored-by: AZhan <[email protected]>
Co-authored-by: singlecoder <[email protected]>
Co-authored-by: luzhuang <[email protected]>
Co-authored-by: zhuxudong <[email protected]>
Co-authored-by: yangfengzzz <[email protected]>
gz65555 added a commit that referenced this pull request Jul 20, 2022
* Test: Use Floss and Chai to Replace Jest (#778)

test: Use Floss and Chai to Replace Jest

* refactor: remove toolkit features (#780)

* v0.7.0-beta.4 (#795)

* Fix:local translate (#706)

* fix(transform):local translate

* Add component denpendent decorator (#796)

* feat: add `dependentComponents` decorator

* ci: remove ci on node 12 (#801)

* Update README.md

* Fix Test Version Error (#802)

* ci: remove ci on node 12

* test: fix version

* feat: add `priority` for renderer to order(#803)

* feat(renderer): add `priority` for renderer to order

* Fix SkyBox render mirror problem (#816)

* refactor: fix skybox mirror problem

* fix:   change `region` and `pivot` origin to left-bottom (#809)

* fix:   change `region` and `pivot` origin to left-bottom

* Merge latest main (#820)

* v0.7.0-beta.4

* Update README.md

* Update README.md

* Update README.md

* Add component denpendent decorator (#796) (#807)

* feat: add `dependentComponents` decorator

* fix(Renderer): destroy crash when material is null (#808)

* Improve BlendShape when use attribute mode (#804)

* feat: improve BlendShape when use attribute mode

* v0.7.0-beta.5

* refactor: fix skybox mirror problem

* fix: fixed the bug of animator revert when blendWeight length exceeds 4 (#817)

* fix: fixed the bug of animator revert when blendWeight length exceeds 4

* v0.7.0-beta.6

* refactor: fix shader

* fix(text): fix horizontal and vertical alignment error (#772)

* fix(text): fix horizontal alignment error

Co-authored-by: luzhuang <[email protected]>
Co-authored-by: singlecoder <[email protected]>

* refactor: rename (#827)

* v0.7.0-beta.7

* feat: physics character controller (#818)

* feat: add `CharacterController` for physX backend

* optimization camera code (#830)

refactor: optimization camera code

* Refactor `cloneTo` to `copyFrom` for math library and rename `setValue` to `set` (#844)

* feat: refactor `cloneTo` to `copyFrom` for math library
* feat: rename `setValue` to `set` for math library

* Fix transform`translate` and `rotate` space bug (#847)

* fix: transform`translate` and `rotate` space bug
* refactor: opt comments

* Feat(core): add more clear flag item for Camera.clearFlags (#843)

* feat(core): add more clear flag item for Camera.clearFlags

* v0.8.0-alpha.0

* v0.8.0-alpha.1

* Add SpriteRenderer drawMode property(support simple and sliced)  (#828)

* feat: add sprite draw mode(support simple and sliced)

* fix: TextureCube is left-hand,so x need inverse (#855)

* `InputManager` support pointer button and wheel (#831)

* feat: `InputManager` support pointer button and wheel

* Add basic physics joint component include `FixedJoint`, `SpringJoint`, `HingeJoint`  (#853)

* feat: basic physics joint

* Use char cache mode for TextRenderer (#837)

* feat(text): use char cache mode for TextRenderer

* v0.8.0-alpha.2

* v0.8.0-alpha.3

* Optimization performance for `TextRenderer` to update world positions (#861)

* refactor(text): optimization performance for `TextRenderer` to update world positions

* Fix `InputManager` bug (#863)

* fix: `pointer` position bug
* fix: `pointerMovingDelta` value bug
* fix: input `onPointerXX` bug not follow `Camera` cullingMask

* fix(2d): `SpriteRenderer` can not show error (#865)

* v0.8.0-alpha.4

* v0.8.0-alpha.5

Co-authored-by: Hu Song <[email protected]>
Co-authored-by: ChenMo <[email protected]>
Co-authored-by: AZhan <[email protected]>
Co-authored-by: singlecoder <[email protected]>
Co-authored-by: luzhuang <[email protected]>
Co-authored-by: zhuxudong <[email protected]>
Co-authored-by: yangfengzzz <[email protected]>
luzhuang pushed a commit to luzhuang/engine that referenced this pull request Sep 6, 2022
* feat(renderer): add `priority` for renderer to order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render order for 2d object
4 participants