61 Commits

Author SHA1 Message Date
llsansun 2157fd176d Multithreading (#322)
* worker pool

* opt

* backup

* worker and worker backend

* worker fallback

* opt

* opt

* remove meta

* opt

* worker export

* testcase fix

* worker js template

* worker pal

* worker opt

* test

* Replace error messages with error codes

* Package size reduction

* Package size reduction

* revert

* Restore editor asset .meta files to the base branch state

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HAtWwr4dy5azfpccweh1g

* bugfix

* Split into two features: Worker and Worker Pool

* worker option

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:35:14 +08:00
ChiaNing f570c1f02d feat(screen): configure Web DPR through startup settings (#367)
* feat(pal): declare startup maximum DPR configuration

Add an optional maximum DPR to screen initialization and readonly access to
the original DPR and explicitly configured cap. An omitted or null cap retains
the platform's existing policy.

This is the engine type contract for the staged PAL implementation. Public
Screen configuration methods and Native render-target integration remain
separate work; this commit does not change runtime rendering.

Validated against the PAL engine/four-platform contract check and full npm test
(65 source tests, 4 build tests, release/debug module validation).

* feat(screen): expose startup maximum DPR configuration

Allow applications to set, reset and read a pending maximum DPR before Screen
initialization while preserving platform defaults when unconfigured. Lock the
configuration at initialization and reject unsupported PAL implementations or
options that PAL silently ignores.

Add startup validation and compatibility tests. Only implementation and tests
are included; local documentation and generated validation artifacts remain
outside this commit.

Companion PAL commit: 2959778b7acf83dd84e3aab5957d60d80e20c461.
Native render-target integration, device acceptance, runtime changes and editor
configuration remain separate work.

Validation recorded on 2026-09-29: tsc --noEmit; 20 Screen and 6 View tests;
public declaration generation; real WebGL demo with simulated host DPR,
first-draw, input, reset, late-call rejection and resize checks. Screen source
SHA-256 still matches that verified build.

* fix(screen): restrict startup DPR configuration to Web

* fix(screen): ignore DPR cap calls on non-Web platforms

* fix(screen): preserve optional DPR types in native builds

* refactor(screen): configure Web DPR through startup settings

* refactor(screen): delegate DPR policy and validation to PAL

* style(screen): wrap fullscreen method signatures

* perf(screen): simplify startup DPR null checks

* version update
2026-10-22 19:15:17 +08:00
tangkai e917b3c833 add interface of notifyMiniProgramPlayableStatus, setEnableDebug (#2)
* add interface of notifyMiniProgramPlayableStatus, setEnableDebug

* fix eslint error
2025-12-20 15:20:24 +08:00
tangkai 08f3e7bf7b add interface for douyin live play feature (#55) 2025-12-20 10:26:30 +08:00
qiuguohua 36e6d0eb6d Caching getSystemInfoSystem information in mini game platforms (#18781) 2025-08-21 10:30:36 +08:00
James Chen 888480783a fixed #17866: [bug] EventTouch.getUIDelta return wrong delta values on native platforms (#17895) 2024-11-21 15:36:01 +08:00
James Chen 32727868b0 Reduce the generated javascript code size (#17491) 2024-08-06 18:14:44 +08:00
GengineJS cf85e35f13 support webgpu (#17096) 2024-06-12 09:24:10 +08:00
James Chen 4ce3e6e64e fixed #16562: Wasm support for ByteDance minigame platform (#16628) 2023-12-20 09:54:54 +08:00
Leslie Leigh (李的序) 3a470a6dff Add utilities to check integrity of pal implementations (#15694)
* Add utilities to check integrity of pal implementation

* Fix screen adapter

* Fix game pad input

* Apply suggestions from code review

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

* Add license

---------

Co-authored-by: PP <chinese1236@qq.com>
2023-07-13 14:18:53 +08:00
PP 649e81a7b2 optimize: ensure wasm module ready before importing (#15631)
* optimize: ensure wasm module ready before importing

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

* Update pal/wasm/wasm-minigame.ts

* use reject instead of warnning

* optimize: add promiseToLoadWasmModule

* add shouldUseWasmModule method to simplify code

* fix: subpackage loading on taobao minigame platform

* Update pal/wasm/wasm-minigame.ts
2023-07-06 15:34:31 +08:00
PP 870e356408 support fetchBuffer in pal/wasm module (#15454) 2023-06-18 16:38:44 +08:00
qiuguohua be5eae04f5 Add ‘screen.on’ interface to listen to screen-related events. (#15080)
* 1、Add ‘screen.on’ interface to listen to screen-related events.
2、Deprecate ‘setResizeCallback’ interface

* Modify comment errors
2023-05-17 17:36:54 +08:00
PP 0b353b6e14 feat: support general WASM module in engine (#14974)
* support pal/wasm module

pal/wasm

* support sys.Feature.WASM and WASM_SUPPORT_MODE

# Conflicts:
#	pal/system-info/web/system-info.ts

# Conflicts:
#	pal/system-info/web/system-info.ts

# Conflicts:
#	pal/system-info/web/system-info.ts

* optimize bullet module


* update physx module

update

* revert tsconfig

* optimize WebGPU wasm import

* fix native wasm instantiate

* support wasm in EDITOR and PREVIEW

* optimize variable name

* update comment

* optimize code

* Update cocos/misc/webassembly-support.ts

* add physx wasm (#11) by yiwenxue

* add physx wasm

* update physx wasm instantiate.

* update, rename, etc.

* download external in CI

* fix physX wasm init

* move out external wasm type

* update external-config.json

* expand node max-old-space-size

* use console.debug

---------

Co-authored-by: Yiwen <15225434259xue@gmail.com>
2023-05-08 18:02:17 +08:00
minggo a22d16bbe6 Merge branch 'v3.7.3' into merge_v3.7.3 2023-04-24 11:26:58 +08:00
fqamic 36b69d4fd7 engine support to webxr (#14861)
* feat: input support to webxr
1.new webxr gamepad event
2.new webxr handle pose event
3.support webxr hmd pose event

* feat: split the frameMove function to support xr readability

* feat:Add webxrFrameMove for webxr

* improve:xr stands for globalThis.globalXR

* improve(xr):format code

* fix: webxr gamepad update cache error

* fix: webxr gamepad update cache error

* fix: code naming error

* fix: update cache right gamepad data error

* improve: any is enough for any | undefined

* improve: modify interface PoseInfo and IGamepadCacheInfo

* improve: declare IGamepadCacheInfo

* fix: globalThis.__globalXR is undefined

---------

Co-authored-by: linyuanyi <1111>
2023-04-20 23:23:15 +08:00
qiuguohua ee86fc40bd Native platform modifies exit process (#14141) 2023-02-15 17:11:28 +08:00
fqamic 1f928364f4 fix some xr devices stretch when splash-screen logo and add handle device key (#13915)
* fix: some xr devices stretch when splash-screen logo

* feat: xr handle device support button menu and button start
2022-12-28 11:56:35 +08:00
mmyduckx 2efe60a576 fix game.init assetDB-warning (#13809)
* fix game.init assetDB-warning
2022-12-14 14:31:14 +08:00
minggo 8d8c283b59 Merge branch 'v3.6.3' into merge-v3.6.3 2022-11-28 13:37:25 +08:00
fqamic 2316dc77c1 improve(xr):Rename Handset to Handheld (#13558)
Co-authored-by: linyuanyi <1111>
2022-11-28 11:30:27 +08:00
fqamic d4055f7e32 new basic capabilities of supporting handset ar and webxr (#13420)
* feat: add the basic capability of handset ar native

* feat: add handset input device, for ar camera pose

* feat: native pack tool supports xr platform name

* feat: web gl context supports webxr

* feat: webxr has been converted to screen coordinates via camera

* fix: pr ts-expect-error undefined xr

* feat: support webxr, and remove ar redundant code

* fix:xr-spaces gradlew permission error

* feat: revert redundant ar engine feature

* fix: eslint check error

* feat: remove redundant code

* fix: eslint check warning

* adjust armodule process in forward stage, mtl texture and jsb

* fix: exlint warning, and add license

* adjust ar lib and interfaces

* change webxr check interface

* merge external arlib header and move it to engine

* improve: update native external version

* move ar background stage to xr/rendering and move its init to webxr device in xr plugin

* fix format error

* fix format error

* adjust jsb_ar_manual, ARModule, ARBackground

* adjust arbackground

Co-authored-by: Parryzhai <1306895355@qq.com>
Co-authored-by: MoHai <1192652394@qq.com>
2022-11-24 13:33:50 +08:00
ycg 827a3f0640 Fix: Update the implementation of the supportWebp on minigame. (#13165)
* Fix: Update the implementation of the supportWebp on minigame.
Optimize: Adjust the initialization of the System-info module.

* Add return type of the sys-init function.

* Add try-catch to _supportsWebp method
2022-10-28 10:44:16 +08:00
ycg 31ad5ab9e1 Adapter System-info on Taobao (#12867)
* Adapter System-info on Taobao

* add  'zh_CN'  for  iPad
2022-09-27 09:52:30 +08:00
QingliWang 6a8f53b186 Add features for XR developement. (#12413)
* Change Android mainloop, add global config and template projects for XR.

* Change gfx/gles device's process flow for XR, working with other PRs, waiting.

* Change gfx/Vulkan device's process flow for XR, working with other PRs, waiting.

* Change render process for XR.

* Develop XR input and events.

* Develop 3D feature of UI widgets and raycast effect for XR.

Co-authored-by: fqamic <fqamic@vip.qq.com>
2022-08-22 16:34:45 +08:00
Santy-Wang 7bc135e1c7 adjust initialization process (#11143)
* adjust init process

* fix bugs

* restructure

* tweak

* delete useless code

* fix ci

* support more platform and fix some bugs

* mark internal

* tweak

* add docs

* add docs and little adjustment

* fix bugs

* adjust decorator execute order

fix mesh error

* fix bugs

* revert some change

* revert auto-generated code

* revert auto-generated code
2022-07-03 21:16:09 +08:00
PP 1fccb90926 support audio PCMData and sampleRate getter (#11470)
* support audio buffer and sampleRate getter

update comment

update interface

update

update comment

update jsb.d.ts

update

* support getPCMData

update

support on native

support on miningame

update

* update comment

* add example doc
2022-06-29 13:39:05 +08:00
PP e5511822eb support game.end() on Minigame (#11473) 2022-06-14 16:13:51 +08:00
PP d0bd6b7376 support input dispatch event for Editor (#11471)
* support input dispatch event for Editor

* update internal

* fix eslint

* fix bug

* update
2022-06-14 16:10:18 +08:00
PP a3f997dfda optimize text baseline on runtime platform (#10751)
* optimize text baseline on runtime platform

* move into minigame module
2022-04-14 16:42:40 +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
PP 1f58fbff6c cache systemInfo on Cocos Play platform (#9856)
* cache systemInfo on Cocos Play platform

* resize swapChain
2021-12-23 11:40:00 +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
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 c4827857ad gfx: import from pal/system-info directly (#9595) 2021-11-03 13:49:32 +08:00
PP 51989a1b76 get exactFitScreen option from game initialization (#9594)
* get exactFitScreen option from game initialization

* set HTML5 as true by default

* optimize editor scene resize
2021-11-02 10:25:49 +08:00
PP 1ed2a9833e optimize screen adaption on Web platform (#9580)
* optimize screen._init

* support WindowType on Web platform

* optimize fullscreen adaption

* optimize frame resize

update

* set timeout to handle screen event

* fix esLint

* fix esLint

* fix spelling

* fix number type

* EVENT_TIMEOUT

* fix esLint

* revert naming 'OrientationMap'
2021-11-01 00:01:49 +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
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
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
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
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
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