Commit Graph

70 Commits

Author SHA1 Message Date
ChiaNing a88cdecadf limit font scale to 1 (#15367)
* limit font scale to 1

* to fix 1

* move
2023-06-08 17:48:48 +08:00
ChiaNing 58299f0ef4 fix label auto Atlas bug (#15356) 2023-06-07 18:40:20 +08:00
ChiaNing 2862b75391 fix bm font anchor bug (#15353) 2023-06-07 14:56:08 +08:00
ChiaNing eb94bbaefe fix font scale limit bug (#15342)
* fix font scale limit bug

* name change
2023-06-07 10:39:56 +08:00
ChiaNing 7b60d75daa HD processing of ttf mode labels (#15206)
* Adding ttf is affected by dpr

* Adding Char mode is affected by dpr

* move dpr to style

* rebase & add max font size

* name change

* remove use less

* misc
2023-06-05 18:14:22 +08:00
ChiaNing 0796fb1e3d Text Processing Refactoring (#14739)
* text processing file add

* processing String

* render & effect

* bmfont add

* char mode add

* code collate

* use less remove

* after rebase and change Sync

* add data class

* fix bm font clamp bug

* fix bitmap mode

* fix ci

* fix misc

* fix ci

* remove some code

* remove data class

* name change

* bug fix
2023-05-25 11:56:45 +08:00
minggo a22d16bbe6 Merge branch 'v3.7.3' into merge_v3.7.3 2023-04-24 11:26:58 +08:00
May2nd 78b1fbfa83 - fix bmfont kerning scale (#14776)
Co-authored-by: Viet <>
2023-04-12 13:49:03 +08:00
minggo 60fa48ba7c make UIRenderer._srcBlendFactor protected (#14685)
* make UIRenderer._srcBlendFactor public
2023-03-30 14:44:12 +08:00
PP fa51b804b5 remove and ban @ts-expect-error (#14572)
* remove ts-expect-error usage in engine

* deprecate Scheduler interface

* remove JavaScriptCore

* set some engineInternal public property as getter setter

* fix build-declaration

* fix releaseManager export name conflict

* update scriptEngineType

* fix and update some comment

* remove  w_mat, w_pos, w_rot, w_scale

* update renderer

* fix setRootBufferDirty not binding on native

* optimize floatToHashString

* mark NOTE
2023-03-20 13:48:26 +08:00
santy-wang 0a81bf445e Merge branch 'develop' of github.com:cocos-creator/engine into v3.7.2 2023-03-13 16:51:47 +08:00
ChiaNing 512856d6ec fix char label color bug (#14467) 2023-03-06 13:52:13 +08:00
李吉林 e5fe41fbdd remove abs from rhw in transformMat4 (#14483) 2023-03-06 11:03:27 +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 c24c02ecc3 Label Bug Fix: init chunk when createData (#13851) 2022-12-20 14:06:26 +08:00
江战 f6854cd16e native introduce jsb.window (#13816) 2022-12-16 13:50:59 +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
Zhang mingzhen 37e67d55c8 Richtext add child optimization v3.7 (#13002)
* add child optimization(in 3.6.2)

(cherry picked from commit 6f44dd375faa1d62becf25818abc4f83ad7e08d1)

* add estimation before calculate size precisely

(cherry picked from commit 92b26a6f6b8f78abd2bcafffbe2a9c86b18a1e50)

* add anotations

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-10-10 16:00:56 +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
santy-wang f33523227f sync v3.6.1 to develop 2022-09-19 14:00:54 +08:00
LeeYip 44dd12a6fe [fix] bmfont uv bug when overflow is clamp (#12374) 2022-09-14 11:42:39 +08:00
minggo 2f10f48c15 adjust some folders (#12712)
move cocos/core/asset-manager to cocos/asset/asset-manager
move cocos/core/assets to cocos/asset/assets
merge cocos/core/builtin to cocos/asset/asset-manager
2022-09-07 18:45:54 +08:00
minggo c5c7b987ea move cocos/core/gfx to cocos/gfx (#12559)
* move cocos/core/gfx to cocos/gfx
2022-08-26 17:51:46 +08:00
QingliWang 6a8f53b186 Add features for XR developement. (#12413)
* Change Android mainloop, add global config and template projects for XR.

* Change gfx/gles device's process flow for XR, working with other PRs, waiting.

* Change gfx/Vulkan device's process flow for XR, working with other PRs, waiting.

* Change render process for XR.

* Develop XR input and events.

* Develop 3D feature of UI widgets and raycast effect for XR.

Co-authored-by: fqamic <fqamic@vip.qq.com>
2022-08-22 16:34:45 +08:00
ChiaNing 1d557ed6fe UI performance optimization (#12390)
* Sprite performance optimization

* inline function

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-08-11 19:22:14 +08:00
Zhang mingzhen 74cf745db8 add protect condition of kerningDict and fontDefDictionary are undefined (#12130)
* add protect condition of kerningDict and fontDefDictionary are undefined

* add warining when give a null parameter

* if fontatlas is null, create one

* narrow the size of letterAtlas initialization

* create global variables for assignment

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-07-22 12:15:07 +08:00
mikecoker ca7a3e35af fix a leak with htmlcanvaselements (#11979) 2022-07-20 23:05:56 +08:00
Santy-Wang ddf0a72fc4 fix richtext bmfont error (#11921) 2022-07-11 15:37:25 +08:00
Zhang mingzhen b32830a3e8 V3.6.0 batcher2d to native (#11592) 2022-07-08 17:10:48 +08:00
ChiaNing 529155281f Fill the Z Position in UI (#11151)
* Fill the Z Position in UI

* useless remove

* add justTranslate hack

* Revert "add justTranslate hack"

This reverts commit 1de036856c02e3b9c0d6e62fa823c9341c1c3fd4.

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
2022-05-25 18:45:34 +08:00
minggo 7814949998 Merge branch 'v3.5.1' into v3.6.0_merge_v3.5.1 2022-05-24 11:53:57 +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
minggo 84c27e7f71 Merge branch 'v3.5.0' into v3.6.0_merge_v3.5 2022-04-24 13:41:27 +08:00
Zhang mingzhen 436eb46fa4 add wrapmode settings (#10754)
Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-04-14 19:02:40 +08:00
minggo be735449af Revert "remove some deprecated api (#10656)" (#10694)
This reverts commit a1b1fc5a09.
2022-04-08 11:51:06 +08:00
minggo a1b1fc5a09 remove some deprecated api (#10656)
* remove some deprecated api
2022-04-07 16:31:02 +08:00
minggo a6bf766170 Merge branch 'v3.5.0' into v3.6_merge_v3.5 2022-03-29 18:26:40 +08:00
Zhang mingzhen f7c2559944 Chunk renderdata reform v3.6 (#10329)
* reform chunk & renderdata

* add some optimizations

* update eslint

* add optimizations

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-03-23 11:21:33 +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
ChiaNing bd89a7bc1a protect when texture insert to atlas (#10214) 2022-03-03 10:01:24 +08:00
Santy-Wang b57b805e8b Revert "fix fuzzy text on high resolution displays (#9888)" (#10157)
This reverts commit 24f74e178c.
2022-02-22 23:06:10 +08:00
Santy-Wang 2aed94a34f Revert "change DPR to 1 when BMfont (#10154)" (#10156)
This reverts commit c27b2d34b6.
2022-02-22 23:02:02 +08:00
ChiaNing c27b2d34b6 change DPR to 1 when BMfont (#10154) 2022-02-22 19:20:04 +08:00
ankye sheng 24f74e178c fix fuzzy text on high resolution displays (#9888)
* fix fuzzy text on high resolution displays

* modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

fix fuzzy text on high resolution displays

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

fix rebase 3.4.2 ,limit dpr 1 or 2

fix font min dpr

fix font min dpr

fix fuzzy text on high resolution displays

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

Merge branch 'v3.4.1' of github.com:ankye/engine into v3.4.1

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

fix fuzzy text on high resolution displays

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

fix rebase 3.4.2 ,limit dpr 1 or 2

fix font min dpr

fix eslint error

fix fuzzy text on high resolution displays

fix fuzzy text on high resolution displays

modify devicePixelRatio scale factor and fix eslint

modify devicePixelRatio scale factor and fix eslint

fix eslint error

fix fuzzy text on high resolution displays

Co-authored-by: shengxiehua <shengxiehua@soulapp.cn>
2022-02-16 10:09:22 +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
ChiaNing 34b1b70431 fix bmfont line width bug (#9793)
* fix bmfont line width bug

* Fix CI

* fix CI
2021-12-13 16:25:23 +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