Commit Graph

87 Commits

Author SHA1 Message Date
PP f433551d1d support system feature query (#9428)
* support feature query in pal/system-info

* support sys.hasFeature and deprecate sys.capabilities

* remove deprecated usage

* support input feature query

update

* IMAGE_BITMAP

* INPUT_TOUCH

* WEBGL

* support WEB_VIEW, VIDEO_PLAYER, SAFE_AREA query

* rename INPUT_XXX  to EVENT_XXX

* support device-manager

update

update

update

* add NOTE

* export deviceManager from gfx

* fix circular dependency

* fix wechat devtools

update

* Revert "fix circular dependency"

This reverts commit ba8a6c0e2e4fa6b2015ae438a4c9a5da94b9bf46.

* Revert "export deviceManager from gfx"

This reverts commit 14b26ca0e3f6e0dce32c37bd668c65193dbd366f.

* Revert "support device-manager"

This reverts commit 010a910e56e1ee2fe9726629fca163fc24ed5b37.

# Conflicts:
#	pal/system-info/enum-type/feature.ts

* update

update

* use INPUT_TOUCH for sys.capabilities

* update
2021-10-14 10:29:36 +08:00
ChiaNing 24fe3ff784 UI GPU dirven add (#9378)
* uniform

* uniform buffer add

* add dummy IA

* first working version

* misc & data structure optimize

* fix webGL1 bug

* rebase on 3.3

* add maxQuadPerDrawcall by device
现在每个DC能绘制的数量由设备返回的 uniform 数量上限决定

* add index

* index bug fix

* sliced ia add(Not finish)

* change mat4 to vec4

* change stride num

* new vec4PreUI finish

* misc fix

* size & anchor dirty add

* bug fix

* add UICapacityDirty

(cherry picked from commit 417e10c8d3422363d80828539b110b93ee4d3cb1)

* static buffer cache version

(cherry picked from commit 1ffe7e7943cdf9af085aeda5ca218c3442fa9119)

* static buffer update version

(cherry picked from commit 964d9cb5b3230963b2a535acac99a34cde7eb63c)

* cache localbuffer

(cherry picked from commit 641b956def64023e0d47be66bc0c0a37ef1e9791)

* fix setPosition event & fix DS release

* weak sliced & filp tiled mode add

* fix tiled y

* fix sliced bug

* ugly but work filled type add

* update effect

* filled mode effect

* shader fix

* RenderData dirty for render data update

* revert fillbuffer

* misc fix

* support label bmfont by meshBuffer

* fix sliced bug & commit Model

* fixed some render dirty flag bug

* cut code by macro.UI_GPU_DRIVEN

* cut code by UI_GPU_DRIVEN Macro on build

* cut file by UI_GPU_DRIVEN

* I-batcher interface add

* remove render queue cache

* file name change

* file name change

* after merge

* fix for v3.4

* useless remove

* fix texture rotation

* fix sliced when atlas rotation

* useless code remove

* native bind

* update effect

* fix DynamicOffsets bind bug

* PR review fix

* effect encapsulation

* change chunk

* update effect

* update shader

* remove color in fs

* move code

* fix UBO buffer bug

* fix ubo count to 10

* fix vk bind
2021-09-29 22:32:33 +08:00
timlyeee 1c437eb87e js invoke JAVA and OSX function without reflection (#9344)
Co-authored-by: LX <codingboeuf@jizamaoxuewangdeMacBook-Air.local>
2021-09-29 14:18:35 +08:00
PP 81fdaf346d support input module (#9327)
* support input module

* don't export eventManager
2021-09-18 19:25:08 +08:00
PP ccd505ad14 migrate Engine Input Event into PAL (#9320)
* optimize input module

* rename

* fix CI

* update input-box.d.ts
2021-09-15 13:51:38 +08:00
PP 8188d27405 fix npm install (#9315) 2021-09-10 16:35:04 +08:00
Yun Hsiao Wu 79f6ec1fcf handle swapchain resize event (#9305)
* swapchain resize accept surface transform

* rt attachment should support read back
2021-09-09 16:00:02 +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
Yun Hsiao Wu 4cf1350fe0 gfx: swapchain refactor (#9030)
* update effect.hideInEditor

* swapchain refactor

* webgl multi draw

* implicit depth/stencil format

* native adapt

* explicit resizable texture

* DrawInfo in InputAssembler

* device cached states

* sync defines

* gfx: empty backend

* update playground

* remove profiler camera

* update effect types

* fix pass.resetUniform
2021-08-31 19:40:50 +08:00
PP fcb1792ba2 fix NATIVE undefined in module 'cc/env' (#9023) 2021-07-21 09:47:57 +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
pandamicro 9849fdd1f4 Add some object flags (#8987)
* Support number key in EventTarget

* Add replicated and clientLoad

* Update main license

* Fix ci

* Fix ci

* Fix ci

* Fix ci

* Move object getter setter to functional style API

* Adjust

* Add SERVER_MODE constant
2021-07-15 19:41:08 +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
PP 40789fa069 implement WebAudio on ByteDance platform (#8802)
* rename AudioPlayerMinigame

* optimize Show Hide

* support ByteDanceAPI

* support WebAudio on ByteDance

remove maxAudioChannel

* cache audio buffer
2021-06-24 18:57:42 +08:00
PP d85cee16df remove legacy adapter in Wechat PC game (#8626)
* support keyboardEvent on wx pc game

update

update

# Conflicts:
#	pal/input/minigame/keyboard.ts

* support mouse event

* move in gl.useProgram adapting

* remove legacy adapter

update

* update

update

update

update

* rename interface

* bind method
2021-06-24 11:37:16 +08:00
PP 7e55ddf133 support SystemEvent.Keyboard enum type (#8785)
* support SystemEvent.Keyboard enum type

update

update

update

update

# Conflicts:
#	cocos/core/platform/event-manager/system-event.ts

update pal

mark macro.KEY as warning

mark

update

update

* support right shift, alt and ctrl enum

* support web keyCode map

# Conflicts:
#	pal/input/web/keyboard.ts

* support num enter key enum

* rename num_slash to num_divide

* support native keyCode map

# Conflicts:
#	pal/input/native/keyboard.ts

* update enum

* rename Keyboard to KeyCode

* update deprecated

* update
2021-06-09 15:12:51 +08:00
PP 4914116834 optimize SystemEventType and NodeEventType (#8678)
* remove recomendation for usage of string type of event

* deprecate KEY_DOWN KEY_UP event

* support SystemEventType.KEYBOARD_DOWN && SystemEventType.KEYBOARD_UP

* deprecate some useless properties

* implement keyboard pal

* remove SystemEventType toString()

update

* fix instantiating EventTouch

* optimize deprecated info

* support native keyboard KEYBOARD_DOWN event

* remove usage of event code

* fix deprecating pure value properties

* optimize deprecating Event type

* optimize deprecating getEventCode()

update

* optimize deprecating eventType

* optimize deprecating isPressed

* optimize deprecating keybaord event

* optimize deprecating rawEvent

* Revert "fix deprecating pure value properties"

This reverts commit 60d586532496fa1f422f05c54a922b86d1dc96ee.

* fix deprecate pure value properties

* Revert "fix deprecate pure value properties"

This reverts commit a83f1725fedfbd7af445892912aacab8e8502147.

* fix deprecating pure value property

* update

updaate

* deprecate some EventType enum in SystemEventType and NodeEventType

* optimize

* update

update

* update

* update

* fix CI

* fix CI

* fix Circular dependency

* fix Circular dependency
2021-06-07 19:06:29 +08:00
PP 6c03fd936a support system.onClose(cb) && system.close() (#8674)
* support `system.onClose(cb)`

update

* optimize game.end()

* update
2021-06-02 14:47:40 +08:00
PP 420c9f59d4 support system.getSafeAreaEdge() (#8654)
* support system.getSafeAreaEdge()

* remove legacy adapter

* remove code

* update
2021-05-17 18:12:13 +08:00
PP c89fe8bfdd compatible movement data in MouseEvent on Web && fix keyCode in keydown event (#8578)
* compatible movement data in MouseEvent on Web

* revert keypress Event to keydown
2021-04-28 17:28:50 +08:00
PP b1123f4546 fix accelerometer && system info on native platform (#8564)
* fix platform info in native platform

* fix orientation on native platform
2021-04-27 10:11:25 +08:00
PP cd1548d3f6 fix Audio bug (#8515)
* support AudioPlayer.loadOneShotAudio

* support native

* support minigame

* support createInnerAudioContextPolyfill

update

* fix audioLoading on runtime

* fix Safari doesn't support promise based decodeAudioData

* optimize interface design

* add onPlay polyfill for vivo

* fix setting AudioSource.clip concurrently

* add createInnerAudioContextPolyfill for Xiaomi

* add createInnerAudioContextPolyfill on Baidu

* fix web audio player currentTime
2021-04-23 18:07:58 +08:00
PP cf554645f0 fix touch event on alipay (#8507)
update
2021-04-20 19:54:31 +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
Leslie Leigh (李的序) 2987cecd9a Optimize the document on pal/audio (#8402)
* Optimize the document on pal/audio

* Update @types/pal/audio.d.ts

Co-authored-by: PP <chinese1236@qq.com>

* Update @types/pal/audio.d.ts

Co-authored-by: PP <chinese1236@qq.com>

* Update @types/pal/audio.d.ts

Co-authored-by: PP <chinese1236@qq.com>

Co-authored-by: PP <chinese1236@qq.com>
Co-authored-by: Santy-Wang <wh19930829@qq.com>
2021-04-14 13:55:18 +08:00
PP 831722c121 optimize pal (#8405)
* rename mg

* optimize audioMgr

* remove implement class

update

* add src property for AudioPlayer

* fix multiple audioSource reference the same audioClip

* support operation-queue

update

* fix operation deadlock

* update

* fix esLint

update

update

* remove ensureStop

remove stop in play

* fix audio-dom loading

* optimize operation queue in AudioSource component

* HACK on runtime

* fix esLint

* update esLint

* HACK on WeChat DevTools

* lowercase enqueueOperationDecorator

* remve ! with @ts-expect-error

* Revert "HACK on WeChat DevTools"

This reverts commit 230a2ec9223f21fc34e8435b962c0b41c18d4e91.

* fix esLint

* rename clip.ts to audio-clip.ts

* add audio meta

* use fastRemoveAt

* change ClassDecorator to MethodDecorator

* remove  player reference in audio-clip

* destroy temporary AudioPlayer after loading

* optimize syncPlayer

* fix esLint

* fix esLint

* optimize audio-manager

* optimize operation-queue

update

* fix eslint
2021-04-09 15:21:11 +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
PP 6ee318daf4 revert youku platform (#8226)
* Revert "update package-lock (#8200)"

This reverts commit 5e5c3a579e.

* Revert "update build-engine version (#8195)"

This reverts commit ab36cecec0.

* Revert "update YOUKU sys info && engine building workflow (#8191)"

This reverts commit 255944f36c.

* update build-engine version

* edit publish branch

* udpate deps
2021-01-28 13:07:29 +08:00
PP 46de2a4d6a add jsb declaration (#8218) 2021-01-27 18:33:42 +08:00
PP 255944f36c update YOUKU sys info && engine building workflow (#8191)
* update YOUKU constant

* update sys info for YOUKU

* fix ts Lint

* fix lint
2021-01-23 17:14:45 +08:00
Leslie Leigh (李的序) 21826607b1 Fix lint errors (#8029)
* Fix lint errors

* Update

* Sync https://github.com/cocos-creator/engine/pull/2433

* Typo
2021-01-05 17:30:40 +08:00
Leslie Leigh (李的序) a069eeca2f Optimize shader sources build (#7998)
* Optimize shader sources build

* Linting

* HTML5, WeChat branch

* Comment
2020-12-23 16:29:58 +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
Leslie Leigh (李的序) 16cc7569eb Introduce the EXPORT_TO_GLOBAL (#7820)
* Introduce the `EXPORT_TO_GLOBAL`

* Bump version
2020-11-19 15:54:33 +08:00
PP a598a9f0cf support linksure and QTT platform (#7800)
* fix undefined toDataURL on linksure platform

* update platform

* add platform info
2020-11-18 20:20:38 +08:00
Yun Hsiao Wu 32598c25cb switch to eslint (#7727)
* switch to eslint

* eslint: extends airbnb
2020-11-09 10:19:12 +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
PP 73be65cd31 support new SubContextView (#7303)
* support new SubContextView

* update

* add type property when postMessage
2020-10-08 23:57:03 +08:00
PP cd03651bc4 remove jsb module declaration in engine repo (#7143)
* remove jsb module declaration in engine repo

* ignore jsb check

* space
2020-08-21 18:50:28 +08:00
pandamicro 3b66332823 Merge remote-tracking branch 'origin/3d-v1.1.1' into 3d-v1.2
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/animation/animation-state.ts
#	cocos/core/game.ts
#	cocos/core/gfx/webgl/webgl-commands.ts
#	cocos/core/pipeline/instanced-buffer.ts
#	cocos/core/pipeline/render-instanced-queue.ts
#	cocos/core/platform/event-manager/input-manager.ts
#	cocos/core/platform/view.ts
#	cocos/core/renderer/core/pass.ts
#	cocos/core/renderer/scene/planar-shadows.ts
#	cocos/core/splash-screen-webgl.ts
#	cocos/core/utils/profiler/profiler.ts
#	cocos/particle/renderer/trail.ts
#	cocos/terrain/terrain.ts
#	package-lock.json
#	package.json
#	predefine.ts
#	scripts/build-engine/package-lock.json
#	scripts/build-engine/package.json
#	scripts/build-engine/src/index.ts
2020-08-12 15:53:52 +08:00
Yun Hsiao Wu afeb83e9a6 native pools (#7028) 2020-08-04 14:14:56 +08:00
jiaxin.lai 65b0478c69 v1.2 new physics features (#7037)
* 3d v1.1.1-exp physics expriment (#6787)

* activate when not awake (#6781)

* activate when not awake

* cannon too

* off event listener when onDestroy

* add clearVelocity & clearForces

* add CC_CONFIG to ammo\cannon

* add convex mesh & reuse mesh

* cache enable false by default

* terrain collider

* cone collider

* fix scale of ammo box & sphere

* simple collider

* add worldBounds & boundingSphere to collider

* add clear*** to rigid body

* enhance physics material

* enhance event

* plane collider

* stash

* tweaks

* update @cocos/ammo to v1.0.7-beta.1

* typing

* enchance update shape dynamic

* absolute scale cannon-box

* expose allowsleep

* fix warning of generate declaration

* remove physics_builtin

* DO NOT MERGE

* Better reuse

* Correct construct and deconstruct

* avoid ammo memory leaks

* minor refactor contact data

* fix cannon terrain tileSize

* stash

* optimize auto wakeup

* [Ammo] fix update by re add

* 400~

* overwrite ArrayCollisionMatrix.prototype.reset

* Export enum by namespace

* stash

* fix remove child shape of btCompound

* fix event with CCD

* dynamic instantiate

* STASH

* add group to rigid body

* update attachedRigidBody of collider in editor

* stash physics config

* tweaks of ammo config

* stash

* stash

* collision matrix

* stash

* rename deltaTime to fixedTimeStep

* group mask collider

* allow get mask

* set default group to Layers.Enum.DEFAULT

* add group change fallback

* cannon collision matrix

* fix

* update @cocos/ammo to 1.0.7-beta.2

* more prop

* fix

* disable on 1.1.1-exp

* tweaks

* fix circular dependency

* tweaks

* rename simple to simplex

* rename collider -> colliders

* stash

* ammo p2p

* hinge constraint

* adapt cannon p2p pivotB

* ammo p2p setPivotB

* constraint

* tweaks

* remove macro of physics

* refactor physics selector

* import ammo from ammo-instantiated

* update @cocos/ammo

* update @cocos/cannon
2020-08-03 11:00:07 +08:00
Leslie Leigh (李的序) aeced26917 Solve duplicated menu issue (#6973) 2020-08-02 14:53:31 +08:00
Leslie Leigh (李的序) 59c46c66af Add platform macro for ByteDance (#6982) 2020-07-15 11:37:47 +08:00
PP aaf542be76 remove browserType for minigame (#6970)
* remove browserType for wechatgame

* optimize booting in subContext

update
2020-07-12 22:42:52 +08:00
ChiaNing 1c54beb91a sys browser type add (#6939)
* sys browser type add

* change JSB
2020-07-06 11:31:46 +08:00
Yun Hsiao Wu 69db70a910 Merge remote-tracking branch 'origin/3d' into 3d 2020-06-03 16:22:00 +08:00
SijieWang a9f3969245 Merge remote-tracking branch 'cocos-for-editor/3d-v1.1.1' into 3d
# Conflicts:
#	cocos/audio/assets/clip.ts
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/batched-skinning-model-component.ts
#	cocos/core/3d/framework/editor-camera-component.ts
#	cocos/core/3d/framework/index.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/animation/animation-clip.ts
#	cocos/core/animation/animation-manager.ts
#	cocos/core/animation/animation-state.ts
#	cocos/core/animation/skeletal-animation-component.ts
#	cocos/core/animation/skeletal-animation-state.ts
#	cocos/core/assets/mesh.ts
#	cocos/core/assets/simple-texture.ts
#	cocos/core/assets/sprite-frame.ts
#	cocos/core/assets/texture-base.ts
#	cocos/core/data/class-decorator.ts
#	cocos/core/data/instantiate.ts
#	cocos/core/event/event-target.ts
#	cocos/core/game.ts
#	cocos/core/load-pipeline/CCLoader.ts
#	cocos/core/load-pipeline/plist-parser.ts
#	cocos/core/load-pipeline/unpackers.ts
#	cocos/core/load-pipeline/url.ts
#	cocos/core/math/deprecated.ts
#	cocos/core/renderer/scene/model.ts
#	cocos/core/scene-graph/base-node.ts
#	cocos/core/scene-graph/scene-globals.ts
#	cocos/terrain/terrain.ts
#	predefine.ts
2020-06-03 13:25:42 +08:00