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

Support GUI #2375

Merged
merged 279 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
279 commits
Select commit Hold shift + click to select a range
08214c2
refactor(2d-render-pipeline): add MeshBuffer
singlecoder Feb 22, 2024
094b5e6
refactor(2d-render-pipeline): complete sprite renderer and sprite mask
singlecoder Mar 5, 2024
04eb47c
refactor(2d-render-pipeline): complete sprite renderer draw mode
singlecoder Mar 5, 2024
650b135
refactor(2d-render-pipeline): complete text renderer
singlecoder Mar 5, 2024
3f0cfa0
refactor(2d-render-pipeline): fix conflicts from dev/1.2
singlecoder Mar 15, 2024
7e33812
refactor(2d-render-pipeline): fix conflicts from dev/1.2
singlecoder Mar 15, 2024
c265204
Merge branch 'main' into refactor/2d-render-pipeline
singlecoder Mar 28, 2024
d442be2
refactor(2d-render-pipeline): fix conflicts from dev/1.3
singlecoder Apr 10, 2024
7a09c01
refactor(2d-render-pipeline): delete IBatcher
singlecoder Apr 11, 2024
901ba13
refactor(2d-render-pipeline): move IPoolElement to Pool
singlecoder Apr 11, 2024
b256155
refactor(2d-render-pipeline): replace CharRenderDataPool with Pool
singlecoder Apr 11, 2024
10bb95b
refactor(2d-render-pipeline): create mesh buffer support custom size
singlecoder Apr 12, 2024
b62df3a
refactor(2d-render-pipeline): opt code
singlecoder Apr 18, 2024
0dbad8d
refactor(2d-render-pipeline): opt code
singlecoder Apr 18, 2024
9e50d30
refactor(2d-render-pipeline): opt text renderer upload texture
singlecoder Apr 19, 2024
ebd27df
feat(ui-init): init ui package
singlecoder Apr 24, 2024
c98748f
feat(ui-init): add basic class
singlecoder Apr 24, 2024
7649de4
refactor(2d-render-pipeline): rename the rendering order function of …
singlecoder Apr 25, 2024
68657e8
refactor(2d-render-pipeline): fix test
singlecoder Apr 25, 2024
c95c0c2
refactor(2d-render-pipeline): fix test error
singlecoder Apr 26, 2024
8f36498
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Apr 26, 2024
10fc066
refactor(2d-render-pipeline): fix chunk error
singlecoder Apr 26, 2024
c9ac2a5
refactor(2d-render-pipeline): opt code
singlecoder Apr 28, 2024
5dc393d
refactor(2d-render-pipeline): opt code
singlecoder Apr 28, 2024
d667d99
refactor(2d-render-pipeline): opt code
singlecoder Apr 29, 2024
caa0a38
refactor(2d-render-pipeline): fix 2d sort error
singlecoder Apr 29, 2024
8f77a72
refactor(2d-render-pipeline): change 2d batch structure
singlecoder Apr 30, 2024
f08d477
refactor(2d-render-pipeline): opt code
singlecoder Apr 30, 2024
7f4a460
refactor(2d-render-pipeline): opt code
singlecoder May 6, 2024
cfe01a5
refactor(2d-render-pipeline): opt code
singlecoder May 6, 2024
83cbf4a
refactor(2d-render-pipeline): fix sprite draw mode tiled error
singlecoder May 6, 2024
c353ee3
refactor(2d-render-pipeline): rename CharRenderData to CharRenderInfo
singlecoder May 6, 2024
fbf6ed1
refactor(2d-render-pipeline): opt code
singlecoder May 6, 2024
997f29f
refactor(2d-render-pipeline): fix render queue sort error
singlecoder May 7, 2024
68f8993
refactor(2d-render-pipeline): fix render queue sort error
singlecoder May 7, 2024
96e9621
refactor(2d-render-pipeline): opt code
singlecoder May 7, 2024
f9e67ec
refactor(2d-render-pipeline): opt performance for render queue sort
singlecoder May 7, 2024
48bcccf
refactor(2d-render-pipeline): opt performance for render queue sort
singlecoder May 7, 2024
c65299a
refactor(2d-render-pipeline): opt performance for 2d
singlecoder May 7, 2024
0acf868
refactor(2d-render-pipeline): opt code
singlecoder May 8, 2024
5871137
refactor(2d-render-pipeline): opt code
singlecoder May 9, 2024
999e348
refactor(2d-render-pipeline): opt code
singlecoder May 9, 2024
fa5a17f
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder May 10, 2024
8fae435
feat(ui): rename resolution adaptation strategy
singlecoder May 10, 2024
332ff64
feat(ui): add ui canvas and ui renderer
singlecoder May 10, 2024
3710d41
Merge branch 'dev/1.3' into refactor/2d-render-pipeline
singlecoder May 10, 2024
1714428
refactor(2d-render-pipeline): fix shadow error
singlecoder May 11, 2024
8bcde48
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder May 13, 2024
a0e2dc5
feat(ui): init ui canvas
singlecoder May 13, 2024
f232172
feat(ui): add get set for ui canvas
singlecoder May 21, 2024
09e975c
refactor(2d-render-pipeline): opt code for simple assembler
singlecoder May 21, 2024
bfb78bc
refactor(2d-render-pipeline): opt code for sprite assemble
singlecoder May 21, 2024
a35fc8f
refactor(2d-render-pipeline): opt code
singlecoder May 21, 2024
169f3eb
refactor(2d-render-pipeline): opt code
singlecoder May 21, 2024
436d4b1
refactor(2d-render-pipeline): opt code
singlecoder May 21, 2024
ae911ae
refactor(2d-render-pipeline): opt code
singlecoder May 22, 2024
2621b7e
refactor(2d-render-pipeline): opt code for batch
singlecoder May 22, 2024
0b2b12d
refactor(2d-render-pipeline): rename SpriteRenderData to RenderData2D
singlecoder May 24, 2024
239feed
refactor(2d-render-pipeline): use primitive to change buffer mesh in …
singlecoder May 31, 2024
8388166
refactor(2d-render-pipeline): opt code
singlecoder Jun 3, 2024
520da7b
refactor(2d-render-pipeline): clean render queue
singlecoder Jun 3, 2024
54ff8f1
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 4, 2024
d8393e8
refactor(2d-render-pipeline): opt code
singlecoder Jun 4, 2024
836e752
refactor(2d-render-pipeline): opt code
singlecoder Jun 4, 2024
169aa09
refactor(2d-render-pipeline): opt code
singlecoder Jun 4, 2024
c09d5e7
refactor(2d-render-pipeline): opt code
singlecoder Jun 4, 2024
df3b5f8
refactor(2d-render-pipeline): fix conflicts
singlecoder Jun 4, 2024
3ada1f6
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 4, 2024
6edbf7b
refactor(2d-render-pipeline): opt code
singlecoder Jun 4, 2024
fbaa8aa
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 4, 2024
26b3b94
refactor(2d-render-pipeline): add comment for export TextUtils
singlecoder Jun 5, 2024
bae7a9a
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 5, 2024
7f613d9
feat(ui): ui canvas
singlecoder Jun 6, 2024
271a77c
test(primitive): test one-to-one 2D renderer and primitive
singlecoder Jun 7, 2024
9575b36
test(primitive): buffer add alloc and free sub buffer
singlecoder Jun 7, 2024
054ded6
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 11, 2024
cef8757
feat(ui): add temp code
singlecoder Jun 11, 2024
1772f93
refactor(2d-render-pipeline): opt code
singlecoder Jun 11, 2024
a1969c3
refactor(2d-render-pipeline): opt code
singlecoder Jun 11, 2024
78059b3
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 11, 2024
7d57894
feat(ui): temp code
singlecoder Jun 11, 2024
59d5c86
refactor(2d-render-pipeline): opt chunk
singlecoder Jun 11, 2024
531e2b3
refactor(2d-render-pipeline): revert code
singlecoder Jun 11, 2024
67eea0f
refactor(2d-render-pipeline): opt code
singlecoder Jun 11, 2024
41401e4
refactor(2d-render-pipeline): opt code
singlecoder Jun 11, 2024
0e48dbb
refactor(2d-render-pipeline): opt object pool
singlecoder Jun 11, 2024
4cb99c8
refactor(2d-render-pipeline): opt code for dynamic geometry data
singlecoder Jun 11, 2024
e2a74ca
refactor(2d-render-pipeline): opt code
singlecoder Jun 11, 2024
ef592f6
refactor(2d-render-pipeline): opt code
singlecoder Jun 11, 2024
80e88c8
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 12, 2024
edc5953
refactor(2d-render-pipeline): fix import error
singlecoder Jun 12, 2024
6a0962e
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 12, 2024
b4748af
refactor(2d-render-pipeline): opt code
singlecoder Jun 12, 2024
3d8cbc2
refactor(2d-render-pipeline): fix test error
singlecoder Jun 12, 2024
c880f70
refactor(2d-render-pipeline): refactor mask
singlecoder Jun 12, 2024
0455188
refactor(2d-render-pipeline): opt upload buffer
singlecoder Jun 12, 2024
44447f3
refactor(2d-render-pipeline): opt code
singlecoder Jun 12, 2024
98e7887
refactor(2d-render-pipeline): add sub render element and sub render data
singlecoder Jun 13, 2024
4b5dc36
refactor(2d-render-pipeline): opt dynamic update shader data for rend…
singlecoder Jun 13, 2024
7f6798d
refactor(2d-render-pipeline): fix text render error
singlecoder Jun 13, 2024
7347e62
refactor(2d-render-pipeline): fix mesh renderer error
singlecoder Jun 13, 2024
59ce725
refactor(2d-render-pipeline): opt code
singlecoder Jun 13, 2024
c502f6d
refactor(2d-render-pipeline): delete unused class
singlecoder Jun 13, 2024
e0e85c6
refactor(2d-render-pipeline): clean render element
singlecoder Jun 13, 2024
70cc80d
refactor(2d-render-pipeline): opt code
singlecoder Jun 13, 2024
8ca4efb
refactor(2d-render-pipeline): opt code for push render data
singlecoder Jun 13, 2024
ba35d56
refactor(2d-render-pipeline): opt code
singlecoder Jun 13, 2024
10d4bf5
refactor(2d-render-pipeline): opt code
singlecoder Jun 13, 2024
c100342
refactor(2d-render-pipeline): delete render data usage
singlecoder Jun 13, 2024
e51478c
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
bbbc3ff
refactor(2d-render-pipeline): opt text renderer
singlecoder Jun 14, 2024
4c9794b
refactor(2d-render-pipeline): add textSubRenderElementPool for text r…
singlecoder Jun 14, 2024
30348f1
refactor(2d-render-pipeline): opt code for mask
singlecoder Jun 14, 2024
8583bf9
refactor(2d-render-pipeline): opt code for mask
singlecoder Jun 14, 2024
43687db
refactor(2d-render-pipeline): opt text renderer
singlecoder Jun 14, 2024
754a7f4
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
8332c31
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
6b07a12
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
1bf8334
refactor(2d-render-pipeline): opt upload buffer
singlecoder Jun 14, 2024
3f46739
refactor(2d-render-pipeline): opt upload buffer
singlecoder Jun 14, 2024
dc293bd
refactor(2d-render-pipeline): rename dynamic geometry data
singlecoder Jun 14, 2024
9860e71
refactor(2d-render-pipeline): rename dynamic geometry data
singlecoder Jun 14, 2024
2ab14d6
refactor(2d-render-pipeline): rename dynamic geometry data
singlecoder Jun 14, 2024
beb3593
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
aa0d174
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
af0f2d7
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
0b45a7f
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
7cb710c
refactor(2d-render-pipeline): opt code
singlecoder Jun 14, 2024
e4f0d93
refactor(2d-render-pipeline): fix test error
singlecoder Jun 14, 2024
854410d
Test0 (#10)
GuoLei1990 Jun 17, 2024
5cb8b48
refactor(2d-render-pipeline): opt code
singlecoder Jun 17, 2024
ce13c8e
refactor(2d-render-pipeline): fix conflict from dev/1.3
singlecoder Jun 17, 2024
e9f2bee
refactor(2d-render-pipeline): fix upload buffer error
singlecoder Jun 17, 2024
38edcbf
refactor(2d-renderpip): fix show errofffffffffffffffffffffff
singlecoder Jun 17, 2024
9d407d2
feat(ui): merge from refactor 2d render pipeline and fix conflicts
singlecoder Jun 18, 2024
043d9fa
refactor(2d-render-pipeline): opt code
singlecoder Jun 18, 2024
0aa5514
refactor(2d-render-pipeline): opt code
singlecoder Jun 18, 2024
6475f15
fix(e2e): fix e2e error
singlecoder Jun 18, 2024
6a7bf93
refactor(2d-render-pipeline): fix conflicts
singlecoder Jun 18, 2024
0b99f79
refactor(2d-render-pipeline): opt code
singlecoder Jun 18, 2024
75bc0c1
refactor(2d-render-pipeline): fix conflicts
singlecoder Jun 19, 2024
beb506b
refactor(2d-render-pipeline): fix e2e error
singlecoder Jun 19, 2024
fdca466
refactor(2d-render-pipeline): opt code
singlecoder Jun 19, 2024
e3f0aae
refactor(2d-render-pipeline): fix e2e screen shot error
singlecoder Jun 19, 2024
37359f0
refactor(2d-render-pipeline): opt code
singlecoder Jun 19, 2024
31529a9
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 19, 2024
1203df7
refactor(2d-render-pipeline): opt code
singlecoder Jun 19, 2024
42dcd13
Merge branch 'refactor/2d-render-pipeline' into feature/ui-init
singlecoder Jun 19, 2024
5fef2a1
Merge branch 'dev/1.3' into feature/ui-init
singlecoder Jun 20, 2024
78add14
feat: ui transform (#9)
cptbtptpbcptdtptp Jun 20, 2024
fd2dc9d
Merge remote-tracking branch 'chengkong/feature/ui-init' into feature…
singlecoder Jun 20, 2024
c9177bf
Merge branch 'dev/1.3' into feature/ui-init
singlecoder Jun 25, 2024
e71a6da
feat(ui): fix conflicts from dev/1.3
singlecoder Jul 4, 2024
1457cdd
UI Canvas (#11)
singlecoder Jul 16, 2024
c9b3157
feat(ui): fix conflicts from dev/1.3
singlecoder Jul 16, 2024
477af1f
feat(ui): opt code for ui canvas
singlecoder Jul 17, 2024
7ccffd3
Merge branch 'dev/1.3' into feature/ui-init
singlecoder Jul 17, 2024
11691f6
feat(ui): opt code
singlecoder Jul 18, 2024
4934498
feat(ui): opt code
singlecoder Jul 18, 2024
f0ebdd0
feat(ui): opt cde
singlecoder Jul 18, 2024
fa07ecd
feat(ui): fix conflicts from dev/1.3
singlecoder Jul 23, 2024
7ae6558
Merge branch 'dev/1.3' into feature/ui-init
singlecoder Jul 30, 2024
52c0d28
feat(ui): add overlay camera add and remove when need
singlecoder Jul 30, 2024
5931066
feat(gui): merge main
singlecoder Aug 13, 2024
a197c1e
Merge code (#12)
cptbtptpbcptdtptp Aug 29, 2024
189a1e7
fix: shaderlab code
Aug 9, 2024
aa6aff8
fix: shaderlab code
Aug 9, 2024
077e163
fix: sprite mask clone bug (#2327)
cptbtptpbcptdtptp Aug 12, 2024
40d926f
Fix animator play backwards error and onStateExit not triggered when …
luzhuang Aug 13, 2024
334bd4a
Fix CharactorController move not effect with transform changed in upd…
luzhuang Aug 13, 2024
8d0ee7a
"v1.3.6"
GuoLei1990 Aug 13, 2024
fc9302b
doc: fix english version of canvas
MrKou47 Aug 13, 2024
2dce250
Feat/add spine doc (#2334)
johanzhu Aug 14, 2024
4e83314
Update README.md
GuoLei1990 Aug 18, 2024
012b61e
Update README.md
GuoLei1990 Aug 18, 2024
f7dacdc
Fix particleRenderer enable startFrame (#2333)
JujieX Aug 20, 2024
41075e6
"v1.3.7"
GuoLei1990 Aug 20, 2024
2f4ce0f
fix(demo): fix video demo error in ios, video will show full screen (…
singlecoder Aug 20, 2024
04bb5b3
Change image in spine doc (#2356)
johanzhu Aug 21, 2024
f237f6a
feat(gui): merge code from dev 1.4
singlecoder Aug 29, 2024
20a1d30
Init UI Input (#13)
cptbtptpbcptdtptp Sep 12, 2024
5279a74
Merge branch 'dev/1.4' into feature/ui-init
singlecoder Sep 12, 2024
6a87332
feat(gui): opt code
singlecoder Oct 10, 2024
a5e0642
feat(gui): opt code
singlecoder Oct 11, 2024
d88532f
Add bubble event. (#16)
cptbtptpbcptdtptp Oct 11, 2024
6904c05
Add UI culling. (#17)
cptbtptpbcptdtptp Oct 21, 2024
d6c03fa
Modify the ui logic as suggested. (#18)
cptbtptpbcptdtptp Oct 22, 2024
f702b2b
feat(ui): fix conflicts
singlecoder Oct 22, 2024
bc8a8d4
Update ui code (#19)
cptbtptpbcptdtptp Oct 24, 2024
53d136e
Add `UIImage.alphaHitTestMinimumThreshold` (#20)
cptbtptpbcptdtptp Oct 28, 2024
15b8e6c
feat(ui): add ui text
singlecoder Nov 1, 2024
4b2487d
Add ui button. (#21)
cptbtptpbcptdtptp Nov 5, 2024
ae63b66
Add UI (#22)
cptbtptpbcptdtptp Nov 6, 2024
8094d8a
feat(ui): fix text bug
singlecoder Nov 6, 2024
3a29609
Separate ui package (#23)
cptbtptpbcptdtptp Nov 20, 2024
8a7073a
Merge branch 'dev/1.4' into feature/ui-init
singlecoder Nov 20, 2024
b8bb449
feat(ui): fix package version
singlecoder Nov 20, 2024
5d4af60
feat(ui): fix lint error
singlecoder Nov 20, 2024
c4ace76
Fix lint error (#24)
cptbtptpbcptdtptp Nov 20, 2024
d73f8f5
Fix pnpm lock (#25)
cptbtptpbcptdtptp Nov 20, 2024
237230d
Delete mini program (#2433)
singlecoder Nov 20, 2024
2511b08
chore: release v1.4.0-alpha.0
GuoLei1990 Nov 26, 2024
14008ad
feat(ui): add implements ITextRenderer for TextRenderer and Label
singlecoder Dec 5, 2024
c3a7089
feat(ui): opt code
singlecoder Dec 6, 2024
a10bb1b
feat(ui): opt code
singlecoder Dec 10, 2024
e300764
feat(ui): fix conflicts from dev/1.4
singlecoder Dec 10, 2024
47a9a97
feat(ui): fix conflicts from dev/1.4
singlecoder Dec 12, 2024
ecbf411
Update GUI code (#26)
cptbtptpbcptdtptp Dec 17, 2024
d984227
feat(ui): fix TextUtils test
singlecoder Dec 17, 2024
c05a6fc
feat(ui): fix conflicts from dev/1.4
singlecoder Dec 17, 2024
923bc96
Merge branch 'dev/1.4' into feature/ui-init
singlecoder Dec 17, 2024
81389df
feat(ui): add test for label
singlecoder Dec 17, 2024
d1592ac
feat(ui): prettier
singlecoder Dec 17, 2024
bb3b3e8
feat(ui): prettier
singlecoder Dec 17, 2024
3929d73
Update gui code (#27)
cptbtptpbcptdtptp Dec 19, 2024
f91d08b
Update gui code. (#28)
cptbtptpbcptdtptp Dec 19, 2024
0bbe7eb
Opt gui code. (#29)
cptbtptpbcptdtptp Dec 23, 2024
b404109
feat(ui): fix conflicts from dev/1.4
singlecoder Dec 24, 2024
9fda417
Replace ui shader (#30)
cptbtptpbcptdtptp Dec 24, 2024
847a1c9
Update gui code. (#31)
cptbtptpbcptdtptp Dec 24, 2024
3ef755a
Delete local bounds (#32)
cptbtptpbcptdtptp Dec 25, 2024
79413fc
feat(ui): merge dev/1.4
singlecoder Dec 25, 2024
e467333
feat(ui): fix label bounding box and support pivot
singlecoder Dec 26, 2024
edf432f
delete: delete alphaHitTestMinimumThreshold
cptbtptpbcptdtptp Dec 30, 2024
ca5306c
Update GUI code (#34)
cptbtptpbcptdtptp Dec 31, 2024
66aa974
Opt: opt code
cptbtptpbcptdtptp Dec 31, 2024
185c659
Update GUI (#36)
cptbtptpbcptdtptp Dec 31, 2024
152368f
Add `referenceResolutionPerUnit` and fix hierarchy dirty bug (#37)
cptbtptpbcptdtptp Jan 2, 2025
ab7cf58
Merge branch 'dev/1.4' into feature/ui-init
singlecoder Jan 6, 2025
be1d389
Adopt suggestions in CR. (#38)
cptbtptpbcptdtptp Jan 7, 2025
a63f4c4
Improve `ReadMe` (#39)
cptbtptpbcptdtptp Jan 7, 2025
3563bc0
Refactor `PostProcessParameter` to strong type (#2487)
zhuxudong Jan 6, 2025
c19f8cc
Support parse method result (#2485)
zhuxudong Jan 6, 2025
7a9d1ec
feat: spine support git clone branch (#2488)
singlecoder Jan 6, 2025
3bca5af
Update release.yml
MrKou47 Jan 7, 2025
b338f12
Update release.yml
MrKou47 Jan 7, 2025
46734a0
Remove unused physX function (#2490)
luzhuang Jan 7, 2025
fcc6c1c
fix Iridescence name (#2489)
hhhhkrx Jan 7, 2025
bd0e4e1
Fix ci e2e error (#2492)
Sway007 Jan 7, 2025
fd267ba
更新 vitest.config.ts
GuoLei1990 Jan 7, 2025
374b4d0
built-in prefiltered lut (#2463)
zhuxudong Jan 8, 2025
dcdfc1a
Update physX wasm without assertions (#2493)
luzhuang Jan 8, 2025
8ffb614
Merge code and fix unit test error (#40)
cptbtptpbcptdtptp Jan 8, 2025
5a43240
`UIRenderer.raycastEnable` -> `UIRenderer.raycastEnabled` (#41)
cptbtptpbcptdtptp Jan 8, 2025
406b95a
Fix conflicts
cptbtptpbcptdtptp Jan 9, 2025
0da25b5
fix: fix conflicts
singlecoder Jan 9, 2025
a289bbc
Merge code. (#44)
cptbtptpbcptdtptp Jan 9, 2025
674ff50
Merge branch 'dev/1.4' into feature/ui-init
singlecoder Jan 9, 2025
c81cefe
fix: fix conflicts
singlecoder Jan 9, 2025
d05c9f3
feat(ui): support platform
singlecoder Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: |
git clone https://github.com/galacean/engine-toolkit.git
git clone https://github.com/galacean/engine-lottie.git
git clone https://github.com/galacean/engine-spine.git
git clone https://github.com/galacean/engine-spine.git -b dev/4.2
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Consider using a stable tag instead of the dev branch

The repository has a stable 4.2.0 tag available, which would be more reliable than the development branch. Note that there are also newer releases (v0.0.3) that might be more appropriate depending on your compatibility requirements.

  • Replace git clone https://github.com/galacean/engine-spine.git -b dev/4.2 with git clone https://github.com/galacean/engine-spine.git -b 4.2.0
🔗 Analysis chain

Verify the engine-spine branch dependency.

The workflow now specifically checks out the dev/4.2 branch of engine-spine. Please confirm if this is intended to be a permanent change or if it should track a stable branch/tag instead.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the dev/4.2 branch exists and its latest commit
curl -s "https://api.github.com/repos/galacean/engine-spine/branches/dev/4.2" | jq '.commit.sha, .commit.commit.message'

# Check available release tags
curl -s "https://api.github.com/repos/galacean/engine-spine/tags" | jq '.[].name'

Length of output: 780


- name: Install and Link Engine and Build for Toolkit
working-directory: ./engine-toolkit
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Install and Link Engine and Build for Spine
working-directory: ./engine-spine
run: |
pnpm install --ignore-workspace
pnpm install --ignore-workspace --frozen-lockfile=false
pnpm link ../packages/galacean
pnpm build

Expand Down Expand Up @@ -121,6 +121,9 @@ jobs:
"${{ github.workspace }}/temp/@galacean/engine-lottie/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-spine/dist/browser.js"
],
"wasm": [
"${{ github.workspace }}/packages/physics-physx/libs/physx.release.wasm"
],
"jsWASMLoader": [
"${{ github.workspace }}/packages/physics-physx/libs/physx.release.js"
],
Expand Down
55 changes: 55 additions & 0 deletions e2e/case/material-LUT.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @title LUT Test
* @category Material
*/
import { Camera, Material, MeshRenderer, PrimitiveMesh, Shader, Vector3, WebGLEngine } from "@galacean/engine";
import { initScreenshot, updateForE2E } from "./.mockForE2E";

// Create engine
WebGLEngine.create({ canvas: "canvas" })
.then((engine) => {
engine.canvas.resizeByClientSize(2);

const scene = engine.sceneManager.activeScene;
const rootEntity = scene.createRootEntity();
// engine.run();

// Create camera
const cameraEntity = rootEntity.createChild("Camera");
cameraEntity.transform.position = new Vector3(0, 0, 3);
const camera = cameraEntity.addComponent(Camera);

const entity = rootEntity.createChild("Entity");
entity.transform.setRotation(90, 0, 0);
const renderer = entity.addComponent(MeshRenderer);
renderer.mesh = PrimitiveMesh.createPlane(engine, 1, 1);

const shader = Shader.create(
"LUT-test",
`
attribute vec3 POSITION;
attribute vec2 TEXCOORD_0;
uniform mat4 renderer_MVPMat;
varying vec2 v_uv;

void main(){
gl_Position = renderer_MVPMat * vec4(POSITION, 1.0);
v_uv = TEXCOORD_0;
}`,
`
varying vec2 v_uv;
uniform sampler2D scene_PrefilteredDFG;

void main(){
gl_FragColor = texture2D(scene_PrefilteredDFG, v_uv);
}
`
);
const material = new Material(engine, shader);
renderer.setMaterial(material);
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add shader precision and resource cleanup.

  1. Add precision specifiers to the fragment shader:
       `
+    precision highp float;
     varying vec2 v_uv;
     uniform sampler2D scene_PrefilteredDFG;
  1. Consider adding shader compilation error handling and resource cleanup:
     const shader = Shader.create(
       "LUT-test",
       // ... shader code ...
     );
+    if (!shader.valid) {
+      throw new Error("Failed to compile shader: " + shader.errorMessage);
+    }
+
+    engine.on("beforeDestroy", () => {
+      shader.destroy();
+      material.destroy();
+    });

Committable suggestion skipped: line range outside the PR's diff.

updateForE2E(engine);
initScreenshot(engine, camera);
})
.catch((e) => {
console.log(e);
});
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance error handling and add test cleanup.

  1. Improve error handling with more detailed logging:
   .catch((e) => {
-    console.log(e);
+    console.error("LUT Test failed:", e);
+    throw e; // Re-throw to ensure test failure
   });
  1. Consider adding test cleanup code:
   updateForE2E(engine);
   initScreenshot(engine, camera);
+  return () => {
+    // Cleanup resources
+    engine.destroy();
+  };

Committable suggestion skipped: line range outside the PR's diff.

2 changes: 1 addition & 1 deletion e2e/case/material-shaderLab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
VertexElementFormat,
WebGLEngine
} from "@galacean/engine";
import { ShaderLab } from "@galacean/engine-shader-lab";
import { ShaderLab } from "@galacean/engine-shaderlab";
import { initScreenshot, updateForE2E } from "./.mockForE2E";

const shaderLab = new ShaderLab();
Expand Down
5 changes: 2 additions & 3 deletions e2e/case/postProcess-customPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Engine,
Material,
PostProcess,
PostProcessEffectFloatParameter,
PostProcessPass,
PostProcessPassEvent,
RenderTarget,
Expand Down Expand Up @@ -43,9 +44,7 @@ void main() {
class CustomPass extends PostProcessPass {
private _blitMaterial: Material;

set intensity(value) {
this._blitMaterial.shaderData.setFloat("intensity", value);
}
intensity = new PostProcessEffectFloatParameter(0.7, 0, 1);
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

The intensity parameter is not being utilized in the shader or render pass

The review comment is correct. While the intensity parameter is properly declared, it's not being used in either:

  • The shader code, which currently only outputs the red channel values
  • The onRender method, which doesn't set the intensity uniform

The suggested implementation in the review comment would correctly integrate the intensity parameter into the effect.

🔗 Analysis chain

Verify the implementation of the intensity parameter.

While the addition of the intensity parameter follows the engine's pattern for post-processing effects, it appears that the parameter isn't being used in the onRender method. This might lead to the intensity setting having no effect on the output.

Consider updating the shader and onRender method to utilize this parameter. Example implementation:

  void main(){
-  gl_FragColor = texture2D(renderer_BlitTexture, v_uv).rrra;
+  vec4 color = texture2D(renderer_BlitTexture, v_uv);
+  gl_FragColor = mix(color, vec4(color.rrr, color.a), intensity);
  }
  onRender(_, srcTexture: Texture2D, dst: RenderTarget): void {
    const engine = this.engine;
+   this._blitMaterial.shaderData.setFloat("intensity", this.intensity.value);
    Blitter.blitTexture(engine, srcTexture, dst, undefined, undefined, this._blitMaterial, 0);
  }
🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Check the complete implementation in the file
cat e2e/case/postProcess-customPass.ts

# Search for any other files that might contain related shader code
fd -e glsl -e frag

# Look for other implementations that might use intensity
rg "intensity" -A 5 -B 5

Length of output: 79887


constructor(engine: Engine) {
super(engine);
Expand Down
18 changes: 9 additions & 9 deletions e2e/case/project-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
* @category Advance
*/
import { Logger, WebGLEngine, AssetType, Camera } from "@galacean/engine";
import { ShaderLab } from "@galacean/engine-shader-lab";
import { ShaderLab } from "@galacean/engine-shaderlab";
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Import change is correct, but documentation needs updating

The new package name @galacean/engine-shaderlab is correct and matches the package structure in the monorepo. However, the documentation in docs/en/basics/overview.md and docs/zh/basics/overview.md still references the old package name and should be updated.

🔗 Analysis chain

Verify the new package name is correct.

The import path has changed from @galacean/engine-shader-lab to @galacean/engine-shaderlab. Let's verify this change is consistent across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining references to the old package name
# and verify the new package exists in package.json

echo "Checking for old package references..."
rg -l "engine-shader-lab"

echo "Verifying package.json dependencies..."
if [ -f "package.json" ]; then
    jq '.dependencies["@galacean/engine-shaderlab"] // .devDependencies["@galacean/engine-shaderlab"]' package.json
fi

Length of output: 398


Script:

#!/bin/bash
# Check documentation references
echo "=== Checking documentation references ==="
rg -A 5 -B 5 "engine-shader-lab" docs/

# Look for workspace configuration files
echo -e "\n=== Looking for workspace files ==="
fd -e yaml -e json

# Search for the new package name in configuration files
echo -e "\n=== Searching for new package name ==="
rg -l "engine-shaderlab" --type-add 'config:*.{json,yaml,yml}' -t config

Length of output: 4523

import { registerIncludes } from "@galacean/engine-toolkit";
import { initScreenshot, updateForE2E } from './.mockForE2E';
import { initScreenshot, updateForE2E } from "./.mockForE2E";

// Create ShaderLab
const shaderLab = new ShaderLab();
registerIncludes();

Logger.enable();
WebGLEngine.create({ canvas: "canvas", shaderLab }).then( (engine) => {
WebGLEngine.create({ canvas: "canvas", shaderLab }).then((engine) => {
engine.canvas.resizeByClientSize(2);
engine.resourceManager
.load({
type: AssetType.Project,
url: "https://mdn.alipayobjects.com/oasis_be/afts/file/A*o15SSopTBh0AAAAAAAAAAAAADkp5AQ/project.json"
}).then(() => {
})
.then(() => {
updateForE2E(engine);

const cameraEntity =
engine.sceneManager.activeScene.findEntityByName('Camera');
const camera = cameraEntity.getComponent(Camera)
initScreenshot(engine, camera)
})
const cameraEntity = engine.sceneManager.activeScene.findEntityByName("Camera");
const camera = cameraEntity.getComponent(Camera);
initScreenshot(engine, camera);
});
});
2 changes: 1 addition & 1 deletion e2e/case/shaderLab-mrt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { Camera, Color, Logger, Material, MeshRenderer, PrimitiveMesh, Shader, WebGLEngine } from "@galacean/engine";
import { ShaderLab } from "@galacean/engine-shader-lab";
import { ShaderLab } from "@galacean/engine-shaderlab";
import { initScreenshot, updateForE2E } from "./.mockForE2E";

const shaderLab = new ShaderLab();
Expand Down
2 changes: 1 addition & 1 deletion e2e/case/shaderLab-renderState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
Shader,
WebGLEngine
} from "@galacean/engine";
import { ShaderLab } from "@galacean/engine-shader-lab";
import { ShaderLab } from "@galacean/engine-shaderlab";
import { initScreenshot, updateForE2E } from "./.mockForE2E";

const shaderLab = new ShaderLab();
Expand Down
5 changes: 5 additions & 0 deletions e2e/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ export const E2E_CONFIG = {
category: "Material",
caseFileName: "shaderLab-renderState",
threshold: 0.2
},
LUT: {
category: "Material",
caseFileName: "material-LUT",
threshold: 0.2
}
},
Shadow: {
Expand Down
3 changes: 3 additions & 0 deletions e2e/fixtures/originImage/Material_material-LUT.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 20 additions & 22 deletions examples/buffer-mesh-particle-shader-effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import {
Shader,
BaseMaterial,
Script,
WebGLEngine,
} from '@galacean/engine';
import { OrbitControl } from '@galacean/engine-toolkit-controls';
import { ShaderLab } from '@galacean/engine-shader-lab';
WebGLEngine
} from "@galacean/engine";
import { OrbitControl } from "@galacean/engine-toolkit-controls";
import { ShaderLab } from "@galacean/engine-shaderlab";

const shaderLab = new ShaderLab();

Expand Down Expand Up @@ -97,37 +97,35 @@ class ParticleMeshMaterial extends BaseMaterial {
}

get texture1(): Texture2D {
return <Texture2D>this.shaderData.getTexture('texture1');
return <Texture2D>this.shaderData.getTexture("texture1");
}

set texture1(value: Texture2D) {
this.shaderData.setTexture('texture1', value);
this.shaderData.setTexture("texture1", value);
}

get texture2(): Texture2D {
return <Texture2D>this.shaderData.getTexture('texture2');
return <Texture2D>this.shaderData.getTexture("texture2");
}

set texture2(value: Texture2D) {
this.shaderData.setTexture('texture2', value);
this.shaderData.setTexture("texture2", value);
}

get progress(): number {
return <number>this.shaderData.getFloat('progress');
return <number>this.shaderData.getFloat("progress");
}

set progress(value: number) {
this.shaderData.setFloat('progress', value);
this.shaderData.setFloat("progress", value);
}
}

class AnimationComponent extends Script {
time = 0;
mtl: ParticleMeshMaterial | undefined;
onAwake() {
this.mtl = this.entity
.getComponent(MeshRenderer)!
.getMaterial() as ParticleMeshMaterial;
this.mtl = this.entity.getComponent(MeshRenderer)!.getMaterial() as ParticleMeshMaterial;
}
onUpdate(time: number) {
this.time += time;
Expand Down Expand Up @@ -232,38 +230,38 @@ function createPlaneParticleMesh(
new VertexBufferBinding(
new Buffer(engine, BufferBindFlag.VertexBuffer, indexBuffer),
3 * Float32Array.BYTES_PER_ELEMENT
),
)
]);

mesh.setVertexElements([
new VertexElement('POSITION', 0, VertexElementFormat.Vector3, 0),
new VertexElement('UV', 0, VertexElementFormat.Vector2, 1),
new VertexElement('INDEX', 0, VertexElementFormat.Vector3, 2),
new VertexElement("POSITION", 0, VertexElementFormat.Vector3, 0),
new VertexElement("UV", 0, VertexElementFormat.Vector2, 1),
new VertexElement("INDEX", 0, VertexElementFormat.Vector3, 2)
]);

mesh.addSubMesh(0, vertexCount);
return mesh;
}

WebGLEngine.create({ canvas: 'canvas', shaderLab }).then((engine) => {
WebGLEngine.create({ canvas: "canvas", shaderLab }).then((engine) => {
engine.canvas.resizeByClientSize();
const scene = engine.sceneManager.activeScene;
const rootEntity = scene.createRootEntity();

const particleMeshShader = Shader.create(shaderSource);

const cameraEntity = rootEntity.createChild('camera');
const cameraEntity = rootEntity.createChild("camera");
cameraEntity.addComponent(Camera);
cameraEntity.transform.position.set(0, 0, 50);
cameraEntity.addComponent(OrbitControl);

engine.resourceManager
.load([
'https://gw.alipayobjects.com/zos/OasisHub/440001901/3736/spring.jpeg',
'https://gw.alipayobjects.com/zos/OasisHub/440001901/9546/winter.jpeg',
"https://gw.alipayobjects.com/zos/OasisHub/440001901/3736/spring.jpeg",
"https://gw.alipayobjects.com/zos/OasisHub/440001901/9546/winter.jpeg"
])
.then((assets) => {
const entity = rootEntity.createChild('plane');
const entity = rootEntity.createChild("plane");
const renderer = entity.addComponent(MeshRenderer);
const mesh = createPlaneParticleMesh(engine, 20, 20, 80, 80, true);
const mtl = new ParticleMeshMaterial(engine, particleMeshShader);
Expand Down
2 changes: 1 addition & 1 deletion examples/shader-lab-multi-pass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
Vector4,
WebGLEngine
} from "@galacean/engine";
import { ShaderLab } from "@galacean/engine-shader-lab";
import { ShaderLab } from "@galacean/engine-shaderlab";
import { OrbitControl } from "@galacean/engine-toolkit-controls";
import * as dat from "dat.gui";

Expand Down
41 changes: 16 additions & 25 deletions examples/shader-lab-simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* @thumbnail https://mdn.alipayobjects.com/merchant_appfe/afts/img/A*C7Y1RaI_ZJEAAAAAAAAAAAAADiR2AQ/original
*/

import { GUI } from 'dat.gui';
import { OrbitControl } from '@galacean/engine-toolkit-controls';
import { GUI } from "dat.gui";
import { OrbitControl } from "@galacean/engine-toolkit-controls";
import {
BufferMesh,
Camera,
Expand All @@ -19,9 +19,9 @@ import {
MeshRenderer,
Shader,
Material,
Color,
} from '@galacean/engine';
import { ShaderLab } from '@galacean/engine-shader-lab';
Color
} from "@galacean/engine";
import { ShaderLab } from "@galacean/engine-shaderlab";

const shaderLab = new ShaderLab();

Expand Down Expand Up @@ -108,59 +108,50 @@ Shader "Lines" {

function createPlaneMesh(engine: WebGLEngine) {
const mesh = new BufferMesh(engine);
const vertices = new Float32Array([
-1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1,
]);
const vertexBuffer = new Buffer(
engine,
BufferBindFlag.VertexBuffer,
vertices,
BufferUsage.Static
);
const vertices = new Float32Array([-1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1]);
const vertexBuffer = new Buffer(engine, BufferBindFlag.VertexBuffer, vertices, BufferUsage.Static);
mesh.setVertexBufferBinding(vertexBuffer, 12);
mesh.setVertexElements([
new VertexElement('POSITION', 0, VertexElementFormat.Vector3, 0),
]);
mesh.setVertexElements([new VertexElement("POSITION", 0, VertexElementFormat.Vector3, 0)]);
mesh.addSubMesh(0, 6);
return mesh;
}

Logger.enable();
WebGLEngine.create({ canvas: 'canvas', shaderLab }).then((engine) => {
WebGLEngine.create({ canvas: "canvas", shaderLab }).then((engine) => {
engine.canvas.resizeByClientSize();

const shaderMap = {
normal: Shader.create(normalShaderSource),
lines: Shader.create(linesShaderSource),
lines: Shader.create(linesShaderSource)
};

const scene = engine.sceneManager.activeScene;
const rootEntity = scene.createRootEntity();

// camera
const cameraEntity = rootEntity.createChild('cameraNode');
const cameraEntity = rootEntity.createChild("cameraNode");
cameraEntity.transform.setPosition(0, 0, 5);
cameraEntity.addComponent(Camera);
cameraEntity.addComponent(OrbitControl);

// create plane
const triangle = rootEntity.createChild('plane');
const triangle = rootEntity.createChild("plane");
const renderer = triangle.addComponent(MeshRenderer);
renderer.mesh = createPlaneMesh(engine);
const shader = shaderMap.lines;
const material = new Material(engine, shader);
material.shaderData.setColor('u_color', new Color(1.0, 1.0, 0));
material.shaderData.setColor("u_color", new Color(1.0, 1.0, 0));
renderer.setMaterial(material);

engine.run();

const state = {
shader: 'lines',
shader: "lines"
};

function addGUI() {
const gui = new GUI({ name: 'Switch Shader' });
gui.add(state, 'shader', Object.keys(shaderMap)).onChange((v) => {
const gui = new GUI({ name: "Switch Shader" });
gui.add(state, "shader", Object.keys(shaderMap)).onChange((v) => {
material.shader = shaderMap[v];
});
}
Expand Down
Loading
Loading