Commit Graph

48 Commits

Author SHA1 Message Date
pandamicro c8d3be08a3 Fix issues in Node.updateWorldTransform and UITransform.getBoundingBoxTo[World] (#15273)
* Fix transform update issue when only rotation is set to root node

* Fix UITransform.getBoundingBoxTo and UITransform.getBoundingBoxToWorld

* Improve API and test

* Fix native Node::updateWorldTransform

* Fix UITransform.getBoundingBoxTo

* Fix getBoundingBoxTo by ensuring one time rect transform

* Ignore zero sized rect for bounding box calculation

* Improve API doc
2023-06-07 11:10:28 +08:00
PP 386ec2895a [cherry-pick] AOT-3: optimize uinstrict code (#14315) (#14523)
* AOT: optimize uinstrict code

- mark some unstrict code as TODO
- remove some unstrict code

* update comment

* remove ts-check
# Conflicts:
#	cocos/2d/framework/deprecated.ts
#	cocos/asset/assets/image-asset.jsb.ts
#	cocos/asset/assets/texture-base.ts
#	cocos/core/assets/image-asset.ts
#	cocos/core/math/rect.ts
#	cocos/core/scene-graph/scene-globals.jsb.ts
#	cocos/native-binding/impl.ts
#	cocos/scene-graph/node-dev.ts
#	cocos/scene-graph/scene-globals.ts
#	exports/sorting.ts
2023-03-10 13:36:45 +08:00
ChiaNing b603baae23 Improve api doc (2d&UI) (#13898)
* Improve api doc (2d&UI)

* remove @internal

* msic

* remove eracut

* update doc

* Update

* fix

* misc
2023-02-08 14:25:48 +08:00
pandamicro afd22296b4 MIT license update and to new year 2023 (#13927)
* Cpp MIT license update and to date
* TS MIT license update and to date
2022-12-28 11:25:12 +08:00
ChiaNing 3d3847f2d9 fix ui transform recursion bug (#13848) 2022-12-19 16:14:34 +08:00
minggo 83a2717fac Fix module import (#13140)
* fix core module import style

* import murmurhash2_32_gc from core module

* do not export visibleRect
2022-10-25 16:38:38 +08:00
minggo 95a76235b6 Adjust some files (#12910)
`cocos/core` should not depend other modules, so move some files out of `cocos/core`:
- move some files from `cocos/core` to `cocos/game`
  - director.ts
  - splash-screen.ts
  - game.ts
 - move `cocos/core/root.ts` to `cocos/root.ts` as there is not better module to contain `root.ts`.
 - move `cocos/core/platform/view.ts` to `cocos/ui/view.ts` as screen related logic is moved to `cocos/core/platform/screen.ts`
2022-09-28 09:34:35 +08:00
minggo 0d7c5c8f56 move cocos/core/scene-graph to cocos/scene-graph (#12868)
* move `cocos/core/scene-graph` to `cocos/scene-graph`
* move some files in `cocos/core/components` to `cocos/scene-graph`:
  - component.ts
  - component-event-handler.ts
  - component-event-handler-schema.ts
* move some files in `cocos/core/components` to `cocos/misc`: 
  - missing-script.ts
  - model-renderer.ts
  - renderer.ts
  - camera-component.ts
* move  `cocos/core/components/system.ts` to ``cocos/core/system.ts``
2022-09-26 11:02:22 +08:00
林玮 785fd91511 Add multi-windows support (#12243)
Co-authored-by: bofeng.song <bofeng.song@chukong-inc.com>
2022-09-15 14:55:44 +08:00
Zhang mingzhen b32830a3e8 V3.6.0 batcher2d to native (#11592) 2022-07-08 17:10:48 +08:00
PP ef3c839838 ban UI hitTest on renderTexture (#11299) 2022-06-20 10:07:14 +08:00
ChiaNing 28b6503087 fix some ui api doc (#10969)
* fix some ui api doc

* update

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-05-06 19:22:34 +08:00
Santy-Wang 23de9188ba V3.5 docs (#10898)
* adjust api docs and delete useless annotation

* delete useless annotation
2022-04-27 15:22:22 +08:00
ChiaNing 968ab9d71a fix some api doc (#10868)
* fix some api doc

* add misc
2022-04-25 21:15:19 +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
Zhang mingzhen 9c37363b69 use approx instead of === (#10357)
* use approx instead of ===

* remove rebundant as
2022-03-16 13:39:11 +08:00
ChiaNing 8f87cbd483 useless UI_GPU code delete (#10048) 2022-01-25 19:14:41 +08:00
ChiaNing 6f1c083ba4 fix renderData null bug (#9476) 2021-10-14 10:29:37 +08:00
ChiaNing 26ce72983f fix contentSize bug when alpha is zero (#9434) 2021-10-14 10:29:37 +08:00
ChiaNing 8d916b9816 fix rotation with anchor (#9453) 2021-10-11 11:29:52 +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
PP 97b3657549 migrate input module out of platform (#9296)
* migrate input module out of platform

* revert EventKeyboard.isPressed deprecation

* fix CI
2021-09-07 15:24:43 +08:00
cary 0a1356a816 Compatible with non-ReadOnly parameters. (#9160) 2021-08-15 22:01:41 +08:00
PP d7067c29c8 deprecate interface in View module && support pal/screenManager (#8836)
* remove BrowserGetter

* deprecated view.adjustViewportMeta

* deprecate view.enableAutoFullScreen and view.isAutoFullScreenEnabled

* remove view._adjustSizeKeepCanvasSize

* remove view._convertMouseToLocation, view._convertTouchWidthScale and view._convertTouchesWithScale

* remove view._originalDesignResolutionSize

* deprecate cc.winSize and cc.visibleRect

update

* access local winSize

* access local visibleRect

* deprecate view.getVisibleOrigin view.getVisibleOriginInPixel

* Revert "deprecate view.getVisibleOrigin view.getVisibleOriginInPixel"

This reverts commit 1ae9e1d5c51d8c701eaa2e4a65cd4c17e5f6d971.

* Revert "deprecate cc.visibleRect"

* optimize screen module

update

* update

update

* optimize deprecation info

* rename pal/system to pal/systemInfo

* update pal/systemInfo access in engine layer

* support pal/screenManager

* update pal/screenManager access in engine layer

* fix bug

* optimize deprecation info

* fix auto fullscreen

* fix ci

* fix ci

* update change request

update

update

* fix CI
2021-07-09 18:57:03 +08:00
santy-wang c5dd05fbf1 Merge branch 'v3.1.2' of github.com:cocos-creator/engine into v3.3-merge 2021-06-28 14:40:34 +08:00
ChiaNing cbf7090542 sprite fillbuffer cache & sprite misc change when set spf (#8876)
* sprite fillbuffer cache & sprite misc change when set spf

* misc fix

* remove Rect Dirty & add uiTransformDirty

* remove getHash
2021-06-25 13:57:24 +08:00
PP 4914116834 optimize SystemEventType and NodeEventType (#8678)
* remove recomendation for usage of string type of event

* deprecate KEY_DOWN KEY_UP event

* support SystemEventType.KEYBOARD_DOWN && SystemEventType.KEYBOARD_UP

* deprecate some useless properties

* implement keyboard pal

* remove SystemEventType toString()

update

* fix instantiating EventTouch

* optimize deprecated info

* support native keyboard KEYBOARD_DOWN event

* remove usage of event code

* fix deprecating pure value properties

* optimize deprecating Event type

* optimize deprecating getEventCode()

update

* optimize deprecating eventType

* optimize deprecating isPressed

* optimize deprecating keybaord event

* optimize deprecating rawEvent

* Revert "fix deprecating pure value properties"

This reverts commit 60d586532496fa1f422f05c54a922b86d1dc96ee.

* fix deprecate pure value properties

* Revert "fix deprecate pure value properties"

This reverts commit a83f1725fedfbd7af445892912aacab8e8502147.

* fix deprecating pure value property

* update

updaate

* deprecate some EventType enum in SystemEventType and NodeEventType

* optimize

* update

update

* update

* update

* fix CI

* fix CI

* fix Circular dependency

* fix Circular dependency
2021-06-07 19:06:29 +08:00
cary f37099c294 Change the parameter of the math library to Readonly. (#8765)
* Change the parameter of the math library to Readonly.

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* delete pool
2021-06-04 17:36:15 +08:00
ChiaNing b6352f6bd1 fix node sort bug when value same (#8568) 2021-04-27 15:23:30 +08:00
ChiaNing 00aca35ef2 fix some deprecated value warn (#8553) 2021-04-25 21:08:58 +08:00
zheng han 2949226876 remove priority visible decorator (#8546) 2021-04-25 16:18:03 +08:00
ChiaNing b7ff216502 fix priority bug when scene change (#8531) 2021-04-23 16:46:43 +08:00
ChiaNing b49b50d829 ui priority deprecated (#8477) 2021-04-19 10:30:14 +08:00
ChiaNing b89c07f2ef UITransform priority change (#8435)
* UITransform priority change

* better version

* update

* name change

* name change
2021-04-15 13:38:35 +08:00
mmyduckx eefc5e8b61 2d module support zh/en UItooltip (#8332) 2021-03-07 16:35:20 +08:00
PP bdae8e370d cache camera priority in event listener (#8216)
* Revert "cache first render camera (#8215)"

This reverts commit 4cdb7043c9.

* cut down touch move callback

* cache camera priority in event listener

* Revert "cut down touch move callback"

This reverts commit 19da61e3f16c3d1c14c1e8111b0da98b4997dea4.

* fix esLint
2021-01-27 15:56:56 +08:00
PP 4cdb7043c9 cache first render camera (#8215)
* cache first render camera

* fix esLint

* fix esLint

* update var name
2021-01-27 12:50:11 +08:00
pandamicro 5f8047d1aa Manual merge v1.2.1 branch (#8186)
* fix ui transform setContentSize (#7686)

* fix ui transform setContentSize

* update

* update

* update

* update remark
# Conflicts:
#	cocos/core/scene-graph/deprecated.ts

* Tweeks

Co-authored-by: yeshao2069 <yezi636shao@163.com>
2021-01-21 20:00:46 +08:00
cary b3f6bb99b6 Fix recycle reference of node event processor. (#8134)
* Fix recycle reference of node event processor.

* fix eslint ci
2021-01-18 14:55:07 +08:00
pandamicro c6dad8c494 Merge render scene and improve naming for 2d render (#8142)
* format and tweek

* Refactor renderer: UI to 2D naming

* refactor root.ui to root.batcher2D

* Refactor UIBatchView to BatchView2D

* Fix issues

* Merge UI render scene to main render scene

* Improve camera scene check in forward pipeline

* Fix eslint ci

* skip js files
2021-01-15 11:43:09 +08:00
ChiaNing a3986052dc Circular reference fix (#8128) 2021-01-12 18:09:43 +08:00
ChiaNing fa2057deb4 RenderRoot2d comp add (#8120)
* RenderRoot2d comp add

* name change

* require UITransform on renderRoot
2021-01-12 14:55:17 +08:00
cary 9d20701c2d Fix the penetration of click events when Mask nesting. (#8109) 2021-01-09 18:00:44 +08:00
ChiaNing b1e8b91a8c layout bug fix when child change (#8070)
* layout bug fix when child change

* use event emit

* Revert "use event emit"

This reverts commit 7ba377ab7c0a16d9e3640484afcb5e706aa06a81.
2021-01-06 15:09:49 +08:00
pandamicro 84f2b5b742 Fix ui canvas event priority and deprecation (#8062)
* Fix UI event priority sorting issue

* Fix canvas deprecation

* Fix ci

* Fix ci

* Fix eslint
2020-12-31 13:45:15 +08:00
Santy-Wang ad4bff3988 Restructure Module (#7968)
* module restructure

* refine

* restructure module

* merge

* revert

* fix ci

* update import path of unit-test

* split 2d and ui

* add more module

* change audio adapter

* rename primitive

* config wechat plugin

* merge

* add category config

* merge

* merge
2020-12-24 19:07:26 +08:00