Commit Graph

106 Commits

Author SHA1 Message Date
minggo a6bf766170 Merge branch 'v3.5.0' into v3.6_merge_v3.5 2022-03-29 18:26:40 +08:00
ChiaNing 0587992cb1 fix label Blend Factor bug for BYTEDANCE (#10516)
* fix label Blend Factor bug for BYTEDANCE

* update
2022-03-26 18:53:07 +08:00
PP 5ef14f649f remove help decorator on non-component class (#10503) 2022-03-25 16:25:30 +08:00
PP 96f3bd00e3 fix pointer event when camera.orthoHeight changed (#10496)
* deprecated uiTransform.isHit with hitTest method

* use hitTest instead of isHit

* add type info

* update
2022-03-25 13:53:09 +08:00
ChiaNing e348ae4e2e clear Particle under UIMeshRenderer when play end (#10468)
* clear Particle under UIMeshRenderer when play end

* format

* format change
2022-03-23 20:21:26 +08:00
pandamicro d3f5e58acc Fix templates and minor tweaks (#10434)
* Fix templates

* Minor tweaks

* Minor
2022-03-22 17:22:41 +08:00
Santy-Wang ab82e1b42d remove hidden (#10414)
* remove hidden

* fix typo

* fix unit-test

* turn on auto fix
2022-03-22 15:11:16 +08:00
alpha 5647498081 UIOpacity Component DisallowMultiple (#10390) 2022-03-21 13:52:39 +08:00
Zhang mingzhen 8d3c975116 Rich text v align v3.5 #9984 new (#10340)
* add vertical alignment attribute

(cherry picked from commit fc4013e4016203c9ff13c3fb55ab24d8f6afdd82)

* set vertical alignment

(cherry picked from commit 60afa526e215c6e599560683427701baf42595c8)

* distinguish hAlign and vAlign

(cherry picked from commit 010e097b5c862a8373e860f01c1104b6396f81ba)

* use as instead of instanceof

* reorder attributes

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-03-15 16:27:30 +08:00
Zhang mingzhen 8d0108807e Rich Text Optimization (#9601)
* split long string into short pieces

* Add '\n' toughly, to be optimized.

* Unified offset of rendering label of ttf and bmfont

* remove chinese or redundant explanations

* step1.optimize truncate long string

* step2: add details

* optimization of tough switching line

* 1. add condition if maxWdith is over 2048.
2. add a ErrorOffset to avoid a little characters will overstep these designed lines.

* remove log

* remove rebundant code and rename the method

* resolve bug: complete english words are truncated

* revert "remove annotations"

* Revert "Unified offset of rendering label of ttf and bmfont"

This reverts commit 37d6a57d820ad5be09a90510526e85e8cca77c5a.

* optimize split algorithm

* consider one char step condition (for chinese characters)

* update conditions causing many bugs

* remove rebundant code

* add two optimizations
1. split with '\n' earlier, excute the method less;
2. when the left string size is less than 2048, the method can finish.

* remove annotated code

* resolve confict

* add internal annotation

* replace "internal" by "engineInternal"

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-03-10 16:21:47 +08:00
minggo 73c303f556 Merge branch 'v3.5.0' into merge_v3.5.0 2022-03-08 14:53:00 +08:00
santy-wang 10349e567d Merge branch 'v3.4.2' of https://gitlab.cocos.net/publics/engine into v3.5.0 2022-03-08 10:21:39 +08:00
黄森斌 4f05432c23 Displayorder is removed from the edit template and is taken over completely by the decorator (#10165) 2022-03-02 21:14:37 +08:00
pandamicro 1446db89e7 Merge branch 'v3.4.2' into v3.5.0
# Conflicts:
#	cocos/2d/components/sprite.ts
#	cocos/2d/framework/ui-transform.ts
#	cocos/2d/renderer/render-uniform-buffer.ts
#	cocos/core/builtin/effects.ts
#	cocos/core/builtin/shader-sources/glsl1.ts
#	cocos/core/builtin/shader-sources/glsl3.ts
#	cocos/core/builtin/shader-sources/glsl4.ts
#	cocos/dragon-bones/ArmatureDisplay.ts
#	cocos/spine/skeleton.ts
#	editor/assets/chunks/cc-sprite-fs-gpu.chunk
#	editor/assets/chunks/cc-sprite-fs-gpu.chunk.meta
#	editor/assets/chunks/cc-sprite-vs-gpu.chunk
#	editor/assets/chunks/cc-sprite-vs-gpu.chunk.meta
#	editor/assets/default_skybox.meta
#	editor/assets/effects/builtin-sprite-gpu.effect.meta
2022-02-28 17:24:02 +08:00
pandamicro 2ba83f18a4 Ensure RenderData.clear won't break usability (#10177)
* Cleanup Renderable2D onDestroy and destroyRenderData

* Ensure RenderData.clear won't break usability

* Remove quad render data

* Fix Skeleton.destroyRenderData

* Small tweak

* Fix ci

* Add protection to buffer accessor size calculation

* Cleanup spine & dragonbones code

* Improve DragonBones draw list management

* Fix currRenderData state issue
2022-02-25 14:56:54 +08:00
Zhang mingzhen 782be9bdce add extra name like cc.xxx from legacyCC namespace (#10076)
* add extra name as cc.xxx from legacyCC namespace

* remove rebundant code

* remove rebundant namespaces

* fix unit test bug. supplement global variables classes.

* UIModel->UIMeshRender

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-02-21 14:14:16 +08:00
pandamicro 50a43e18e4 Shared vb accessor for spine (#10077)
* Robust updateOpacity in batcher & cleanup code

* Support Batcher2D commitIA

* Support customized buffer size for StaticVBAccessor

* Reorganize RenderData logic and prepare spine refactor

* spine realTimeTraverse using dedicated accessor

* Support spine clipping

* Fix updateOpacity in batcher 2d

* Support Spine cache mode

* Fix ci

* Use different accessor for tint spine

* Update effect

* Fix native spine and dagonbones IA range issue

* Fix spine tint accessor registartion

* Revert darkColor default value

* Fix spine accessor switching issue and render data init issue

* Shared vb accessor for dragonbones (#44)

* Shared vb accessor for dragonbones

* fix code style

* add explanation why need resize render data in realTimeTraverse

Co-authored-by: zhakesi <liqiao@cocos.com>
2022-02-18 15:24:59 +08:00
ChiaNing f08fdd13a8 Sprite grayscale use compress Texture bug (#10129) 2022-02-18 14:35:48 +08:00
ChiaNing 8f87cbd483 useless UI_GPU code delete (#10048) 2022-01-25 19:14:41 +08:00
santy-wang 41fe64b097 Merge branch 'v3.5.0' of https://gitlab.cocos.net/publics/engine into v3.6.0 2022-01-24 17:45:05 +08:00
santy-wang 995f5b2d41 Merge branch 'v3.4.2' of https://gitlab.cocos.net/publics/engine into v3.5-merge 2022-01-24 15:56:49 +08:00
ChiaNing 59acd7eec7 sprite event off & fix renderData hash bug (#10012)
* event off

* fix renderData hash bug
2022-01-18 18:18:26 +08:00
ChiaNing 4397003da5 fix sprite rect bug (#10011) 2022-01-18 18:01:47 +08:00
PP 6167bab1aa fix touch event on IMAGE STENCIL mask component (#10000) 2022-01-17 14:03:09 +08:00
ChiaNing 085b4a2d2e fix spriteFrame apply time (#9987) 2022-01-13 17:54:20 +08:00
minggo e80251eae6 Codes for native (#9920) 2022-01-11 17:30:18 +08:00
pandamicro bd3c30fd4c BufferAccessor refactor for Batcher2D (#9802)
* VB cache add(only simple)

* sliced add

* after rebase

* Extract BufferAccessor from MeshBuffer

* Refactor for linear buffer accessor

* Support simple sprite

* Fix initialization issues

* Fix simple sprite rendering

* Rough adaptation

* tweaks

* Fix LinearBufferAccessor's appendBuffers

* Cleanup mesh buffer codes

* Reorganize ia allocation

* Middleware adaptation & Particle 2d adaptation (#31)

* Middleware adaptation

* particle-2d adaptation

* Initial implementation of static vb accessor

* Complete static vb accessor

* Improve static vb accessor

* Ensure MeshBuffer.byteOffset

* Fix record batch process in static vb accessor

* Fix vb reset

* simple & simple label add (#32)

* Meshbuffer static length (#33)

* set ib only first time

* Meshbuffer static length

* Some name refactor

* remove RenderData.vData

* Improve buffer update logics

* Use appendIndices in fillBuffers

* The quickest version(simple & label can render) (#34)

* Revert "Use appendIndices in fillBuffers"

This reverts commit 0600e26f7eee277c820c3097b1f48f79fcf60890.

* the quickest version

* pass renderScene

* batch

* change batcher update

Co-authored-by: pandamicro <lphuabin@gmail.com>

* Move ia record logic from accessor to batcher

* Make vertexFormat sourced from render data

* sliced & bar-filled (#35)

* radial-filled & tiled & label (#36)

* radial-filled & tiled

* bmfont & char label

* function change

* name change

* Remove uvDirty

fixes

Fix uv update for sprite

* Reduce mesh buffer setDirty

* uv fix

* Format label

* Refactor color and cascade opacity mechanism

* Fix empty render data or chunk absent issue

* fix some uv (#37)

* Fix non stop allocation issue in static vb accessor

* fix bmfont richText & remove uiComponent (#38)

* fix bmfont uv

* fix richText & remove ui Component

* Fix mesh render data batching

* Small fix

* Update for spine

* Formatting jsb spine and editor

* middle ware & particle 2d (#39)

* motion-streak

* dragon Bones add

* tiled map unsafe change

* particle-2d add

* function name change

* some function change (#40)

* Fix RenderData pool usage

* Fix merge issue

* fix misc bug (#41)

* Native adaptation for spine and dragonbones with MeshRenderData

* misc fix (#42)

* Improvements

* Fix ci and improvements

Co-authored-by: ChiaNing <sun.cloud.mo@gmail.com>
2022-01-07 15:43:04 +08:00
santy-wang 7ffe1bc031 Merge branch 'v3.4.1' of https://gitlab.cocos.net/publics/engine into v3.5.0 2022-01-06 14:41:28 +08:00
PP fbde8d1e90 use lagacyPublic to marked deprecated public interface (#9859)
* use lagacy-public

* publish beta6

* remove jsDoc tag from constructor

* use legacyPublic

* publish beta 7
2021-12-28 11:48:10 +08:00
Zhang mingzhen 6601d1d2de Label string setter optimization (#9880)
* remove rebundant onDisable

* update label.string.setter and add unit test case

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-12-28 11:27:58 +08:00
pandamicro decf7e92fa Merge pull request #9853 from holycanvas/v3.5.0-sync
sync v3.4.1
2021-12-22 16:01:31 +08:00
PP cc01fad918 support internal interface filter (#9797)
* support interface filter

* publish build-engine@4.2.20-beta.1

* update

* fix other type of statement

* publish @cocos/build-engine 4.2.20

* update lock

* remove `@internal` from constructor documentation

* change to internal_cc tag

* support target tag in interface-filter

* publish  4.2.21-beta.1

* remove `@private_cc` tag

* remove public internal interface

* remove public internal getter setter

* remove public declare internal property

* update

* remove `__editorExtrasTag__`

* remove public internal interface on `js`

* pulish @cocos/build-engine 4.2.21-beta.2

* change tag to `@deprecated_to_user`

* support `@deprecated_to_user`

* publish 4.2.21-beta.3

* finish change request

* change to marked_as_engine_private

* publish 4.2.21-beta.5
2021-12-22 12:55:45 +08:00
Zhang mingzhen bb55156164 add decorator “serializable” (#9848)
Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-12-21 16:29:47 +08:00
ChiaNing a355971692 fix RichText image offset bug (#9778) 2021-12-08 10:06:13 +08:00
ChiaNing 99bdb07378 Revert "mesh buffer cache add (#9728)"
This reverts commit 1c0db6414a.
2021-12-03 19:46:09 +08:00
ChiaNing 1c0db6414a mesh buffer cache add (#9728)
* UI MeshBuffer Cache add

* support hierarchy changed event

* notify upper

* use Dirty by Hierarchy Changed

* PR fix

* Fix CI

* fix CI

* support hierarchy changed event & function name change

* function name change

* comment add

* type change

Co-authored-by: santy-wang <wh19930829@qq.com>
2021-11-25 21:25:16 +08:00
ChiaNing 0173699089 Add renderData cache & simplify merge check (#9651)
* Add renderData cache & simplify merge check

* move function

* remove material id

* change dirty name

* fix CI
2021-11-19 18:21:02 +08:00
zhakesi fed044e8fb optimize opacity update (#9679)
* optimize opacity update

* remove _cacheAlpha

* modify code style

* Update cocos/core/scene-graph/node-ui-properties.ts

* Update cocos/core/scene-graph/node-ui-properties.ts

* 1. supplement unit test case
2. supplement default dirty parameter

(cherry picked from commit 7e62d265ffbc8566e92bfcc10c1f9eb68e081487)

Co-authored-by: Santy-Wang <wh19930829@qq.com>
Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-11-19 17:35:19 +08:00
ChiaNing cbc142f89c fix label memory leak when destroy (#9677)
* fix label memory leak when  destroy

* function move
2021-11-17 17:15:19 +08:00
Zhang mingzhen 60cae28a26 Optimize label serialization of "spacingX" and "underlineHeight" on v3.4 (#9628)
Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-11-05 14:07:09 +08:00
ChiaNing 92c0e7c154 fix set trim bug (#9568) 2021-10-29 11:48:22 +08:00
Zhang mingzhen 1448c55ab7 update tooltips of "cocos/2d" and "cocos/ui"#9163 (#9489)
* Update tooltips of sprite-frame and texture(#9163)

* Supplement some tooltips and annotations of som attributes in folder "cocos/2d/component" and "cocos/ui"

* Optimize some tooltips according to comments of PR

* optimize tooltips according to comment at 2021/10/19

(cherry picked from commit fe3d0a910fe11489521c46656343483a502594c3)

* fix "anisotropy" interpretation.It emphasizes threshold instead of just amount.

(cherry picked from commit d06a8c3d6b2d4205a9a51dc769d32ae1eb707b9a)

* optimize tooltips according to EricCorleone's comment at 2021/10/19

(cherry picked from commit df7044bb73a0e1b1dc1f9e946a45d96bc839b00e)

* optimize tooltips according to Xunyi0's comment at 2021/10/20

(cherry picked from commit 6b42df5c69d12a74adee44bc9add2c27e6064c9f)

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-10-25 11:49:58 +08:00
ChiaNing c6a80a8310 fix graphics draw info bug (#9529) 2021-10-25 10:11:56 +08:00
ChiaNing 97fb689578 fix ui-static-batch crash on native (#9488) 2021-10-14 17:50:00 +08:00
ChiaNing c7e432e50b fix trim bug (#9451) 2021-10-14 10:29:36 +08:00
ChiaNing f54c8f5844 fix tiled bug for GPU Mode (#9456) 2021-10-11 13:46:19 +08:00
ChiaNing 24fe3ff784 UI GPU dirven add (#9378)
* uniform

* uniform buffer add

* add dummy IA

* first working version

* misc & data structure optimize

* fix webGL1 bug

* rebase on 3.3

* add maxQuadPerDrawcall by device
现在每个DC能绘制的数量由设备返回的 uniform 数量上限决定

* add index

* index bug fix

* sliced ia add(Not finish)

* change mat4 to vec4

* change stride num

* new vec4PreUI finish

* misc fix

* size & anchor dirty add

* bug fix

* add UICapacityDirty

(cherry picked from commit 417e10c8d3422363d80828539b110b93ee4d3cb1)

* static buffer cache version

(cherry picked from commit 1ffe7e7943cdf9af085aeda5ca218c3442fa9119)

* static buffer update version

(cherry picked from commit 964d9cb5b3230963b2a535acac99a34cde7eb63c)

* cache localbuffer

(cherry picked from commit 641b956def64023e0d47be66bc0c0a37ef1e9791)

* fix setPosition event & fix DS release

* weak sliced & filp tiled mode add

* fix tiled y

* fix sliced bug

* ugly but work filled type add

* update effect

* filled mode effect

* shader fix

* RenderData dirty for render data update

* revert fillbuffer

* misc fix

* support label bmfont by meshBuffer

* fix sliced bug & commit Model

* fixed some render dirty flag bug

* cut code by macro.UI_GPU_DRIVEN

* cut code by UI_GPU_DRIVEN Macro on build

* cut file by UI_GPU_DRIVEN

* I-batcher interface add

* remove render queue cache

* file name change

* file name change

* after merge

* fix for v3.4

* useless remove

* fix texture rotation

* fix sliced when atlas rotation

* useless code remove

* native bind

* update effect

* fix DynamicOffsets bind bug

* PR review fix

* effect encapsulation

* change chunk

* update effect

* update shader

* remove color in fs

* move code

* fix UBO buffer bug

* fix ubo count to 10

* fix vk bind
2021-09-29 22:32:33 +08:00
PP 5878829d51 refactor UI pointer event dispatcher (#9363)
* optimize node event processor

# Conflicts:
#	cocos/core/scene-graph/node-event-processor.ts
#	cocos/core/scene-graph/node.ts

* support pointer event dispatcher

* remove event manager, event listener

# Conflicts:
#	cocos/core/director.ts
#	cocos/input/index.ts

* remove docs for event-manager

* fix pointer lock on web

* BREAKING-CHANGE: ui-transform.isHit interface

ud

* fix CI

* fix CI

* activeInHierarchy
2021-09-24 13:34:43 +08:00
santy-wang 6391b5705a Merge branch 'v3.3.2' of github.com:cocos-creator/engine into v3.4.0-physx 2021-09-24 12:11:48 +08:00
ChiaNing 8be1785d8d fix mask graphics enable bug for android (#9317) 2021-09-11 10:35:40 +08:00