cocos-engine
cocos-engine copied to clipboard
Remove base node related logics
Re: #https://github.com/cocos/3d-tasks/issues/9283
Changelog
Continuous Integration
This pull request:
- [ ] needs automatic test cases check.
Manual trigger with
@cocos-robot run test casesafterward. - [ ] does not change any runtime related code or build configuration
If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.
Compatibility Check
This pull request:
- [ ] changes public API, and have ensured backward compatibility with deprecated features.
- [ ] affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
- [ ] affects file structure of the build package or build configuration which requires user project upgrade.
- [ ] introduces breaking changes, please list all changes, affected features and the scope of violation.
Interface Check Report
! WARNING this pull request has changed these public interfaces:
@@ -930,9 +930,9 @@
* 这个组件会设置 [[Node]] 上的 NodeUIProperties.uiComp。
* @deprecated since v3.4.1
*/
export class UIComponent extends Component {
- protected _lastParent: Node | null;
+ protected _lastParent: BaseNode | null;
__preload(): void;
onEnable(): void;
onDisable(): void;
onDestroy(): void;
@@ -1081,9 +1081,9 @@
* @en Marks for calculating opacity per vertex
* @zh 标记组件是否逐顶点计算透明度
*/
protected _useVertexOpacity: boolean;
- protected _lastParent: Node | null;
+ protected _lastParent: BaseNode | null;
onLoad(): void;
__preload(): void;
onEnable(): void;
onRestore(): void;
@@ -1122,9 +1122,9 @@
protected _canRender(): boolean;
protected _postCanRender(): void;
protected updateMaterial(): void;
protected _updateColor(): void;
- static setEntityColorDirtyRecursively(node: Node, dirty: boolean): void;
+ static setEntityColorDirtyRecursively(node: BaseNode, dirty: boolean): void;
setEntityColor(color: math.Color): void;
setEntityOpacity(opacity: number): void;
setEntityEnabled(enabled: boolean): void;
/**
@@ -1369,9 +1369,9 @@
* @zh
* 计算出此 UI_2D 节点在世界空间下的 aabb 包围盒
*/
getComputeAABB(out?: geometry.AABB): geometry.AABB;
- protected _parentChanged(node: Node): void;
+ protected _parentChanged(node: BaseNode): void;
static _sortSiblings(): void;
static _cleanChangeMap(): void;
}
export class RenderRoot2D extends Component {
@@ -1502,9 +1502,9 @@
protected _spriteFrame: SpriteFrame | null;
protected _alphaThreshold: number;
protected _sprite: Sprite | null;
protected _graphics: Graphics | null;
- protected _maskNode: Node | null;
+ protected _maskNode: BaseNode | null;
constructor();
onLoad(): void;
onEnable(): void;
/**
@@ -2409,9 +2409,9 @@
* 透明度。
*/
get opacity(): number;
set opacity(value: number);
- static setEntityLocalOpacityDirtyRecursively(node: Node, dirty: boolean, interruptParentOpacity: number): void;
+ static setEntityLocalOpacityDirtyRecursively(node: BaseNode, dirty: boolean, interruptParentOpacity: number): void;
protected _opacity: number;
onEnable(): void;
onDisable(): void;
}
@@ -2994,9 +2994,9 @@
* @zh 被移除的屏幕。
*/
removeScreen(comp: RenderRoot2D): void;
sortScreens(): void;
- getFirstRenderCamera(node: Node): renderer.scene.Camera | null;
+ getFirstRenderCamera(node: BaseNode): renderer.scene.Camera | null;
update(): void;
uploadBuffers(): void;
reset(): void;
/**
@@ -3022,9 +3022,9 @@
* @param frame - Texture or sprite frame related to the draw batch, could be null
* @param assembler - The assembler for the current component, could be null
* @param transform - Node type transform, if passed, then batcher will consider it's using model matrix, could be null
*/
- commitComp(comp: UIRenderer, renderData: BaseRenderData | null, frame: __private._cocos_core_assets_texture_base__TextureBase | SpriteFrame | null, assembler: any, transform: Node | null): void;
+ commitComp(comp: UIRenderer, renderData: BaseRenderData | null, frame: __private._cocos_core_assets_texture_base__TextureBase | SpriteFrame | null, assembler: any, transform: BaseNode | null): void;
/**
* @en
* Render component data submission process for individual [[gfx.InputAssembler]]
* @zh
@@ -3035,9 +3035,9 @@
* @param tex - The texture used
* @param mat - The material used
* @param [transform] - The related node transform if the render data is based on node's local coordinates
*/
- commitIA(renderComp: UIRenderer, ia: gfx.InputAssembler, tex?: __private._cocos_core_assets_texture_base__TextureBase, mat?: Material, transform?: Node): void;
+ commitIA(renderComp: UIRenderer, ia: gfx.InputAssembler, tex?: __private._cocos_core_assets_texture_base__TextureBase, mat?: Material, transform?: BaseNode): void;
/**
* @en
* Render component data submission process of UI.
* The submitted vertex data is the UI for local coordinates.
@@ -3101,9 +3101,9 @@
* @zh
* 强制刷新材质。
*/
flushMaterial(mat: Material): void;
- walk(node: Node, level?: number): void;
+ walk(node: BaseNode, level?: number): void;
syncMeshBuffersToNative(accId: number, buffers: MeshBuffer[]): void;
}
/**
* @deprecated since v3.6.0, this is an engine private interface that will be removed in the future.
@@ -3171,9 +3171,9 @@
* 即使节点的状态是未启用的也可以找到,建议将结果缓存,而不是每次需要都去查找。
* @param path The path of the target node
* @param referenceNode If given, the search will be limited in the sub node tree of the reference node
*/
- export function find(path: string, referenceNode?: Node): Node | null;
+ export function find(path: string, referenceNode?: BaseNode): BaseNode | null;
/**
* @en
* save a color buffer to a PPM file
* @zh
@@ -3250,9 +3250,9 @@
* 如果要对这个过程进行更精细的控制,可以直接使用 `Mesh.merge`。
* @param staticModelRoot root of all the static models to be batched
* @param batchedRoot the target output node
*/
- static batchStaticModel(staticModelRoot: Node, batchedRoot: Node): boolean;
+ static batchStaticModel(staticModelRoot: BaseNode, batchedRoot: BaseNode): boolean;
/**
* @en
* Undoes everything `batchStaticModel` did.
* @zh
@@ -3260,9 +3260,9 @@
*
* @param staticModelRoot root of all the static models to be batched
* @param batchedRoot the target output node
*/
- static unbatchStaticModel(staticModelRoot: Node, batchedRoot: Node): boolean;
+ static unbatchStaticModel(staticModelRoot: BaseNode, batchedRoot: BaseNode): boolean;
}
/**
* @en A representation of a mesh asset
* A mesh can contain multiple sub-mesh resources. The mesh mainly provides data such as vertices and indices for model instances.
@@ -4218,9 +4218,9 @@
* @zh 蒙皮网格渲染器组件。
*/
export class SkinnedMeshRenderer extends MeshRenderer {
protected _skeleton: Skeleton | null;
- protected _skinningRoot: Node | null;
+ protected _skinningRoot: BaseNode | null;
protected _clip: AnimationClip | null;
/**
* @en The skeleton asset.
* @zh 骨骼资源。
@@ -4230,10 +4230,10 @@
/**
* @en The skinning root. (The node where the controlling Animation is located)
* @zh 骨骼根节点的引用,对应控制此模型的动画组件所在节点。
*/
- get skinningRoot(): Node | null;
- set skinningRoot(value: Node | null);
+ get skinningRoot(): BaseNode | null;
+ set skinningRoot(value: BaseNode | null);
get model(): __private._cocos_3d_models_skinning_model__SkinningModel | __private._cocos_3d_models_baked_skinning_model__BakedSkinningModel | null;
/**
* Set associated animation.
* @internal This method only friends to skeletal animation component.
@@ -4499,9 +4499,9 @@
* Creates an event evaluator for this animation.
* @param targetNode Target node used to fire events.
* @internal Do not use this in your code.
*/
- createEventEvaluator(targetNode: Node): __private._cocos_core_animation_animation_clip__EventEvaluator;
+ createEventEvaluator(targetNode: BaseNode): __private._cocos_core_animation_animation_clip__EventEvaluator;
/**
* Returns if this clip has any embedded player.
* @internal Do not use this in your code.
*/
@@ -4510,9 +4510,9 @@
* Creates an embedded player evaluator for this animation.
* @param targetNode Target node.
* @internal Do not use this in your code.
*/
- createEmbeddedPlayerEvaluator(targetNode: Node): __private._cocos_core_animation_animation_clip__EmbeddedPlayerEvaluation;
+ createEmbeddedPlayerEvaluator(targetNode: BaseNode): __private._cocos_core_animation_animation_clip__EmbeddedPlayerEvaluation;
/**
* Creates an evaluator for this animation.
* @param context The context.
* @returns The evaluator.
@@ -4844,9 +4844,9 @@
frameRate: number;
/**
* @internal This field is only visible from within internal.
*/
- protected _targetNode: Node | null;
+ protected _targetNode: BaseNode | null;
/**
* @internal This field is only visible from within internal.
*/
protected _curveLoaded: boolean;
@@ -4858,9 +4858,9 @@
/**
* This method is used for internal purpose only.
*/
get curveLoaded(): boolean;
- initialize(root: Node, blendStateBuffer?: __private._cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateBuffer, mask?: AnimationMask): void;
+ initialize(root: BaseNode, blendStateBuffer?: __private._cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateBuffer, mask?: AnimationMask): void;
destroy(): void;
/**
* @deprecated Since V1.1.1, animation states were no longer defined as event targets.
* To process animation events, use `Animation` instead.
@@ -5572,17 +5572,17 @@
*/
export class HierarchyPath implements ICustomTargetPath {
path: string;
constructor(path?: string);
- get(target: Node): Node | null;
+ get(target: BaseNode): BaseNode | null;
}
/**
* @deprecated Since V3.3, use [[TrackPath]] instead.
*/
export class ComponentPath implements ICustomTargetPath {
component: string;
constructor(component?: string);
- get(target: Node): Component | null;
+ get(target: BaseNode): Component | null;
}
/**
* @en
* Value proxies are used to set curve value to target. They are "generalized assignment".
@@ -5999,19 +5999,19 @@
destruct(): void;
addAnimation(anim: AnimationState): void;
removeAnimation(anim: AnimationState): void;
pushDelayEvent(fn: (...args: any[]) => void, thisArg: any, args: any[]): void;
- addSockets(root: Node, sockets: Socket[]): void;
- removeSockets(root: Node, sockets: Socket[]): void;
+ addSockets(root: BaseNode, sockets: Socket[]): void;
+ removeSockets(root: BaseNode, sockets: Socket[]): void;
}
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- export function getPathFromRoot(target: Node | null, root: Node): string;
+ export function getPathFromRoot(target: BaseNode | null, root: BaseNode): string;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- export function getWorldTransformUntilRoot(target: Node, root: Node, outMatrix: math.Mat4): math.Mat4;
+ export function getWorldTransformUntilRoot(target: BaseNode, root: BaseNode, outMatrix: math.Mat4): math.Mat4;
/**
* @en
* The audio clip asset.
* @zh
@@ -6339,9 +6339,9 @@
ROTATION = 3
}
export interface ICameraInfo {
name: string;
- node: Node;
+ node: BaseNode;
projection: number;
targetDisplay?: number;
window?: __private._cocos_core_renderer_core_render_window__RenderWindow | null;
priority: number;
@@ -6378,10 +6378,10 @@
/**
* @en The node of the camera which determines its transform in world space.
* @zh 相机绑定的节点,决定了它在世界空间的变换矩阵
*/
- set node(val: Node);
- get node(): Node;
+ set node(val: BaseNode);
+ get node(): BaseNode;
/**
* @en The render window of the camera
* @zh 相机关联的渲染窗口
*/
@@ -6792,16 +6792,16 @@
/**
* @en The node to which the model belongs
* @zh 模型所在的节点
*/
- get node(): Node;
- set node(n: Node);
+ get node(): BaseNode;
+ set node(n: BaseNode);
/**
* @en Model's transform
* @zh 模型的变换
*/
- get transform(): Node;
- set transform(n: Node);
+ get transform(): BaseNode;
+ set transform(n: BaseNode);
/**
* @en Model's visibility tag
* Model's visibility flags, it's different from [[Node.layer]],
* but it will also be compared with [[Camera.visibility]] during culling process.
@@ -6860,14 +6860,14 @@
/**
* @en The node to which the model belongs
* @zh 模型所在的节点
*/
- protected _node: Node;
+ protected _node: BaseNode;
/**
* @en Model's transform
* @zh 子模型的变换
*/
- protected _transform: Node;
+ protected _transform: BaseNode;
/**
* @en Current gfx device
* @zh 当前 GFX 设备
*/
@@ -7851,14 +7851,14 @@
* @en The float RGB value of the color temperature, each channel is from 0 to 1
* @zh 色温的浮点数颜色值,每个通道都是从 0 到 1
*/
get colorTemperatureRGB(): math.Vec3;
- set node(n: Node | null);
+ set node(n: BaseNode | null);
/**
* @en The node which owns the light source
* @zh 光源归属的节点
*/
- get node(): Node | null;
+ get node(): BaseNode | null;
/**
* @en The type of the light source, e.g. directional light, spot light, etc
* @zh 光源的类型,比如方向光、聚光灯等
*/
@@ -7878,9 +7878,9 @@
protected _color: math.Vec3;
protected _colorTemp: number;
protected _colorTempRGB: math.Vec3;
protected _scene: RenderScene | null;
- protected _node: Node | null;
+ protected _node: BaseNode | null;
protected _name: string | null;
protected _useColorTemperature: boolean;
protected _type: LightType;
initialize(): void;
@@ -8791,9 +8791,9 @@
* @en The result of one raycast operation
* @zh 一次射线检测的结果
*/
export interface IRaycastResult {
- node: Node;
+ node: BaseNode;
distance: number;
}
/**
* @en The render scene which is created by the [[Root]] and provides all basic render scene elements for the render process.
@@ -17562,9 +17562,9 @@
* @param wpos @en The world space location. @zh 世界空间位置。
* @param uiNode @en The UI node. @zh UI 节点。
* @param out @en The output local position in UI @zh 返回 UI 节点局部坐标。
*/
- export function WorldNode3DToLocalNodeUI(mainCamera: Camera, wpos: math.Vec3, uiNode: Node, out?: math.Vec3): math.Vec3;
+ export function WorldNode3DToLocalNodeUI(mainCamera: Camera, wpos: math.Vec3, uiNode: BaseNode, out?: math.Vec3): math.Vec3;
/**
* @en
* Conversion of non-UI nodes to UI Node (World) Space coordinate system.
* @zh
@@ -18282,9 +18282,9 @@
* const node = instantiate(prefabAsset);
* node.parent = director.getScene();
* ```
*/
- export function instantiate(prefab: Prefab): Node;
+ export function instantiate(prefab: Prefab): BaseNode;
/**
* @en Clones the object `original.
* @zh 克隆指定的任意类型的对象。
* @param original An existing object that you want to make a copy of.
@@ -18818,9 +18818,9 @@
*/
optimizationPolicy: number;
persistent: boolean;
constructor();
- createNode(cb: (err: Error | null, node: Node) => void): void;
+ createNode(cb: (err: Error | null, node: BaseNode) => void): void;
/**
* @en
* Dynamically translation prefab data into minimized code.<br/>
* This method will be called automatically before the first time the prefab being instantiated,<br/>
@@ -18840,12 +18840,12 @@
export class TargetInfo {
localID: string[];
}
export class TargetOverrideInfo {
- source: Component | Node | null;
+ source: Component | BaseNode | null;
sourceInfo: TargetInfo | null;
propertyPath: string[];
- target: Node | null;
+ target: BaseNode | null;
targetInfo: TargetInfo | null;
}
export class CompPrefabInfo {
fileId: string;
@@ -18857,9 +18857,9 @@
isTarget(localID: string[], propPath: string[]): boolean | undefined;
}
export class MountedChildrenInfo {
targetInfo: TargetInfo | null;
- nodes: Node[];
+ nodes: BaseNode[];
isTarget(localID: string[]): boolean | undefined;
}
export class MountedComponentsInfo {
targetInfo: TargetInfo | null;
@@ -18871,14 +18871,14 @@
* @internal
*/
export class PrefabInstance {
fileId: string;
- prefabRootNode?: Node;
+ prefabRootNode?: BaseNode;
mountedChildren: MountedChildrenInfo[];
mountedComponents: MountedComponentsInfo[];
propertyOverrides: PropertyOverrideInfo[];
removedComponents: TargetInfo[];
- targetMap: Record<string, any | Node | Component>;
+ targetMap: Record<string, any | BaseNode | Component>;
/**
* make sure prefab instance expand only once
* @internal
*/
@@ -18886,26 +18886,26 @@
findPropertyOverride(localID: string[], propPath: string[]): Prefab._utils.PropertyOverrideInfo | null | undefined;
removePropertyOverride(localID: string[], propPath: string[]): void;
}
export class PrefabInfo {
- root?: Node;
+ root?: BaseNode;
asset?: Prefab;
fileId: string;
instance?: PrefabInstance;
targetOverrides?: TargetOverrideInfo[];
- nestedPrefabInstanceRoots?: Node[];
+ nestedPrefabInstanceRoots?: BaseNode[];
}
- export function createNodeWithPrefab(node: Node): void;
- export function generateTargetMap(node: Node, targetMap: any, isRoot: boolean): void;
- export function getTarget(localID: string[], targetMap: any): Component | Node | null;
- export function applyMountedChildren(node: Node, mountedChildren: MountedChildrenInfo[], targetMap: Record<string, any | Node | Component>): void;
- export function applyMountedComponents(node: Node, mountedComponents: MountedComponentsInfo[], targetMap: Record<string, any | Node | Component>): void;
- export function applyRemovedComponents(node: Node, removedComponents: TargetInfo[], targetMap: Record<string, any | Node | Component>): void;
- export function applyPropertyOverrides(node: Node, propertyOverrides: PropertyOverrideInfo[], targetMap: Record<string, any | Node | Component>): void;
+ export function createNodeWithPrefab(node: BaseNode): void;
+ export function generateTargetMap(node: BaseNode, targetMap: any, isRoot: boolean): void;
+ export function getTarget(localID: string[], targetMap: any): BaseNode | Component | null;
+ export function applyMountedChildren(node: BaseNode, mountedChildren: MountedChildrenInfo[], targetMap: Record<string, any | BaseNode | Component>): void;
+ export function applyMountedComponents(node: BaseNode, mountedComponents: MountedComponentsInfo[], targetMap: Record<string, any | BaseNode | Component>): void;
+ export function applyRemovedComponents(node: BaseNode, removedComponents: TargetInfo[], targetMap: Record<string, any | BaseNode | Component>): void;
+ export function applyPropertyOverrides(node: BaseNode, propertyOverrides: PropertyOverrideInfo[], targetMap: Record<string, any | BaseNode | Component>): void;
export function applyTargetOverrides(node: BaseNode): void;
- export function expandPrefabInstanceNode(node: Node, recursively?: boolean): void;
+ export function expandPrefabInstanceNode(node: BaseNode, recursively?: boolean): void;
export function expandNestedPrefabInstanceNode(node: BaseNode): void;
- export function applyNodeAndComponentId(node: Node, rootId: string): void;
+ export function applyNodeAndComponentId(node: BaseNode, rootId: string): void;
}
}
/**
* @en Sub mesh for rendering which contains all geometry data, it can be used to create [[gfx.InputAssembler]].
@@ -21085,23 +21085,23 @@
* 目标节点必须位于为层级的根节点,否则无效。
* @param node - The node to be made persistent
* @deprecated Since v3.6.0, please use director.addPersistRootNode instead.
*/
- addPersistRootNode(node: Node): void;
+ addPersistRootNode(node: BaseNode): void;
/**
* @en Remove a persistent root node.
* @zh 取消常驻根节点。
* @param node - The node to be removed from persistent node list
* @deprecated Since v3.6.0, please use director.removePersistRootNode instead.
*/
- removePersistRootNode(node: Node): void;
+ removePersistRootNode(node: BaseNode): void;
/**
* @en Check whether the node is a persistent root node.
* @zh 检查节点是否是常驻根节点。
* @param node - The node to be checked.
* @deprecated Since v3.6.0, please use director.isPersistRootNode instead.
*/
- isPersistRootNode(node: Node): boolean;
+ isPersistRootNode(node: BaseNode): boolean;
}
export namespace Game {
export type OnStart = () => void;
}
@@ -21665,21 +21665,21 @@
* 声明常驻根节点,该节点不会在场景切换中被销毁。<br>
* 目标节点必须位于为层级的根节点,否则无效。
* @param node - The node to be made persistent
*/
- addPersistRootNode(node: Node): void;
+ addPersistRootNode(node: BaseNode): void;
/**
* @en Remove a persistent root node.
* @zh 取消常驻根节点。
* @param node - The node to be removed from persistent node list
*/
- removePersistRootNode(node: Node): void;
+ removePersistRootNode(node: BaseNode): void;
/**
* @en Check whether the node is a persistent root node.
* @zh 检查节点是否是常驻根节点。
* @param node - The node to be checked
*/
- isPersistRootNode(node: Node): boolean;
+ isPersistRootNode(node: BaseNode): boolean;
}
export namespace Director {
export type OnBeforeLoadScene = () => void;
export type OnUnload = () => void;
@@ -24742,20 +24742,29 @@
* @deprecated since v3.0 url is deprecated
*/
export const url: {};
/**
- * @en The base class for [[Node]], it:
- * - maintains scene hierarchy and life cycle logic
- * - provides EventTarget ability
- * - emits events if some properties changed, ref: [[Node.EventType]]
- * - manages components
- * @zh [[Node]] 的基类,他会负责:
- * - 维护场景树以及节点生命周期管理
- * - 提供 EventTarget 的事件管理和注册能力
- * - 派发节点状态相关的事件,参考:[[Node.EventType]]
- * - 管理组件
+ * @zh
+ * 场景树中的基本节点,基本特性有:
+ * * 具有层级关系
+ * * 持有各类组件
+ * * 维护空间变换(坐标、旋转、缩放)信息
*/
- export class BaseNode extends CCObject implements ISchedulable {
+ /**
+ * @en
+ * Class of all entities in Cocos Creator scenes.
+ * Basic functionalities include:
+ * * Hierarchy management with parent and children
+ * * Components management
+ * * Coordinate system with position, scale, rotation in 3d space
+ * @zh
+ * Cocos Creator 场景中的所有节点类。
+ * 基本特性有:
+ * * 具有层级关系
+ * * 持有各类组件
+ * * 维护 3D 空间左边变换(坐标、旋转、缩放)信息
+ */
+ export class BaseNode extends CCObject implements ISchedulable, CustomSerializable {
/**
* @en Gets all components attached to this node.
* @zh 获取附加到此节点的所有组件。
*/
@@ -24786,9 +24795,9 @@
* @en All children nodes.
* @zh 节点的所有子节点。
* @readOnly
*/
- get children(): Node[];
+ get children(): BaseNode[];
/**
* @en
* The local active state of this node.
* Note that a Node may be inactive because a parent is not active, even if this returns true.
@@ -24875,9 +24884,8 @@
* The derived `Scene` overrides this method to behavior differently.
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
protected _updateScene(): void;
- constructor(name?: string);
/**
* @en
* Properties configuration function.
* All properties in attrs will be set to the node,
@@ -24899,17 +24907,19 @@
getParent(): this | null;
/**
* @en Set parent of the node.
* @zh 设置该节点的父节点。
+ * @param value Parent node
+ * @param keepWorldTransform Whether keep node's current world transform unchanged after this operation
*/
setParent(value: this | Scene | null, keepWorldTransform?: boolean): void;
/**
* @en Returns a child with the same uuid.
* @zh 通过 uuid 获取节点的子节点。
* @param uuid - The uuid to find the child node.
* @return a Node whose uuid equals to the input parameter
*/
- getChildByUuid(uuid: string): Node | null;
+ getChildByUuid(uuid: string): BaseNode | null;
/**
* @en Returns a child with the same name.
* @zh 通过名称获取节点的子节点。
* @param name - A name to find the child node.
@@ -24918,9 +24928,9 @@
* ```
* var child = node.getChildByName("Test Node");
* ```
*/
- getChildByName(name: string): Node | null;
+ getChildByName(name: string): BaseNode | null;
/**
* @en Returns a child with the given path.
* @zh 通过路径获取节点的子节点。
* @param path - A path to find the child node.
@@ -24929,15 +24939,15 @@
* ```
* var child = node.getChildByPath("subNode/Test Node");
* ```
*/
- getChildByPath(path: string): Node | null;
+ getChildByPath(path: string): BaseNode | null;
/**
* @en Add a child to the current node.
* @zh 添加一个子节点。
* @param child - the child node to be added
*/
- addChild(child: Node): void;
+ addChild(child: BaseNode): void;
/**
* @en Inserts a child to the node at a specified index.
* @zh 插入子节点到指定位置
* @param child - the child node to be inserted
@@ -24946,9 +24956,9 @@
* ```
* node.insertChild(child, 2);
* ```
*/
- insertChild(child: Node, siblingIndex: number): void;
+ insertChild(child: BaseNode, siblingIndex: number): void;
/**
* @en Get the sibling index of the current node in its parent's children array.
* @zh 获取当前节点在父节点的 children 数组中的位置。
*/
@@ -24993,9 +25003,9 @@
* @en Removes a child from the container.
* @zh 移除节点中指定的子节点。
* @param child - The child node which will be removed.
*/
- removeChild(child: this | Node): void;
+ removeChild(child: this | BaseNode): void;
/**
* @en Removes all children from the container.
* @zh 移除节点所有的子节点。
*/
@@ -25154,9 +25164,10 @@
* 2. At target phase: dispatch to the listeners of the real target
* 3. Bubbling phase: dispatch in bubble targets, e.g. parents in node tree, from the real target to root
* In any moment of the dispatching process, it can be stopped via `event.stopPropagation()` or `event.stopPropagationImmediate()`.
* You can also register custom event and use `emit` to trigger custom event on Node.
- * For such events, there won't be capturing and bubbling phase, your event will be dispatched directly to its listeners registered on the same node.
+ * For such events, there won't be capturing and bubbling phase,
+ * your event will be dispatched directly to its listeners registered on the same node.
* You can also pass event callback parameters with `emit` by passing parameters after `type`.
* @zh
* 在节点上注册指定类型的回调函数,也可以设置 target 用于绑定响应函数的 this 对象。
* 鼠标或触摸事件会被系统调用 dispatchEvent 方法触发,触发的过程包含三个阶段:
@@ -25166,11 +25177,13 @@
* 同时您可以将事件派发到父节点或者通过调用 stopPropagation 拦截它。
* 你也可以注册自定义事件到节点上,并通过 emit 方法触发此类事件,对于这类事件,不会发生捕获冒泡阶段,只会直接派发给注册在该节点上的监听器
* 你可以通过在 emit 方法调用时在 type 之后传递额外的参数作为事件回调的参数列表
* @param type - A string representing the event type to listen for.<br>See [[Node.EventType.POSITION_CHANGED]] for all builtin events.
- * @param callback - The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique).
+ * @param callback - The callback that will be invoked when the event is dispatched.
+ * The callback is ignored if it is a duplicate (the callbacks are unique).
* @param target - The target (this object) to invoke the callback, can be null
- * @param useCapture - When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit, otherwise it will be triggered during bubbling phase.
+ * @param useCapture - When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit,
+ * otherwise it will be triggered during bubbling phase.
* @return - Just returns the incoming callback so you can save the anonymous function easier.
* @example
* ```ts
* this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
@@ -25187,9 +25200,10 @@
* @zh 删除之前与同类型,回调,目标或 useCapture 注册的回调。
* @param type - A string representing the event type being removed.
* @param callback - The callback to remove.
* @param target - The target (this object) to invoke the callback, if it's not given, only callback without target will be removed
- * @param useCapture - When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit, otherwise it will be triggered during bubbling phase.
+ * @param useCapture - When set to true, the listener will be triggered at capturing phase
+ * which is ahead of the final target emit, otherwise it will be triggered during bubbling phase.
* @example
* ```ts
* this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
* node.off(NodeEventType.TOUCH_START, callback, this.node);
@@ -25268,13 +25282,8 @@
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
_updateSiblingIndex(): void;
- protected _onSetParent(oldParent: this | null, keepWorldTransform?: boolean): void;
- protected _onPostActivated(active: boolean): void;
- protected _onBatchCreated(dontSyncChildPrefab: boolean): void;
- protected _onPreDestroy(): void;
- protected _onHierarchyChanged(oldParent: this | null): void;
protected _instantiate(cloned: any, isSyncedNode: any): any;
protected _onHierarchyChangedBase(oldParent: this | null): void;
protected _onPreDestroyBase(): boolean;
protected _onSiblingIndexChanged?(siblingIndex: number): void;
@@ -25286,31 +25295,8 @@
* @param constructor Constructor of the component.
* @throws If one or more component of same type have been existed in this node.
*/
protected _checkMultipleComp?<T extends Component>(constructor: __private._types_globals__Constructor<T>): void;
- }
- /**
- * @zh
- * 场景树中的基本节点,基本特性有:
- * * 具有层级关系
- * * 持有各类组件
- * * 维护空间变换(坐标、旋转、缩放)信息
- */
- /**
- * @en
- * Class of all entities in Cocos Creator scenes.
- * Basic functionalities include:
- * * Hierarchy management with parent and children
- * * Components management
- * * Coordinate system with position, scale, rotation in 3d space
- * @zh
- * Cocos Creator 场景中的所有节点类。
- * 基本特性有:
- * * 具有层级关系
- * * 持有各类组件
- * * 维护 3D 空间左边变换(坐标、旋转、缩放)信息
- */
- export class Node extends BaseNode implements CustomSerializable {
/**
* @en Event types emitted by Node
* @zh 节点可能发出的事件类型
*/
@@ -25351,17 +25337,18 @@
protected _lrot: math.Quat;
protected _lscale: math.Vec3;
protected _layer: number;
protected _euler: math.Vec3;
+ protected _dirtyFlags: TransformBit;
protected _eulerDirty: boolean;
protected _flagChangeVersion: number;
protected _hasChangedFlags: number;
constructor(name?: string);
/**
* @en Determine whether the given object is a normal Node. Will return false if [[Scene]] given.
* @zh 指定对象是否是普通的节点?如果传入 [[Scene]] 会返回 false。
*/
- static isNode(obj: unknown): obj is Node;
+ static isNode(obj: unknown): obj is BaseNode;
protected _onPreDestroy(): boolean;
/**
* @en Position in local coordinate system
* @zh 本地坐标系下的坐标
@@ -25452,18 +25439,11 @@
* @internal
*/
[serializeTag](serializationOutput: SerializationOutput, context: SerializationContext): void;
/**
- * @en Set parent of the node.
- * @zh 设置该节点的父节点。
- * @param value Parent node
- * @param keepWorldTransform Whether keep node's current world transform unchanged after this operation
- */
- setParent(value: this | null, keepWorldTransform?: boolean): void;
- /**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- _onSetParent(oldParent: this | null, keepWorldTransform: boolean): void;
+ _onSetParent(oldParent: this | null, keepWorldTransform?: boolean): void;
protected _onHierarchyChanged(oldParent: this | null): void;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
@@ -25744,12 +25724,12 @@
getPathInHierarchy(): string;
}
/**
* @en
- * Scene is a subclass of [[BaseNode]], composed by nodes, representing the root of a runnable environment in the game.
+ * Scene is a subclass of [[Node]], composed by nodes, representing the root of a runnable environment in the game.
* It's managed by [[Director]] and user can switch from a scene to another using [[Director.loadScene]]
* @zh
- * Scene 是 [[BaseNode]] 的子类,由节点所构成,代表着游戏中可运行的某一个整体环境。
+ * Scene 是 [[Node]] 的子类,由节点所构成,代表着游戏中可运行的某一个整体环境。
* 它由 [[Director]] 管理,用户可以使用 [[Director.loadScene]] 来切换场景
*/
export class Scene extends BaseNode {
/**
@@ -25773,16 +25753,8 @@
dependAssets: null;
protected _renderScene: renderer.RenderScene | null;
protected _inited: boolean;
protected _prefabSyncedInLiveReload: boolean;
- protected _pos: Readonly<math.Vec3>;
- protected _rot: Readonly<math.Quat>;
- protected _scale: Readonly<math.Vec3>;
- protected _mat: Readonly<math.Mat4>;
- protected _dirtyFlags: number;
- protected _lpos: Readonly<math.Vec3>;
- protected _lrot: Readonly<math.Quat>;
- protected _lscale: Readonly<math.Vec3>;
protected _updateScene(): void;
constructor(name: string);
/**
* @en Destroy the current scene and all its nodes, this action won't destroy related assets
@@ -25800,130 +25772,15 @@
_onHierarchyChanged(): void;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- _onBatchCreated(dontSyncChildPrefab: boolean): void;
+ _onPostActivated(active: boolean): void;
/**
- * @en
- * Refer to [[Node.getPosition]]
- * @zh
- * 参考 [[Node.getPosition]]
+ * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- getPosition(out?: math.Vec3): math.Vec3;
+ _onBatchCreated(dontSyncChildPrefab: boolean): void;
/**
* @en
- * Refer to [[Node.getRotation]]
- * @zh
- * 参考 [[Node.getRotation]]
- */
- getRotation(out?: math.Quat): math.Quat;
- /**
- * @en
- * Refer to [[Node.getScale]]
- * @zh
- * 参考 [[Node.getScale]]
- */
- getScale(out?: math.Vec3): math.Vec3;
- /**
- * @en
- * Refer to [[Node.getWorldPosition]]
- * @zh
- * 参考 [[Node.getWorldPosition]]
- */
- getWorldPosition(out?: math.Vec3): math.Vec3;
- /**
- * @en
- * Refer to [[Node.getWorldRotation]]
- * @zh
- * 参考 [[Node.getWorldRotation]]
- */
- getWorldRotation(out?: math.Quat): math.Quat;
- /**
- * @en
- * Refer to [[Node.getWorldScale]]
- * @zh
- * 参考 [[Node.getWorldScale]]
- */
- getWorldScale(out?: math.Vec3): math.Vec3;
- /**
- * @en
- * Refer to [[Node.getWorldMatrix]]
- * @zh
- * 参考 [[Node.getWorldMatrix]]
- */
- getWorldMatrix(out?: math.Mat4): math.Mat4;
- /**
- * @en
- * Refer to [[Node.getWorldRS]]
- * @zh
- * 参考 [[Node.getWorldRS]]
- */
- getWorldRS(out?: math.Mat4): math.Mat4;
- /**
- * @en
- * Refer to [[Node.getWorldRT]]
- * @zh
- * 参考 [[Node.getWorldRT]]
- */
- getWorldRT(out?: math.Mat4): math.Mat4;
- /**
- * @en
- * Refer to [[Node.position]]
- * @zh
- * 参考 [[Node.position]]
- */
- get position(): Readonly<math.Vec3>;
- /**
- * @en
- * Refer to [[Node.worldPosition]]
- * @zh
- * 参考 [[Node.worldPosition]]
- */
- get worldPosition(): Readonly<math.Vec3>;
- /**
- * @en
- * Refer to [[Node.rotation]]
- * @zh
- * 参考 [[Node.rotation]]
- */
- get rotation(): Readonly<math.Quat>;
- /**
- * @en
- * Refer to [[Node.worldRotation]]
- * @zh
- * 参考 [[Node.worldRotation]]
- */
- get worldRotation(): Readonly<math.Quat>;
- /**
- * @en
- * Refer to [[Node.scale]]
- * @zh
- * 参考 [[Node.scale]]
- */
- get scale(): Readonly<math.Vec3>;
- /**
- * @en
- * Refer to [[Node.worldScale]]
- * @zh
- * 参考 [[Node.worldScale]]
- */
- get worldScale(): Readonly<math.Vec3>;
- /**
- * @en
- * Refer to [[Node.eulerAngles]]
- * @zh
- * 参考 [[Node.eulerAngles]]
- */
- get eulerAngles(): Readonly<math.Vec3>;
- /**
- * @en
- * Refer to [[Node.worldMatrix]]
- * @zh
- * 参考 [[Node.worldMatrix]]
- */
- get worldMatrix(): Readonly<math.Mat4>;
- /**
- * @en
* Refer to [[Node.updateWorldTransform]]
* @zh
* 参考 [[Node.updateWorldTransform]]
*/
@@ -26637,9 +26494,9 @@
* @en Set plane which receives shadow with the given node's world transformation
* @zh 根据指定节点的世界变换设置阴影接收平面的信息
* @param node The node for setting up the plane
*/
- setPlaneFromNode(node: Node): void;
+ setPlaneFromNode(node: BaseNode): void;
/**
* @en Activate the shadow configuration in the render scene, no need to invoke manually.
* @zh 在渲染场景中启用阴影设置,不需要手动调用
* @param resource The shadow configuration object in the render scene
@@ -26736,9 +26593,9 @@
/**
* @internal
* @deprecated since v3.5
*/
- export class PrivateNode extends Node {
+ export class PrivateNode extends BaseNode {
constructor(name?: string);
}
/**
* @en Base class for all functional system managed by [[Director]].
@@ -26848,9 +26705,9 @@
* The node that contains target component
* @zh
* 事件响应组件和函数所在节点
*/
- target: Node | null;
+ target: BaseNode | null;
/**
* @en
* The name of the component(script) that contains target callback, such as the name 'MainMenu' of the script in the example
* @zh
@@ -26967,9 +26824,9 @@
* import { log } from 'cc';
* log(comp.node);
* ```
*/
- node: Node;
+ node: BaseNode;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
_enabled: boolean;
@@ -27535,9 +27392,9 @@
* this.convertToUINode(target.worldPosition, uiNode.parent, out);
* uiNode.position = out;
* ```
*/
- convertToUINode(wpos: math.Vec3 | Readonly<math.Vec3>, uiNode: Node, out?: math.Vec3): math.Vec3;
+ convertToUINode(wpos: math.Vec3 | Readonly<math.Vec3>, uiNode: BaseNode, out?: math.Vec3): math.Vec3;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
_createCamera(): void;
@@ -28302,9 +28159,9 @@
* import { instantiate } from 'cc';
* const myNode = instantiate(this.template);
* this.myPool.put(myNode);
*/
- put(obj: Node): void;
+ put(obj: BaseNode): void;
/**
* @en Get a obj from pool, if no available object in pool, null will be returned.
* This function will invoke the reuse function of poolHandlerComp if exist.
* @zh 获取对象池中的对象,如果对象池没有可用对象,则返回空。
@@ -28312,9 +28169,9 @@
* @param args - 向 poolHandlerComp 中的 'reuse' 函数传递的参数
* @example
* let newNode = this.myPool.get();
*/
- get(...args: any[]): Node | null;
+ get(...args: any[]): BaseNode | null;
}
/**
* @en The event type supported by SystemEvent and Node events
* @zh SystemEvent 支持的事件类型以及节点事件类型
@@ -31358,9 +31215,9 @@
initUpdate(dt?: number): void;
update(dt: number): void;
getDragonBonesDataByRawData(rawData: any): DragonBonesData | null;
buildArmatureDisplay(armatureName: string, dragonBonesName?: string, skinName?: string, textureAtlasName?: string): DisplayData | null;
- createArmatureNode(comp: ArmatureDisplay, armatureName: string, node?: Node): ArmatureDisplay;
+ createArmatureNode(comp: ArmatureDisplay, armatureName: string, node?: BaseNode): ArmatureDisplay;
_buildTextureAtlasData(textureAtlasData: null | CCTextureAtlasData, textureAtlas?: __private._cocos_core_assets_texture_base__TextureBase): CCTextureAtlasData;
_sortSlots(): void;
_buildArmature(dataPackage: any): Armature;
_buildSlot(dataPackage: any, slotData: any, displays: any): CCSlot;
@@ -31449,9 +31306,9 @@
*/
export class CCArmatureDisplay extends DisplayData implements IEventDispatcher {
get node(): this;
shouldAdvanced: boolean;
- _ccNode: Node | null;
+ _ccNode: BaseNode | null;
_ccComponent: ArmatureDisplay | null;
_eventTarget: EventTarget;
_armature: Armature | null;
constructor();
@@ -31461,9 +31318,9 @@
setEventTarget(eventTarget: EventTarget): void;
getRootDisplay(): CCArmatureDisplay;
convertToRootSpace(pos: math.Vec3): math.Vec3;
convertToWorldSpace(point: math.Vec3): math.Vec3 | undefined;
- getRootNode(): Node | null;
+ getRootNode(): BaseNode | null;
dbInit(armature: Armature | null): void;
dbClear(): void;
dbUpdate(): void;
advanceTimeBySelf(on: boolean | number): void;
@@ -31571,9 +31428,9 @@
get dragonBonesJson(): string;
set dragonBonesJson(value: string);
protected _dragonBonesJsonData?: ArrayBuffer;
constructctor(): void;
- createNode(callback: (err: Error | null, node: Node) => void): void;
+ createNode(callback: (err: Error | null, node: BaseNode) => void): void;
reset(): void;
init(factory?: CCFactory, atlasUUID?: string): string;
getArmatureEnum(): any;
getAnimsEnum(armatureName: string): {
@@ -31601,9 +31458,9 @@
*/
get texture(): Texture2D | null;
set texture(value: Texture2D | null);
_textureAtlasData: TextureAtlasData | null;
- createNode(callback: (error: Error | null, node: Node) => void): void;
+ createNode(callback: (error: Error | null, node: BaseNode) => void): void;
init(factory: CCFactory): void;
destroy(): boolean;
protected _clear(): void;
}
@@ -31654,11 +31511,11 @@
/**
* @en Transform output node.
* @zh 此挂点的变换信息输出节点。
*/
- target: Node | null;
+ target: BaseNode | null;
boneIndex: number | null;
- constructor(path?: string, target?: Node | null);
+ constructor(path?: string, target?: BaseNode | null);
}
export interface BoneIndex extends Number {
_any: number;
}
@@ -31770,9 +31627,9 @@
* 当前动画组件维护的挂点数组。要挂载自定义节点到受动画驱动的骨骼上,必须先在此注册挂点。
*/
get sockets(): DragonBoneSocket[];
set sockets(val: DragonBoneSocket[]);
- get socketNodes(): Map<string, Node>;
+ get socketNodes(): Map<string, BaseNode>;
_armature: Armature | null;
attachUtil: AttachUtil;
get drawList(): memop.RecyclePool<ArmatureDisplayDrawData>;
protected _defaultArmatureIndexValue: DefaultArmaturesEnum;
@@ -31827,9 +31684,9 @@
[key: string]: renderer.MaterialInstance;
};
protected _enumArmatures: any;
protected _enumAnimations: any;
- protected _socketNodes: Map<string, Node>;
+ protected _socketNodes: Map<string, BaseNode>;
protected _cachedSockets: Map<string, BoneIndex>;
protected _sockets: DragonBoneSocket[];
constructor();
initFactory(): void;
@@ -32023,9 +31880,9 @@
* @param {String} armatureName
* @param {Node} node
* @return {dragonBones.ArmatureDisplay}
*/
- buildArmature(armatureName: string, node?: Node): ArmatureDisplay;
+ buildArmature(armatureName: string, node?: BaseNode): ArmatureDisplay;
/**
* @en
* Get the current armature object of the ArmatureDisplay.
* @zh
@@ -32046,9 +31903,9 @@
*/
export class AttachUtil {
_inited: boolean;
_armature: Armature | null;
- _armatureNode: Node | null;
+ _armatureNode: BaseNode | null;
_armatureDisplay: ArmatureDisplay | null;
constructor();
init(armatureDisplay: ArmatureDisplay): void;
reset(): void;
@@ -39451,10 +39308,10 @@
* @zh 从 prefab 实例化粒子系统
*/
static instantiate(prefab: any): CCObject;
static destroy(prefab: any): void;
- static play(rootNode: Node): void;
- static stop(rootNode: Node): void;
+ static play(rootNode: BaseNode): void;
+ static stop(rootNode: BaseNode): void;
}
export class CurveRange {
static Mode: {
Constant: number;
@@ -43039,9 +42896,9 @@
rot: math.Quat;
scale: math.Vec3;
}
export interface ISocketData {
- target: Node;
+ target: BaseNode;
frames: ITransform[];
}
/**
* @en The animation state for skeletal animations.
@@ -43055,9 +42912,9 @@
protected _animInfoMgr: __private._cocos_3d_skeletal_animation_skeletal_animation_utils__JointAnimationInfo;
protected _parent: SkeletalAnimation | null;
protected _curvesInited: boolean;
constructor(clip: AnimationClip, name?: string);
- initialize(root: Node): void;
+ initialize(root: BaseNode): void;
/**
* @internal This method only friends to `SkeletalAnimation`.
*/
setUseBaked(useBaked: boolean): void;
@@ -43082,10 +42939,10 @@
/**
* @en Transform output node.
* @zh 此挂点的变换信息输出节点。
*/
- target: Node | null;
- constructor(path?: string, target?: Node | null);
+ target: BaseNode | null;
+ constructor(path?: string, target?: BaseNode | null);
}
/**
* @en
* Skeletal animation component, offers the following features on top of [[Animation]]:
@@ -43147,9 +43004,9 @@
* 如果对应路径还没有创建挂点,这个函数会创建一个新的挂点。
* @param path @en Path of the target joint. @zh 此挂点的骨骼路径。
* @returns @en The target node of the socket. @zh 挂点的目标节点
*/
- createSocket(path: string): Node | null;
+ createSocket(path: string): BaseNode | null;
/**
* @internal This method only friends to skinned mesh renderer.
*/
notifySkinnedMeshAdded(skinnedMeshRenderer: SkinnedMeshRenderer): void;
@@ -43274,10 +43131,10 @@
/**
* @en Transform output node.
* @zh 此挂点的变换信息输出节点。
*/
- target: Node | null;
- constructor(path?: string, target?: Node | null);
+ target: BaseNode | null;
+ constructor(path?: string, target?: BaseNode | null);
}
/**
* @en
* The skeleton of Spine <br/>
@@ -43387,9 +43244,9 @@
* 当前动画组件维护的挂点数组。要挂载自定义节点到受动画驱动的骨骼上,必须先在此注册挂点。
*/
get sockets(): SpineSocket[];
set sockets(val: SpineSocket[]);
- get socketNodes(): Map<number, Node>;
+ get socketNodes(): Map<number, BaseNode>;
/**
* @internal
*/
_frameCache: __private._cocos_spine_skeleton_cache__AnimationCache | null;
@@ -43494,9 +43351,9 @@
protected _debugMesh: boolean;
protected _rootBone: spine.Bone | null;
protected _state?: spine.AnimationState;
protected _listener: spine.AnimationStateListener | null;
- protected _socketNodes: Map<number, Node>;
+ protected _socketNodes: Map<number, BaseNode>;
protected _cachedSockets: Map<string, number>;
constructor();
/**
* @en
@@ -43933,9 +43790,9 @@
get _nativeAsset(): ArrayBuffer;
set _nativeAsset(bin: ArrayBuffer);
protected _atlasText: string;
constructor();
- createNode(callback: (err: Error | null, node: Node) => void): void;
+ createNode(callback: (err: Error | null, node: BaseNode) => void): void;
reset(): void;
resetEnums(): void;
/**
* @en Get the included SkeletonData used in spine runtime.<br>
@@ -44693,9 +44550,9 @@
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
_exportDefaultNativeData(): Uint8Array;
}
- export interface ImageExtendedNode extends Node {
+ export interface ImageExtendedNode extends BaseNode {
layerInfo: __private._cocos_tiledmap_tiled_types__TMXImageLayerInfo;
_offset: math.Vec2;
}
/**
@@ -45061,32 +44918,32 @@
* @method addUserNode
* @param {cc.Node} node
* @return {Boolean}
*/
- addUserNode(node: Node): boolean;
+ addUserNode(node: BaseNode): boolean;
/**
* @en Removes user's node.
* @zh 移除用户节点。
* @method removeUserNode
* @param {cc.Node} node
* @return {Boolean}
*/
- removeUserNode(node: Node): boolean;
+ removeUserNode(node: BaseNode): boolean;
/**
* @en Destroy user's node.
* @zh 销毁用户节点。
* @method destroyUserNode
* @param {cc.Node} node
*/
- destroyUserNode(node: Node): void;
+ destroyUserNode(node: BaseNode): void;
protected _nodeLocalPosToLayerPos(nodePos: math.IVec2Like, out: math.IVec2Like): void;
getNodesByRowCol(row: number, col: number): {
count: number;
list: (TiledUserNodeData | null)[];
} | null;
getNodesCountByRow(row: any): number;
protected _updateAllUserNode(): void;
- protected _updateCullingOffsetByUserNode(node_: Node): void;
+ protected _updateCullingOffsetByUserNode(node_: BaseNode): void;
protected _userNodeSizeChange(): void;
protected _userNodePosChange(): void;
protected _removeUserNodeFromGrid(dataComp: TiledUserNodeData): void;
protected _limitInLayer(rowCol: {
@@ -45450,9 +45307,9 @@
protected _hasAniObj?: boolean;
protected _texGrids?: __private._cocos_tiledmap_tiled_types__TiledTextureGrids;
protected aniObjects?: {
object: __private._cocos_tiledmap_tiled_types__TMXObject;
- imgNode: Node;
+ imgNode: BaseNode;
gridGID: __private._cocos_tiledmap_tiled_types__GID;
}[];
protected _objects: __private._cocos_tiledmap_tiled_types__TMXObject[];
/**
@@ -45916,10 +45773,10 @@
* - Button.Transition.COLOR // 进行颜色之间过渡
* - Button.Transition.SPRITE // 进行 Sprite 之间的过渡
* - Button.Transition.SCALE // 进行缩放过渡
*/
- get target(): Node;
- set target(value: Node);
+ get target(): BaseNode;
+ set target(value: BaseNode);
/**
* @en
* Whether the Button is disabled.
* If true, the Button will trigger event and do transition.
@@ -46055,9 +45912,9 @@
protected _pressedSprite: SpriteFrame | null;
protected _disabledSprite: SpriteFrame | null;
protected _duration: number;
protected _zoomScale: number;
- protected _target: Node | null;
+ protected _target: BaseNode | null;
__preload(): void;
onEnable(): void;
onDisable(): void;
onDestroy(): void;
@@ -46067,9 +45924,9 @@
protected _registerNodeEvent(): void;
protected _registerTargetEvent(target: any): void;
protected _unregisterNodeEvent(): void;
protected _unregisterTargetEvent(target: any): void;
- protected _getTargetSprite(target: Node | null): Sprite | null;
+ protected _getTargetSprite(target: BaseNode | null): Sprite | null;
protected _applyTarget(): void;
protected _onTouchBegan(event?: EventTouch): void;
protected _onTouchMove(event?: EventTouch): void;
protected _onTouchEnded(event?: EventTouch): void;
@@ -46542,10 +46399,10 @@
protected _addEventListeners(): void;
protected _removeEventListeners(): void;
protected _addChildrenEventListeners(): void;
protected _removeChildrenEventListeners(): void;
- protected _childAdded(child: Node): void;
- protected _childRemoved(child: Node): void;
+ protected _childAdded(child: BaseNode): void;
+ protected _childRemoved(child: BaseNode): void;
protected _resized(): void;
protected _doLayoutHorizontally(baseWidth: number, rowBreak: boolean, fnPositionY: (...args: any[]) => number, applyChildren: boolean): number;
protected _doLayoutVertically(baseHeight: number, columnBreak: boolean, fnPositionX: (...args: any[]) => number, applyChildren: boolean): number;
protected _doLayoutGridAxisHorizontal(layoutAnchor: math.Vec2 | Readonly<math.Vec2>, layoutSize: math.Size): void;
@@ -46735,9 +46592,9 @@
onTouchEnded(): void;
protected onEnable(): void;
protected start(): void;
protected update(dt: any): void;
- protected _convertToScrollViewSpace(out: math.Vec2, content: Node): void;
+ protected _convertToScrollViewSpace(out: math.Vec2, content: BaseNode): void;
protected _setOpacity(opacity: number): void;
protected _updateHandlerPosition(position: math.Vec2): void;
protected _fixupHandlerPosition(out: math.Vec3): void;
protected _conditionalDisableScrollBar(contentSize: math.Size, scrollViewSize: math.Size): boolean;
@@ -46795,10 +46652,10 @@
*
* @zh
* 可滚动展示内容的节点。
*/
- get content(): Node | null;
- set content(value: Node | null);
+ get content(): BaseNode | null;
+ set content(value: BaseNode | null);
/**
* @en
* Enable horizontal scroll.
*
@@ -46851,9 +46708,9 @@
scrollEvents: EventHandler[];
get view(): UITransform | null;
protected _autoScrolling: boolean;
protected _scrolling: boolean;
- protected _content: Node | null;
+ protected _content: BaseNode | null;
protected _horizontalScrollBar: ScrollBar | null;
protected _verticalScrollBar: ScrollBar | null;
protected _topBoundary: number;
protected _bottomBoundary: number;
@@ -47175,15 +47032,15 @@
update(dt: number): void;
onDisable(): void;
protected _registerEvent(): void;
protected _unregisterEvent(): void;
- protected _onMouseWheel(event: EventMouse, captureListeners?: Node[]): void;
- protected _onTouchBegan(event: EventTouch, captureListeners?: Node[]): void;
- protected _onTouchMoved(event: EventTouch, captureListeners?: Node[]): void;
- protected _onTouchEnded(event: EventTouch, captureListeners?: Node[]): void;
- protected _onTouchCancelled(event: EventTouch, captureListeners?: Node[]): void;
+ protected _onMouseWheel(event: EventMouse, captureListeners?: BaseNode[]): void;
+ protected _onTouchBegan(event: EventTouch, captureListeners?: BaseNode[]): void;
+ protected _onTouchMoved(event: EventTouch, captureListeners?: BaseNode[]): void;
+ protected _onTouchEnded(event: EventTouch, captureListeners?: BaseNode[]): void;
+ protected _onTouchCancelled(event: EventTouch, captureListeners?: BaseNode[]): void;
protected _calculateBoundary(): void;
- protected _hasNestedViewGroup(event: Event, captureListeners?: Node[]): boolean;
+ protected _hasNestedViewGroup(event: Event, captureListeners?: BaseNode[]): boolean;
protected _startInertiaScroll(touchMoveVelocity: math.Vec3): void;
protected _calculateAttenuatedFactor(distance: number): number;
protected _startAttenuatingAutoScroll(deltaMove: math.Vec3, initialVelocity: math.Vec3): void;
protected _calculateAutoScrollTimeByInitialSpeed(initialSpeed: number): number;
@@ -47425,10 +47282,10 @@
*
* @zh
* 指定一个对齐目标,只能是当前节点的其中一个父节点,默认为空,为空时表示当前父节点。
*/
- get target(): Node | null;
- set target(value: Node | null);
+ get target(): BaseNode | null;
+ set target(value: BaseNode | null);
/**
* @en
* Whether to align to the top.
*
@@ -47723,16 +47580,16 @@
_adjustWidgetToAnchorChanged(): void;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- _adjustTargetToParentChanged(oldParent: Node): void;
+ _adjustTargetToParentChanged(oldParent: BaseNode): void;
protected _registerEvent(): void;
protected _unregisterEvent(): void;
protected _removeParentEvent(): void;
protected _autoChangedValue(flag: __private._cocos_ui_widget__AlignFlags, isAbs: boolean): void;
protected _registerTargetEvents(): void;
protected _unregisterTargetEvents(): void;
- protected _unregisterOldParentEvents(oldParent: Node): void;
+ protected _unregisterOldParentEvents(oldParent: BaseNode): void;
protected _setDirtyByMode(): void;
}
export namespace Widget {
export type AlignMode = __private._types_globals__EnumAlias<typeof __private._cocos_ui_widget__AlignMode>;
@@ -47831,9 +47688,9 @@
protected _pageTurningEventTiming: number;
protected _indicator: PageViewIndicator | null;
protected _curPageIdx: number;
protected _lastPageIdx: number;
- protected _pages: Node[];
+ protected _pages: BaseNode[];
protected _initContentPos: math.Vec3;
protected _scrollCenterOffsetX: number[];
protected _scrollCenterOffsetY: number[];
protected _touchBeganPosition: math.Vec2;
@@ -47868,9 +47725,9 @@
* 返回视图中的所有页面。
*
* @returns @en return all pages of this page view @zh 返回当前视图所有页面
*/
- getPages(): Node[];
+ getPages(): BaseNode[];
/**
* @en
* At the end of the current page view to insert a new view.
*
@@ -47878,9 +47735,9 @@
* 在当前页面视图的尾部插入一个新视图。
*
* @param page @en New page to add to this page view @zh 新加入的视图
*/
- addPage(page: Node): void;
+ addPage(page: BaseNode): void;
/**
* @en
* Inserts a page in the specified location.
*
@@ -47889,9 +47746,9 @@
*
* @param page @en New page to insert to this page view @zh 新插入的视图
* @param index @en The index of new page to be inserted @zh 新插入视图的索引
*/
- insertPage(page: Node, index: number): void;
+ insertPage(page: BaseNode, index: number): void;
/**
* @en
* Removes a page from PageView.
*
@@ -47899,9 +47756,9 @@
* 移除指定页面。
*
* @param page @en The page to be removed @zh 将被移除的页面
*/
- removePage(page: Node): void;
+ removePage(page: BaseNode): void;
/**
* @en
* Removes a page at index of PageView.
*
@@ -47999,9 +47856,9 @@
protected _direction: __private._cocos_ui_page_view_indicator__Direction;
protected _cellSize: math.Size;
protected _layout: Layout | null;
protected _pageView: PageView | null;
- protected _indicators: Node[];
+ protected _indicators: BaseNode[];
onLoad(): void;
/**
* @en
* Set Page View.
@@ -48018,9 +47875,9 @@
_updateLayout(): void;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- _createIndicator(): Node;
+ _createIndicator(): BaseNode;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
_changedState(): void;
@@ -48072,10 +47929,10 @@
*
* @zh
* 目标对象。
*/
- get target(): Node | null;
- set target(value: Node | null);
+ get target(): BaseNode | null;
+ set target(value: BaseNode | null);
/**
* @en
* The 3D camera representing the original coordinate system.
*
@@ -48111,9 +47968,9 @@
* @zh
* 映射数据事件。回调的第一个参数是映射后的本地坐标,第二个是距相机距离比。
*/
syncEvents: EventHandler[];
- protected _target: Node | null;
+ protected _target: BaseNode | null;
protected _camera: Camera | null;
protected _useScale: boolean;
protected _distance: number;
protected _transformPos: math.Vec3;
@@ -48197,9 +48054,9 @@
init(): void;
add(widget: Widget): void;
remove(widget: Widget): void;
onResized(): void;
- refreshWidgetOnResized(node: Node): void;
+ refreshWidgetOnResized(node: BaseNode): void;
updateOffsetsToStayPut(widget: Widget, e?: __private._cocos_ui_widget__AlignFlags | undefined): void;
updateAlignment: typeof __private._cocos_ui_widget_manager__updateAlignment;
AlignMode: typeof __private._cocos_ui_widget__AlignMode;
AlignFlags: typeof __private._cocos_ui_widget__AlignFlags;
@@ -48574,9 +48431,9 @@
/**
* @en Controller model
* @zh Controller模型
*/
- model: Node | null;
+ model: BaseNode | null;
/**
* @en Handle events
* @zh 手柄事件
*/
@@ -48589,9 +48446,9 @@
/**
* @en The attached node
* @zh 被附着者节点
*/
- attachNode: Node | null;
+ attachNode: BaseNode | null;
/**
* @en Whether to force grab
* @zh 是否强制抓取
*/
@@ -48934,25 +48791,25 @@
setValue(value: unknown): void;
getValue?(): unknown;
};
export class _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriterInternal<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName> implements _cocos_core_animation_tracks_track__RuntimeBinding {
- protected _node: Node;
+ protected _node: BaseNode;
protected _property: P;
protected _propertyBlendState: _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendStateTypeMap<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>>[P];
protected _host: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriterHost;
protected _constants: boolean;
- constructor(_node: Node, _property: P, _propertyBlendState: _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendStateTypeMap<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>>[P], _host: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriterHost, _constants: boolean);
- get node(): Node;
+ constructor(_node: BaseNode, _property: P, _propertyBlendState: _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendStateTypeMap<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>>[P], _host: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriterHost, _constants: boolean);
+ get node(): BaseNode;
get property(): P;
- getValue(): Node[P];
+ getValue(): BaseNode[P];
setValue(value: _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendStateTypeMap<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>>[P]["result"]): void;
}
export type _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriter<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName> = Omit<_cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriterInternal<P>, "node" | "property">;
export abstract class _cocos_3d_skeletal_animation_skeletal_animation_blending__NodeBlendState<TVec3PropertyBlendState extends _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, TQuatPropertyBlendState extends _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>> {
get empty(): boolean;
- refProperty<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>(node: Node, property: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName): _cocos_3d_skeletal_animation_skeletal_animation_blending__NodeBlendState<TVec3PropertyBlendState, TQuatPropertyBlendState>["_properties"][P];
+ refProperty<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>(node: BaseNode, property: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName): _cocos_3d_skeletal_animation_skeletal_animation_blending__NodeBlendState<TVec3PropertyBlendState, TQuatPropertyBlendState>["_properties"][P];
deRefProperty(property: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName): void;
- apply(node: Node): void;
+ apply(node: BaseNode): void;
protected _transformApplyFlags: number;
protected _properties: {
position?: TVec3PropertyBlendState;
rotation?: TQuatPropertyBlendState;
@@ -48962,22 +48819,22 @@
protected abstract _createVec3BlendState(currentValue: Readonly<math.Vec3>): TVec3PropertyBlendState;
protected abstract _createQuatBlendState(currentValue: Readonly<math.Quat>): TQuatPropertyBlendState;
}
export abstract class _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateBuffer<TNodeBlendState extends _cocos_3d_skeletal_animation_skeletal_animation_blending__NodeBlendState<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>> = _cocos_3d_skeletal_animation_skeletal_animation_blending__NodeBlendState<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>>> {
- protected _nodeBlendStates: Map<Node, TNodeBlendState>;
- createWriter<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>(node: Node, property: P, host: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriterHost, constants: boolean): _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriter<P>;
+ protected _nodeBlendStates: Map<BaseNode, TNodeBlendState>;
+ createWriter<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>(node: BaseNode, property: P, host: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriterHost, constants: boolean): _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriter<P>;
destroyWriter<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>(writer: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriter<P>): void;
- ref<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>(node: Node, property: P): _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendStateTypeMap<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>>[P];
- deRef(node: Node, property: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName): void;
+ ref<P extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>(node: BaseNode, property: P): _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendStateTypeMap<_cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Vec3>, _cocos_3d_skeletal_animation_skeletal_animation_blending__PropertyBlendState<math.Quat>>[P];
+ deRef(node: BaseNode, property: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName): void;
apply(): void;
protected abstract createNodeBlendState(): TNodeBlendState;
}
export type _cocos_core_animation_pose_output__Pose = _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateBuffer;
export class _cocos_core_animation_pose_output__PoseOutput {
weight: number;
constructor(pose: _cocos_core_animation_pose_output__Pose);
destroy(): void;
- createPoseWriter(node: Node, property: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName, constants: boolean): _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriter<_cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>;
+ createPoseWriter(node: BaseNode, property: _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName, constants: boolean): _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateWriter<_cocos_3d_skeletal_animation_skeletal_animation_blending__BlendingPropertyName>;
}
/**
* Composite of track path and value proxy.
* Not exposed to external. If there is any reason it should be exposed,
@@ -49115,9 +48972,9 @@
constructor(_curves: RealCurve[]);
evaluate(time: number, _runtimeBinding: _cocos_core_animation_tracks_track__RuntimeBinding): number[];
}
export class _editor_src_marionette_preview__AnimationGraphPartialPreviewer {
- constructor(root: Node);
+ constructor(root: BaseNode);
destroy(): void;
evaluate(): void;
addVariable(id: string, type: animation.VariableType, value: animation.Value): void;
removeVariable(id: string): void;
@@ -50358,9 +50215,9 @@
get shaders(): gfx.Shader[];
model: renderer.scene.Model | null;
texture: gfx.Texture | null;
sampler: gfx.Sampler | null;
- useLocalData: Node | null;
+ useLocalData: BaseNode | null;
isStatic: boolean;
textureHash: number;
samplerHash: number;
destroy(ui: _cocos_2d_renderer_i_batcher__IBatcher): void;
@@ -50375,25 +50232,25 @@
device: gfx.Device;
initialize(): boolean;
destroy(): any;
addScreen(comp: RenderRoot2D): any;
- getFirstRenderCamera(node: Node): renderer.scene.Camera | null;
+ getFirstRenderCamera(node: BaseNode): renderer.scene.Camera | null;
removeScreen(comp: RenderRoot2D): any;
sortScreens(): any;
update(): any;
uploadBuffers(): any;
reset(): any;
switchBufferAccessor(attributes?: gfx.Attribute[]): _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
- commitComp(comp: UIRenderer, renderData: BaseRenderData | null, frame: _cocos_core_assets_texture_base__TextureBase | SpriteFrame | null, assembler: any, transform: Node | null): any;
+ commitComp(comp: UIRenderer, renderData: BaseRenderData | null, frame: _cocos_core_assets_texture_base__TextureBase | SpriteFrame | null, assembler: any, transform: BaseNode | null): any;
commitModel(comp: UIMeshRenderer | UIRenderer, model: renderer.scene.Model | null, mat: Material | null): any;
setupStaticBatch(staticComp: UIStaticBatch, bufferAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor): any;
endStaticBatch(): any;
commitStaticBatch(comp: UIStaticBatch): any;
autoMergeBatches(renderComp?: UIRenderer): any;
forceMergeBatches(material: Material, frame: _cocos_core_assets_texture_base__TextureBase | SpriteFrame | null, renderComp: UIRenderer): any;
finishMergeBatches(): any;
flushMaterial(mat: Material): any;
- walk(node: Node, level?: number): any;
+ walk(node: BaseNode, level?: number): any;
}
export enum _cocos_2d_renderer_render_entity__MaskMode {
NONE = 0,
MASK = 1,
@@ -50418,10 +50275,10 @@
get sampler(): gfx.Sampler | null;
set sampler(sampler: gfx.Sampler | null);
get model(): renderer.scene.Model | null;
set model(model: renderer.scene.Model | null);
- get subNode(): Node;
- set subNode(node: Node);
+ get subNode(): BaseNode;
+ set subNode(node: BaseNode);
changeMeshBuffer(): any;
setRender2dBufferToNative(data: _types_globals__TypedArray): any;
syncSharedBufferToNative(data: _types_globals__TypedArray): any;
getAttrSharedBufferForJS(): ArrayBufferLike;
@@ -50432,10 +50289,10 @@
setDynamicRenderDrawInfo(drawInfo: _cocos_2d_renderer_native_2d__NativeRenderDrawInfo, index: number): any;
removeDynamicRenderDrawInfo(): any;
clearDynamicRenderDrawInfos(): any;
clearStaticRenderDrawInfos(): any;
- get node(): Node | null;
- set node(node: Node | null);
+ get node(): BaseNode | null;
+ set node(node: BaseNode | null);
get stencilStage(): number;
set stencilStage(stage: number);
get staticDrawInfoSize(): number;
set staticDrawInfoSize(size: number);
@@ -50468,9 +50325,9 @@
protected _stride: number;
protected _useLocal: boolean;
protected _model: renderer.scene.Model | null;
protected _drawInfoType: _cocos_2d_renderer_render_draw_info__RenderDrawInfoType;
- protected _subNode: Node | null;
+ protected _subNode: BaseNode | null;
protected _nativeObj: _cocos_2d_renderer_native_2d__NativeRenderDrawInfo;
protected _uint8SharedBuffer: Uint8Array;
protected _uint16SharedBuffer: Uint16Array;
protected _uint32SharedBuffer: Uint32Array;
@@ -50497,9 +50354,9 @@
setTexture(texture: gfx.Texture | null): void;
setSampler(sampler: gfx.Sampler | null): void;
setModel(model: renderer.scene.Model): void;
setDrawInfoType(drawInfoType: _cocos_2d_renderer_render_draw_info__RenderDrawInfoType): void;
- setSubNode(node: Node): void;
+ setSubNode(node: BaseNode): void;
setStride(stride: number): void;
initRender2dBuffer(): void;
fillRender2dBuffer(vertexDataArr: IRenderData[]): void;
}
@@ -50508,9 +50365,9 @@
DYNAMIC = 1,
CROSSED = 2
}
export class _cocos_2d_renderer_render_entity__RenderEntity {
- protected _node: Node | null;
+ protected _node: BaseNode | null;
protected _stencilStage: _cocos_2d_renderer_stencil_manager__Stage;
protected _useLocal: boolean;
protected _maskMode: _cocos_2d_renderer_render_entity__MaskMode;
protected _floatSharedBuffer: Float32Array;
@@ -50538,9 +50395,9 @@
clearStaticRenderDrawInfos(): void;
setDynamicRenderDrawInfo(renderDrawInfo: _cocos_2d_renderer_render_draw_info__RenderDrawInfo | null, index: number): void;
setMaskMode(mode: _cocos_2d_renderer_render_entity__MaskMode): void;
getStaticRenderDrawInfo(): _cocos_2d_renderer_render_draw_info__RenderDrawInfo | null;
- setNode(node: Node | null): void;
+ setNode(node: BaseNode | null): void;
setStencilStage(stage: _cocos_2d_renderer_stencil_manager__Stage): void;
setUseLocal(useLocal: boolean): void;
}
/**
@@ -50578,9 +50435,9 @@
*/
IMAGE_STENCIL = 3
}
export interface _cocos_2d_components_rich_text__ISegment {
- node: Node;
+ node: BaseNode;
comp: Label | Sprite | null;
lineCount: number;
styleIndex: number;
imageOffset: string;
@@ -50831,9 +50688,9 @@
syncMeshBuffersToNative(accId: number, buffers: _cocos_2d_renderer_native_2d__NativeUIMeshBuffer[]): any;
update(): any;
uploadBuffers(): any;
reset(): any;
- syncRootNodesToNative(nodes: Node[]): any;
+ syncRootNodesToNative(nodes: BaseNode[]): any;
releaseDescriptorSetCache(texture: gfx.Texture, sampler: gfx.Sampler): any;
}
export class _cocos_2d_utils_dynamic_atlas_atlas__DynamicAtlasTexture extends Texture2D {
/**
@@ -51184,9 +51041,9 @@
* @param skinningRoot @en The skinning root of the skeleton @zh 骨骼的蒙皮根节点
* @param mesh @en The mesh @zh 蒙皮网格
* @returns void
*/
- bindSkeleton(skeleton?: Skeleton | null, skinningRoot?: Node | null, mesh?: Mesh | null): void;
+ bindSkeleton(skeleton?: Skeleton | null, skinningRoot?: BaseNode | null, mesh?: Mesh | null): void;
/**
* @en Update world transform and bounding boxes for the model
* @zh 更新模型的世界矩阵和包围盒
* @param stamp @en The update time stamp @zh 更新的时间戳
@@ -51243,9 +51100,9 @@
*/
uploadedAnim: AnimationClip | null | undefined;
constructor();
destroy(): void;
- bindSkeleton(skeleton?: Skeleton | null, skinningRoot?: Node | null, mesh?: Mesh | null): void;
+ bindSkeleton(skeleton?: Skeleton | null, skinningRoot?: BaseNode | null, mesh?: Mesh | null): void;
updateTransform(stamp: number): void;
updateUBOs(stamp: number): boolean;
getMacroPatches(subModelIndex: number): renderer.IMacroPatch[] | null;
/**
@@ -51306,15 +51163,15 @@
export interface _cocos_core_animation_animation_clip__IAnimationEventGroup {
events: _cocos_core_animation_animation_clip__IAnimationEvent[];
}
export class _cocos_core_animation_animation_clip__EventEvaluator {
- constructor(_targetNode: Node, _ratios: readonly number[], _eventGroups: readonly _cocos_core_animation_animation_clip__IAnimationEventGroup[], _wrapMode: _cocos_core_animation_types__WrapMode);
+ constructor(_targetNode: BaseNode, _ratios: readonly number[], _eventGroups: readonly _cocos_core_animation_animation_clip__IAnimationEventGroup[], _wrapMode: _cocos_core_animation_types__WrapMode);
setWrapMode(wrapMode: _cocos_core_animation_types__WrapMode): void;
ignore(ratio: number, direction: number): void;
sample(ratio: number, direction: number, iterations: number): void;
}
export class _cocos_core_animation_animation_clip__EmbeddedPlayerEvaluation {
- constructor(embeddedPlayers: ReadonlyArray<EmbeddedPlayer>, rootNode: Node);
+ constructor(embeddedPlayers: ReadonlyArray<EmbeddedPlayer>, rootNode: BaseNode);
destroy(): void;
/**
* Evaluates the embedded players.
* @param time The time([0, clipDuration]).
@@ -51375,9 +51232,9 @@
eulerAngles: math.Vec3;
getTransform(out: math.Mat4): void;
}
export class _cocos_core_animation_animation_clip__RootMotionEvaluation {
- constructor(_rootBone: Node, _duration: number, _boneTransform: _cocos_core_animation_animation_clip__BoneTransform, _trackEvalStatuses: _cocos_core_animation_animation_clip__TrackEvalStatus[]);
+ constructor(_rootBone: BaseNode, _duration: number, _boneTransform: _cocos_core_animation_animation_clip__BoneTransform, _trackEvalStatuses: _cocos_core_animation_animation_clip__TrackEvalStatus[]);
evaluate(time: number, motionLength: number): void;
}
export class _cocos_core_animation_animation_clip__AnimationClipEvaluation {
constructor(trackEvalStatuses: _cocos_core_animation_animation_clip__TrackEvalStatus[], exoticAnimationEvaluator: _cocos_core_animation_animation_clip__ExoticAnimationEvaluator | undefined, rootMotionEvaluation: _cocos_core_animation_animation_clip__RootMotionEvaluation | undefined);
@@ -51698,9 +51555,9 @@
blend(value: Readonly<math.Quat>, weight: number): void;
reset(): void;
}
export class _cocos_3d_skeletal_animation_skeletal_animation_blending__LegacyNodeBlendState extends _cocos_3d_skeletal_animation_skeletal_animation_blending__NodeBlendState<_cocos_3d_skeletal_animation_skeletal_animation_blending__LegacyVec3PropertyBlendState, _cocos_3d_skeletal_animation_skeletal_animation_blending__LegacyQuatPropertyBlendState> {
- apply(node: Node): void;
+ apply(node: BaseNode): void;
protected _createVec3BlendState(_currentValue: Readonly<math.Vec3>): _cocos_3d_skeletal_animation_skeletal_animation_blending__LegacyVec3PropertyBlendState;
protected _createQuatBlendState(_currentValue: Readonly<math.Quat>): _cocos_3d_skeletal_animation_skeletal_animation_blending__LegacyQuatPropertyBlendState;
}
export class _cocos_3d_skeletal_animation_skeletal_animation_blending__LegacyBlendStateBuffer extends _cocos_3d_skeletal_animation_skeletal_animation_blending__BlendStateBuffer<_cocos_3d_skeletal_animation_skeletal_animation_blending__LegacyNodeBlendState> {
@@ -52409,16 +52266,16 @@
* Get joint texture for the default pose.
* @zh
* 获取默认姿势的骨骼贴图。
*/
- getDefaultPoseTexture(skeleton: Skeleton, mesh: Mesh, skinningRoot: Node): _cocos_3d_skeletal_animation_skeletal_animation_utils__IJointTextureHandle | null;
+ getDefaultPoseTexture(skeleton: Skeleton, mesh: Mesh, skinningRoot: BaseNode): _cocos_3d_skeletal_animation_skeletal_animation_utils__IJointTextureHandle | null;
/**
* @en
* Get joint texture for the specified animation clip.
* @zh
* 获取指定动画片段的骨骼贴图。
*/
- getSequencePoseTexture(skeleton: Skeleton, clip: AnimationClip, mesh: Mesh, skinningRoot: Node): _cocos_3d_skeletal_animation_skeletal_animation_utils__IJointTextureHandle | null;
+ getSequencePoseTexture(skeleton: Skeleton, clip: AnimationClip, mesh: Mesh, skinningRoot: BaseNode): _cocos_3d_skeletal_animation_skeletal_animation_utils__IJointTextureHandle | null;
releaseHandle(handle: _cocos_3d_skeletal_animation_skeletal_animation_utils__IJointTextureHandle): void;
releaseSkeleton(skeleton: Skeleton): void;
releaseAnimationClip(clip: AnimationClip): void;
}
@@ -52862,9 +52719,9 @@
/**
* @param error - null or the error info
* @param node - the created node or null
*/
- export type _cocos_core_assets_asset__CreateNodeCallback = (error: Error | null, node: Node) => void;
+ export type _cocos_core_assets_asset__CreateNodeCallback = (error: Error | null, node: BaseNode) => void;
export const _cocos_core_assets_asset__Asset_base: new (...args: any[]) => CCObject & _cocos_core_event_eventify__IEventified;
/**
* @en Array views for index buffer
* @zh 允许存储索引的数组视图。
@@ -57216,9 +57073,9 @@
*/
export class _cocos_spine_attach_util__AttachUtil {
protected _inited: boolean;
protected _skeleton: sp.spine.Skeleton | null;
- protected _skeletonNode: Node | null;
+ protected _skeletonNode: BaseNode | null;
protected _skeletonComp: sp.Skeleton | null;
constructor();
init(skeletonComp: sp.Skeleton): void;
reset(): void;
@@ -58068,10 +57925,10 @@
* @static
* @default -1
*/
static TAG_INVALID: number;
- protected originalTarget: Node | null;
- protected target: Node | null;
+ protected originalTarget: BaseNode | null;
+ protected target: BaseNode | null;
protected tag: number;
/**
* @en
* to copy object with deep copy.
@@ -58098,23 +57955,23 @@
* @zh 获取当前目标节点。
* @method getTarget
* @return {object}
*/
- getTarget(): Node | null;
+ getTarget(): BaseNode | null;
/**
* @en The action will modify the target properties.
* @zh 设置目标节点。
* @method setTarget
* @param {object} target
*/
- setTarget(target: Node): void;
+ setTarget(target: BaseNode): void;
/**
* @en get the original target.
* @zh 获取原始目标节点。
* @method getOriginalTarget
* @return {object}
*/
- getOriginalTarget(): Node | null;
+ getOriginalTarget(): BaseNode | null;
setOriginalTarget(originalTarget: any): void;
/**
* @en get tag number.
* @zh 获取用于识别动作的标签。
@@ -58181,9 +58038,9 @@
* @param {Action} action
* @param {object} target
* @param {Boolean} paused
*/
- addAction(action: _cocos_tween_actions_action__Action, target: Node, paused: boolean): void;
+ addAction(action: _cocos_tween_actions_action__Action, target: BaseNode, paused: boolean): void;
/**
* @en Removes all actions from all the targets.
* @zh 移除所有对象的所有动作。
* @method removeAllActions
@@ -58198,9 +58055,9 @@
* 属于该目标的所有的动作将被删除。
* @method removeAllActionsFromTarget
* @param {Node} target
*/
- removeAllActionsFromTarget(target: Node): void;
+ removeAllActionsFromTarget(target: BaseNode): void;
/**
* @en Removes an action given an action reference.
* @zh 移除指定的动作。
* @method removeAction
@@ -58209,38 +58066,38 @@
removeAction(action: _cocos_tween_actions_action__Action): void;
/**
* @internal
*/
- _removeActionByTag(tag: number, element: any, target?: Node): void;
+ _removeActionByTag(tag: number, element: any, target?: BaseNode): void;
/**
* @internal
*/
- _removeAllActionsByTag(tag: number, element: any, target?: Node): void;
+ _removeAllActionsByTag(tag: number, element: any, target?: BaseNode): void;
/**
* @en Removes an action given its tag and the target.
* @zh 删除指定对象下特定标签的一个动作,将删除首个匹配到的动作。
* @method removeActionByTag
* @param {Number} tag
* @param {Node} target
*/
- removeActionByTag(tag: number, target?: Node): void;
+ removeActionByTag(tag: number, target?: BaseNode): void;
/**
* @en Removes all actions given the tag and the target.
* @zh 删除指定对象下特定标签的所有动作。
* @method removeAllActionsByTag
* @param {Number} tag
* @param {Node} target
*/
- removeAllActionsByTag(tag: number, target?: Node): void;
+ removeAllActionsByTag(tag: number, target?: BaseNode): void;
/**
* @en Gets an action given its tag an a target.
* @zh 通过目标对象和标签获取一个动作。
* @method getActionByTag
* @param {Number} tag
* @param {Node} target
* @return {Action|null} return the Action with the given tag on success
*/
- getActionByTag(tag: number, target: Node): _cocos_tween_actions_action__Action | null;
+ getActionByTag(tag: number, target: BaseNode): _cocos_tween_actions_action__Action | null;
/**
* @en
* Returns the numbers of actions that are running in a certain target. <br/>
* Composable actions are counted as 1 action. <br/>
@@ -58257,23 +58114,23 @@
* @method getNumberOfRunningActionsInTarget
* @param {Node} target
* @return {Number}
*/
- getNumberOfRunningActionsInTarget(target: Node): number;
+ getNumberOfRunningActionsInTarget(target: BaseNode): number;
/**
* @en Pauses the target: all running actions and newly added actions will be paused.
* @zh 暂停指定对象:所有正在运行的动作和新添加的动作都将会暂停。
* @method pauseTarget
* @param {Node} target
*/
- pauseTarget(target: Node): void;
+ pauseTarget(target: BaseNode): void;
/**
* @en Resumes the target. All queued actions will be resumed.
* @zh 让指定目标恢复运行。在执行序列中所有被暂停的动作将重新恢复运行。
* @method resumeTarget
* @param {Node} target
*/
- resumeTarget(target: Node): void;
+ resumeTarget(target: BaseNode): void;
/**
* @en Pauses all running actions, returning a list of targets whose actions were paused.
* @zh 暂停所有正在运行的动作,返回一个包含了那些动作被暂停了的目标对象的列表。
* @method pauseAllRunningActions
@@ -59118,9 +58975,9 @@
* @zh 垂直方向
*/
VERTICAL = 1
}
- function _cocos_ui_widget_manager__updateAlignment(node: Node): void;
+ function _cocos_ui_widget_manager__updateAlignment(node: BaseNode): void;
export enum _cocos_video_video_player_enums__EventType {
/**
* @en None
* @zh 无
@@ -59185,9 +59042,9 @@
protected _waitingPlay: boolean;
protected _keepAspectRatio: boolean;
protected _component: VideoPlayer | null;
protected _uiTrans: UITransform | null;
- protected _node: Node | null;
+ protected _node: BaseNode | null;
protected _stayOnBottom: boolean;
protected _dirty: boolean;
protected _forceUpdate: boolean;
protected _w: number;
@@ -59306,9 +59163,9 @@
protected _loaded: boolean;
protected _forceUpdate: boolean;
protected _component: WebView | null;
protected _uiTrans: UITransform | null;
- protected _node: Node | null;
+ protected _node: BaseNode | null;
protected _w: number;
protected _h: number;
protected _m00: number;
protected _m01: number;
@@ -59339,8 +59196,8 @@
import { exoticAnimationTag, ExoticAnimation } from "cc/editor/exotic-animation";
import { EmbeddedPlayer, embeddedPlayerCountTag, getEmbeddedPlayersTag, addEmbeddedPlayerTag, removeEmbeddedPlayerTag, clearEmbeddedPlayersTag } from "cc/editor/embedded-player";
import { AnimationMask } from "cc/editor/new-gen-anim";
import { CCON } from "cc/editor/serialization";
- export { Canvas as CanvasComponent, UIRenderer as RenderComponent, UIRenderer as UIRenderable, UIRenderer as Renderable2D, UITransform as UITransformComponent, Mask as MaskComponent, RichText as RichTextComponent, Sprite as SpriteComponent, UIMeshRenderer as UIModelComponent, LabelOutline as LabelOutlineComponent, Graphics as GraphicsComponent, UIStaticBatch as UIStaticBatchComponent, UIOpacity as UIOpacityComponent, Label as LabelComponent, MeshRenderer as ModelComponent, DirectionalLight as DirectionalLightComponent, Light as LightComponent, SphereLight as SphereLightComponent, SpotLight as SpotLightComponent, SkinnedMeshRenderer as SkinningModelComponent, SkinnedMeshBatchRenderer as BatchedSkinningModelComponent, SkinnedMeshUnit as SkinningModelUnit, Animation as AnimationComponent, AudioSource as AudioSourceComponent, Camera as CameraComponent, ModelRenderer as RenderableComponent, Billboard as BillboardComponent, Line as LineComponent, ParticleSystem as ParticleSystemComponent, SkeletalAnimation as SkeletalAnimationComponent, Button as ButtonComponent, EditBox as EditBoxComponent, Layout as LayoutComponent, ProgressBar as ProgressBarComponent, ScrollBar as ScrollBarComponent, ScrollView as ScrollViewComponent, Slider as SliderComponent, Toggle as ToggleComponent, ToggleContainer as ToggleContainerComponent, Widget as WidgetComponent, PageView as PageViewComponent, PageViewIndicator as PageViewIndicatorComponent, SafeArea as SafeAreaComponent, UICoordinateTracker as UICoordinateTrackerComponent, BlockInputEvents as BlockInputEventsComponent } from "cc";
+ export { Canvas as CanvasComponent, UIRenderer as RenderComponent, UIRenderer as UIRenderable, UIRenderer as Renderable2D, UITransform as UITransformComponent, Mask as MaskComponent, RichText as RichTextComponent, Sprite as SpriteComponent, UIMeshRenderer as UIModelComponent, LabelOutline as LabelOutlineComponent, Graphics as GraphicsComponent, UIStaticBatch as UIStaticBatchComponent, UIOpacity as UIOpacityComponent, Label as LabelComponent, MeshRenderer as ModelComponent, DirectionalLight as DirectionalLightComponent, Light as LightComponent, SphereLight as SphereLightComponent, SpotLight as SpotLightComponent, SkinnedMeshRenderer as SkinningModelComponent, SkinnedMeshBatchRenderer as BatchedSkinningModelComponent, SkinnedMeshUnit as SkinningModelUnit, Animation as AnimationComponent, AudioSource as AudioSourceComponent, BaseNode as Node, Camera as CameraComponent, ModelRenderer as RenderableComponent, Billboard as BillboardComponent, Line as LineComponent, ParticleSystem as ParticleSystemComponent, SkeletalAnimation as SkeletalAnimationComponent, Button as ButtonComponent, EditBox as EditBoxComponent, Layout as LayoutComponent, ProgressBar as ProgressBarComponent, ScrollBar as ScrollBarComponent, ScrollView as ScrollViewComponent, Slider as SliderComponent, Toggle as ToggleComponent, ToggleContainer as ToggleContainerComponent, Widget as WidgetComponent, PageView as PageViewComponent, PageViewIndicator as PageViewIndicatorComponent, SafeArea as SafeAreaComponent, UICoordinateTracker as UICoordinateTrackerComponent, BlockInputEvents as BlockInputEventsComponent } from "cc";
import { Details as _Details, Category as _Category, PrimitiveType as _PrimitiveType } from "cc";
export {};
}
Arealy tested in develop. can merge now.
@mmyduckx please fix ci error.
@mmyduckx please fix ci error.
fixed.
Search instanceof Node globally, as it is now written in such a way that it can search for scene, which may cause problems
Search
instanceof Nodeglobally, as it is now written in such a way that it can search for scene, which may cause problems
Already check.