Commit Graph

67 Commits

Author SHA1 Message Date
Jare Guo
92bb384dda Instantiate all FastDefined objects as value type (#11052)
* Instantiate FastDefined object as value type

* Optimize #11052

* Doc

* minor tweak

Co-authored-by: Leslie Leigh <leslieleigh@outlook.com>
2022-05-14 14:30:47 +08:00
Leslie Leigh (李的序)
b1271e6370 Unit test on retrieving class id and class name (#10559) 2022-03-29 20:15:20 +08:00
Santy-Wang
98e52e3f16 output warning info when attached to the node has zero scaling (#10524)
* output warning info when attached to the node has zero scaling

* use approx instead
2022-03-26 22:23:29 +08:00
Leslie Leigh (李的序)
e86ee1a247 @disallowAnimation should not imply visible (#10262) 2022-03-08 16:27:30 +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
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 0600e26f7e.

* 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
Leslie Leigh (李的序)
d97e453b07 Fix decorator order issue in standalone mode (#9911)
* Fix decorator order issue in standalone mode

* Apply

* Update
2022-01-05 23:30:21 +08:00
alpha
f153b5cc1b fix Color.fromHex Bug (#9867) 2021-12-28 11:52:01 +08:00
santy-wang
d3d84673d3 Merge branch 'v3.4.0' of https://gitlab.cocos.net/publics/engine into v3.5.0 2021-12-10 19:20:01 +08:00
ChiaNing
99bdb07378 Revert "mesh buffer cache add (#9728)"
This reverts commit 1c0db6414a.
2021-12-03 19:46:09 +08:00
santy-wang
01ceef90c1 Merge branch 'v3.4.0' of github.com:cocos-creator/engine into v3.5.0 2021-12-03 00:08:06 +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
santy-wang
6cde877e5b Merge branch 'v3.4.0' of https://gitlab.cocos.net/publics/engine into v3.5.0 2021-11-24 14:23:21 +08:00
Santy-Wang
c08d69f664 introduce container manager (#9640)
* introduce pool manager

refine

refine

fix render mode

introduce pool manager

refine

* refine

* fix ci

* fix spine buffer

* add unit test

* add unit test 2
2021-11-22 23:23:19 +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
Leslie Leigh (李的序)
d5154269e2 Fix log() takes not effect if debug mode <= verbose (#9681) 2021-11-18 12:00:24 +08:00
Santy-Wang
89f8cfbad3 optimize layer (#9658)
* optimize layer

* refine
2021-11-13 15:33:07 +08:00
PP
1abbc90c23 compability for PROPORTIONAL_TO_FRAME container strategy (#9642)
* support isProportionalToFrame field on screen-adapter

update

stash

* rename _setupContainer to _setupCanvas

* optimize view.setResolutionPolicy()

* remove TIME_OUT to handle resize event

* compability for PROPORTIONAL_TO_FRAME container strategy

comp

update

* add NOTE

* optimize 'window-resize'

resize

* deprecate game.frame && game.container

deprecate

game

* close screen.resolutionScale interface

close

* fix npm test

* fix view unit test

* space
2021-11-11 19:24:39 +08:00
Zhang mingzhen
9f77edb1f7 Add a method "getCompletePath()" to print complete path in hierarchy (#9536)
* Bump tmpl from 1.0.4 to 1.0.5 (#9357)

Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add a method "getCompletePath()" to print complete path in hierarchy#9203

(cherry picked from commit 9acba34514)

* delete "getCompletePath()" in "BaseNode" and "Scene"

* Revert "Bump tmpl from 1.0.4 to 1.0.5 (#9357)"

This reverts commit 33375839a6.

* Optimize method name and supplement the annotations #9203

* optimize annotations

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Santy-Wang <wh19930829@qq.com>
Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-10-30 18:12:24 +08:00
Zhang mingzhen
f6edc13da7 set active false if param is undefined or null (#9571)
* set active false if param is undefined #9397

* add condition that param is null and the unit test #9397

* ignore grammar error

Co-authored-by: zhangmingzhen <mingzhen.zhang@cocos.com>
2021-10-30 15:23:21 +08:00
PP
f5511f4c87 Revert "Revert "optimize interface in screen module (#9176)"" (#9490)
This reverts commit b88d4845cc.
2021-10-15 10:21:04 +08:00
pandamicro
b88d4845cc Revert "optimize interface in screen module (#9176)"
This reverts commit 4735476945.
2021-10-14 23:07:23 +08:00
PP
4735476945 optimize interface in screen module (#9176)
* optimize interface in screen module

* remove DPR calculating

* update screen-adapter init

* set screen.resolutionScale as 1 by default

* remove pixelRatio getter in system-info

* remove sys.windowPixelRatio access

* optimize screen.windowSize

update

* convertToCocosScreenSpace

* change resolution-change to window-resize

* fix native UI

update

update UI

update UI

* optimize screen init

* fix subContextView

* fix root resize

* fix precision issue on Metal render end

* sys.windowPixelRatio

* use warnID

* remove screen.convertToCocosScreenSpace

* put private property and method together after public ones

* warnID

* fix landScape on CocosPlay

* fix DPR on vivo platform

* fix CI
2021-10-14 22:16:34 +08:00
Leslie Leigh (李的序)
f1f0fbaf16 [WIP] Feature: NewGenAnim (#9331)
* NewGenAnim

* Fix/Optimize simple directional blending

* Class transition by type (#29)

* Transition & Gradient transition (#30)

* The default ExitCondition should be 1.0

* Do correct graph eval

* Fix PoseSubgraph connect() signature order (#31)

* Graph defaults test (#32)

* Conditions (#33)

* Trigger (#34)

* Transition should only be considered when satemachine exited (#35)

* Add layer.name (#36)

* Fix some behaviours; add API to query poses and transition (#37)

Fix single frame exit condition behaviours; Fix pose -> subgraph behaviours

* Support self transition; refactor sub state machine implementation (#38)

* Temp

* Flat whole layer statemachine

* Add test for test reset triggers

* Allow self transition

* Self transition test

* Fix deserialize (#39)

* update animgraph template (#40)

* The inheritance of any state (#41)

* StateMachine events (#42)

* Fix state machine events; Allow multiple transitions between two nodes (#43)

* Transition priority test (#44)

* Optimize variable bind (#45)

* Fix variable bind errors (#46)

* Expose blend algorithm to editor (#47)

* Cont (#48)

* update animgraph template (#49)

* update animgraph template

* update animgraph template

* Pose speed (#50)

* blend tree add EditorExtendable data (#51)

* Correct pose blend duration (#52)

* Export some types (#53)

* animation pose EditorExtendable (#54)

(cherry picked from commit d5dd5f32c9dbacb68c016ff8ba56d383c781a021)

* Implement clone() (#55)

* Fix trigger condition serialization (#56)

* Add variable type: integer (#57)

* Optimize 0 weight case (#58)

* Relative duration (#59)

* update_hdr_skybox (#9230)

* Rename.. (#60)

* Optimize animation blend item export (#61)

* Fix Type (#62)

* modify aniamtion graph template data (#63)

* modify aniamtion graph template data

* add animation graph component template

* Fix serialize issue (#64)

* Optimize (#65)

* Remove MotionState.startRatio, loop (#66)

* Update (#67)

* Fix circular reference (#68)

* CR (#69)

* Fix exit time greater than 1 (#70)

Co-authored-by: 黄森斌 <arsen2010@126.com>
Co-authored-by: linshunjun <49218738+linshunjun@users.noreply.github.com>
2021-10-14 10:28:23 +08:00
Santy-Wang
e8cf9a0ada export active-in-hierarchy-changed event (#9369) 2021-09-23 14:22:18 +08:00
Santy-Wang
75a22d4b98 support require component array (#9366)
* support require component array

* fix lint

* refine
2021-09-23 14:00:55 +08:00
Santy-Wang
cf3e10b6c4 sync some unit test from 2.4 (#9321)
* add unit test

* add more unit test

* refine

* add test

* add more unit test

* add more unit test

* more change

* add commit

* add unit test

* commit package-lock.json

* revert some

* refine code

* add more test

* fix bugs

* fix bugs
2021-09-13 19:05:39 +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
jiaxin.lai
9ccf2aa92b add vec2 cross override and unit test (#9250)
* vec2 cross override

* add unit test

* docs
2021-08-25 18:43:55 +08:00
minggo
732f7a7ffa do not shrink array when alloc and fix some logic error (#9218)
* do not shrink array when alloc
* add test case
2021-08-21 15:39:06 +08:00
zhakesi
d120ba3ace fix:root node scene has no rts info. (#9167)
* fix:root node scene has no rts info.

* add lpos lrot lscale attributes for scene
2021-08-19 15:17:33 +08:00
PP
829a9eb409 use jest.expect().toBeCloseTo() interface (#9140) 2021-08-05 14:56:41 +08:00
PP
c8be11cdc4 add view module test (#9120)
update
2021-08-03 13:53:46 +08:00
Leslie Leigh (李的序)
44dc537b87 Update snapshot (#9077) 2021-07-27 16:58:33 +08:00
cary
6bf82a91ee Delete support of onAfterDeserialize_JSB. (#9075) 2021-07-27 15:04:30 +08:00
Leslie Leigh (李的序)
6d10f68ef8 AnimationCurve (#8409)
* AnimationCurve

* Mark curve frame values as uniquelyReferenced

* Adjust modules

* Update

* Manually implements KeyframeCurve.iterator

* TargetPath

* Update

* Fix BUG

* Fix

* Add size track

* Update

* Fix size; unit tests

* fix split animation (#24)

* CCONB animation clip; Remove integer track/channel/curve

* Optimize key shared curves

* Remove keyframecurve.empty

* Exotic animation

* Fix unit tests

* start/end -> left/right

* Curve range rename

* Easing methods

* Fix untyped track

* Fix

* fix upgradUnTypedTracks (#26)

* Rename

.interpMode -> .interpolationMode
RealInterpMode -> RealInterpolationMode
QuaternionInterpMode -> QuaternionInterpolationMode
ExtrapMode -> ExtrapolationMode
.preExtrap -> .preExtrapolation
.postExtrap -> .postExtrapolation
QuaternionCurve -> QuatCurve
QuaternionKeyframeValue -> QuatKeyframeValue

* Update pre/post extrap

* Optimize-1

* Optimize-2

* Eliminate for-of

* Mark deprecateds

* Hide RealKeyframeValue/QuatKeyframeValue Constructor

* Fix quat keyframe value name

* Error ID

* Fix RealKeyframeValue editor extras

* Elimanate for-of forEach

Co-authored-by: zheng han <sunstar198941@gmail.com>
2021-07-23 11:26:55 +08:00
Leslie Leigh (李的序)
f7a5bd3102 Store morph weights in mesh renderer (#8754)
* Store morph weights in mesh renderer

* Update

* Document and lint
2021-07-21 16:41:17 +08:00
Leslie Leigh (李的序)
ed4ba944c3 Update custom-serialize-symbol test case (#8993) 2021-07-16 15:26:23 +08:00
Leslie Leigh (李的序)
bc817790b8 Add flag to indicates if is targeting CCON (#8990)
* Add flag to indicates if is targeting CCON

* Fix

* Fix

* Add case

* Fix __id__: 0
2021-07-16 11:32:12 +08:00
Leslie Leigh (李的序)
705c977fc9 Binary serialization (#8946)
* Binary serialization

* Update snapshots

* Update

* rename option ccon -> useCCON

* Missing script

* encodeCCONJson: chunks -> chunkURLs

* Update

* (de)serializeSymbol -> (de)serializeTag;

* CustomizedSerializable -> CustomSerializable

* _deserializePrimitiveObject -> _fillPlainObject

* Unify CCClass CCClassConstructor

* encodeCCONJson -> parseCCONJson

* Custom serializable

* Move (de)serializeSuper(This) from context into global

* property -> read(write)Property; (de)serializeThis(Super) -> (read)writeThis(Super)

* CI and lint

* Mock cc env
2021-07-15 10:21:25 +08:00
Leslie Leigh (李的序)
93e76714c6 Class decorator uniquelyReferenced (#8894)
* Class decorator unique

* unique -> uniquelyReferenced

* Add unit test

* Update doc

* Optimize for non-serialization env

* Update
2021-06-29 16:06:40 +08:00
Leslie Leigh (李的序)
0ddc51ac71 Implements array.move() (#8790) 2021-06-09 11:34:58 +08:00
Leslie Leigh (李的序)
34942a1894 Add editor extendable (#8778)
* Add editor extendable

* Update signature

* Doc
2021-06-07 19:58:23 +08:00
Leslie Leigh (李的序)
08926421ce Add log method with verbose level; verbose on zero duration clip (#8519)
* Add log method with verbose level; verbose on zero duration clip

* Lint

* Rearrange DebugMode values
2021-04-26 15:20:08 +08:00
Leslie Leigh (李的序)
13baf8a845 binarySearch series functions: document and unit test (#8114)
* binarySearch series functions: document and unit test

* Fix lint errors

* Update

* Update

* Update
2021-01-11 11:51:16 +08:00
Leslie Leigh (李的序)
a3207d6bcb Suppress no-initializer warns if the property is declared to have object type (#7917)
* Suppress no-initializer warns if the property is declared to have object type

* Use 'default' in

* Update

* Revert

* Revert

* Update
2020-12-15 17:23:41 +08:00
Jare Guo
676c267150 remove RawAsset (sync #6286) (#7697) 2020-11-08 22:45:15 +08:00
Jare Guo
a0d5508779 simplify attribute implements (sync #5040) (#7679) 2020-11-05 17:37:56 +08:00
Jare Guo
9bf46ac0a5 obsolete target support of deserializer (sync #6494) (#7680)
* fix merge error (resync #6285)

* fix rare editor crash caused by invalid PrivateNode data (sync #6971)

* obsolete target support of deserializer (sync #6494)
2020-11-03 13:39:23 +08:00