Skip to content

Commit c41f379

Browse files
committed
add export
1 parent 40cbb7a commit c41f379

10 files changed

Lines changed: 93 additions & 1 deletion

File tree

cc.config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@
281281
],
282282
"dependentModules": ["custom-pipeline"]
283283
},
284+
"render-scene": {
285+
"modules": ["render-scene"],
286+
"dependentModules": ["custom-pipeline"]
287+
},
284288
"legacy-pipeline": {
285289
"modules": ["legacy-pipeline"],
286290
"dependentScripts": [

cocos/rendering/scene/index.jsb.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
Copyright (c) 2021-2026 Xiamen Yaji Software Co., Ltd.
3+
4+
https://www.cocos.com/
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights to
9+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10+
of the Software, and to permit persons to whom the Software is furnished to do so,
11+
subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
*/
24+
25+
declare const render_scene: any;
26+
27+
export * from './render-scene';

cocos/rendering/scene/index.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
Copyright (c) 2021-2026 Xiamen Yaji Software Co., Ltd.
3+
4+
https://www.cocos.com/
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights to
9+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10+
of the Software, and to permit persons to whom the Software is furnished to do so,
11+
subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
*/
24+
25+
export * from './render-scene';

editor/engine-features/render-config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,12 @@
483483
}
484484
}
485485
},
486+
"render-scene": {
487+
"default": false,
488+
"label": "i18n:ENGINE.features.render_scene.label",
489+
"description": "i18n:ENGINE.features.render_scene.description",
490+
"enginePlugin": false
491+
},
486492
"xr": {
487493
"default": false,
488494
"label": "i18n:ENGINE.features.xr.label",

editor/i18n/en/localization.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,10 @@ module.exports = link(mixin({
11211121
label: "Post Process Module (Deprecated)",
11221122
description: "The render pipeline used in previous versions. This pipeline will be deprecated in future versions.",
11231123
},
1124+
render_scene: {
1125+
label: "Render Scene (New)",
1126+
description: "The new data-oriented render scene.",
1127+
},
11241128
legacy_pipeline: {
11251129
label: "Render Pipeline (Legacy)",
11261130
description: "The render pipeline used in previous versions. This pipeline will be deprecated in future versions.",

editor/i18n/zh/localization.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,10 @@ module.exports = link(mixin({
10991099
label: "后处理模块(已废弃)",
11001100
description: "此选项用于兼容旧项目(Custom管线),新项目请使用 Builtin 自带的后处理流程。",
11011101
},
1102+
render_scene: {
1103+
label: "新渲染场景",
1104+
description: "新的面向数据的渲染场景。",
1105+
},
11021106
legacy_pipeline: {
11031107
label: "原渲染管线",
11041108
description: "原有的渲染管线,在后续的版本中会被移除。",

exports/render-scene.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2026 Zhenglong Zhou
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
import { legacyCC } from '../cocos/core/global-exports';
16+
import * as renderScene from '../cocos/rendering/scene';
17+
18+
export { renderScene };
19+
20+
legacyCC.renderScene = renderScene;

native/tools/swig-config/render-scene.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// target_namespace means the name exported to JS, could be same as which in other modules
33
// native2d at the last means the suffix of binding function name, different modules should use unique name
44
// Note: doesn't support number prefix
5-
%module(target_namespace="render") scene
5+
%module(target_namespace="render_scene") render_scene
66

77
// Disable some swig warnings, find warning number reference here ( https://www.swig.org/Doc4.1/Warnings.html )
88
#pragma SWIG nowarn=503,302,401,317,402

scripts/compile-native-ts.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ async function buildTsEngine () {
7171
// "marionette",
7272
'custom-pipeline',
7373
'legacy-pipeline',
74+
'render-scene',
7475
// "light-probe",
7576
],
7677
mode: 'BUILD',

typedoc-index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export * from './exports/physics-2d-framework';
2222
export * from './exports/physics-framework';
2323
export * from './exports/primitive';
2424
export * from './exports/profiler';
25+
export * from './exports/render-scene';
2526
export * from './exports/rich-text';
2627
export * from './exports/skeletal-animation';
2728
export * from './exports/sorting';

0 commit comments

Comments
 (0)