179 Commits

Author SHA1 Message Date
hyde zhou 6ccf1cf9a8 Reapply "Feat/plugin support, allow third_party feat(spine) to create plugin f…" (#403) (#424)
This reverts commit 5bcfb9fa04.
2026-11-16 16:33:05 +08:00
hyde zhou 5bcfb9fa04 Revert "Feat/plugin support, allow third_party feat(spine) to create plugin f…" (#403)
This reverts commit a56706c9ad.
2026-11-10 17:04:32 +08:00
Tianze-Chen a56706c9ad Feat/plugin support, allow third_party feat(spine) to create plugin for creator. (#306)
* Add UIMesh component for custom 2D mesh rendering

- Add UIMesh component consuming pre-baked vertex/index/segment data, enabling custom renderers (e.g. spine plugin) to batch through the 2D batcher.
- Export UIMesh from the 2d components index.
- Validate setMeshData input at the boundary (stride, buffer lengths, index values, segment ranges, accessor caps) via engine-standard errorIDs 9010-9017, documented in EngineErrorMap.md.
- Expose StaticVBAccessor per-chunk caps as maxVertexCount/maxIndexCount getters and clamp the 10% reserve to them, so meshes that fit (e.g. 30000 vertices) allocate instead of silently failing.
- Add tests/ui/ui-mesh.test.ts covering the 32767 cap boundary, setMeshData validation, and accessor lifetime.

Also takes over node transform and cascaded opacity: vertices are now always
node-local — UIMesh applies the node's world matrix (unbatched via the
per-draw GPU transform the 2D batcher already maintains for middleware,
batched by baking into the shared chunk copy so draws still merge) and folds
the cascaded UIOpacity into the copied vertex colors itself. The legacy
switches (USE_LOCAL / useLocalData / RenderEntity.setUseLocal) are all derived
internally; consumers never touch them. A JSB staleness poll re-prepares the
native draw infos in the same frame on transform/opacity changes, and a
premultipliedAlpha format declaration drives the opacity fold and the builtin
material's blend factors.

Follow-ups folded in: the opacity fold reads the light color at byte offset 20
(the pos*3f + uv*2f header is 20 bytes), not 16; and UIMesh notifies data
producers through the new onPremultipliedAlphaChanged() hook so subclasses
(e.g. the spine plugin) forward the declared format to their baker instead of
redeclaring the field.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Disable built-in spine by default; minor editor/build fixes

- Default the built-in Spine feature (spine-3.8) to off in feature cropping, so it is only included when enabled in the editor.
- Recognize scale as a valid spine atlas page attribute in the texture inspector.
- Skip incomplete platform dirs when bundling runtime adapters.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 7f7922aaf42ff1857f0a6d38970a75d303032f57)

* Export WebAssembly interface under cc.wasm namespace

- Add exports/webassembly.ts re-exporting pal/wasm (instantiateWasm, fetchBuffer, fetchUrl, ensureWasmModuleReady) as the public cc.wasm namespace, so extensions/game code can load their own .wasm files through the engine's platform-adaptive path.
- Expose it as a croppable feature rather than an unconditional export from exports/base.ts: cc.config.json declares a `webassembly` feature and editor/engine-features/render-config.json adds the panel entry (default on, required), so it appears under Project Settings -> Feature Cropping. The label/description are plain text on purpose — i18n:ENGINE.* keys live in the editor package and a custom engine cannot add them.

(cherry picked from commit 92003ab4a21b6ee753cf3ba2ca0f4767658e9cdc)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* feat(simulator): generic native plugin discovery opt-in

The generic plugin discovery chain (cc_gen_plugin_cmake_hook ->
plugins_parser.js -> Pre-AutoLoadPlulgins.cmake -> find_package ->
plugin_registry) already exists and is what native device builds use; the
simulator never invoked it. Wire it in behind an opt-in cache variable, with
no plugin names or plugin logic in the engine — the plugin set is always just
the scan result:

- templates/cmake/common.cmake: cc_gen_plugin_cmake_hook()'s scan roots
  (CC_PLUGIN_PATH) may now be pre-set by the caller; the native-build
  project-layout defaults are unchanged when nobody pre-defines it
- simulator runtime-src CMakeLists.txt: -DSIMULATOR_PLUGIN_SCAN_DIRS="<dir>
  [;<dir>]" scans those roots for cc_plugin.json through the same chain as
  device builds (CC_PROJECT_DIR points into the build tree so the generated
  hook lands there, satisfying the parser's output-dir invariant); unset
  keeps the stock plugin-less simulator, and a cache variable means plain
  `cmake --build` reuses the configured scan
- simulator Game.cpp: call cc_load_all_plugins() after init, mirroring
  BaseGame::init(), so registered plugins' JSB bindings exist before any
  script runs (no-op when no plugins are linked)
- libsimulator protobuf config.h: skip the <hash_map>/<hash_set> defines on
  MSVC >= 1950 (headers removed); stubs fall back to the std::map emulation
  path

Verified end-to-end: a project extensions/ tree scanned at configure time
produces a simulator exe whose plugins register their JSB bindings at startup
(observed live in the simulator's JS context).

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: Developer <developer@cocos.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Engineer <engineer@cocos.com>
2026-11-04 16:41:54 +08:00
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
hyde zhou db5462603e Move pal directory to private repository (#191) (#254)
Co-authored-by: qiuguohua <qiuguohua111@126.com>
2026-08-08 16:20:49 +08:00
bofeng-song ab8792686b feat(spine): support runtime-selectable spine version for editor/preview (#184) 2026-07-07 14:59:24 +08:00
hyde zhou 4a6f83bd6d Revert "refactor platforms (#126)" (#128) 2026-04-28 23:12:10 +08:00
hyde zhou 910865bd8b refactor platforms (#126) 2026-04-28 18:53:46 +08:00
tangkai ba0a042ef5 add SUDV2 platform (#100) 2026-03-13 12:06:51 +08:00
tangkai 406dbd09b3 400sudplayable (#8) 2025-12-25 19:36:43 +08:00
tangkai f538598adc add sud platform (#3) 2025-12-20 17:26:57 +08:00
hyde zhou 78abe8e2da adding nodejs (#2) 2025-09-11 16:56:03 +08:00
GengineJS b5f1b88b81 Added mipmap bloom algorithm (#18725) 2025-05-22 11:53:19 +08:00
James Chen 9ef56add32 Fix a Sorting2D bug that priority was not updated in Sorting2D onEnable/onDisable and fix the default priority. (#18650) 2025-04-23 20:02:55 +08:00
qiuguohua c533f1379b Fix code hints and add comments when using the google play interface. (#18625) 2025-04-22 16:44:28 +08:00
James Chen afef795931 Add Sorting2D support. (#18643) 2025-04-22 14:28:55 +08:00
bofeng 7533b6091d Support check compatible for spine's asset 2025-03-07 16:20:43 +08:00
James Chen 00cb328bee Add CocosRuntime platform config (#18395) 2025-03-03 14:08:54 +08:00
bofeng-song b2316fc02f Support spine version 4.2 (#18325) 2025-02-26 18:56:42 +08:00
tangkai b08a406d07 Support box2d JS binding which improves the performance of 2D physical system for native platforms . (#18152) 2025-02-24 19:22:06 +08:00
James Chen 8b7e7a6ea1 Treeshake xr module import. (#18328)
* Treeshake xr module import.

* Treeshake more XR relevant code.

* Update cc.config.json
2025-02-14 11:34:02 +08:00
James Chen 025700d380 Treeshake weak-cache.ts (#18322) 2025-02-13 09:54:41 +08:00
James Chen 905eb374dd Update ccbuild to 2.3.13 which supports to override constant values in feature definition. (#18319)
* Update ccbuild to 2.3.12 which supports to override constant values in feature definition.

* Update ccbuild to 2.3.13
2025-02-12 14:07:12 +08:00
lanbinqiang f5697c4c27 Added Honor channel identifiers (#18314)
Co-authored-by: lbq <563294062@qq.com>
2025-02-11 17:00:16 +08:00
James Chen cf945088ca Add more feature cropping settings for RichText, Mask, Graphics, UISkew, AffineTransform. (#18284)
* Add more feature cropping settings for RichText, Mask, Graphics, UISkew, AffineTransform.
2025-02-10 11:40:01 +08:00
James Chen 243b622592 Strip minigame (#18288) 2025-02-07 13:53:56 +08:00
James Chen aa841bd7f7 [v3.8.6] [2D Skew comes back] Add UISkew component support. (#18212) 2025-01-22 16:38:56 +08:00
James Chen f4cca397f8 [v3.8.6] Strip jsb-utils.ts (#18161)
* [v3.8.6] Strip jsb-utils.ts
2025-01-15 09:39:12 +08:00
minggo 7251fd3efc merge v3.8.5 2024-12-23 10:34:45 +08:00
qiuguohua c2882db601 The google play billing interface is consistent with google's original interface (#18010)
The google play billing interface is consistent with google's original interface

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
Co-authored-by: James Chen <dumganhar@gmail.com>
2024-12-12 18:23:38 +08:00
minggo 52af1141b7 Merge pull request #18003 from cocos/v3.8.5
V3.8.5
2024-12-05 11:04:27 +08:00
qiuguohua deba073213 Integrate the Google Play Billing Library into engine (#17918) 2024-11-29 11:18:48 +08:00
James Chen 667005fe44 [v3.8.6] Continue to remove unused platforms support. (#17902)
* Continue to remove unused platforms support.
2024-11-22 10:30:47 +08:00
James Chen 21e6d0c47e fixed #17833: [v3.8.5] Add an ability to load wasm/asmjs module manually (#17844) 2024-11-13 17:17:38 +08:00
James Chen d9daaae301 [v3.8.5] Remove unused exports/wait-for-ammon-instantiation.ts (#17834) 2024-11-12 18:21:46 +08:00
lanbinqiang e4d9eeef6c fix migu platform build config (#17717)
Co-authored-by: lbq <563294062@qq.com>
2024-10-15 17:31:49 +08:00
James Chen f4ccf3a8bb [v3.8.5] Support inline enum and mangle private variables to reduce engine size. (#17703) 2024-10-15 10:17:16 +08:00
lanbinqiang 7bbc5faf60 Added MIGU channel identifiers (#17687)
Co-authored-by: lbq <563294062@qq.com>
2024-10-10 09:34:29 +08:00
hyde zhou dda764eb21 add post process culling (#17452)
* add post process culling

* disable post-process by default

* remove post process builder

* cleanup

* backward compatible
2024-07-30 13:42:05 +08:00
媛媛 4c61824d28 change script uuid (#17380) 2024-07-17 16:56:34 +08:00
媛媛 ecbcd20cb0 add dependentScripts to buitin-pipeline (#17379) 2024-07-17 16:08:44 +08:00
hyde zhou c4969f4f47 refactor builtin-pipeline (#17363) 2024-07-15 10:55:25 +08:00
GengineJS de3a857222 [Removed] Removing the native configuration for publishing WebGPU. (#17244) 2024-07-04 17:01:00 +08:00
hyde zhou e9da7e2309 add legacy pipeline (#17250) 2024-07-01 13:57:21 +08:00
GengineJS cf85e35f13 support webgpu (#17096) 2024-06-12 09:24:10 +08:00
hyde zhou 019dd24dbe V3.8.5 pipeline (#17073) 2024-06-04 16:33:33 +08:00
媛媛 dbd251c7ff [3.8.3] add isNativeModule/hidden/readonly in engine feature render config (#16662) 2024-01-12 16:06:05 +08:00
James Chen 75c6f6d16d fixed #16248: .wasm / .asm.js files are both downloaded on web platform (#16679) 2024-01-11 15:30:05 +08:00
James Chen 16382fa9e9 Fix wasm loading and remove unused code (#16676)
* Fix wasm loading and remove unused code

* Update package.json
2024-01-10 10:29:48 +08:00
James Chen 4ce3e6e64e fixed #16562: Wasm support for ByteDance minigame platform (#16628) 2023-12-20 09:54:54 +08:00