Commit Graph

196 Commits

Author SHA1 Message Date
jiaxin.lai 4cda45bfd9 physics unit-test and features base 3.3 (#9027)
* support ccd

* clearState after change type

* fix Instantiate rigid body with custom group

* add some extra functions

* update physics libs

* tweaks rigid body component

* add EVENT_UPDATE to PhysicsMaterial

* tweaks

* support switch physics backend

* remove redundant constants

* add config & min volume size

* update @cocos/physx to 1.0.4

* fix destroy cannon world

* correct init if manual construct physics system

* disable log info in test

* add some physics unit test

* add physics unit test

* make the config optional

* add runInEditor to selector

* pack physx js libs by default

* fix

* STASH

* stash

* tweaks

* rename

* update test

* support query trigger

* update @cocos/ammo to 1.1.6

* fix raycast with query trigger in physx

* raycast test with query trigger

* rename

* docs

* fix calculate local inertia (#8956)

* rename

* delete

* allow generate mesh/terrain collider at runtime

* tweaks

* use sap by default

* update @cocos/ammo to  1.1.8

* update @cocos/physx to 1.0.7

* update @cocos/cannon to 1.2.8

* update package-lock

* add ccd test

* remove config

* rename

* fix 2d phy sys typing

* support global allow sleep toggle for bullet

* tweaks

* use naive broadphase by default

* rename

* docs

* tweaks

* add missing jugement
2021-07-22 15:52:18 +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
PP 5a4bed2379 support inputManager.frameDispatchEvents() in main loop (#8954)
* support pollEvent() API on pal/input

update

update pal

* support inputManager.frameDispatchEvents() in main loop

* remove event-manager module

* fix CI

* fix _glView

* fix CI

* fix director pause

* update for
2021-07-16 13:45:01 +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
Santy-Wang b48baac045 no need to validate animation-clip (#8958) 2021-07-12 16:58:16 +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
jiaxin.lai b1f0802a5f let game run in test environment (#8906) 2021-07-08 22:33:08 +08:00
Yun Hsiao Wu 5130002624 sync gfx macros (#8935) 2021-07-06 14:03:06 +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
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
Leslie Leigh (李的序) f7205249f6 Fix an edge case when doing skeletal animation blending (#8895) 2021-06-28 11:52:22 +08:00
Leslie Leigh (李的序) 69bd320b9a Anim perf (#8865)
* Optimize and refactor skeletal animation blending(3.1)



* Type error

* Update xx

* Update yy
2021-06-24 23:13:29 +08:00
Leslie Leigh (李的序) 9be4e5e2cf Add editor extendable 2021-06-21 13:55:02 +08:00
Yun Hsiao Wu d1d077c098 gfx: sRGB texture support (#8822) 2021-06-17 18:09:57 +08:00
santy-wang 51d80d3815 Merge branch 'v3.1.2' of https://gitlab.cocos.net/publics/engine into v3.3-merge 2021-06-16 17:37:10 +08:00
Leslie Leigh (李的序) 397ed24f5f Optimize cross fade (#8825) 2021-06-16 14:49:00 +08:00
minggo 424232493e Merge pull request #8777 from minggo/merge_v3.1.2
Merge v3.1.2
2021-06-09 14:12:21 +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 (李的序) a2266c9651 Optimize and refactor skeletal animation blending (#8753)
* Optimize and refactor skeletal animation blending

* Type error
2021-06-07 14:52:16 +08:00
Yun Hsiao Wu d8890c558f optimize WebGLCmdFuncBindStates (#8705) 2021-05-26 12:36:19 +08:00
PP ad24ca70c7 update deprecated usage of sy API (#8684) 2021-05-18 13:31:27 +08:00
Leslie Leigh (李的序) 1d44fab8a1 Fix clip equivalence in Animation component (#8675) 2021-05-14 16:15:33 +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
PP 86f20da0f0 support pal/input (#8472)
* support pal/input

update

* update

* fix esLint

* support minigame

* support  pal/input on  minigame

* remove minigame.isSubContext

* support native

update

* deprecate static property on EventMouse

* deprecated static property in  EventTouch

* remove TODO

* remove  x y position in MouseWheel Event

* remove TODO

* remove temp code

* fix esLint

* update AccelerometerIntervalMode

* remove legacy code in JSB

* fix esLint

* optimize AccelerometerInputSource.setInterval

* fix esLint

* optimize code

* add more details for documentation

* update

* don't pass game.canvas to inputManager.registerSystemEvent

* optimize

* Revert "remove  x y position in MouseWheel Event"

This reverts commit b521ec4948d693b420887cdeb2f5f3afc1500066.

# Conflicts:
#	@types/pal/input.d.ts

* update

* fix esLint

* fix esLint
2021-04-19 16:24:42 +08:00
PP 9bb4c4f8ea support pal/system (#8441)
* support pal/app

update

update

* remove 'QQ_PLAY' and 'FB_PLAYABLE_ADS'

* rename system

update

* rename Language

* update

* update

* bind function in Game.ts

* rename system

* support system.getBatteryLevel()

* support pal/system on native

* support pal/system on minigame

* update

* fix esLint

* fix Circular dependency

* fix esLint

* use math/Size
2021-04-15 11:00:54 +08:00
PP cd7e644694 implement audio on pal (#8255)
* Update logo in README

* add pal/audio

* deprecate property

* support wechat  game AudioPlayer

* unify minigame interface

* optimize module name

* support  native audio

# Conflicts:
#	@types/jsb.d.ts

* add runtime platform

* fix module

* support build native virtual module

update

update

* update module name

* remove jsb-audio.js

* revert @rollup/plugin-alias

* add quickCompiler field in cc.config.json

* fix audio can't stop when paused

* fix esLint & ci

* fix ci

update

* update ccConfigJson

* add NOTE

* readonly maxAudioChannel

* add description for interface OneShotAudio

* volume range

* range for seeking

* loadNative return Promise<unknown>

* remove quickCompile field in cc.config.json

Co-authored-by: pandamicro <lphuabin@gmail.com>
Co-authored-by: Jare Guo <jareguo@users.noreply.github.com>
2021-03-25 14:30:13 +08:00
Yun Hsiao Wu 6d5cf2112a unify forward/deferred material (#8267) 2021-02-22 15:56:30 +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 78f33fe31b fix conflicts 2021-02-05 11:45:37 +08:00
jiaxin.lai a1963ca9b1 support switch body type at phsyx (#8167)
* support switch body type at phsyx

* tweaks

* fix ci
2021-01-23 17:30:15 +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
jiaxin.lai fadf3d9b00 support dynamic select physics backend (#8048)
* support dynamic select physics backend

* skip physics ray group

* fix eslint

* lint
2020-12-30 15:47:06 +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
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 c10676df3c remove onBatchRestored & prefab._synced flag (sync #7163 #7271) (#7803) 2020-12-09 10:42:16 +08:00
Santy-Wang 3be28fb3ce Revert "Optimize build time constants implementation (#7882)" (#7927)
This reverts commit 6f57c3ad8f.
2020-12-07 13:32:50 +08:00
Leslie Leigh (李的序) 6f57c3ad8f Optimize build time constants implementation (#7882) 2020-12-04 15:06:54 +08:00
Jare Guo b5ba2e5dbe fix texture preloading (sync #7581) (#7802)
* fix texture preloading (sync #7581)

* fix prefab revert problem for render component (sync #7385)

* tweak API docs (sync #7525)

* Update Readme (sync from 2D)

Co-authored-by: Nisar Hassan Naqvi <syednisarhassan12@gmail.com>
2020-11-18 10:47:23 +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
pandamicro 3068956648 Refactor gfx module naming convention (#7663)
* Remove GFX prefix in gfx module

* Full deprecation for old GFX APIs

* export gfx module

* Fix issues and make deprecated exports backward compatible

* Adaptation in engine modules for gfx

* Fix ci

* fix ci
2020-11-02 09:49:50 +08:00
Jare Guo e2b740dd15 Finally merge runtime deserializer & asset manager (#7648)
* sync asset-manager

refine

refine

refine

* change director

* refine

* fix bugs

* commit

* refine and fix bugs

* refine docs

* fix bugs

* merge

* fix bugs

* fix bugs

* merge

* sync jsb-adapter

* fix ci

* adapt preloading process for new Deserializer

* adapt preloading process for new Deserializer

* fix bugs

* minor fix

* dump dependency of SpriteFrame explicitly (sync #6938)

* dump dependency of SpriteFrame explicitly (sync #6938)

* remove unused variable

* exporting should trigger uuid compression in serializer

* refine

* fix ci

Co-authored-by: Santy-Wang <wh19930829@qq.com>
2020-10-30 20:51:58 +08:00
cary 6bcc7933a9 Add motion streak and particle 2d. (#7588)
* Add motion streak and particle 2d.

* fix buffer error

* modify comment error

* fix ci

* fix comment

* modify some comment
2020-10-27 11:48:17 +08:00
pandamicro 6101d772a2 Merge remote-tracking branch 'origin/3d-v1.2' into 3d
# Conflicts:
#	EngineErrorMap.md
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/data/decorators/property.ts
#	cocos/core/pipeline/forward/forward-pipeline.ts
#	cocos/core/pipeline/forward/scene-culling.ts
#	cocos/core/renderer/scene/model.ts
#	cocos/core/renderer/scene/shadows.ts
#	cocos/core/renderer/ui/mesh-buffer.ts
#	cocos/core/renderer/ui/ui-vertex-format.ts
#	cocos/core/scene-graph/scene-globals.ts
#	cocos/terrain/terrain.ts
#	cocos/ui/assembler/graphics/webgl/graphics-assembler.ts
#	cocos/ui/components/graphics.ts
#	editor/assets/default_prefab/3d/Capsule.prefab.meta
#	editor/assets/default_prefab/3d/Cone.prefab.meta
#	editor/assets/default_prefab/3d/Cube.prefab.meta
#	editor/assets/default_prefab/3d/Cylinder.prefab.meta
#	editor/assets/default_prefab/3d/Plane.prefab.meta
#	editor/assets/default_prefab/3d/Quad.prefab.meta
#	editor/assets/default_prefab/3d/Sphere.prefab.meta
#	editor/assets/default_prefab/3d/Torus.prefab.meta
#	editor/assets/default_prefab/Camera.prefab.meta
#	editor/assets/default_prefab/Terrain.prefab.meta
#	editor/assets/default_prefab/effects/Particle System.prefab.meta
#	editor/assets/default_prefab/light/Directional Light.prefab.meta
#	editor/assets/default_prefab/light/Sphere Light.prefab.meta
#	editor/assets/default_prefab/light/Spot Light.prefab.meta
#	editor/assets/default_prefab/ui/Button.prefab.meta
#	editor/assets/default_prefab/ui/Canvas.prefab.meta
#	editor/assets/default_prefab/ui/EditBox.prefab.meta
#	editor/assets/default_prefab/ui/Label.prefab.meta
#	editor/assets/default_prefab/ui/Layout.prefab.meta
#	editor/assets/default_prefab/ui/Mask.prefab.meta
#	editor/assets/default_prefab/ui/ProgressBar.prefab.meta
#	editor/assets/default_prefab/ui/ScrollView.prefab.meta
#	editor/assets/default_prefab/ui/Slider.prefab.meta
#	editor/assets/default_prefab/ui/Sprite.prefab.meta
#	editor/assets/default_prefab/ui/Toggle.prefab.meta
#	editor/assets/default_prefab/ui/ToggleContainer.prefab.meta
#	editor/assets/default_prefab/ui/Widget.prefab.meta
2020-10-21 18:35:11 +08:00
Jare Guo 0319477911 fix decorator warning of ValueTypes (#7553)
* fix decorator warning of ValueTypes (sync #6285)

* refresh copyright
2020-10-21 16:31:41 +08:00
Jare Guo a0a992de5d remove asserts from addChild & sync 2D changes (#7479)
* remove asserts from addChild

* expose js._registeredClassIds & js._registeredClassNames (sync #3174)

To unload scripts dynamically.
Also revert part of changes from https://github.com/cocos-creator/engine/pull/3204/files#diff-cabe5229c3c6e31339220008e54fe853L421

* remove unused code (sync #3174)

* minor tweak (sync #3421)

* should not invoke component if destroy() called before node activating (sync #3430)

* node should removed and destroyed with scene (sync #3456 #3483)

* fix WebGL detection on Android browsers (sync #3510)

* remove redundant right shift for bitwise operation (sync #3754)

* fix label blur when using dark font color (sync #3949)

* refine tooltip of Block Input Event (sync #4053)

* fix IE/Edge exception when output log/warn before engine initialization(sync #4447, #4500)

* sync class, attribute (#4689, #4712, #4781, #4712)

* fix loading unknown texture format (sync #4820)

* prefer toLowerCase to toLocaleLowerCase + sync #5114

* optimize bezier calculation (sync #5155)

* fix potential memory leak in scene-editor (sync #5643)

* fix _posDirty error of Mask on native platform (sync #6168)
2020-10-15 17:28:14 +08:00