From fbde8d1e90293203330c4029e8bcd6ff2ec652dc Mon Sep 17 00:00:00 2001 From: PP Date: Tue, 28 Dec 2021 11:48:10 +0800 Subject: [PATCH] use lagacyPublic to marked deprecated public interface (#9859) * use lagacy-public * publish beta6 * remove jsDoc tag from constructor * use legacyPublic * publish beta 7 --- cocos/2d/assets/sprite-atlas.ts | 4 +- cocos/2d/assets/sprite-frame.ts | 14 +++--- cocos/2d/assets/ttf-font.ts | 6 +-- cocos/2d/components/label.ts | 2 +- cocos/2d/components/mask.ts | 4 +- cocos/2d/components/sprite.ts | 4 +- cocos/2d/components/ui-static-batch.ts | 2 +- cocos/2d/framework/renderable-2d.ts | 2 +- cocos/2d/framework/ui-transform.ts | 6 +-- cocos/2d/renderer/render-uniform-buffer.ts | 2 +- cocos/3d/assets/mesh.ts | 2 +- cocos/3d/framework/mesh-renderer.ts | 2 +- cocos/3d/models/skinning-model.ts | 2 +- .../skinned-mesh-batch-renderer.ts | 4 +- cocos/audio/audio-clip.ts | 4 +- cocos/core/animation/animation-clip.ts | 8 +-- cocos/core/animation/animation-state.ts | 2 +- .../animation/compression/compressed-data.ts | 2 +- .../exotic-animation/exotic-animation.ts | 10 ++-- .../animation/marionette/animation-graph.ts | 11 +--- .../core/animation/marionette/clip-motion.ts | 2 +- cocos/core/animation/marionette/graph-eval.ts | 2 +- cocos/core/animation/marionette/state.ts | 3 -- cocos/core/animation/motion-path-helper.ts | 2 +- cocos/core/animation/tracks/track.ts | 2 +- cocos/core/asset-manager/bundle.ts | 2 +- cocos/core/asset-manager/depend-util.ts | 2 +- cocos/core/asset-manager/deprecated.ts | 4 +- cocos/core/asset-manager/release-manager.ts | 6 +-- cocos/core/assets/asset.ts | 12 ++--- cocos/core/assets/buffer-asset.ts | 2 +- cocos/core/assets/image-asset.ts | 6 +-- cocos/core/assets/render-texture.ts | 4 +- cocos/core/assets/texture-2d.ts | 6 +-- cocos/core/assets/texture-base.ts | 4 +- cocos/core/assets/texture-cube.ts | 6 +-- cocos/core/components/camera-component.ts | 2 +- .../components/component-event-handler.ts | 4 +- cocos/core/components/component.ts | 18 +++---- cocos/core/components/missing-script.ts | 2 +- cocos/core/components/renderable-component.ts | 2 +- cocos/core/data/custom-serializable.ts | 6 +-- cocos/core/data/gc-object.ts | 2 +- cocos/core/data/object.ts | 8 +-- cocos/core/director.ts | 4 +- cocos/core/event/callbacks-invoker.ts | 2 +- cocos/core/game.ts | 10 ++-- cocos/core/geometry/curve.ts | 2 +- cocos/core/math/color.ts | 10 ++-- cocos/core/memop/scalable-container.ts | 2 +- cocos/core/pipeline/geometry-renderer.ts | 12 ++--- cocos/core/pipeline/shadow/shadow-flow.ts | 2 +- cocos/core/platform/view.ts | 4 +- cocos/core/root.ts | 4 +- cocos/core/scene-graph/base-node.ts | 8 +-- cocos/core/scene-graph/component-scheduler.ts | 4 +- cocos/core/scene-graph/node.ts | 14 +++--- cocos/core/scene-graph/scene-globals.ts | 2 +- cocos/core/scene-graph/scene.ts | 6 +-- cocos/core/utils/js-typed.ts | 10 ++-- cocos/core/utils/js.ts | 12 ++--- cocos/core/utils/pool.ts | 2 +- cocos/dragon-bones/ArmatureDisplay.ts | 4 +- cocos/dragon-bones/CCSlot.ts | 10 ++-- cocos/particle-2d/motion-streak-2d.ts | 2 +- cocos/particle-2d/particle-system-2d.ts | 20 ++++---- cocos/particle/animator/curve-range.ts | 2 +- cocos/particle/animator/gradient-range.ts | 2 +- cocos/particle/emitter/shape-module.ts | 2 +- cocos/particle/particle-system.ts | 8 +-- cocos/particle/renderer/trail.ts | 8 +-- cocos/physics/framework/physics-ray-result.ts | 2 +- cocos/profiler/profiler.ts | 2 +- cocos/spine/skeleton-cache.ts | 2 +- cocos/spine/skeleton-data.ts | 4 +- cocos/spine/skeleton.ts | 22 ++++---- cocos/terrain/terrain-asset.ts | 12 ++--- cocos/terrain/terrain-lod.ts | 8 +-- cocos/terrain/terrain.ts | 50 +++++++++---------- cocos/tiledmap/tiled-layer.ts | 2 +- cocos/tiledmap/tiled-object-group.ts | 2 +- cocos/ui/editbox/edit-box-impl-base.ts | 4 +- cocos/ui/editbox/edit-box-impl.ts | 16 +++--- cocos/ui/editbox/edit-box.ts | 16 +++--- cocos/ui/page-view-indicator.ts | 8 +-- cocos/ui/toggle.ts | 2 +- cocos/ui/widget.ts | 18 +++---- cocos/video/assets/video-clip.ts | 2 +- package-lock.json | 6 +-- package.json | 2 +- pal/audio/minigame/player-minigame.ts | 4 +- pal/audio/minigame/player-web.ts | 4 +- pal/audio/native/player.ts | 4 +- pal/audio/web/player-dom.ts | 4 +- pal/audio/web/player-web.ts | 4 +- scripts/build-engine/package.json | 2 +- .../src/build-declarations/index.ts | 4 +- 97 files changed, 282 insertions(+), 294 deletions(-) diff --git a/cocos/2d/assets/sprite-atlas.ts b/cocos/2d/assets/sprite-atlas.ts index 5b698f7b82..1c94726148 100644 --- a/cocos/2d/assets/sprite-atlas.ts +++ b/cocos/2d/assets/sprite-atlas.ts @@ -107,7 +107,7 @@ export class SpriteAtlas extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _serialize (ctxForExporting: any): any { if (EDITOR || TEST) { @@ -130,7 +130,7 @@ export class SpriteAtlas extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _deserialize (serializeData: any, handle: any) { const data = serializeData as ISpriteAtlasSerializeData; diff --git a/cocos/2d/assets/sprite-frame.ts b/cocos/2d/assets/sprite-frame.ts index 0d2a270a9f..7be186de1b 100644 --- a/cocos/2d/assets/sprite-frame.ts +++ b/cocos/2d/assets/sprite-frame.ts @@ -805,7 +805,7 @@ export class SpriteFrame extends Asset { /** * Calculate UV for sliced - * @marked_as_engine_private + * @legacyPublic */ public _calculateSlicedUV () { if (UI_GPU_DRIVEN) { @@ -870,7 +870,7 @@ export class SpriteFrame extends Asset { /** * Calculate UV - * @marked_as_engine_private + * @legacyPublic */ public _calculateUV () { const rect = this._rect; @@ -1113,7 +1113,7 @@ export class SpriteFrame extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _setDynamicAtlasFrame (frame) { if (!frame) return; @@ -1131,7 +1131,7 @@ export class SpriteFrame extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _resetDynamicAtlasFrame () { if (!this._original) return; @@ -1143,7 +1143,7 @@ export class SpriteFrame extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _checkPackable () { const dynamicAtlas = dynamicAtlasManager; @@ -1169,7 +1169,7 @@ export class SpriteFrame extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _serialize (ctxForExporting: any): any { if (EDITOR || TEST) { @@ -1215,7 +1215,7 @@ export class SpriteFrame extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _deserialize (serializeData: any, handle: any) { const data = serializeData as ISpriteFramesSerializeData; diff --git a/cocos/2d/assets/ttf-font.ts b/cocos/2d/assets/ttf-font.ts index 156c7e4072..f17cec14ce 100644 --- a/cocos/2d/assets/ttf-font.ts +++ b/cocos/2d/assets/ttf-font.ts @@ -41,13 +41,13 @@ import { legacyCC } from '../../core/global-exports'; @ccclass('cc.TTFFont') export class TTFFont extends Font { /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _fontFamily: string | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ @override @string @@ -59,7 +59,7 @@ export class TTFFont extends Font { } /** - * @marked_as_engine_private + * @legacyPublic */ @override get _nativeDep () { diff --git a/cocos/2d/components/label.ts b/cocos/2d/components/label.ts index b3cff90705..c084511236 100644 --- a/cocos/2d/components/label.ts +++ b/cocos/2d/components/label.ts @@ -637,7 +637,7 @@ export class Label extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ get _bmFontOriginalSize () { if (this._font instanceof BitmapFont) { diff --git a/cocos/2d/components/mask.ts b/cocos/2d/components/mask.ts index da7418c1e0..58baf09c0c 100644 --- a/cocos/2d/components/mask.ts +++ b/cocos/2d/components/mask.ts @@ -328,11 +328,11 @@ export class Mask extends Renderable2D { public static Type = MaskType; /** - * @marked_as_engine_private + * @legacyPublic */ public _clearStencilMtl: Material | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _clearModel: Model | null = null; diff --git a/cocos/2d/components/sprite.ts b/cocos/2d/components/sprite.ts index 8e7acaf3b2..ba927e1722 100644 --- a/cocos/2d/components/sprite.ts +++ b/cocos/2d/components/sprite.ts @@ -753,7 +753,7 @@ export class Sprite extends Renderable2D { // macro.UI_GPU_DRIVEN /** - * @marked_as_engine_private + * @legacyPublic */ public _calculateSlicedData (out: number[]) { const content = this.node._uiProps.uiTransformComp!.contentSize; @@ -786,7 +786,7 @@ export class Sprite extends Renderable2D { // macro.UI_GPU_DRIVEN /** - * @marked_as_engine_private + * @legacyPublic */ public _updateUVWithTrim () { this.tillingOffsetWithTrim.length = 0; diff --git a/cocos/2d/components/ui-static-batch.ts b/cocos/2d/components/ui-static-batch.ts index 29b1bd2d96..fbe54b228b 100644 --- a/cocos/2d/components/ui-static-batch.ts +++ b/cocos/2d/components/ui-static-batch.ts @@ -160,7 +160,7 @@ export class UIStaticBatch extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _requireDrawBatch () { const batch = new DrawBatch2D(); diff --git a/cocos/2d/framework/renderable-2d.ts b/cocos/2d/framework/renderable-2d.ts index 6dd0a21646..435ebf99dd 100644 --- a/cocos/2d/framework/renderable-2d.ts +++ b/cocos/2d/framework/renderable-2d.ts @@ -446,7 +446,7 @@ export class Renderable2D extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateBlendFunc () { // todo: Not only Pass[0].target[0] diff --git a/cocos/2d/framework/ui-transform.ts b/cocos/2d/framework/ui-transform.ts index 8d0021abb6..6c125348ee 100644 --- a/cocos/2d/framework/ui-transform.ts +++ b/cocos/2d/framework/ui-transform.ts @@ -256,15 +256,15 @@ export class UITransform extends Component { // macro.UI_GPU_DRIVEN /** - * @marked_as_engine_private + * @legacyPublic */ declare public _rectDirty: boolean; /** - * @marked_as_engine_private + * @legacyPublic */ declare public _rectWithScale: Vec3; /** - * @marked_as_engine_private + * @legacyPublic */ declare public _anchorCache: Vec3; diff --git a/cocos/2d/renderer/render-uniform-buffer.ts b/cocos/2d/renderer/render-uniform-buffer.ts index cb4b742ea0..816c0bc5d4 100644 --- a/cocos/2d/renderer/render-uniform-buffer.ts +++ b/cocos/2d/renderer/render-uniform-buffer.ts @@ -178,7 +178,7 @@ interface ILocalBuffers { export class UILocalUBOManger { /** - * @marked_as_engine_private + * @legacyPublic */ public _localBuffers: ILocalBuffers[] = []; // UIPerUBO -> buffer[] private _device: Device; diff --git a/cocos/3d/assets/mesh.ts b/cocos/3d/assets/mesh.ts index 2a9d3d42fd..a0f40f5778 100644 --- a/cocos/3d/assets/mesh.ts +++ b/cocos/3d/assets/mesh.ts @@ -184,7 +184,7 @@ const globalEmptyMeshBuffer = new Uint8Array(); @ccclass('cc.Mesh') export class Mesh extends Asset { /** - * @marked_as_engine_private + * @legacyPublic */ get _nativeAsset (): ArrayBuffer { return this._data.buffer; diff --git a/cocos/3d/framework/mesh-renderer.ts b/cocos/3d/framework/mesh-renderer.ts index 5d87fd5e20..679d23067b 100644 --- a/cocos/3d/framework/mesh-renderer.ts +++ b/cocos/3d/framework/mesh-renderer.ts @@ -399,7 +399,7 @@ export class MeshRenderer extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateLightmap (lightmap: Texture2D|null, uOff: number, vOff: number, uScale: number, vScale: number) { this.lightmapSettings.texture = lightmap; diff --git a/cocos/3d/models/skinning-model.ts b/cocos/3d/models/skinning-model.ts index 209c4da51e..3f12b89de8 100644 --- a/cocos/3d/models/skinning-model.ts +++ b/cocos/3d/models/skinning-model.ts @@ -218,7 +218,7 @@ export class SkinningModel extends MorphModel { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateLocalDescriptors (submodelIdx: number, descriptorSet: DescriptorSet) { super._updateLocalDescriptors(submodelIdx, descriptorSet); diff --git a/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts b/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts index 793389f65c..f601042fc1 100644 --- a/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts +++ b/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts @@ -73,7 +73,7 @@ export class SkinnedMeshUnit { public material: Material | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _localTransform = new Mat4(); @@ -213,7 +213,7 @@ export class SkinnedMeshBatchRenderer extends SkinnedMeshRenderer { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onMaterialModified (idx: number, material: Material | null) { this.cookMaterials(); diff --git a/cocos/audio/audio-clip.ts b/cocos/audio/audio-clip.ts index 3c494ec541..a0a326e62a 100644 --- a/cocos/audio/audio-clip.ts +++ b/cocos/audio/audio-clip.ts @@ -73,7 +73,7 @@ export class AudioClip extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ set _nativeAsset (meta: AudioMeta | null) { this._meta = meta; @@ -91,7 +91,7 @@ export class AudioClip extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ @override get _nativeDep () { diff --git a/cocos/core/animation/animation-clip.ts b/cocos/core/animation/animation-clip.ts index f59b3b2f94..44b933b987 100644 --- a/cocos/core/animation/animation-clip.ts +++ b/cocos/core/animation/animation-clip.ts @@ -139,7 +139,7 @@ export class AnimationClip extends Asset { /** * Sets if node TRS curves in this animation can be blended. * Normally this flag is enabled for model animation and disabled for other case. - * @marked_as_engine_private This is an internal slot. Never use it in your code. + * @legacyPublic This is an internal slot. Never use it in your code. */ @serializable public enableTrsBlending = false; @@ -286,7 +286,7 @@ export class AnimationClip extends Asset { * Creates an event evaluator for this animation. * @param targetNode Target node used to fire events. * @returns - * @marked_as_engine_private Do not use this in your code. + * @legacyPublic Do not use this in your code. */ public createEventEvaluator (targetNode: Node) { return new EventEvaluator( @@ -301,7 +301,7 @@ export class AnimationClip extends Asset { * Creates an evaluator for this animation. * @param context The context. * @returns The evaluator. - * @marked_as_engine_private Do not use this in your code. + * @legacyPublic Do not use this in your code. */ public createEvaluator (context: AnimationClipEvalContext) { const { @@ -407,7 +407,7 @@ export class AnimationClip extends Asset { /** * Convert all untyped tracks into typed ones and delete the original. * @param refine How to decide the type on specified path. - * @marked_as_engine_private DO NOT USE THIS IN YOUR CODE. + * @legacyPublic DO NOT USE THIS IN YOUR CODE. */ public upgradeUntypedTracks (refine: UntypedTrackRefine) { const newTracks: Track[] = []; diff --git a/cocos/core/animation/animation-state.ts b/cocos/core/animation/animation-state.ts index c3c36ab284..eec9839565 100644 --- a/cocos/core/animation/animation-state.ts +++ b/cocos/core/animation/animation-state.ts @@ -441,7 +441,7 @@ export class AnimationState extends Playable { /** * This method is used for internal purpose only. - * @marked_as_engine_private + * @legacyPublic */ public _setEventTarget (target) { this._target = target; diff --git a/cocos/core/animation/compression/compressed-data.ts b/cocos/core/animation/compression/compressed-data.ts index 9ec73f3826..6fcb88205c 100644 --- a/cocos/core/animation/compression/compressed-data.ts +++ b/cocos/core/animation/compression/compressed-data.ts @@ -175,7 +175,7 @@ export class CompressedData { } /** - * @marked_as_engine_private + * @legacyPublic */ public _addQuatCurve (curve: QuatCurve): CompressedQuatCurvePointer { const times = Array.from(curve.times()); diff --git a/cocos/core/animation/exotic-animation/exotic-animation.ts b/cocos/core/animation/exotic-animation/exotic-animation.ts index bd8dab5370..2c14af0e5f 100644 --- a/cocos/core/animation/exotic-animation/exotic-animation.ts +++ b/cocos/core/animation/exotic-animation/exotic-animation.ts @@ -50,7 +50,7 @@ export class ExoticAnimation { } /** - * @marked_as_engine_private + * @legacyPublic */ public toHashString () { return this._nodeAnimations.map((nodeAnimation) => nodeAnimation.toHashString()).join('\n'); @@ -116,7 +116,7 @@ class ExoticNodeAnimation { } /** - * @marked_as_engine_private + * @legacyPublic */ public toHashString (): string { return `${this._path}\n${ @@ -183,7 +183,7 @@ class ExoticVectorLikeTrackValues { } /** - * @marked_as_engine_private + * @legacyPublic */ public toHashString (): string { const { _isQuantized: isQuantized, _values: values } = this; @@ -305,7 +305,7 @@ class ExoticTrack { public values!: TTrackValues; /** - * @marked_as_engine_private + * @legacyPublic */ public toHashString (): string { const { times, values } = this; @@ -802,7 +802,7 @@ class QuantizedFloatArray { } /** - * @marked_as_engine_private + * @legacyPublic */ public toHashString (): string { const { originalPrecision, min, extent, values } = this; diff --git a/cocos/core/animation/marionette/animation-graph.ts b/cocos/core/animation/marionette/animation-graph.ts index 1288793e21..475e0e47fc 100644 --- a/cocos/core/animation/marionette/animation-graph.ts +++ b/cocos/core/animation/marionette/animation-graph.ts @@ -44,9 +44,6 @@ class Transition extends EditorExtendable implements OwnedBy, Tran @serializable public conditions: Condition[] = []; - /** - * @marked_as_engine_private - */ constructor (from: State, to: State, conditions?: Condition[]) { super(); this.from = from; @@ -130,7 +127,7 @@ export class StateMachine extends EditorExtendable { /** * // TODO: HACK - * @marked_as_engine_private + * @legacyPublic */ public __callOnAfterDeserializeRecursive () { this[onAfterDeserializedTag](); @@ -143,9 +140,6 @@ export class StateMachine extends EditorExtendable { } } - /** - * @marked_as_engine_private - */ constructor () { super(); this._entryState = this._addState(new State()); @@ -481,9 +475,6 @@ export class Layer implements OwnedBy { @serializable public blending: LayerBlending = LayerBlending.additive; - /** - * @marked_as_engine_private - */ constructor () { this._stateMachine = new StateMachine(); } diff --git a/cocos/core/animation/marionette/clip-motion.ts b/cocos/core/animation/marionette/clip-motion.ts index e82baa0690..9e8e33ef98 100644 --- a/cocos/core/animation/marionette/clip-motion.ts +++ b/cocos/core/animation/marionette/clip-motion.ts @@ -25,7 +25,7 @@ export class ClipMotion extends EditorExtendable implements Motion { class ClipMotionEval implements MotionEval { /** - * @marked_as_engine_private + * @legacyPublic */ public declare __DEBUG__ID__?: string; diff --git a/cocos/core/animation/marionette/graph-eval.ts b/cocos/core/animation/marionette/graph-eval.ts index b2cec66827..7c1a15150b 100644 --- a/cocos/core/animation/marionette/graph-eval.ts +++ b/cocos/core/animation/marionette/graph-eval.ts @@ -965,7 +965,7 @@ enum NodeKind { export class StateEval { /** - * @marked_as_engine_private + * @legacyPublic */ public declare __DEBUG_ID__?: string; diff --git a/cocos/core/animation/marionette/state.ts b/cocos/core/animation/marionette/state.ts index 7eee37a635..75cca344e5 100644 --- a/cocos/core/animation/marionette/state.ts +++ b/cocos/core/animation/marionette/state.ts @@ -22,9 +22,6 @@ export class State extends EditorExtendable implements OwnedBy = new Cache(); diff --git a/cocos/core/asset-manager/deprecated.ts b/cocos/core/asset-manager/deprecated.ts index 6c1fc64507..4f1d856b44 100644 --- a/cocos/core/asset-manager/deprecated.ts +++ b/cocos/core/asset-manager/deprecated.ts @@ -107,13 +107,13 @@ export class CCLoader { } /** - * @marked_as_engine_private + * @legacyPublic */ public _autoReleaseSetting: Record = Object.create(null); private _parseLoadResArgs = parseLoadResArgs; /** - * @marked_as_engine_private + * @legacyPublic */ public get _cache (): Record { if (assets instanceof Cache) { diff --git a/cocos/core/asset-manager/release-manager.ts b/cocos/core/asset-manager/release-manager.ts index 49ba6802f5..d7c6c1c271 100644 --- a/cocos/core/asset-manager/release-manager.ts +++ b/cocos/core/asset-manager/release-manager.ts @@ -129,7 +129,7 @@ class ReleaseManager { } /** - * @marked_as_engine_private + * @legacyPublic */ public _addPersistNodeRef (node: Node) { const deps = []; @@ -144,7 +144,7 @@ class ReleaseManager { } /** - * @marked_as_engine_private + * @legacyPublic */ public _removePersistNodeRef (node: Node) { if (!this._persistNodeDeps.has(node.uuid)) { return; } @@ -161,7 +161,7 @@ class ReleaseManager { // do auto release /** - * @marked_as_engine_private + * @legacyPublic */ public _autoRelease (oldScene: Scene, newScene: Scene, persistNodes: Record) { if (oldScene) { diff --git a/cocos/core/assets/asset.ts b/cocos/core/assets/asset.ts index 46d157fb64..d1677a7b79 100644 --- a/cocos/core/assets/asset.ts +++ b/cocos/core/assets/asset.ts @@ -85,7 +85,7 @@ export class Asset extends Eventify(GCObject) { public loaded = true; /** - * @marked_as_engine_private + * @legacyPublic */ public declare _uuid: string; @@ -98,12 +98,12 @@ export class Asset extends Eventify(GCObject) { * 用于本机资产的可序列化URL。供内部使用。 * @default "" * - * @marked_as_engine_private + * @legacyPublic */ @serializable public _native = ''; /** - * @marked_as_engine_private + * @legacyPublic */ public _nativeUrl = ''; @@ -146,7 +146,7 @@ export class Asset extends Eventify(GCObject) { * 此资源的基础资源(如果有)。 此属性可用于访问与资源相关的其他详细信息或功能。
* 如果`_native`可用,则此属性将由加载器初始化。 * @default null - * @marked_as_engine_private + * @legacyPublic */ @property get _nativeAsset () { @@ -219,7 +219,7 @@ export class Asset extends Eventify(GCObject) { * * @param filename * @param inLibrary - * @marked_as_engine_private + * @legacyPublic */ public _setRawAsset (filename: string, inLibrary = true) { if (inLibrary !== false) { @@ -240,7 +240,7 @@ export class Asset extends Eventify(GCObject) { public createNode? (callback: CreateNodeCallback): void; /** - * @marked_as_engine_private + * @legacyPublic */ public get _nativeDep () { if (this._native) { diff --git a/cocos/core/assets/buffer-asset.ts b/cocos/core/assets/buffer-asset.ts index 1213d1e8f7..d04f4b5332 100644 --- a/cocos/core/assets/buffer-asset.ts +++ b/cocos/core/assets/buffer-asset.ts @@ -37,7 +37,7 @@ export class BufferAsset extends Asset { private _buffer: ArrayBuffer | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ @override get _nativeAsset () { diff --git a/cocos/core/assets/image-asset.ts b/cocos/core/assets/image-asset.ts index d299233725..e22b5f6a18 100644 --- a/cocos/core/assets/image-asset.ts +++ b/cocos/core/assets/image-asset.ts @@ -83,7 +83,7 @@ function isNativeImage (imageSource: ImageSource): imageSource is (HTMLImageElem @ccclass('cc.ImageAsset') export class ImageAsset extends Asset { /** - * @marked_as_engine_private + * @legacyPublic */ @override get _nativeAsset () { @@ -218,7 +218,7 @@ export class ImageAsset extends Asset { // SERIALIZATION /** - * @marked_as_engine_private + * @legacyPublic */ // eslint-disable-next-line consistent-return public _serialize () { @@ -247,7 +247,7 @@ export class ImageAsset extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _deserialize (data: any) { let fmtStr = ''; diff --git a/cocos/core/assets/render-texture.ts b/cocos/core/assets/render-texture.ts index 5f462189b2..4c4adacf81 100644 --- a/cocos/core/assets/render-texture.ts +++ b/cocos/core/assets/render-texture.ts @@ -114,7 +114,7 @@ export class RenderTexture extends TextureBase { } /** - * @marked_as_engine_private + * @legacyPublic */ public _serialize (ctxForExporting: any): any { if (EDITOR || TEST) { @@ -124,7 +124,7 @@ export class RenderTexture extends TextureBase { } /** - * @marked_as_engine_private + * @legacyPublic */ public _deserialize (serializedData: any, handle: any) { const data = serializedData; diff --git a/cocos/core/assets/texture-2d.ts b/cocos/core/assets/texture-2d.ts index 2623cfbee3..485b6cdc41 100644 --- a/cocos/core/assets/texture-2d.ts +++ b/cocos/core/assets/texture-2d.ts @@ -125,7 +125,7 @@ export class Texture2D extends SimpleTexture { } /** - * @marked_as_engine_private + * @legacyPublic */ @type([ImageAsset]) public _mipmaps: ImageAsset[] = []; @@ -232,7 +232,7 @@ export class Texture2D extends SimpleTexture { } /** - * @marked_as_engine_private + * @legacyPublic */ public _serialize (ctxForExporting: any) { if (EDITOR || TEST) { @@ -254,7 +254,7 @@ export class Texture2D extends SimpleTexture { } /** - * @marked_as_engine_private + * @legacyPublic */ public _deserialize (serializedData: any, handle: any) { const data = serializedData as ITexture2DSerializeData; diff --git a/cocos/core/assets/texture-base.ts b/cocos/core/assets/texture-base.ts index f30c17cd21..2f5ebb9271 100644 --- a/cocos/core/assets/texture-base.ts +++ b/cocos/core/assets/texture-base.ts @@ -287,7 +287,7 @@ export class TextureBase extends Asset { // SERIALIZATION /** - * @marked_as_engine_private + * @legacyPublic */ public _serialize (ctxForExporting: any): any { if (EDITOR || TEST) { @@ -299,7 +299,7 @@ export class TextureBase extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _deserialize (serializedData: any, handle: any) { const data = serializedData as string; diff --git a/cocos/core/assets/texture-cube.ts b/cocos/core/assets/texture-cube.ts index 676bd5a8c7..b5cbae720c 100644 --- a/cocos/core/assets/texture-cube.ts +++ b/cocos/core/assets/texture-cube.ts @@ -169,7 +169,7 @@ export class TextureCube extends SimpleTexture { } /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _mipmaps: ITextureCubeMipmap[] = []; @@ -229,7 +229,7 @@ export class TextureCube extends SimpleTexture { } /** - * @marked_as_engine_private + * @legacyPublic */ public _serialize (ctxForExporting: any): Record | null { if (EDITOR || TEST) { @@ -257,7 +257,7 @@ export class TextureCube extends SimpleTexture { } /** - * @marked_as_engine_private + * @legacyPublic */ public _deserialize (serializedData: ITextureCubeSerializeData, handle: any) { const data = serializedData; diff --git a/cocos/core/components/camera-component.ts b/cocos/core/components/camera-component.ts index cb434a5fb3..f1374a950d 100644 --- a/cocos/core/components/camera-component.ts +++ b/cocos/core/components/camera-component.ts @@ -532,7 +532,7 @@ export class Camera extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _createCamera () { if (!this._camera) { diff --git a/cocos/core/components/component-event-handler.ts b/cocos/core/components/component-event-handler.ts index 7332df18c6..0952fd2047 100644 --- a/cocos/core/components/component-event-handler.ts +++ b/cocos/core/components/component-event-handler.ts @@ -64,7 +64,7 @@ import { legacyCC } from '../global-exports'; @ccclass('cc.ClickEvent') export class EventHandler { /** - * @marked_as_engine_private + * @legacyPublic */ get _componentName () { this._genCompIdIfNeeded(); @@ -118,7 +118,7 @@ export class EventHandler { public component = ''; /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _componentId = ''; diff --git a/cocos/core/components/component.ts b/cocos/core/components/component.ts index 2b5f012243..0474cc49f1 100644 --- a/cocos/core/components/component.ts +++ b/cocos/core/components/component.ts @@ -96,7 +96,7 @@ class Component extends CCObject { } /** - * @marked_as_engine_private + * @legacyPublic */ @displayName('Script') @type(Script) @@ -156,7 +156,7 @@ class Component extends CCObject { * log(this._isOnLoadCalled > 0); * ``` * - * @marked_as_engine_private + * @legacyPublic */ get _isOnLoadCalled () { return this._objFlags & IsOnLoadCalled; @@ -176,32 +176,32 @@ class Component extends CCObject { public node: Node = NullNode; /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _enabled = true; /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public __prefab: CompPrefabInfo | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _sceneGetter: null | (() => RenderScene) = null; /** * For internal usage. - * @marked_as_engine_private + * @legacyPublic */ public _id: string = idGenerator.getNewId(); // private __scriptUuid = ''; /** - * @marked_as_engine_private + * @legacyPublic */ public _getRenderScene (): RenderScene { if (this._sceneGetter) { @@ -379,7 +379,7 @@ class Component extends CCObject { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onPreDestroy () { // Schedules @@ -399,7 +399,7 @@ class Component extends CCObject { } /** - * @marked_as_engine_private + * @legacyPublic */ public _instantiate (cloned?: Component) { if (!cloned) { diff --git a/cocos/core/components/missing-script.ts b/cocos/core/components/missing-script.ts index d0dc19f173..5acc8940e4 100644 --- a/cocos/core/components/missing-script.ts +++ b/cocos/core/components/missing-script.ts @@ -72,7 +72,7 @@ export default class MissingScript extends Component { // the serialized data for original script object /** - * @marked_as_engine_private + * @legacyPublic */ @serializable @editorOnly diff --git a/cocos/core/components/renderable-component.ts b/cocos/core/components/renderable-component.ts index e847d3bf08..3c35c6cb7f 100644 --- a/cocos/core/components/renderable-component.ts +++ b/cocos/core/components/renderable-component.ts @@ -225,7 +225,7 @@ export class RenderableComponent extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _collectModels (): scene.Model[] { return this._models; diff --git a/cocos/core/data/custom-serializable.ts b/cocos/core/data/custom-serializable.ts index 7ac396d723..106f6ca59a 100644 --- a/cocos/core/data/custom-serializable.ts +++ b/cocos/core/data/custom-serializable.ts @@ -2,13 +2,13 @@ import { assertIsNonNullable, assertIsTrue } from './utils/asserts'; /** * Tag to define the custom serialization method. - * @marked_as_engine_private + * @legacyPublic */ export const serializeTag = Symbol('[[Serialize]]'); /** * Tag to define the custom deserialization method. - * @marked_as_engine_private + * @legacyPublic */ export const deserializeTag = Symbol('[[Deserialize]]'); @@ -82,7 +82,7 @@ export interface CustomSerializable { /** * Enables the custom serialize/deserialize method only if the (de)serialize procedure is targeting CCON. - * @marked_as_engine_private + * @legacyPublic */ export const enableIfCCON: MethodDecorator = ( // eslint-disable-next-line @typescript-eslint/ban-types diff --git a/cocos/core/data/gc-object.ts b/cocos/core/data/gc-object.ts index cd42f71b8c..249dde5b58 100644 --- a/cocos/core/data/gc-object.ts +++ b/cocos/core/data/gc-object.ts @@ -26,7 +26,7 @@ import { CCObject } from './object'; @ccclass('cc.GCObject') export class GCObject extends CCObject { /** - * @marked_as_engine_private + * @legacyPublic */ public declare _finalizationToken: any; diff --git a/cocos/core/data/object.ts b/cocos/core/data/object.ts index 663950566c..47a9a01ee5 100644 --- a/cocos/core/data/object.ts +++ b/cocos/core/data/object.ts @@ -195,12 +195,12 @@ class CCObject implements EditorExtendableObject { } /** - * @marked_as_engine_private + * @legacyPublic */ public declare [editorExtrasTag]: unknown; /** - * @marked_as_engine_private + * @legacyPublic */ public _objFlags: number; protected _name: string; @@ -345,7 +345,7 @@ class CCObject implements EditorExtendableObject { * } * } * - * @marked_as_engine_private + * @legacyPublic */ public _destruct () { const ctor: any = this.constructor; @@ -358,7 +358,7 @@ class CCObject implements EditorExtendableObject { } /** - * @marked_as_engine_private + * @legacyPublic */ public _destroyImmediate () { if (this._objFlags & Destroyed) { diff --git a/cocos/core/director.ts b/cocos/core/director.ts index 279ff5ac90..8b2257a440 100644 --- a/cocos/core/director.ts +++ b/cocos/core/director.ts @@ -202,11 +202,11 @@ export class Director extends EventTarget { public static instance: Director; /** - * @marked_as_engine_private + * @legacyPublic */ public _compScheduler: ComponentScheduler; /** - * @marked_as_engine_private + * @legacyPublic */ public _nodeActivator: NodeActivator; private _invalid: boolean; diff --git a/cocos/core/event/callbacks-invoker.ts b/cocos/core/event/callbacks-invoker.ts index a63c20105a..34e0409c75 100644 --- a/cocos/core/event/callbacks-invoker.ts +++ b/cocos/core/event/callbacks-invoker.ts @@ -186,7 +186,7 @@ type EventType = string | number; */ export class CallbacksInvoker { /** - * @marked_as_engine_private + * @legacyPublic */ public _callbackTable: ICallbackTable = createMap(true); private _offCallback?: () => void; diff --git a/cocos/core/game.ts b/cocos/core/game.ts index 770b4b4c42..1bcec7942f 100644 --- a/cocos/core/game.ts +++ b/cocos/core/game.ts @@ -390,25 +390,25 @@ export class Game extends EventTarget { public groupList: any[] = []; /** - * @marked_as_engine_private + * @legacyPublic */ public _persistRootNodes = {}; /** - * @marked_as_engine_private + * @legacyPublic */ public _gfxDevice: Device | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _swapchain: Swapchain | null = null; // states /** - * @marked_as_engine_private + * @legacyPublic */ public _configLoaded = false; // whether config loaded /** - * @marked_as_engine_private + * @legacyPublic */ public _isCloning = false; // deserializing or instantiating private _inited = false; diff --git a/cocos/core/geometry/curve.ts b/cocos/core/geometry/curve.ts index 505f577f64..a35b5eedcf 100644 --- a/cocos/core/geometry/curve.ts +++ b/cocos/core/geometry/curve.ts @@ -122,7 +122,7 @@ export class AnimationCurve { /** * For internal usage only. - * @marked_as_engine_private + * @legacyPublic */ get _internalCurve () { return this._curve; diff --git a/cocos/core/math/color.ts b/cocos/core/math/color.ts index c44a771855..4666803cb0 100644 --- a/cocos/core/math/color.ts +++ b/cocos/core/math/color.ts @@ -301,7 +301,7 @@ export class Color extends ValueType { set w (value) { this.a = value * 255; } /** - * @marked_as_engine_private + * @legacyPublic */ public _val = 0; @@ -652,7 +652,7 @@ export class Color extends ValueType { } /** - * @marked_as_engine_private + * @legacyPublic */ public _set_r_unsafe (red) { this._val = ((this._val & 0xffffff00) | red) >>> 0; @@ -660,7 +660,7 @@ export class Color extends ValueType { } /** - * @marked_as_engine_private + * @legacyPublic */ public _set_g_unsafe (green) { this._val = ((this._val & 0xffff00ff) | (green << 8)) >>> 0; @@ -668,7 +668,7 @@ export class Color extends ValueType { } /** - * @marked_as_engine_private + * @legacyPublic */ public _set_b_unsafe (blue) { this._val = ((this._val & 0xff00ffff) | (blue << 16)) >>> 0; @@ -676,7 +676,7 @@ export class Color extends ValueType { } /** - * @marked_as_engine_private + * @legacyPublic */ public _set_a_unsafe (alpha) { this._val = ((this._val & 0x00ffffff) | (alpha << 24)) >>> 0; diff --git a/cocos/core/memop/scalable-container.ts b/cocos/core/memop/scalable-container.ts index 20f5cc3167..dcb4786f9a 100644 --- a/cocos/core/memop/scalable-container.ts +++ b/cocos/core/memop/scalable-container.ts @@ -26,7 +26,7 @@ import { containerManager } from './container-manager'; export abstract class ScalableContainer { /** - * @marked_as_engine_private + * @legacyPublic */ public _poolHandle = -1; constructor () { diff --git a/cocos/core/pipeline/geometry-renderer.ts b/cocos/core/pipeline/geometry-renderer.ts index 0e5de4571f..496127d033 100644 --- a/cocos/core/pipeline/geometry-renderer.ts +++ b/cocos/core/pipeline/geometry-renderer.ts @@ -73,27 +73,27 @@ enum GeometryType { class GeometryVertexBuffer { /** - * @marked_as_engine_private + * @legacyPublic */ public _maxVertices = 0; /** - * @marked_as_engine_private + * @legacyPublic */ public _vertexCount = 0; /** - * @marked_as_engine_private + * @legacyPublic */ public _stride = 0; /** - * @marked_as_engine_private + * @legacyPublic */ public _vertices!: Float32Array; /** - * @marked_as_engine_private + * @legacyPublic */ public _buffer!: Buffer; /** - * @marked_as_engine_private + * @legacyPublic */ public _inputAssembler!: InputAssembler; diff --git a/cocos/core/pipeline/shadow/shadow-flow.ts b/cocos/core/pipeline/shadow/shadow-flow.ts index e49d5a0b14..b47f807a9a 100644 --- a/cocos/core/pipeline/shadow/shadow-flow.ts +++ b/cocos/core/pipeline/shadow/shadow-flow.ts @@ -164,7 +164,7 @@ export class ShadowFlow extends RenderFlow { } /** - * @marked_as_engine_private + * @legacyPublic */ public _initShadowFrameBuffer (pipeline: RenderPipeline, light: Light, swapchain: Swapchain) { const { device } = pipeline; diff --git a/cocos/core/platform/view.ts b/cocos/core/platform/view.ts index ea61170e30..b561e9d2a6 100644 --- a/cocos/core/platform/view.ts +++ b/cocos/core/platform/view.ts @@ -72,7 +72,7 @@ const orientationMap = { export class View extends EventTarget { public static instance: View; /** - * @marked_as_engine_private + * @legacyPublic */ public _designResolutionSize: Size; @@ -718,7 +718,7 @@ class ContentStrategy { } /** - * @marked_as_engine_private + * @legacyPublic */ public _buildResult (containerW, containerH, contentW, contentH, scaleX, scaleY): AdaptResult { // Makes content fit better the canvas diff --git a/cocos/core/root.ts b/cocos/core/root.ts index 03f296f379..3af7605828 100644 --- a/cocos/core/root.ts +++ b/cocos/core/root.ts @@ -222,11 +222,11 @@ export class Root { } /** - * @marked_as_engine_private + * @legacyPublic */ public _createSceneFun: (root: Root) => RenderScene = null!; /** - * @marked_as_engine_private + * @legacyPublic */ public _createWindowFun: (root: Root) => RenderWindow = null!; diff --git a/cocos/core/scene-graph/base-node.ts b/cocos/core/scene-graph/base-node.ts index 91a8e343a1..60011dc640 100644 --- a/cocos/core/scene-graph/base-node.ts +++ b/cocos/core/scene-graph/base-node.ts @@ -95,7 +95,7 @@ export class BaseNode extends CCObject implements ISchedulable { * @zh 如果为true,则该节点是一个常驻节点,不会在场景转换期间被销毁。 * 如果为false,节点将在加载新场景时自动销毁。默认为 false。 * @default false - * @marked_as_engine_private + * @legacyPublic */ @property get _persistNode (): boolean { @@ -333,7 +333,7 @@ export class BaseNode extends CCObject implements ISchedulable { /** * record scene's id when set this node as persist node - * @marked_as_engine_private + * @legacyPublic */ public _originalSceneId = ''; @@ -1225,7 +1225,7 @@ export class BaseNode extends CCObject implements ISchedulable { /** * Do remove component, only used internally. - * @marked_as_engine_private + * @legacyPublic */ public _removeComponent (component: Component) { if (!component) { @@ -1247,7 +1247,7 @@ export class BaseNode extends CCObject implements ISchedulable { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateSiblingIndex () { for (let i = 0; i < this._children.length; ++i) { diff --git a/cocos/core/scene-graph/component-scheduler.ts b/cocos/core/scene-graph/component-scheduler.ts index 32c7b2577d..077e77a48e 100644 --- a/cocos/core/scene-graph/component-scheduler.ts +++ b/cocos/core/scene-graph/component-scheduler.ts @@ -369,7 +369,7 @@ export class ComponentScheduler { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onEnabled (comp) { legacyCC.director.getScheduler().resumeTarget(comp); @@ -384,7 +384,7 @@ export class ComponentScheduler { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onDisabled (comp) { legacyCC.director.getScheduler().pauseTarget(comp); diff --git a/cocos/core/scene-graph/node.ts b/cocos/core/scene-graph/node.ts index a2d89e72de..9b33ea32d2 100644 --- a/cocos/core/scene-graph/node.ts +++ b/cocos/core/scene-graph/node.ts @@ -158,12 +158,12 @@ export class Node extends BaseNode implements CustomSerializable { public static TransformBit = TransformBit; /** - * @marked_as_engine_private + * @legacyPublic */ public static reserveContentsForAllSyncablePrefabTag = reserveContentsForAllSyncablePrefabTag; /** - * @marked_as_engine_private + * @legacyPublic */ public _uiProps = new NodeUIProperties(this); @@ -175,7 +175,7 @@ export class Node extends BaseNode implements CustomSerializable { private static ClearRound = 1000; /** - * @marked_as_engine_private + * @legacyPublic */ public _static = false; @@ -552,7 +552,7 @@ export class Node extends BaseNode implements CustomSerializable { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onSetParent (oldParent: this | null, keepWorldTransform: boolean) { super._onSetParent(oldParent, keepWorldTransform); @@ -579,7 +579,7 @@ export class Node extends BaseNode implements CustomSerializable { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onBatchCreated (dontSyncChildPrefab: boolean) { if (JSB) { @@ -596,7 +596,7 @@ export class Node extends BaseNode implements CustomSerializable { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onBeforeSerialize () { // eslint-disable-next-line @typescript-eslint/no-unused-expressions @@ -604,7 +604,7 @@ export class Node extends BaseNode implements CustomSerializable { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onPostActivated (active: boolean) { if (active) { // activated diff --git a/cocos/core/scene-graph/scene-globals.ts b/cocos/core/scene-graph/scene-globals.ts index 9983e7bcc5..1a9977ea1d 100644 --- a/cocos/core/scene-graph/scene-globals.ts +++ b/cocos/core/scene-graph/scene-globals.ts @@ -1088,7 +1088,7 @@ export class SceneGlobals { @editable public shadows = new ShadowsInfo(); /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _skybox = new SkyboxInfo(); diff --git a/cocos/core/scene-graph/scene.ts b/cocos/core/scene-graph/scene.ts index b7e2ac5002..9737b8d98f 100644 --- a/cocos/core/scene-graph/scene.ts +++ b/cocos/core/scene-graph/scene.ts @@ -76,7 +76,7 @@ export class Scene extends BaseNode { * @en Per-scene level rendering info * @zh 场景级别的渲染信息 * - * @marked_as_engine_private + * @legacyPublic */ @serializable public _globals = new SceneGlobals(); @@ -165,12 +165,12 @@ export class Scene extends BaseNode { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onHierarchyChanged () { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onBatchCreated (dontSyncChildPrefab: boolean) { super._onBatchCreated(dontSyncChildPrefab); diff --git a/cocos/core/utils/js-typed.ts b/cocos/core/utils/js-typed.ts index 87de870849..6c046cbf75 100644 --- a/cocos/core/utils/js-typed.ts +++ b/cocos/core/utils/js-typed.ts @@ -471,11 +471,11 @@ function isTempClassId (id) { // id registration /** - * @marked_as_engine_private + * @legacyPublic */ export const _idToClass: Record = createMap(true); /** - * @marked_as_engine_private + * @legacyPublic */ export const _nameToClass: Record = createMap(true); @@ -512,7 +512,7 @@ js.unregisterClass to remove the id of unused class'; * @method _setClassId * @param classId * @param constructor - * @marked_as_engine_private + * @legacyPublic */ export const _setClassId = setup('__cid__', _idToClass); @@ -606,7 +606,7 @@ export function unregisterClass (...constructors: Function[]) { * Get the registered class by id * @param classId * @return constructor - * @marked_as_engine_private + * @legacyPublic */ export function _getClassById (classId) { return _idToClass[classId]; @@ -626,7 +626,7 @@ export function getClassByName (classname) { * @param obj - instance or constructor * @param [allowTempId = true] - can return temp id in editor * @return - * @marked_as_engine_private + * @legacyPublic */ export function _getClassId (obj, allowTempId?: boolean) { allowTempId = (typeof allowTempId !== 'undefined' ? allowTempId : true); diff --git a/cocos/core/utils/js.ts b/cocos/core/utils/js.ts index d200690e26..f97945f798 100644 --- a/cocos/core/utils/js.ts +++ b/cocos/core/utils/js.ts @@ -93,7 +93,7 @@ export const js = { /** * @en All classes registered in the engine, indexed by name. * @zh 引擎中已注册的所有类型,通过名称进行索引。 - * @marked_as_engine_private + * @legacyPublic * @example * ``` * import { js } from 'cc'; @@ -107,7 +107,7 @@ export const js = { * js._registeredClassNames = builtinClassNames; * ``` * - * @marked_as_engine_private + * @legacyPublic */ get _registeredClassNames (): typeof _nameToClass { return { ..._nameToClass }; @@ -132,7 +132,7 @@ export const js = { * js._registeredClassNames = builtinClassNames; * ``` * - * @marked_as_engine_private + * @legacyPublic */ get _registeredClassIds (): typeof _idToClass { return { ..._idToClass }; @@ -142,15 +142,15 @@ export const js = { Object.assign(_idToClass, value); }, /** - * @marked_as_engine_private + * @legacyPublic */ _getClassId, /** - * @marked_as_engine_private + * @legacyPublic */ _setClassId, /** - * @marked_as_engine_private + * @legacyPublic */ _getClassById, obsolete, diff --git a/cocos/core/utils/pool.ts b/cocos/core/utils/pool.ts index 9596392fca..784eaa5ffb 100644 --- a/cocos/core/utils/pool.ts +++ b/cocos/core/utils/pool.ts @@ -139,7 +139,7 @@ export default class Pool { * @zh * 获取对象池中的对象,如果对象池没有可用对象,则返回空。 * - * @marked_as_engine_private + * @legacyPublic */ public _get () { if (this.count > 0) { diff --git a/cocos/dragon-bones/ArmatureDisplay.ts b/cocos/dragon-bones/ArmatureDisplay.ts index 33a76e2292..d66fa10810 100644 --- a/cocos/dragon-bones/ArmatureDisplay.ts +++ b/cocos/dragon-bones/ArmatureDisplay.ts @@ -437,7 +437,7 @@ export class ArmatureDisplay extends Renderable2D { /* protected */ _debugDraw: Graphics | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _enableBatch = false; @@ -561,7 +561,7 @@ export class ArmatureDisplay extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _meshRenderDataArrayIdx = 0; protected _render (ui: IBatcher) { diff --git a/cocos/dragon-bones/CCSlot.ts b/cocos/dragon-bones/CCSlot.ts index c5cd5b0578..16fc45c9d0 100644 --- a/cocos/dragon-bones/CCSlot.ts +++ b/cocos/dragon-bones/CCSlot.ts @@ -17,28 +17,28 @@ export class CCSlot extends Slot { } /** - * @marked_as_engine_private + * @legacyPublic */ _localVertices: number[]; /** - * @marked_as_engine_private + * @legacyPublic */ _indices: number[]; /** - * @marked_as_engine_private + * @legacyPublic */ _matrix: Mat4; /** - * @marked_as_engine_private + * @legacyPublic */ public _worldMatrix: Mat4; protected _worldMatrixDirty: boolean; /** - * @marked_as_engine_private + * @legacyPublic */ _color: Color; diff --git a/cocos/particle-2d/motion-streak-2d.ts b/cocos/particle-2d/motion-streak-2d.ts index f5a0855707..6adba6b4ff 100644 --- a/cocos/particle-2d/motion-streak-2d.ts +++ b/cocos/particle-2d/motion-streak-2d.ts @@ -230,7 +230,7 @@ export class MotionStreak extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _render (render: IBatcher) { render.commitComp(this, this._texture, this._assembler, null); diff --git a/cocos/particle-2d/particle-system-2d.ts b/cocos/particle-2d/particle-system-2d.ts index 4e7b1f69ab..f7237527b3 100644 --- a/cocos/particle-2d/particle-system-2d.ts +++ b/cocos/particle-2d/particle-system-2d.ts @@ -695,11 +695,11 @@ export class ParticleSystem2D extends Renderable2D { public aspectRatio = 1; /** * The temporary SpriteFrame object used for the renderer. Because there is no corresponding asset, it can't be serialized. - * @marked_as_engine_private + * @legacyPublic */ public declare _renderSpriteFrame: SpriteFrame | null; /** - * @marked_as_engine_private + * @legacyPublic */ public declare _simulator: Simulator; @@ -904,7 +904,7 @@ export class ParticleSystem2D extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _applyFile () { const file = this._file; @@ -936,7 +936,7 @@ export class ParticleSystem2D extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _initTextureWithDictionary (dict: any) { if (dict.spriteFrameUuid) { @@ -1020,7 +1020,7 @@ export class ParticleSystem2D extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _initWithDictionary (dict: any) { this.totalParticles = parseInt(dict.maxParticles || 0); @@ -1135,7 +1135,7 @@ export class ParticleSystem2D extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _syncAspect () { if (this._renderSpriteFrame) { @@ -1145,7 +1145,7 @@ export class ParticleSystem2D extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _applySpriteFrame () { this._renderSpriteFrame = this._renderSpriteFrame || this._spriteFrame; @@ -1163,14 +1163,14 @@ export class ParticleSystem2D extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _getTexture () { return (this._renderSpriteFrame && this._renderSpriteFrame.texture); } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateMaterial () { const mat = this.getMaterialInstance(0); @@ -1178,7 +1178,7 @@ export class ParticleSystem2D extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _finishedSimulation () { if (EDITOR) { diff --git a/cocos/particle/animator/curve-range.ts b/cocos/particle/animator/curve-range.ts index ea947231fa..a79b2a38e9 100644 --- a/cocos/particle/animator/curve-range.ts +++ b/cocos/particle/animator/curve-range.ts @@ -178,7 +178,7 @@ export default class CurveRange { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onBeforeSerialize (props) { // eslint-disable-next-line @typescript-eslint/no-unsafe-return diff --git a/cocos/particle/animator/gradient-range.ts b/cocos/particle/animator/gradient-range.ts index cc6ff7631d..208ab31458 100644 --- a/cocos/particle/animator/gradient-range.ts +++ b/cocos/particle/animator/gradient-range.ts @@ -142,7 +142,7 @@ export default class GradientRange { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onBeforeSerialize (props: any): any { return SerializableTable[this._mode]; diff --git a/cocos/particle/emitter/shape-module.ts b/cocos/particle/emitter/shape-module.ts index 110df66cc1..ed644539f1 100644 --- a/cocos/particle/emitter/shape-module.ts +++ b/cocos/particle/emitter/shape-module.ts @@ -126,7 +126,7 @@ export default class ShapeModule { /** * @zh 粒子发射器类型 [[ShapeType]]。 * - * @marked_as_engine_private + * @legacyPublic */ @type(ShapeType) @formerlySerializedAs('shapeType') diff --git a/cocos/particle/particle-system.ts b/cocos/particle/particle-system.ts index 69757b420d..33dac30cd7 100644 --- a/cocos/particle/particle-system.ts +++ b/cocos/particle/particle-system.ts @@ -776,7 +776,7 @@ export class ParticleSystem extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onMaterialModified (index: number, material: Material) { if (this.processor !== null) { @@ -785,14 +785,14 @@ export class ParticleSystem extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onRebuildPSO (index: number, material: Material) { this.processor.onRebuildPSO(index, material); } /** - * @marked_as_engine_private + * @legacyPublic */ public _collectModels (): scene.Model[] { this._models.length = 0; @@ -1349,7 +1349,7 @@ export class ParticleSystem extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onBeforeSerialize (props) { // eslint-disable-next-line @typescript-eslint/no-unsafe-return diff --git a/cocos/particle/renderer/trail.ts b/cocos/particle/renderer/trail.ts index 28b7f76979..03e80fc1a5 100644 --- a/cocos/particle/renderer/trail.ts +++ b/cocos/particle/renderer/trail.ts @@ -200,7 +200,7 @@ export default class TrailModule { } /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _enable = false; @@ -225,7 +225,7 @@ export default class TrailModule { public lifeTime = new CurveRange(); /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _minParticleDistance = 0.1; @@ -380,7 +380,7 @@ export default class TrailModule { } /** - * @marked_as_engine_private + * @legacyPublic */ public _attachToScene () { if (this._trailModel) { @@ -392,7 +392,7 @@ export default class TrailModule { } /** - * @marked_as_engine_private + * @legacyPublic */ public _detachFromScene () { if (this._trailModel && this._trailModel.scene) { diff --git a/cocos/physics/framework/physics-ray-result.ts b/cocos/physics/framework/physics-ray-result.ts index 8a8c6f59be..72cffd1855 100644 --- a/cocos/physics/framework/physics-ray-result.ts +++ b/cocos/physics/framework/physics-ray-result.ts @@ -90,7 +90,7 @@ export class PhysicsRayResult { * @zh * 设置射线,此方法由引擎内部使用,请勿在外部脚本调用。 * - * @marked_as_engine_private + * @legacyPublic */ public _assign (hitPoint: IVec3Like, distance: number, collider: Collider, hitNormal: IVec3Like) { Vec3.copy(this._hitPoint, hitPoint); diff --git a/cocos/profiler/profiler.ts b/cocos/profiler/profiler.ts index fbddd888a1..3743b00172 100644 --- a/cocos/profiler/profiler.ts +++ b/cocos/profiler/profiler.ts @@ -93,7 +93,7 @@ const _constants = { export class Profiler { /** - * @marked_as_engine_private + * @legacyPublic */ public _stats: IProfilerState | null = null; public id = '__Profiler__'; diff --git a/cocos/spine/skeleton-cache.ts b/cocos/spine/skeleton-cache.ts index 8d98e3d3c8..a27c3a7256 100644 --- a/cocos/spine/skeleton-cache.ts +++ b/cocos/spine/skeleton-cache.ts @@ -98,7 +98,7 @@ export class AnimationCache { public isCompleted = false; /** - * @marked_as_engine_private + * @legacyPublic */ public _privateMode = false; protected _inited = false; diff --git a/cocos/spine/skeleton-data.ts b/cocos/spine/skeleton-data.ts index 15ca80b1c5..bbc0d0e07d 100644 --- a/cocos/spine/skeleton-data.ts +++ b/cocos/spine/skeleton-data.ts @@ -21,7 +21,7 @@ import { legacyCC } from '../core/global-exports'; @ccclass('sp.SkeletonData') export class SkeletonData extends Asset { /** - * @marked_as_engine_private + * @legacyPublic */ @serializable public _skeletonJson: spine.SkeletonJson | null = null; @@ -98,7 +98,7 @@ export class SkeletonData extends Asset { public scale = 1; /** - * @marked_as_engine_private + * @legacyPublic */ get _nativeAsset (): ArrayBuffer { return this._buffer!; diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index 82a6a9ee8e..97febd97bf 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -467,45 +467,45 @@ export class Skeleton extends Renderable2D { public enableBatch = false; /** - * @marked_as_engine_private + * @legacyPublic */ public _frameCache: AnimationCache | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _curFrame: AnimationFrame | null = null; // protected _materialCache = {}; /** - * @marked_as_engine_private + * @legacyPublic */ public _effectDelegate: VertexEffectDelegate | null | undefined = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _skeleton: spine.Skeleton | null; /** - * @marked_as_engine_private + * @legacyPublic */ public _clipper?: spine.SkeletonClipping; /** - * @marked_as_engine_private + * @legacyPublic */ public _debugRenderer: Graphics | null; /** - * @marked_as_engine_private + * @legacyPublic */ public _startSlotIndex; /** - * @marked_as_engine_private + * @legacyPublic */ public _endSlotIndex; /** - * @marked_as_engine_private + * @legacyPublic */ public _startEntry; /** - * @marked_as_engine_private + * @legacyPublic */ public _endEntry; public attachUtil: AttachUtil; @@ -1389,7 +1389,7 @@ export class Skeleton extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _meshRenderDataArrayIdx = 0; protected _render (ui: IBatcher) { diff --git a/cocos/terrain/terrain-asset.ts b/cocos/terrain/terrain-asset.ts index dd5f2f95fc..eaaaf9f8af 100644 --- a/cocos/terrain/terrain-asset.ts +++ b/cocos/terrain/terrain-asset.ts @@ -217,7 +217,7 @@ export class TerrainLayerInfo { * @en terrain layer binary info * @zh 地形纹理二进制信息 */ - @ccclass('cc.TerrainLayerBinaryInfo') +@ccclass('cc.TerrainLayerBinaryInfo') export class TerrainLayerBinaryInfo { public slot = 0; public tileSize = 1; @@ -251,7 +251,7 @@ export class TerrainAsset extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ get _nativeAsset (): ArrayBuffer { return this._data!.buffer; @@ -408,14 +408,14 @@ export class TerrainAsset extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _setNativeData (_nativeData: Uint8Array) { this._data = _nativeData; } /** - * @marked_as_engine_private + * @legacyPublic */ public _loadNativeData (_nativeData: Uint8Array) { if (!_nativeData || _nativeData.length === 0) { @@ -489,7 +489,7 @@ export class TerrainAsset extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _exportNativeData (): Uint8Array { const stream = new TerrainBuffer(); @@ -551,7 +551,7 @@ export class TerrainAsset extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ public _exportDefaultNativeData (): Uint8Array { const stream = new TerrainBuffer(); diff --git a/cocos/terrain/terrain-lod.ts b/cocos/terrain/terrain-lod.ts index 1fef184069..bab34745e0 100644 --- a/cocos/terrain/terrain-lod.ts +++ b/cocos/terrain/terrain-lod.ts @@ -63,19 +63,19 @@ export class TerrainLod { } /** - * @marked_as_engine_private + * @legacyPublic */ public _bodyIndexPool: TerrainIndexPool[]; /** - * @marked_as_engine_private + * @legacyPublic */ public _connecterIndexPool: TerrainIndexPool[]; /** - * @marked_as_engine_private + * @legacyPublic */ public _indexMap: TerrainIndexData[] = []; /** - * @marked_as_engine_private + * @legacyPublic */ public _indexBuffer: Uint16Array = new Uint16Array(); diff --git a/cocos/terrain/terrain.ts b/cocos/terrain/terrain.ts index cedef1adc5..26f141e58a 100644 --- a/cocos/terrain/terrain.ts +++ b/cocos/terrain/terrain.ts @@ -180,27 +180,27 @@ export class TerrainLayer { */ class TerrainRenderable extends RenderableComponent { /** - * @marked_as_engine_private + * @legacyPublic */ public _model: scene.Model | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _meshData: RenderingSubMesh | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _brushPass: Pass | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _brushMaterial: Material | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _currentMaterial: Material | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _currentMaterialLayers = 0; @@ -215,7 +215,7 @@ class TerrainRenderable extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _destroyModel () { // this._invalidMaterial(); @@ -226,7 +226,7 @@ class TerrainRenderable extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _invalidMaterial () { if (this._currentMaterial == null) { @@ -243,7 +243,7 @@ class TerrainRenderable extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateMaterial (block: TerrainBlock, init: boolean) { if (this._meshData == null || this._model == null) { @@ -286,7 +286,7 @@ class TerrainRenderable extends RenderableComponent { } /** - * @marked_as_engine_private + * @legacyPublic */ public _onMaterialModified (idx: number, mtl: Material|null) { if (this._model == null) { @@ -861,7 +861,7 @@ export class TerrainBlock { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateLightmap (info: TerrainBlockLightmapInfo) { this._lightmapInfo = info; @@ -869,7 +869,7 @@ export class TerrainBlock { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateLod () { const key = new TerrainLodKey(); @@ -920,7 +920,7 @@ export class TerrainBlock { } /** - * @marked_as_engine_private + * @legacyPublic */ public _resetLod () { const key = new TerrainLodKey(); @@ -939,7 +939,7 @@ export class TerrainBlock { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateIndexBuffer () { if (this._renderable._meshData === null) { @@ -1064,7 +1064,7 @@ export class TerrainBlock { } } - private _buildVertexData(vertexData: Float32Array) { + private _buildVertexData (vertexData: Float32Array) { let index = 0; for (let j = 0; j < TERRAIN_BLOCK_VERTEX_COMPLEXITY; ++j) { for (let i = 0; i < TERRAIN_BLOCK_VERTEX_COMPLEXITY; ++i) { @@ -1085,7 +1085,7 @@ export class TerrainBlock { } } - private _buildBoundingBox() { + private _buildBoundingBox () { this._bbMin.set(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE); this._bbMax.set(Number.MIN_VALUE, Number.MIN_VALUE, Number.MIN_VALUE); for (let j = 0; j < TERRAIN_BLOCK_VERTEX_COMPLEXITY; ++j) { @@ -1221,7 +1221,7 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public get _asset () { return this.__asset; @@ -1770,7 +1770,7 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _setNormal (i: number, j: number, n: Vec3) { const index = j * this.vertexCount[0] + i; @@ -2083,7 +2083,7 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _getSharedIndexBuffer () { if (this._sharedIndexBuffer == null) { @@ -2102,14 +2102,14 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _getIndexData (key: TerrainLodKey) { return this._lod.getIndexData(key); } /** - * @marked_as_engine_private + * @legacyPublic */ public _resetLightmap (enble: boolean) { this._lightmapInfos.length = 0; @@ -2121,7 +2121,7 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateLightmap (blockId: number, tex: Texture2D|null, uOff: number, vOff: number, uScale: number, vScale: number) { this._lightmapInfos[blockId].texture = tex; @@ -2133,7 +2133,7 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _getLightmapInfo (i: number, j: number) { const index = j * this._blockCount[0] + i; @@ -2141,7 +2141,7 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _calcNormal (x: number, z: number) { let flip = 1; @@ -2176,7 +2176,7 @@ export class Terrain extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _buildNormals () { let index = 0; diff --git a/cocos/tiledmap/tiled-layer.ts b/cocos/tiledmap/tiled-layer.ts index 2aa598f887..c92ee34680 100644 --- a/cocos/tiledmap/tiled-layer.ts +++ b/cocos/tiledmap/tiled-layer.ts @@ -1434,7 +1434,7 @@ export class TiledLayer extends Renderable2D { } /** - * @marked_as_engine_private + * @legacyPublic */ public _meshRenderDataArrayIdx = 0; protected _render (ui: IBatcher) { diff --git a/cocos/tiledmap/tiled-object-group.ts b/cocos/tiledmap/tiled-object-group.ts index ac4ddb6c40..8047e4fe9b 100644 --- a/cocos/tiledmap/tiled-object-group.ts +++ b/cocos/tiledmap/tiled-object-group.ts @@ -161,7 +161,7 @@ export class TiledObjectGroup extends Component { protected _objects: TMXObject[] = []; /** - * @marked_as_engine_private + * @legacyPublic */ public _init (groupInfo: TMXObjectGroupInfo, mapInfo: TMXMapInfo, texGrids: TiledTextureGrids) { const FLIPPED_MASK = TileFlag.FLIPPED_MASK; diff --git a/cocos/ui/editbox/edit-box-impl-base.ts b/cocos/ui/editbox/edit-box-impl-base.ts index a547aae545..e6900a7f22 100644 --- a/cocos/ui/editbox/edit-box-impl-base.ts +++ b/cocos/ui/editbox/edit-box-impl-base.ts @@ -35,11 +35,11 @@ import { EditBox } from './edit-box'; export class EditBoxImplBase { /** - * @marked_as_engine_private + * @legacyPublic */ public _editing = false; /** - * @marked_as_engine_private + * @legacyPublic */ public _delegate: EditBox | null = null; diff --git a/cocos/ui/editbox/edit-box-impl.ts b/cocos/ui/editbox/edit-box-impl.ts index d298a227c9..5269f7967e 100644 --- a/cocos/ui/editbox/edit-box-impl.ts +++ b/cocos/ui/editbox/edit-box-impl.ts @@ -65,35 +65,35 @@ let _domCount = 0; export class EditBoxImpl extends EditBoxImplBase { /** - * @marked_as_engine_private + * @legacyPublic */ public _delegate: EditBox | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _inputMode: InputMode = -1; /** - * @marked_as_engine_private + * @legacyPublic */ public _inputFlag: InputFlag = -1; /** - * @marked_as_engine_private + * @legacyPublic */ public _returnType: KeyboardReturnType = -1; /** - * @marked_as_engine_private + * @legacyPublic */ public __eventListeners: any = {}; /** - * @marked_as_engine_private + * @legacyPublic */ public __autoResize = false; /** - * @marked_as_engine_private + * @legacyPublic */ public __orientationChanged: any; /** - * @marked_as_engine_private + * @legacyPublic */ public _edTxt: HTMLInputElement | HTMLTextAreaElement | null = null; private _isTextArea = false; diff --git a/cocos/ui/editbox/edit-box.ts b/cocos/ui/editbox/edit-box.ts index 7491ea6c18..ce2627091c 100644 --- a/cocos/ui/editbox/edit-box.ts +++ b/cocos/ui/editbox/edit-box.ts @@ -364,11 +364,11 @@ export class EditBox extends Component { public editingReturn: ComponentEventHandler[] = []; /** - * @marked_as_engine_private + * @legacyPublic */ public _impl: EditBoxImplBase | null = null; /** - * @marked_as_engine_private + * @legacyPublic */ public _background: Sprite | null = null; @@ -472,7 +472,7 @@ export class EditBox extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _editBoxEditingDidBegan () { ComponentEventHandler.emitEvents(this.editingDidBegan, this); @@ -480,7 +480,7 @@ export class EditBox extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _editBoxEditingDidEnded () { ComponentEventHandler.emitEvents(this.editingDidEnded, this); @@ -488,7 +488,7 @@ export class EditBox extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _editBoxTextChanged (text: string) { text = this._updateLabelStringStyle(text, true); @@ -498,7 +498,7 @@ export class EditBox extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _editBoxEditingReturn () { ComponentEventHandler.emitEvents(this.editingReturn, this); @@ -506,7 +506,7 @@ export class EditBox extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _showLabels () { this._isLabelVisible = true; @@ -514,7 +514,7 @@ export class EditBox extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _hideLabels () { this._isLabelVisible = false; diff --git a/cocos/ui/page-view-indicator.ts b/cocos/ui/page-view-indicator.ts index a6a2f8085b..a0f3cb7bdd 100644 --- a/cocos/ui/page-view-indicator.ts +++ b/cocos/ui/page-view-indicator.ts @@ -182,7 +182,7 @@ export class PageViewIndicator extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _updateLayout () { this._layout = this.getComponent(Layout); @@ -202,7 +202,7 @@ export class PageViewIndicator extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _createIndicator () { const node = new Node(); @@ -216,7 +216,7 @@ export class PageViewIndicator extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _changedState () { const indicators = this._indicators; @@ -244,7 +244,7 @@ export class PageViewIndicator extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _refresh () { if (!this._pageView) { return; } diff --git a/cocos/ui/toggle.ts b/cocos/ui/toggle.ts index 5484414929..caedbad283 100644 --- a/cocos/ui/toggle.ts +++ b/cocos/ui/toggle.ts @@ -104,7 +104,7 @@ export class Toggle extends Button { } /** - * @marked_as_engine_private + * @legacyPublic */ get _toggleContainer () { const parent = this.node.parent!; diff --git a/cocos/ui/widget.ts b/cocos/ui/widget.ts index 073676f093..9025b03324 100644 --- a/cocos/ui/widget.ts +++ b/cocos/ui/widget.ts @@ -727,19 +727,19 @@ export class Widget extends Component { public static AlignMode = AlignMode; /** - * @marked_as_engine_private + * @legacyPublic */ public _lastPos = new Vec3(); /** - * @marked_as_engine_private + * @legacyPublic */ public _lastSize = new Size(); /** - * @marked_as_engine_private + * @legacyPublic */ public _dirty = true; /** - * @marked_as_engine_private + * @legacyPublic */ public _hadAlignOnce = false; @@ -805,7 +805,7 @@ export class Widget extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _validateTargetInDEV () { if (!DEV) { @@ -846,23 +846,23 @@ export class Widget extends Component { } /** - * @marked_as_engine_private + * @legacyPublic */ public _adjustWidgetToAllowMovingInEditor (eventType: TransformBit) {} /** - * @marked_as_engine_private + * @legacyPublic */ public _adjustWidgetToAllowResizingInEditor () {} /** - * @marked_as_engine_private + * @legacyPublic */ public _adjustWidgetToAnchorChanged () { this.setDirty(); } /** - * @marked_as_engine_private + * @legacyPublic */ public _adjustTargetToParentChanged (oldParent: Node) { if (oldParent) { diff --git a/cocos/video/assets/video-clip.ts b/cocos/video/assets/video-clip.ts index 546169b4ad..e689636d03 100644 --- a/cocos/video/assets/video-clip.ts +++ b/cocos/video/assets/video-clip.ts @@ -48,7 +48,7 @@ export class VideoClip extends Asset { } /** - * @marked_as_engine_private + * @legacyPublic */ set _nativeAsset (clip: HTMLVideoElement | null) { this._video = clip; diff --git a/package-lock.json b/package-lock.json index 0a4134f5fd..3ba100c385 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1746,9 +1746,9 @@ } }, "@cocos/build-engine": { - "version": "4.2.21-beta.5", - "resolved": "https://registry.npmjs.org/@cocos/build-engine/-/build-engine-4.2.21-beta.5.tgz", - "integrity": "sha512-IEbTRyooUQ7DwMyaM9W2kQaDiFXxib94IQWH71n1wzaKL9aDhCIsbzfVf7cUzhgnVl1P00aJ665Y4paLWojUmA==", + "version": "4.2.21-beta.7", + "resolved": "https://registry.npmjs.org/@cocos/build-engine/-/build-engine-4.2.21-beta.7.tgz", + "integrity": "sha512-oKtro2BY5Zbd0iLIATvdmt6Fp3ghcLVbPqGTFFp8WkCP09KZ2zOx0wPhacqrCsbctwg8r6jEz8mpMlRj8dy4yA==", "dev": true, "requires": { "@babel/core": "^7.13.10", diff --git a/package.json b/package.json index 07c40b82e2..52fa813dde 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@babel/core": "^7.13.10", "@babel/preset-env": "7.8.7", "@cocos/babel-preset-cc": "2.2.0", - "@cocos/build-engine": "4.2.21-beta.5", + "@cocos/build-engine": "4.2.21-beta.7", "@cocos/typedoc-plugin-internal-external": "^1.0.1", "@cocos/typedoc-plugin-localization": "^1.0.0", "@types/fs-extra": "^5.0.4", diff --git a/pal/audio/minigame/player-minigame.ts b/pal/audio/minigame/player-minigame.ts index d6f16385cf..712e1afc92 100644 --- a/pal/audio/minigame/player-minigame.ts +++ b/pal/audio/minigame/player-minigame.ts @@ -56,11 +56,11 @@ export class AudioPlayerMinigame implements OperationQueueable { private _readyToHandleOnShow = false; /** - * @marked_as_engine_private + * @legacyPublic */ public _eventTarget: EventTarget = new EventTarget(); /** - * @marked_as_engine_private + * @legacyPublic */ public _operationQueue: OperationInfo[] = []; diff --git a/pal/audio/minigame/player-web.ts b/pal/audio/minigame/player-web.ts index 144c8d20c4..4f3acde57d 100644 --- a/pal/audio/minigame/player-web.ts +++ b/pal/audio/minigame/player-web.ts @@ -71,11 +71,11 @@ export class AudioPlayerWeb implements OperationQueueable { private _readyToHandleOnShow = false; /** - * @marked_as_engine_private + * @legacyPublic */ public _eventTarget: EventTarget = new EventTarget(); /** - * @marked_as_engine_private + * @legacyPublic */ public _operationQueue: OperationInfo[] = []; diff --git a/pal/audio/native/player.ts b/pal/audio/native/player.ts index b3b4c64e65..20f7a67a5c 100644 --- a/pal/audio/native/player.ts +++ b/pal/audio/native/player.ts @@ -55,11 +55,11 @@ export class AudioPlayer implements OperationQueueable { private _state: AudioState = AudioState.INIT; /** - * @marked_as_engine_private + * @legacyPublic */ public _eventTarget: EventTarget = new EventTarget(); /** - * @marked_as_engine_private + * @legacyPublic */ public _operationQueue: OperationInfo[] = []; diff --git a/pal/audio/web/player-dom.ts b/pal/audio/web/player-dom.ts index d84dbe1831..07140dd9ef 100644 --- a/pal/audio/web/player-dom.ts +++ b/pal/audio/web/player-dom.ts @@ -68,11 +68,11 @@ export class AudioPlayerDOM implements OperationQueueable { private _onEnded: () => void; /** - * @marked_as_engine_private + * @legacyPublic */ public _eventTarget: EventTarget = new EventTarget(); /** - * @marked_as_engine_private + * @legacyPublic */ public _operationQueue: OperationInfo[] = []; diff --git a/pal/audio/web/player-web.ts b/pal/audio/web/player-web.ts index e4bb052562..0159d4f919 100644 --- a/pal/audio/web/player-web.ts +++ b/pal/audio/web/player-web.ts @@ -161,11 +161,11 @@ export class AudioPlayerWeb implements OperationQueueable { private _audioTimer: AudioTimer; /** - * @marked_as_engine_private + * @legacyPublic */ public _eventTarget: EventTarget = new EventTarget(); /** - * @marked_as_engine_private + * @legacyPublic */ public _operationQueue: OperationInfo[] = []; diff --git a/scripts/build-engine/package.json b/scripts/build-engine/package.json index 27faae3724..fa250a1461 100644 --- a/scripts/build-engine/package.json +++ b/scripts/build-engine/package.json @@ -1,6 +1,6 @@ { "name": "@cocos/build-engine", - "version": "4.2.21-beta.5", + "version": "4.2.21-beta.7", "description": "", "repository": { "type": "git", diff --git a/scripts/build-engine/src/build-declarations/index.ts b/scripts/build-engine/src/build-declarations/index.ts index b1055f3e05..06f64a8e12 100644 --- a/scripts/build-engine/src/build-declarations/index.ts +++ b/scripts/build-engine/src/build-declarations/index.ts @@ -219,8 +219,8 @@ export async function build (options: { interfaceFilter.cullInterface({ inputDts: indexOutputPath, - privateTag: 'private_cc', - deprecateTag: 'marked_as_engine_private', + privateTag: 'engineInternal', + deprecateTag: 'legacyPublic', deprecateTip: 'since v3.5.0, this is an engine private interface that will be removed in the future.', }); } catch (error) {