Commit Graph

23 Commits

Author SHA1 Message Date
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
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
Zhang mingzhen b2e497adc5 update richtext truncation condition (new) (#10252)
* update richtext truncation condition

(cherry picked from commit 585eab687a039e5e6caa76ac465b4285f3711710)

* remove rebundant condition

(cherry picked from commit a04bef01fbe8ff61ae3aebc1daf8fe5bda2d58cf)

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2022-03-09 16:09:00 +08:00
ChiaNing cb721f1d81 fix atlas bug when spriteframe is null (#10239) 2022-03-04 11:57:15 +08:00
ChiaNing bd89a7bc1a protect when texture insert to atlas (#10214) 2022-03-03 10:01:24 +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 da2f73e096 fix nearest filter texture packed bug (#9780) 2021-12-08 10:09:04 +08:00
Zhang mingzhen 6c661a5758 supplement docs of atlasmanager (#9590)
* supplement docs of atlasmanager #9522

* optimize docs.

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-11-03 10:36:52 +08:00
ChiaNing 4f778c7ddb fix sprite frame reset bug when Atlas delete (#9579)
* fix sprite frame reset bug when Atlas delete

* change function
2021-10-30 18:22:53 +08:00
Santy-Wang 9d23637f06 delete useless code (#8601)
* delete useless code

* refine format and fix typo
2021-07-09 14:38:04 +08:00
ChiaNing 98bf04576f remove event at _applySpriteFrame (#8517)
* remove event at _applySpriteFrame

* remove version dirty
2021-04-22 16:52:18 +08:00
pandamicro c5d4c5c08e Merge remote-tracking branch 'origin/v3.0.0' into device-proof
# Conflicts:
#	cocos/3d/assets/morph-rendering.ts
#	cocos/core/builtin/builtin-res-mgr.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/core/pipeline/index.jsb.ts
#	cocos/core/pipeline/planar-shadow-queue.ts
#	cocos/core/pipeline/render-additive-light-queue.ts
#	cocos/core/pipeline/shadow/shadow-flow.ts
#	cocos/particle/renderer/trail.ts
#	cocos/physics/ammo/polyfill-atob.ts
#	editor/assets/effects/builtin-spine-two-colored.effect.meta
#	jest.config.js
#	platforms/native/engine/jsb-pipeline.js
#	tests/general/sealed-global-variables.json
2021-02-07 18:33:59 +08:00
Yun Hsiao Wu 5a02d3f1d0 structure 2021-02-03 17:51:22 +08:00
Yun Hsiao Wu 4fd693adf2 device layer adapt 2021-02-03 17:51:20 +08:00
ChiaNing 1a7a3962a4 export dynamicAtlasManger (#8170) 2021-01-21 15:20:42 +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
Leslie Leigh (李的序) 9bd9baac12 Eslint autofix all (#8108)
* Eslint autofix all

* Manual fix
2021-01-09 11:41:10 +08:00
ChiaNing 0b5e103307 fix richText layout bug (#8057) 2020-12-30 22:04:45 +08:00
ChiaNing b85a367309 fix label bug (update UV when texture change) (#8041)
* fix label bug (update UV when texture change)

* Circular reference fix
2020-12-28 20:41:22 +08:00
ChiaNing 4461eb1d12 DynamicAtlas support (#8017)
* DynamicAtlas support

* CI fix
2020-12-26 14:28:30 +08:00
Santy-Wang 75d8b8add2 Lint asset manager (#8002)
* lint asset manager and refine d.ts

* refine

* refine d.ts
2020-12-25 20:43:44 +08:00
JoneLau fc62709146 remove padding display, and fix safeMeasureText code hint (#8012) 2020-12-24 19:23:07 +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