diff --git a/cc.config.json b/cc.config.json index dacad28ce8b..76b967b6e94 100644 --- a/cc.config.json +++ b/cc.config.json @@ -125,6 +125,9 @@ "MARIONETTE": true } }, + "_experimental-animation-internals": { + "modules": ["_experimental-animation-internals"] + }, "custom-pipeline": { "modules": ["custom-pipeline"] } }, "moduleOverrides": [ diff --git a/cocos/core/animation/_experimental-animation-internals.ts b/cocos/core/animation/_experimental-animation-internals.ts new file mode 100644 index 00000000000..e36b32f5b85 --- /dev/null +++ b/cocos/core/animation/_experimental-animation-internals.ts @@ -0,0 +1,5 @@ +// These bindings are exported for internal usages only. + +export { exoticAnimationTag } from './animation-clip'; +export { ExoticAnimation } from './exotic-animation/exotic-animation'; +export { RealArrayTrack } from './tracks/array-track'; diff --git a/cocos/core/animation/index.ts b/cocos/core/animation/index.ts index c6188e45311..8567e8a7dc4 100644 --- a/cocos/core/animation/index.ts +++ b/cocos/core/animation/index.ts @@ -31,7 +31,7 @@ legacyCC.easing = easing; export * from '../curves/bezier'; export { easing }; export * from './animation-curve'; -export { AnimationClip, exoticAnimationTag } from './animation-clip'; +export { AnimationClip } from './animation-clip'; export * from './animation-manager'; export { AnimationState, @@ -43,8 +43,3 @@ export { export * from './transform-utils'; export { animation }; export type { ILerpable } from './types'; - -// For runtime create animation clip. -export * from './exotic-animation/exotic-animation'; -export * from './tracks/track'; -export * from './tracks/array-track'; diff --git a/editor/engine-features/render-config.json b/editor/engine-features/render-config.json index 6f2f8eb65dc..3adafa1733f 100644 --- a/editor/engine-features/render-config.json +++ b/editor/engine-features/render-config.json @@ -229,6 +229,13 @@ "wechatPlugin": false, "category": "animation" }, + "_experimental-animation-internals": { + "default": [], + "label": "i18n:ENGINE.features._experimental_animation_internals.label", + "description": "i18n:ENGINE.features._experimental_animation_internals.description", + "wechatPlugin": false, + "category": "_experimental_internals" + }, "custom-pipeline": { "default": [], "label": "i18n:ENGINE.features.custom_pipeline.label", @@ -248,6 +255,10 @@ "animation": { "label": "i18n:ENGINE.features.categories.animation.label", "description": "i18n:ENGINE.features.categories.animation.description" + }, + "_experimental_internals": { + "label": "i18n:ENGINE.features.categories._experimental_internals.label", + "description": "i18n:ENGINE.features.categories._experimental_internals.description" } } } diff --git a/editor/i18n/en/localization.js b/editor/i18n/en/localization.js index 0dae920cc1e..c92ab9d35e3 100755 --- a/editor/i18n/en/localization.js +++ b/editor/i18n/en/localization.js @@ -782,6 +782,14 @@ module.exports = { label: 'Animation', description: 'Animation System.', }, + _experimental_internals: { + label: '(Experimental)Internal interfaces', + description: + '(Experimental)Export internal interfaces. ' + + 'Features under this category might be used by certain external libraries that are tightly related to engine. ' + + 'These features are highly coupled with engine editions, undocumented, and ' + + 'no compatibilities are guaranteed.', + }, }, core: { label: "Core", @@ -935,6 +943,10 @@ module.exports = { label: "Custom Render Pipeline (Experimental)", description: "Enable custom render pipeline", }, + _experimental_animation_internals: { + label: "(Experimental)Animation Internals", + description: "(Experimental)Export animation internal interfaces.", + }, }, renderable_2d: { srcBlendFactor: 'Specifies the source blend mode,
it will clone a new material object.', diff --git a/editor/i18n/zh/localization.js b/editor/i18n/zh/localization.js index 3b68368e219..9d707148f10 100755 --- a/editor/i18n/zh/localization.js +++ b/editor/i18n/zh/localization.js @@ -763,6 +763,12 @@ module.exports = { label: '动画', description: '动画系统。', }, + _experimental_internals: { + label: '(实验性)内部接口', + description: + '(实验性)导出内部接口。此分类下的功能可能会被某些与引擎紧密相关的外部库使用。' + + '这些功能和引擎版本高度耦合,无明确文档并不保证任何兼容性。', + }, }, core: { label: "核心功能", @@ -916,6 +922,10 @@ module.exports = { label: "自定义渲染管线(实验)", description: "启用自定义渲染管线。", }, + _experimental_animation_internals: { + label: "(实验性)内部动画接口", + description: "(实验性)导出内部动画接口。", + }, }, renderable_2d: { srcBlendFactor: '指定源的混合模式,这会克隆一个新的材质对象,注意这带来的性能和内存损耗', diff --git a/exports/_experimental-animation-internals.ts b/exports/_experimental-animation-internals.ts new file mode 100644 index 00000000000..df6f78ea84b --- /dev/null +++ b/exports/_experimental-animation-internals.ts @@ -0,0 +1,7 @@ +import legacyCC from '../predefine'; + +import * as internals from '../cocos/core/animation/_experimental-animation-internals'; + +Object.assign(legacyCC.internal, { + animation: internals, +});