Commit Graph

164 Commits

Author SHA1 Message Date
Yun Hsiao Wu 198034ec2c refactor access type array to access flags (#10103) 2022-02-16 09:56:46 +08:00
Yiwen d0719c6727 add a new interface to query format feature info (#9949)
* add format feature information for query

* adapted the higher level code to use the new formatFeature query inferface, and run the test-cases-3d

* remove uncessary public interface

* remove uncessary public interface

* remove unnecessary api

* fixed the name of function support16FTexture.

* clean the code, fix some typos.

* correct format features

* group the judgemnts to fix the logic

* query the support to compressed from a decent method. correct some bit operations.

* add FormatFeatureBit into globaleVariable's database to pass npm test

* Add deprecation information to help developers move to the new
interface. Every time a deprecated property is accessed, an error will
present. So developers must move to the new interface following the
instruction in the error info.

* Move the deprecation information to the right module.
2022-01-25 19:02:25 +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
Leslie Leigh (李的序) 19c121dd07 Fix skeletal animation sample() does not work as intended (#10006)
* Fix skeletal animation sample() does not work as intended

* update

* currentClipRef -> currentClip

* Rename

* Optimize

* Internal

* Optimize

* Update
2022-01-18 22:56:10 +08:00
ChiaNing 466a2dc97d change macro for meshBuffer (#10001)
* change macro for meshBuffer

* name change

* test used name change
2022-01-17 16:09: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 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
zxx43 bebf8aff0a add cpu & gpu particle culling test (#9945) 2022-01-07 13:16:50 +08:00
Greg1129 88a0ccbf26 fix particle capacity <= 0 (#9910)
* fix particle capacity <= 0

* fix issue 10417 particle capacity 0

* fix issue 10417 particle capacity setter range limitation

* remove unused package
2022-01-06 15:10:32 +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
Greg1129 6f3b1fae0c fix bug: remove all actions by tag (#9876)
* fix bug: remove all actions by tag

* add tween unit test

* add @internal comment

* fix using backward delete

* add commnets by eslint
2021-12-30 17:55:11 +08:00
Greg1129 5d3b5d64c8 modify builtin texture generation + particle unit test (#9841)
* modify builtin texture generation + particle unit test + particle system capacity issue 10417

* change texture format to RGBA8

* modify builtin texture generation

* modify format and remove particle parts out to another pr

* fix array buffer view generation
2021-12-29 10:35:57 +08:00
alpha f153b5cc1b fix Color.fromHex Bug (#9867) 2021-12-28 11:52:01 +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
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
Leslie Leigh (李的序) b4ec6c576e Fix AnimationGraph.disconnect() (#9785)
* Fix AnimationGraph.disconnect()

* Update comment
2021-12-09 15:29:19 +08:00
Leslie Leigh (李的序) 080053bc33 Empty tracks shall not take effect (#9777)
* Empty tracks shall not take effect

* Fix test

* Fix test
2021-12-08 10:31:20 +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
Leslie Leigh (李的序) d47f5eb6a5 AnimationController.variables() (#9710)
* AnimationController.variables()

* rename, add test

* rename
2021-11-24 14:54:56 +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
Leslie Leigh (李的序) 05484abc30 Rename animation.StateStatus -> animation.MotionStateStatus (#9675) 2021-11-17 15:55:03 +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
Yun Hsiao Wu a3bc15d83d misc fixes (#9631)
* prefer D24S8 first

* webgl creates only one context

* restore render area semantic

* fix inefficient usages in pipeline

* fix raycast pre-rotation adaptation

* draw profiler only once
2021-11-11 17:21:09 +08:00
Leslie Leigh (李的序) c961d105f3 Triggers should be only reset when a motion state arrived (#9612)
* Triggers should be only reset when a motion state arrived

* Code

* Fix
2021-11-03 19:43:53 +08:00
Leslie Leigh (李的序) 48dbbe3293 Respect to wrap mode of animation clip (#9607) 2021-11-03 16:43:19 +08:00
Leslie Leigh (李的序) 07fb27dac4 Support more state machine component callbacks (#9556)
* StateMachineComponent

* Rename
2021-11-01 10:31:27 +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 9acba34514f43730494b548a7e9c22bf21a6d555)

* 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
Yun Hsiao Wu 3493f0c02f fix camera pre-rotation adaptation (#9534)
* fix camera pre-rotation adaptation

* more consistent wrap modes
2021-10-26 15:29:12 +08:00
Leslie Leigh (李的序) c56fa21d33 Exit transition shall not consume triggers (#9519) 2021-10-21 19:50:20 +08:00
Leslie Leigh (李的序) 6583b7c780 Hide animation graph asset creation API in runtime (#9491) 2021-10-15 15:23:23 +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 (李的序) 74dd46657d Animation graph variable: rename number to float (#9486)
* Animation graph variable: rename number to float

* Add name property to animation blend
2021-10-14 18:02:49 +08:00
Leslie Leigh (李的序) df9b5ccdce Remove transition by transition object (#9483) 2021-10-14 10:30:09 +08:00
Leslie Leigh (李的序) 81d41f5446 Refine dangling transition behaviour (#9466) 2021-10-14 10:29:37 +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
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 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 b608ff8315 optimize render texture (#9342)
* optimize render texture

* refine
2021-09-18 12:04:39 +08:00
Santy-Wang a1b018ebc0 Headless Mode (#9345)
* Headless Mode

* refine annotation
2021-09-18 10:58:00 +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