Skip to content
Draft

V4.0.0 #19120

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
78abe8e
adding nodejs (#2)
star-e Sep 11, 2025
58b7419
V4.0.0 init (#3)
star-e Sep 11, 2025
5e0f494
Add empty implementations for the Node.js platform to avoid compilati…
qiuguohua Sep 12, 2025
b8ebe33
Add web adapters and engine adapters for the Node.js platform. (#5)
qiuguohua Sep 12, 2025
1634163
Fix the issue of spine loading failure. (#6)
qiuguohua Sep 15, 2025
515f384
Fix the variable assignment failure in the new Node.js version (#7)
qiuguohua Sep 15, 2025
255466a
Add NODEJS environment variables (#8)
qiuguohua Sep 15, 2025
8aae2b4
Remove TypeScript syntax from JavaScript code (#9)
qiuguohua Sep 15, 2025
420e3bc
V4.0.0 fix game init (#11)
qiuguohua Sep 18, 2025
d1e204f
Fix serialization/deserialization errors. (#13)
qiuguohua Sep 19, 2025
6dcf6f3
Fix deserialization errors. (#14)
qiuguohua Sep 22, 2025
6bf2d33
disable hasFeature warning (#15)
star-e Sep 24, 2025
1163a66
Fix the problem where the display size is incorrect. (#16)
qiuguohua Sep 29, 2025
e188ea0
NODEJS supports _RF.reset (#17)
bofeng-song Sep 29, 2025
5d78f78
Fixing cachelist file read warnings (#18)
qiuguohua Oct 10, 2025
a921985
PAL module adapted to node platform (#19)
qiuguohua Oct 10, 2025
31fe353
Adapt image loading functionality for the Node.js platform (#21)
qiuguohua Oct 13, 2025
a3869d8
update engine version (#23)
star-e Oct 15, 2025
971366f
rename default asset template (#22)
yanOO1497 Oct 15, 2025
598dac7
Fix the issue where project script registration was not recognized. (…
knoxHuang Oct 16, 2025
2bc107d
[feat] add _registerIfAttached for NODEJS platform (#25)
bofeng-song Oct 17, 2025
f8c33a6
Fix CLI error when adding or removing component (#26)
qiuguohua Oct 18, 2025
d7af465
Fixed issue where deserialization of added components did not registe…
qiuguohua Oct 21, 2025
97a7799
Modify cache directory (#29)
qiuguohua Oct 22, 2025
f208620
Add NODEJS macro to check if there are identical components (#30)
qiuguohua Oct 22, 2025
4d20834
Fix reading resource files of type file:/// (#34)
qiuguohua Oct 23, 2025
478adbb
add skipLibCheck fix npm run build native-pack-tool, (#33)
knoxHuang Oct 23, 2025
b82efb2
1、Fix the issue of being unable to load ccon (#35)
qiuguohua Oct 24, 2025
6decfca
Fix prefab instance creation issue in Node.js environment (#37)
knoxHuang Oct 28, 2025
06fd724
Fix the error that occurs when creating a component. (#38)
qiuguohua Oct 29, 2025
12a934b
fix objFlags and isRealValid undefined in nodejs (#45)
knoxHuang Nov 11, 2025
56cc56c
Fix the issue of fetch failures when using local paths during build. …
qiuguohua Nov 12, 2025
dbe0c4a
Fix missing script component error causing scene to fail to load (#47)
qiuguohua Nov 14, 2025
0f8af9d
Revert "Fix applyTargetOverrides checks if property is declared to pr…
knoxHuang Nov 17, 2025
5ea83c0
Fix support for Node's built-in interfaces (#49)
qiuguohua Nov 20, 2025
57cc800
Merge branch 'v3.8.8' into v4.0.0
star-e Dec 19, 2025
ce5a303
Browser offline loading fails to return correctly even after network …
tangkaikk Dec 20, 2025
4505d86
check if the buffer is valid in case of crash in IOS (#52)
tangkaikk Dec 20, 2025
5e50ee1
Fix build error for ios (#53)
bofeng-song Dec 20, 2025
08f3e7b
add interface for douyin live play feature (#55)
tangkaikk Dec 20, 2025
2fbef6b
Skip audio parsing on the CLI platform. (#56)
qiuguohua Dec 20, 2025
f83892d
Support reports missing class. (#57)
bofeng-song Dec 20, 2025
e917b3c
add interface of notifyMiniProgramPlayableStatus, setEnableDebug (#2)
tangkaikk Dec 20, 2025
f538598
add sud platform (#3)
tangkaikk Dec 20, 2025
25d1a5d
add FeedStatusController.ts (#5)
tangkaikk Dec 24, 2025
406dbd0
400sudplayable (#8)
tangkaikk Dec 25, 2025
002ae41
add 3.8.8 default scene back (#9)
star-e Dec 29, 2025
0db09be
change default scene content
star-e Dec 29, 2025
b110198
remove LICENSE (#11)
star-e Dec 29, 2025
c15f966
Add MIT License to the project
star-e Dec 29, 2025
b13fcd1
update README.md (#12)
star-e Dec 29, 2025
739424e
update README.zh-CN.md
star-e Dec 29, 2025
9e7775b
update intro (#15)
star-e Dec 29, 2025
a6b9369
change image (#17)
star-e Dec 29, 2025
c4b6619
update readme (#19)
star-e Dec 30, 2025
8469ed8
update doc (#20)
star-e Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions @types/pal/minigame.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ declare module 'pal/minigame' {
getDeviceInfo(): DeviceInfo;
getWindowInfo(): WindowInfo;
getAppBaseInfo(): AppBaseInfo;

// interace for douyin live play feature
checkFeedSubscribeStatus(opt: subscribeOptions): void;
requestFeedSubscribe(opt: reqSubscribeOptions): void;
getLaunchOptionsSync(): LaunchOptions;
reportScene(opt: reportOption): void;
onFeedStatusChange(cb: (type: string) => void): void;
offFeedStatusChange(cb?: (type: string) => void): void;
storeFeedData(opt: storeFeedDataOptions): void;
getFeedData(opt: getFeedDataOptions): void;

setEnableDebug? (parm: DebugParameter): void;
notifyMiniProgramPlayableStatus? (parm: notiOptions): void;
}

interface WeChatAPI {
Expand Down Expand Up @@ -345,3 +358,92 @@ interface LoadSubpackageTaskOnProgressUpdateListenerResult {
totalBytesExpectedToWrite: number;
totalBytesWritten: number;
}

interface subscribeOptions {
scene: number;
allScene: boolean;
type: string;
success?: (successObj: commonSuccessObj) => void,
fail?: (failObj: commonFailObj) => void,
complete?: () => void,
}
interface reqSubscribeOptions {
scene: number;
contentIDs: string[];
allScene: boolean;
type: string;
success?: (successObj: commonSuccessObj) => void,
fail?: (failObj: commonFailObj) => void,
complete?: () => void,
}

interface LaunchOptions {
query: LaunchOptionQuery;
scene: string;
extra: LaunchOptionExtra;
}

interface LaunchOptionExtra {
aid: object;
appId: string;
mpVersion: string;
launch_from: string;
}

interface LaunchOptionQuery {
ad_params: any;
feed_game_scene: any;
feed_game_channel: any;
feed_game_content_id: any;
feed_game_extra: any;
}
interface reportOption {
costTime: number; //ms
sceneId: number;
dimension: object;
metric: object;
success?: (successObj: commonSuccessObj) => void,
fail?: (failObj: commonFailObj) => void,
complete?: () => void,
}
interface commonSuccessObj {
errMsg: string,
data: object,
}
interface commonFailObj {
errMsg: string,
}

interface storeFeedDataOptions {
scene: string;
extra: string;
status: number;
contentID: string;
leftValue: number;//ms
operator: string;
rightValue: number;//ms
success?: (successObj: {errMsg: string}) => void,
fail?: (failObj: commonFailObj) => void,
complete?: () => void,
}

interface getFeedDataOptions {
scene: string;
contentID: string;
success?: (successObj: {errMsg: string, extra: string, status: number}) => void,
fail?: (failObj: commonFailObj) => void,
complete?: () => void,
}

interface DebugParameter {
enableDebug: boolean,
success?: () => void,
fail?: (err: any) => void,
complete?: () => void,
}

interface notiOptions {
success?: () => void,
fail?: (err: any) => void,
complete?: () => void,
}
5 changes: 1 addition & 4 deletions LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
MIT License

Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd.

http://www.cocos.com
Copyright (c) 2025 SUD

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://www.cocos.com/">
<img src="https://user-images.githubusercontent.com/1503156/112012067-d5cdf580-8b63-11eb-819a-1c32cf253b25.png"
<img src="./ui.png"
alt="Cocos Creator Logo">
</a>
</p>
Expand All @@ -13,7 +13,7 @@
<img src="https://img.shields.io/github/forks/cocos/cocos-engine.svg?style=flat-square&colorB=4183c4"
alt="forks">
</a>
<a href="./licenses/LICENSE">
<a href="./LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&colorB=4183c4"
alt="license">
</a>
Expand All @@ -23,15 +23,15 @@
</a>
</p>

# Engine for Cocos Creator
# COCOS 4

**Cocos Creator is the new generation of game development tool in Cocos family, it brings a complete set of 3D and 2D features while providing an intuitive, low cost and collaboration friendly workflow to game developers.** Cocos Engine is the runtime framework for Cocos Creator editor.
COCOS 4 is an open-source, high-performance, cross-platform game and interactive content development engine. Built on a mature C++ architecture, it provides powerful rendering capabilities and flexible script bindings, supporting a "write once, run anywhere" philosophy.

![image](./ui.png)
Previously, _Cocos Creator_ referred to the combined engine and editor, spanning versions 1.x, 2.x, and 3.x. To embrace a purely open-source model and fully integrate AI, we are separating the engine from the editor. This is a significant and necessary evolution. Moving forward:

Cocos Creator inherited many good qualities and cool features from its previous versions, such as high performance low level C++ implementation, intuitive editor, cross-platform support. It supports native platforms, web platforms and rapidly expanding instant gaming platforms, including Windows, Mac, iOS, Android, HarmonyOS, Web, Facebook Instant Games, WeChat Mini Game and TikTok Mini Games.
**COCOS** will refer solely to the engine, with the major version upgrading to **COCOS 4**. The cross-platform framework and the core components of the editor will be converted to CLI tools and integrated into the engine's core functionality. This represents a major new addition to this open-source release.

Furthermore, Cocos Creator has pushed the engine technology to a whole new level for high performance with scalability on various platforms, full extensibility and easy development.
## Features

1. **Modern Graphics**: The GFX implementation is designed to adapt to the modern graphics APIs, it uses Vulkan on Windows and Android, Metal on Mac OS and iOS, and WebGL on Web platforms.
2. **High Performance**: The runtime engine is built with half C++ and half TypeScript, low-level infrastructure, native platform adaptation, renderer, and scene management are all written in C++ to ensure high runtime performance. We continue to move heavy lifting work to native as much as possible.
Expand All @@ -40,12 +40,10 @@ Furthermore, Cocos Creator has pushed the engine technology to a whole new level
5. **Physically Based Rendering (PBR)**: The standard effect adopts physically based rendering, along with the physically based camera and the lighting based on physical metrics, developers can easily achieve realistic and seamless rendering results across different environments.
6. **Easy TypeScript API**: The user-level API set is provided in TypeScript, along with the powerful VSCode editor, development with Cocos Creator is incredibly efficient.

Besides all these highlights, Cocos Creator also provides a built-in animation system, physics system, particle system, terrain editing support, complex UI system, instant preview, etc.
Besides all these highlights, COCOS 4 also provides a built-in animation system, physics system, particle system, terrain editing support, complex UI system, instant preview, etc.

![image](https://user-images.githubusercontent.com/1503156/111037166-f27c7600-845d-11eb-988f-4c2c8b5c7321.png)

This open-source repository is the runtime engine of Cocos Creator, the engine is naturally integrated within Cocos Creator, designed to only be the essential runtime library and not to be used independently.

## Development and Contribution Notice

Cocos Creator engine is open source and welcomes community participation, for open source engine development with Cocos Creator editor, you should fork this repository and setup [custom engine](https://docs.cocos.com/creator/manual/en/advanced-topics/engine-customization.html) in the editor.
Expand Down
27 changes: 15 additions & 12 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://www.cocos.com/">
<img src="https://user-images.githubusercontent.com/1503156/112012067-d5cdf580-8b63-11eb-819a-1c32cf253b25.png"
<img src="./ui.png"
alt="Cocos Creator Logo">
</a>
</p>
Expand All @@ -13,11 +13,7 @@
<img src="https://img.shields.io/github/forks/cocos/cocos-engine.svg?style=flat-square&colorB=4183c4"
alt="forks">
</a>
<a href="https://github.com/cocos-creator/engine/releases">
<img src="https://img.shields.io/github/tag/cocos/cocos-engine.svg?label=version&style=flat-square&colorB=4183c4"
alt="version">
</a>
<a href="./licenses/LICENSE">
<a href="./LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&colorB=4183c4"
alt="license">
</a>
Expand All @@ -27,20 +23,27 @@
</a>
</p>

# Cocos Creator 引擎
# COCOS 4

COCOS 4 是一个开源的、高性能的、跨平台的游戏和交互式内容开发引擎。基于成熟的 C++ 架构,它提供强大的渲染能力和灵活的脚本绑定,支持"一次编写,随处运行"的哲学。

![image](https://user-images.githubusercontent.com/1503156/111035862-53548000-8457-11eb-8e8b-52d854caf627.png)
以前,_Cocos Creator_ 指的是结合了引擎和编辑器的产品,跨越 1.x、2.x 和 3.x 版本。为了采纳纯开源模式并充分整合 AI,我们正在将引擎与编辑器分离。这是一个重大且必要的演进。往后:

Cocos Engine 是 Cocos Creator 编辑器的运行时框架。Cocos Creator 是 Cocos 家族的下一代游戏开发工具,为开发者集成了完整的 3D 能力,并且提供了直观、高效、便于协作的工作流
**COCOS** 将专指引擎,主版本号升级到 **COCOS 4**。跨平台框架和编辑器的核心组件将被转换为 CLI 工具并整合到引擎的核心功能中。这代表着这个开源版本的一个重要新增功能

Cocos Creator 继承了其以前版本的许多优良品质和酷炫功能,如强大的跨平台支持、资产管理、强大的动画编辑等。此外,Cocos Creator 还将我们的技术推到了一个全新的水平。我们的 GFX 实现是为了适应最新的图形后端 API,支持 WebGL 2 并且可以无缝 fallback 到 WebGL 1,在原生构建中支持 Vulkan 和 Metal。材质系统建立在我们自己基于 GLSL 300 的 Effect 格式,可以很容易地适应低端设备的低版本。使开发人员可以制作高性能、极富表现力的着色器,并具有良好的兼容性。伴随着基于物理的相机和光照,高水平的游戏图形可以很容易地实现。我们的纯 GPU 驱动的骨骼动画也能确保你的游戏运行尽可能的流畅。除了所有这些令人兴奋的功能,Cocos Creator 还有内置的物理支持、地形编辑支持、特效编辑、UI 系统、TypeScript 支持、即时预览等功能。
## 引擎特性

1. **现代图形技术**:GFX 实现设计用于适配现代图形 API,在 Windows 和 Android 上使用 Vulkan,在 Mac OS 和 iOS 上使用 Metal,在 Web 平台上使用 WebGL。
2. **高性能**:运行时引擎由 C++ 和 TypeScript 各占一半构成,低层基础设施、原生平台适配、渲染器和场景管理都用 C++ 编写以保证高运行时性能。我们不断将更多的繁重工作转移到原生代码中。
3. **可定制化渲染管线**:渲染管线被设计为完全可定制的,已在所有平台上支持内置的正向和延迟渲染管线。开发者可以按照相同的方法自定义他们的渲染管线。
4. **可扩展的表面着色器**:材质系统建立在 Cocos 的 effect 格式之上,使用 GLSL 300,着色器程序将自动转换为合适的运行时格式。表面着色器允许充分定制表面材质,同时确保通用的光照模型。
5. **基于物理的渲染(PBR)**:标准效果采用基于物理的渲染,结合基于物理的摄像机和基于物理参数的光照,开发者可以轻松在不同环境中实现逼真、无缝的渲染效果。
6. **易用的 TypeScript API**:用户级 API 集由 TypeScript 提供,加上强大的 VSCode 编辑器,使用 Cocos Creator 开发效率极高。

![image](https://user-images.githubusercontent.com/1503156/111037166-f27c7600-845d-11eb-988f-4c2c8b5c7321.png)

引擎部分主要由 TypeScript 实现,支持用户使用 TypeScript 来编写游戏逻辑。另外在 `native` 目录中则提供了引擎在原生平台上的底层实现。引擎本身大部分是独立的,有成熟的运行时,包括光照、材质、粒子、动画、物理、UI、地形、声音、资源和场景节点管理等模块。同时支持原生和 Web 浏览器,包括 Windows、Mac、iOS、Android、HarmonyOS、Web。更令人兴奋的是,它支持各类小游戏平台,如微信小游戏和 Facebook Instant Games。

此引擎作为关键的运行时库默认集成在 Cocos Creator 中,并不是被设计为独立使用。

## 开发

### 环境要求
Expand Down
30 changes: 29 additions & 1 deletion cc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,20 @@
"pal/wasm": "pal/wasm/wasm-minigame.ts"
}
},
{
"test": "context.buildTimeConstants && context.buildTimeConstants.NODEJS",
"isVirtualModule": true,
"overrides": {
"pal/minigame": "pal/minigame/non-minigame.ts",
"pal/audio": "pal/audio/nodejs/player.ts",
"pal/system-info": "pal/system-info/nodejs/system-info.ts",
"pal/screen-adapter": "pal/screen-adapter/nodejs/screen-adapter.ts",
"pal/input": "pal/input/nodejs/index.ts",
"pal/env": "pal/env/nodejs/env.ts",
"pal/pacer": "pal/pacer/pacer-nodejs.ts",
"pal/wasm": "pal/wasm/wasm-nodejs.ts"
}
},
{
"test": "context.buildTimeConstants && context.buildTimeConstants.NOT_PACK_PHYSX_LIBS",
"isVirtualModule": false,
Expand Down Expand Up @@ -638,6 +652,20 @@
"ccGlobal": true,
"internal": false
},
"SUD": {
"comment": "Running in the sud's quick game.",
"type": "boolean",
"value": false,
"ccGlobal": true,
"internal": false
},
"NODEJS": {
"comment": "Running in the Node.js environment.",
"type": "boolean",
"value": false,
"ccGlobal": true,
"internal": false
},
"EDITOR": {
"comment": "Running in the editor.",
"type": "boolean",
Expand Down Expand Up @@ -710,7 +738,7 @@
"RUNTIME_BASED": {
"comment": "Running in runtime based environment.",
"type": "boolean",
"value": "$OPPO || $VIVO || $HUAWEI || $MIGU || $HONOR || $COCOS_RUNTIME",
"value": "$OPPO || $VIVO || $HUAWEI || $MIGU || $HONOR || $COCOS_RUNTIME || $SUD",
"ccGlobal": true,
"internal": false
},
Expand Down
4 changes: 2 additions & 2 deletions cocos/2d/assets/sprite-atlas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
THE SOFTWARE.
*/

import { EDITOR, TEST } from 'internal:constants';
import { EDITOR, NODEJS, TEST } from 'internal:constants';
import { ccclass, serializable, editable } from 'cc.decorator';
import { Asset } from '../../asset/assets';
import { SpriteFrame } from './sprite-frame';
Expand Down Expand Up @@ -112,7 +112,7 @@ export class SpriteAtlas extends Asset {
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
public _serialize (ctxForExporting: any): any {
if (EDITOR || TEST) {
if (EDITOR || NODEJS || TEST) {
const frames: string[] = [];
for (const key in this.spriteFrames) {
const spriteFrame = this.spriteFrames[key];
Expand Down
8 changes: 4 additions & 4 deletions cocos/2d/assets/sprite-frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/

import { ccclass } from 'cc.decorator';
import { EDITOR, TEST, BUILD } from 'internal:constants';
import { EDITOR, NODEJS, TEST, BUILD } from 'internal:constants';
import { Rect, Size, Vec2, Vec3, Vec4, cclegacy, errorID, warnID, js, v3, mat4, rect, v4, v2, size } from '../../core';
import { Asset } from '../../asset/assets/asset';
import { TextureBase } from '../../asset/assets/texture-base';
Expand Down Expand Up @@ -649,7 +649,7 @@ export class SpriteFrame extends Asset {
constructor (name?: string) {
super(name);

if (EDITOR) {
if (EDITOR || NODEJS) {
// Atlas asset uuid
this._atlasUuid = '';
}
Expand Down Expand Up @@ -1200,7 +1200,7 @@ export class SpriteFrame extends Asset {
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
public _serialize (ctxForExporting: any): any {
if (EDITOR || TEST) {
if (EDITOR || TEST || NODEJS) {
const rect = { x: this._rect.x, y: this._rect.y, width: this._rect.width, height: this._rect.height };
const offset = { x: this._offset.x, y: this._offset.y };
const originalSize = this._originalSize;
Expand Down Expand Up @@ -1298,7 +1298,7 @@ export class SpriteFrame extends Asset {
}
}

if (EDITOR) {
if (EDITOR || NODEJS) {
self._atlasUuid = data.atlas ? data.atlas : '';
}

Expand Down
4 changes: 2 additions & 2 deletions cocos/animation/exotic-animation/exotic-animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
THE SOFTWARE.
*/

import { EDITOR, TEST } from 'internal:constants';
import { EDITOR, NODEJS, TEST } from 'internal:constants';
import { binarySearchEpsilon, clamp, lerp, Quat, Vec3, _decorator } from '../../core';
import { assertIsTrue } from '../../core/data/utils/asserts';
import { AnimationClipGraphBindingContext } from '../marionette/animation-graph-animation-clip-binding';
Expand All @@ -31,7 +31,7 @@
import { CLASS_NAME_PREFIX_ANIM } from '../define';
import { Binder, RuntimeBinding, TrackBinding, TrackPath } from '../tracks/track';

const SPLIT_METHOD_ENABLED = TEST || EDITOR;
const SPLIT_METHOD_ENABLED = TEST || EDITOR || NODEJS;

const { ccclass, serializable } = _decorator;

Expand Down Expand Up @@ -625,19 +625,19 @@
binder: Binder,
) {
if (position) {
this._position = createExoticTrackEvaluationRecord(

Check failure on line 628 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected newline after '('
position.times, position.values, Vec3, path, 'position', binder,
);

Check failure on line 630 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected newline before ')'
}
if (rotation) {
this._rotation = createExoticTrackEvaluationRecord(

Check failure on line 633 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected newline after '('
rotation.times, rotation.values, Quat, path, 'rotation', binder,
);

Check failure on line 635 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected newline before ')'
}
if (scale) {
this._scale = createExoticTrackEvaluationRecord(

Check failure on line 638 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected newline after '('
scale.times, scale.values, Vec3, path, 'scale', binder,
);

Check failure on line 640 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected newline before ')'
}
}

Expand Down Expand Up @@ -936,8 +936,8 @@
let min = Number.POSITIVE_INFINITY;
let max = Number.NEGATIVE_INFINITY;
values.forEach((value) => {
min = Math.min(value, min);

Check failure on line 939 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unsafe argument of type `any` assigned to a parameter of type `number`
max = Math.max(value, max);

Check failure on line 940 in cocos/animation/exotic-animation/exotic-animation.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unsafe argument of type `any` assigned to a parameter of type `number`
});
const extent = max - min;
// Should consider `extent === 0.0`.
Expand Down
4 changes: 2 additions & 2 deletions cocos/asset/asset-manager/builtin-res-mgr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
THE SOFTWARE.
*/

import { EDITOR, EDITOR_NOT_IN_PREVIEW, TEST } from 'internal:constants';
import { EDITOR, EDITOR_NOT_IN_PREVIEW, NODEJS, TEST } from 'internal:constants';
import { Asset } from '../assets/asset';
import { ImageAsset, ImageSource } from '../assets/image-asset';
import { SpriteFrame } from '../../2d/assets/sprite-frame';
Expand Down Expand Up @@ -284,7 +284,7 @@ export class BuiltinResMgr {
resources[spriteFrame._uuid] = spriteFrame;
}

if (EDITOR) {
if (EDITOR || NODEJS) {
const builtinAssets = settings.querySettings<string[]>(SettingsCategory.ENGINE, 'builtinAssets');
const builtinBundle = new Bundle();
builtinBundle.init({
Expand Down
Loading
Loading